From c483d2e67e26cce5074df50df44e581d39db63b7 Mon Sep 17 00:00:00 2001 From: ndaelman Date: Fri, 19 Jan 2024 15:27:44 +0100 Subject: [PATCH] Soften logic to matching solely `SinglePoint` calculations --- simulationworkflownormalizer/normalizer.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/simulationworkflownormalizer/normalizer.py b/simulationworkflownormalizer/normalizer.py index d1c2329..3554fa7 100644 --- a/simulationworkflownormalizer/normalizer.py +++ b/simulationworkflownormalizer/normalizer.py @@ -19,22 +19,25 @@ from nomad.utils import get_logger from nomad.normalizing.normalizer import Normalizer from simulationworkflowschema import ( - SinglePoint, GeometryOptimization, MolecularDynamics, Phonon, - Elastic + SinglePoint, + GeometryOptimization, + MolecularDynamics, + Phonon, + Elastic, ) from nomad.datamodel import EntryArchive class SimulationWorkflowNormalizer(Normalizer): - ''' + """ This normalizer produces information specific to a simulation workflow. - ''' + """ def __init__(self, entry_archive: EntryArchive): super().__init__(entry_archive) - self._elastic_programs = ['elastic'] - self._phonon_programs = ['phonopy'] - self._molecular_dynamics_programs = ['lammps'] + self._elastic_programs = ["elastic"] + self._phonon_programs = ["phonopy"] + self._molecular_dynamics_programs = ["lammps"] def _resolve_workflow(self): if not self.entry_archive.run: @@ -65,8 +68,6 @@ def _resolve_workflow(self): # TODO decide if workflow should map to each run if len(self.entry_archive.run[-1].calculation) == 1: workflow = SinglePoint() - else: - workflow = GeometryOptimization() return workflow