Skip to content

Commit

Permalink
Soften logic to matching solely SinglePoint calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
ndaelman committed Jan 19, 2024
1 parent 19593bc commit c483d2e
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions simulationworkflownormalizer/normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit c483d2e

Please sign in to comment.