Skip to content

Commit

Permalink
Move basic parser out of nomad
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa committed Dec 8, 2023
1 parent af1e078 commit 475e0e3
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 27 deletions.
20 changes: 10 additions & 10 deletions atomisticparsers/amber/metainfo/amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
MSection, MCategory, Category, Package, Quantity, Section, SubSection, SectionProxy,
Reference
)
from nomad.datamodel.metainfo import simulation
import runschema
import simulationworkflowschema


Expand Down Expand Up @@ -85,7 +85,7 @@ class x_amber_section_single_configuration_calculation(MSection):
m_def = Section(validate=False)


class System(simulation.system.System):
class System(runschema.system.System):

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

Expand Down Expand Up @@ -265,7 +265,7 @@ class MolecularDynamics(simulationworkflowschema.MolecularDynamics):
''')


class AtomParameters(simulation.method.AtomParameters):
class AtomParameters(runschema.method.AtomParameters):

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

Expand All @@ -284,12 +284,12 @@ class AtomParameters(simulation.method.AtomParameters):
''')


class Interaction(simulation.method.Interaction):
class Interaction(runschema.method.Interaction):

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

x_amber_interaction_atom_to_atom_type_ref = Quantity(
type=simulation.method.AtomParameters,
type=runschema.method.AtomParameters,
shape=['number_of_atoms_per_interaction'],
description='''
Reference to the atom type of each interaction atoms.
Expand All @@ -303,7 +303,7 @@ class Interaction(simulation.method.Interaction):
''')

x_amber_pair_interaction_atom_type_ref = Quantity(
type=simulation.method.AtomParameters,
type=runschema.method.AtomParameters,
shape=['x_amber_number_of_defined_pair_interactions', 'number_of_atoms_per_interaction'],
description='''
Reference to the atom type for pair interactions.
Expand All @@ -317,7 +317,7 @@ class Interaction(simulation.method.Interaction):
''')

x_amber_molecule_interaction_atom_to_atom_type_ref = Quantity(
type=simulation.method.AtomParameters,
type=runschema.method.AtomParameters,
shape=['number_of_atoms_per_interaction'],
description='''
Reference to the atom type of each molecule interaction atoms.
Expand All @@ -338,14 +338,14 @@ class Interaction(simulation.method.Interaction):
''')

x_amber_pair_molecule_interaction_to_atom_type_ref = Quantity(
type=simulation.method.AtomParameters,
type=runschema.method.AtomParameters,
shape=['x_amber_number_of_defined_pair_interactions', 'number_of_atoms_per_interaction'],
description='''
Reference to the atom type for pair interactions within a molecule.
''')


class Run(simulation.run.Run):
class Run(runschema.run.Run):

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

Expand Down Expand Up @@ -431,7 +431,7 @@ class Run(simulation.run.Run):
repeats=False)


class Calculation(simulation.calculation.Calculation):
class Calculation(runschema.calculation.Calculation):

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

Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/amber/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#

from nomad.units import ureg
from nomad.parsing.file_parser import BasicParser
from simulationparsers.utils import BasicParser


class AmberParser:
Expand Down
20 changes: 10 additions & 10 deletions atomisticparsers/gromos/metainfo/gromos.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
MSection, MCategory, Category, Package, Quantity, Section, SubSection, SectionProxy,
Reference
)
from nomad.datamodel.metainfo import simulation
import runschema
import simulationworkflowschema


Expand Down Expand Up @@ -1290,7 +1290,7 @@ class x_gromos_section_single_configuration_calculation(MSection):
m_def = Section(validate=False)


class System(simulation.system.System):
class System(runschema.system.System):

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

Expand Down Expand Up @@ -1484,7 +1484,7 @@ class MolecularDynamics(simulationworkflowschema.MolecularDynamics):
''')


class AtomParameters(simulation.method.AtomParameters):
class AtomParameters(runschema.method.AtomParameters):

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

Expand Down Expand Up @@ -1531,12 +1531,12 @@ class AtomParameters(simulation.method.AtomParameters):
''')


class Interaction(simulation.method.Interaction):
class Interaction(runschema.method.Interaction):

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

x_gromos_interaction_atom_to_atom_type_ref = Quantity(
type=simulation.method.AtomParameters,
type=runschema.method.AtomParameters,
shape=['number_of_atoms_per_interaction'],
description='''
Reference to the atom type of each interaction atoms.
Expand All @@ -1550,7 +1550,7 @@ class Interaction(simulation.method.Interaction):
''')

x_gromos_pair_interaction_atom_type_ref = Quantity(
type=simulation.method.AtomParameters,
type=runschema.method.AtomParameters,
shape=['x_gromos_number_of_defined_pair_interactions', 'number_of_atoms_per_interaction'],
description='''
Reference to the atom type for pair interactions.
Expand All @@ -1564,7 +1564,7 @@ class Interaction(simulation.method.Interaction):
''')

x_gromos_molecule_interaction_atom_to_atom_type_ref = Quantity(
type=simulation.method.AtomParameters,
type=runschema.method.AtomParameters,
shape=['number_of_atoms_per_interaction'],
description='''
Reference to the atom type of each molecule interaction atoms.
Expand All @@ -1585,14 +1585,14 @@ class Interaction(simulation.method.Interaction):
''')

x_gromos_pair_molecule_interaction_to_atom_type_ref = Quantity(
type=simulation.method.AtomParameters,
type=runschema.method.AtomParameters,
shape=['x_gromos_number_of_defined_pair_interactions', 'number_of_atoms_per_interaction'],
description='''
Reference to the atom type for pair interactions within a molecule.
''')


class Run(simulation.run.Run):
class Run(runschema.run.Run):

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

Expand Down Expand Up @@ -1748,7 +1748,7 @@ class Run(simulation.run.Run):
repeats=True)


class Calculation(simulation.calculation.Calculation):
class Calculation(runschema.calculation.Calculation):

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

Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/gromos/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import re

from nomad.units import ureg
from nomad.parsing.file_parser import BasicParser
from simulationparsers.utils import BasicParser


class GromosParser:
Expand Down
8 changes: 4 additions & 4 deletions atomisticparsers/libatoms/metainfo/lib_atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
MSection, MCategory, Category, Package, Quantity, Section, SubSection, SectionProxy,
Reference
)
from nomad.datamodel.metainfo import simulation
import runschema


m_package = Package()
Expand All @@ -36,7 +36,7 @@ class x_lib_atoms_section_gap(MSection):
m_def = Section(validate=False)

x_lib_atoms_training_config_refs = Quantity(
type=simulation.calculation.Calculation,
type=runschema.calculation.Calculation,
shape=['n_sparseX'],
description='''
References to frames in training configuration.
Expand Down Expand Up @@ -190,7 +190,7 @@ class x_lib_atoms_section_gap(MSection):
''')


class Run(simulation.run.Run):
class Run(runschema.run.Run):

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

Expand All @@ -199,7 +199,7 @@ class Run(simulation.run.Run):
repeats=False)


class Calculation(simulation.calculation.Calculation):
class Calculation(runschema.calculation.Calculation):

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

Expand Down
2 changes: 1 addition & 1 deletion atomisticparsers/libatoms/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# limitations under the License.
#

from nomad.parsing.file_parser import BasicParser
from simulationparsers.utils import BasicParser
from nomad.units import ureg


Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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",
"nomad-schema-plugin-run@git+https://github.com/nomad-coe/nomad-schema-plugin-run.git@develop",
i "simulationparsers@git+https://github.com/nomad-coe/simulation-parsers.git@develop",
'lxml==4.7.1',
'MDAnalysis',
'panedr==0.2',
Expand Down

0 comments on commit 475e0e3

Please sign in to comment.