Skip to content

Commit

Permalink
Added conversion to nomad atoms
Browse files Browse the repository at this point in the history
  • Loading branch information
hampusnasstrom committed Nov 6, 2024
1 parent e084cda commit 9940683
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/perovskite_solar_cell_database/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def to_topology_system(self) -> System:
Returns:
System: The system object.
"""
atoms=optimize_molecule(self.smiles)
ase_atoms = optimize_molecule(self.smiles)
atoms = nomad_atoms_from_ase_atoms(ase_atoms)
structural_type = 'molecule'
if len(atoms) == 1:
structural_type = 'atom'
Expand Down Expand Up @@ -851,7 +852,7 @@ def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:

# topology contains an extra parent
if len(sub_systems) == len(material.topology) - 1:
for i in range(len(self.ions)):
for i in range(len(sub_systems)):
material.topology[i + 1].chemical_formula_descriptive = self.ions[
i
].name
Expand Down

0 comments on commit 9940683

Please sign in to comment.