Skip to content

Commit

Permalink
Remove workflow schema from nomad (#78)
Browse files Browse the repository at this point in the history
* Remove references to old workflow schema in nomad

* Add schema dependency

* Fix defs
  • Loading branch information
ladinesa authored Dec 6, 2023
1 parent ddb6997 commit 0e51245
Show file tree
Hide file tree
Showing 20 changed files with 35 additions and 25 deletions.
3 changes: 2 additions & 1 deletion atomisticparsers/amber/metainfo/amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Reference
)
from nomad.datamodel.metainfo import simulation
import simulationworkflowschema


m_package = Package()
Expand Down Expand Up @@ -169,7 +170,7 @@ class System(simulation.system.System):
''')


class MolecularDynamics(simulation.workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True)

Expand Down
6 changes: 3 additions & 3 deletions atomisticparsers/asap/metainfo/asap.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
MSection, MCategory, Category, Package, Quantity, Section, SubSection, SectionProxy,
Reference
)
from nomad.datamodel.metainfo.simulation import workflow
import simulationworkflowschema


m_package = Package()


class MolecularDynamics(workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True)

Expand All @@ -54,7 +54,7 @@ class MolecularDynamics(workflow.MolecularDynamics):
''')


class GeometryOptimization(workflow.GeometryOptimization):
class GeometryOptimization(simulationworkflowschema.GeometryOptimization):

m_def = Section(validate=False, extends_base_section=True)

Expand Down
4 changes: 2 additions & 2 deletions atomisticparsers/asap/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
from nomad.datamodel.metainfo.simulation.run import Run, Program
from nomad.datamodel.metainfo.simulation.method import (
Method, ForceField, Model)
from nomad.datamodel.metainfo.simulation.workflow import (
GeometryOptimization, GeometryOptimizationMethod,
from simulationworkflowschema import (
GeometryOptimization, GeometryOptimizationMethod
)
from atomisticparsers.utils import MDParser
from .metainfo.asap import MolecularDynamics # pylint: disable=unused-import
Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/bopfox/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Calculation, Energy, EnergyEntry, Forces, ForcesEntry, Stress, StressEntry, Charges,
ChargesValue
)
from nomad.datamodel.metainfo.simulation.workflow import (
from simulationworkflowschema import (
GeometryOptimization, GeometryOptimizationMethod, SinglePoint
)
from atomisticparsers.utils import MDParser
Expand Down
3 changes: 2 additions & 1 deletion atomisticparsers/dlpoly/metainfo/dl_poly.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Reference, JSON
)
from nomad.datamodel.metainfo import simulation
import simulationworkflowschema


m_package = Package()
Expand Down Expand Up @@ -69,7 +70,7 @@ class x_dl_poly_section_md_topology(MSection):
repeats=True)


class MolecularDynamics(simulation.workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True)

Expand Down
3 changes: 2 additions & 1 deletion atomisticparsers/gromacs/metainfo/gromacs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
MSection, MCategory, Category, Package, Quantity, Section, SubSection, SectionProxy
)
from nomad.datamodel.metainfo import simulation
import simulationworkflowschema


m_package = Package()
Expand Down Expand Up @@ -1572,7 +1573,7 @@ class System(simulation.system.System):
''',)


class MolecularDynamics(simulation.workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True,)

Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/gromacs/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from nomad.datamodel.metainfo.simulation.system import (
AtomsGroup
)
from nomad.datamodel.metainfo.simulation.workflow import (
from simulationworkflowschema import (
GeometryOptimization, GeometryOptimizationMethod, GeometryOptimizationResults
)
from .metainfo.gromacs import x_gromacs_section_control_parameters, x_gromacs_section_input_output_files
Expand Down
3 changes: 2 additions & 1 deletion atomisticparsers/gromos/metainfo/gromos.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Reference
)
from nomad.datamodel.metainfo import simulation
import simulationworkflowschema


m_package = Package()
Expand Down Expand Up @@ -1388,7 +1389,7 @@ class System(simulation.system.System):
''')


class MolecularDynamics(simulation.workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True)

Expand Down
5 changes: 3 additions & 2 deletions atomisticparsers/gulp/metainfo/gulp.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
Reference
)
from nomad.datamodel.metainfo import simulation
import simulationworkflowschema


m_package = Package()
Expand Down Expand Up @@ -827,7 +828,7 @@ class Calculation(simulation.calculation.Calculation):
x_gulp_bulk_optimisation = SubSection(sub_section=x_gulp_bulk_optimisation.m_def)


class ElasticResults(simulation.workflow.ElasticResults):
class ElasticResults(simulationworkflowschema.ElasticResults):

m_def = Section(validate=False, extends_base_section=True)

Expand Down Expand Up @@ -909,7 +910,7 @@ class ElasticResults(simulation.workflow.ElasticResults):
''')


class MolecularDynamics(simulation.workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True)

Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/gulp/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from nomad.datamodel.metainfo.simulation.calculation import (
Calculation, Energy, EnergyEntry
)
from nomad.datamodel.metainfo.simulation.workflow import (
from simulationworkflowschema import (
Elastic, ElasticMethod, ElasticResults, MolecularDynamics, MolecularDynamicsMethod
)
from atomisticparsers.gulp.metainfo.gulp import x_gulp_bulk_optimisation, x_gulp_bulk_optimisation_cycle
Expand Down
3 changes: 2 additions & 1 deletion atomisticparsers/lammps/metainfo/lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Reference
)
from nomad.datamodel.metainfo import simulation
import simulationworkflowschema


m_package = Package()
Expand Down Expand Up @@ -99,7 +100,7 @@ class System(simulation.system.System):
''')


class MolecularDynamics(simulation.workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True)

Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/lammps/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from nomad.datamodel.metainfo.simulation.system import (
AtomsGroup
)
from nomad.datamodel.metainfo.simulation.workflow import (
from simulationworkflowschema import (
GeometryOptimization, GeometryOptimizationMethod, GeometryOptimizationResults
)
from .metainfo.lammps import x_lammps_section_input_output_files, x_lammps_section_control_parameters
Expand Down
3 changes: 2 additions & 1 deletion atomisticparsers/namd/metainfo/namd.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Reference, JSON
)
from nomad.datamodel.metainfo import simulation
import simulationworkflowschema


m_package = Package()
Expand Down Expand Up @@ -1006,7 +1007,7 @@ class System(simulation.system.System):
''')


class MolecularDynamics(simulation.workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True)

Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/namd/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from nomad.parsing.file_parser import TextParser, Quantity
from nomad.datamodel.metainfo.simulation.run import Run, Program
from nomad.datamodel.metainfo.simulation.method import Method
from nomad.datamodel.metainfo.simulation.workflow import MolecularDynamics
from simulationworkflowschema import MolecularDynamics
from atomisticparsers.utils import MDAnalysisParser, MDParser
from .metainfo import m_env # pylint: disable=unused-import

Expand Down
5 changes: 3 additions & 2 deletions atomisticparsers/tinker/metainfo/tinker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Reference, JSON
)
from nomad.datamodel.metainfo import simulation
import simulationworkflowschema


m_package = Package()
Expand Down Expand Up @@ -778,7 +779,7 @@ class System(simulation.system.System):
''')


class MolecularDynamics(simulation.workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True)

Expand Down Expand Up @@ -872,7 +873,7 @@ class MolecularDynamics(simulation.workflow.MolecularDynamics):
''')


class GeometryOptimization(simulation.workflow.GeometryOptimization):
class GeometryOptimization(simulationworkflowschema.GeometryOptimization):

m_def = Section(validate=False, extends_base_section=True)

Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/tinker/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from nomad.datamodel.metainfo.simulation.calculation import (
Calculation, Energy, EnergyEntry, VibrationalFrequencies
)
from nomad.datamodel.metainfo.simulation.workflow import (
from simulationworkflowschema import (
GeometryOptimization, GeometryOptimizationMethod
)
from atomisticparsers.utils import MDAnalysisParser, MDParser
Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/utils/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from nomad.datamodel.metainfo.simulation.run import Run
from nomad.datamodel.metainfo.simulation.system import System
from nomad.datamodel.metainfo.simulation.calculation import Calculation
from nomad.datamodel.metainfo.simulation.workflow import MolecularDynamics
from simulationworkflowschema import MolecularDynamics
from nomad.datamodel.metainfo.simulation.method import Interaction


Expand Down
5 changes: 3 additions & 2 deletions atomisticparsers/xtb/metainfo/xtb.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Package, Quantity, Section, SubSection, JSON
)
from nomad.datamodel.metainfo import simulation
import simulationworkflowschema


m_package = Package()
Expand Down Expand Up @@ -87,7 +88,7 @@ class MultipolesEntry(simulation.calculation.MultipolesEntry):
''')


class GeometryOptimization(simulation.workflow.GeometryOptimization):
class GeometryOptimization(simulationworkflowschema.GeometryOptimization):

m_def = Section(validate=False, extends_base_section=True)

Expand Down Expand Up @@ -146,7 +147,7 @@ class GeometryOptimization(simulation.workflow.GeometryOptimization):
''')


class MolecularDynamics(simulation.workflow.MolecularDynamics):
class MolecularDynamics(simulationworkflowschema.MolecularDynamics):

m_def = Section(validate=False, extends_base_section=True)

Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/xtb/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from nomad.datamodel.metainfo.simulation.calculation import (
Calculation, ScfIteration, Energy, EnergyEntry, BandEnergies, Multipoles, MultipolesEntry
)
from nomad.datamodel.metainfo.simulation.workflow import (
from simulationworkflowschema import (
SinglePoint, GeometryOptimization, GeometryOptimizationMethod
)
from atomisticparsers.utils import MDParser
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ authors = [{ name = "The NOMAD Authors" }]
license = { file = "LICENSE" }
dependencies = [
'nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop',
"nomad-schema-plugin-simulation-workflow@git+https://github.com/nomad-coe/nomad-schema-plugin-simulation-workflow.git@develop",
'lxml==4.7.1',
'MDAnalysis',
'panedr==0.2',
Expand Down

0 comments on commit 0e51245

Please sign in to comment.