Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soften logic to matching solely SinglePoint calculations #1

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading