Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed Feb 9, 2024
1 parent 9d90031 commit 8d2e778
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions simulationdataschema/model_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def resolve_analyzed_atomic_cell(

atomic_cell = AtomicCell(type=cell_type)
atomic_cell.lattice_vectors = cell * ureg.angstrom
atomic_cell.positions = positions * ureg.angstrom
atomic_cell.positions = positions * ureg.angstrom # ? why do we need to pass units
atomic_cell.labels = labels
atomic_cell.atomic_numbers = atomic_numbers
atomic_cell.wyckoff_letters = wyckoff
Expand Down Expand Up @@ -485,9 +485,7 @@ def resolve_bulk_symmetry(
symmetry.get("space_group_number"), norm_wyckoff
)
strukturbericht = aflow_prototype.get("Strukturbericht Designation")
if strukturbericht == "None":
strukturbericht = None
else:
if strukturbericht != "None":
strukturbericht = re.sub("[$_{}]", "", strukturbericht)
prototype_aflow_id = aflow_prototype.get("aflow_prototype_id")
prototype_formula = aflow_prototype.get("Prototype")
Expand Down
8 changes: 4 additions & 4 deletions simulationdataschema/model_system_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@ def resolve_analyzed_atomic_cell(

atomic_cell = AtomicCell(type=cell_type)
atomic_cell.lattice_vectors = cell * ureg.angstrom
atomic_cell.positions = positions * ureg.angstrom
atomic_cell.positions = (
positions * ureg.angstrom
) # ? why do we need to pass units
atomic_cell.labels = labels
atomic_cell.atomic_numbers = atomic_numbers
atomic_cell.wyckoff_letters = wyckoff
Expand Down Expand Up @@ -485,9 +487,7 @@ def resolve_bulk_symmetry(
symmetry.get("space_group_number"), norm_wyckoff
)
strukturbericht = aflow_prototype.get("Strukturbericht Designation")
if strukturbericht == "None":
strukturbericht = None
else:
if strukturbericht != "None":
strukturbericht = re.sub("[$_{}]", "", strukturbericht)
prototype_aflow_id = aflow_prototype.get("aflow_prototype_id")
prototype_formula = aflow_prototype.get("Prototype")
Expand Down

0 comments on commit 8d2e778

Please sign in to comment.