diff --git a/src/nomad_simulations/schema_packages/model_system.py b/src/nomad_simulations/schema_packages/model_system.py index 68173b6f..5363b6df 100644 --- a/src/nomad_simulations/schema_packages/model_system.py +++ b/src/nomad_simulations/schema_packages/model_system.py @@ -1,4 +1,5 @@ import re +import sys from typing import TYPE_CHECKING, Optional import ase @@ -1304,11 +1305,16 @@ def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None: sec_symmetry = self.m_create(Symmetry) sec_symmetry.normalize(archive, logger) + print(self.model_system) + print(self.cell[0]) + print(self.cell[0].particles_state[0].particle_type) + sys.exit() # Creating and normalizing ChemicalFormula section - # TODO add support for fractional formulas (possibly add `AtomicCell.concentrations` for each species) - sec_chemical_formula = self.m_create(ChemicalFormula) - sec_chemical_formula.normalize(archive, logger) - if sec_chemical_formula.m_cache: - self.elemental_composition = sec_chemical_formula.m_cache.get( - 'elemental_composition', [] - ) + if self.cell[0].name == 'AtomicCell': + # TODO add support for fractional formulas (possibly add `AtomicCell.concentrations` for each species) + sec_chemical_formula = self.m_create(ChemicalFormula) + sec_chemical_formula.normalize(archive, logger) + if sec_chemical_formula.m_cache: + self.elemental_composition = sec_chemical_formula.m_cache.get( + 'elemental_composition', [] + )