Skip to content

Commit

Permalink
Change name of interchange_meta -> mol_specs and add structure to MDT…
Browse files Browse the repository at this point in the history
…askDocument.
  • Loading branch information
orionarcher committed Sep 20, 2024
1 parent 246b478 commit 66cbfa7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
16 changes: 13 additions & 3 deletions emmet-core/emmet/core/openff/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
)
from monty.json import MSONable

from pymatgen.core import Structure
from emmet.core.vasp.task_valid import TaskState # type: ignore[import-untyped]


Expand Down Expand Up @@ -83,8 +84,17 @@ class MDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-arg]
None, description="An interchange object serialized to json."
)

interchange_meta: Optional[list[MoleculeSpec]] = Field(
None, description="Molecules within the system."
mol_specs: Optional[list[MoleculeSpec]] = Field(
None,
description="Molecules within the system. Only makes sense "
"for molecular systems.",
)

structure: Optional[Structure] = Field(
None,
title="Structure",
description="The final structure for the simulation. Saved only "
"if specified by job.",
)

force_field: Optional[str] = Field(None, description="The classical MD forcefield.")
Expand All @@ -103,6 +113,6 @@ class MDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-arg]
class ClassicalMDTaskDocument(MDTaskDocument):
"""Definition of the OpenMM task document."""

interchange_meta: Optional[list[MoleculeSpec]] = Field(
mol_specs: Optional[list[MoleculeSpec]] = Field(
None, description="Molecules within the system."
)
6 changes: 0 additions & 6 deletions emmet-core/emmet/core/openmm/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,6 @@ class OpenMMTaskDocument(MDTaskDocument):
"task document.",
)

interchange_meta: Optional[Union[list[MoleculeSpec], Structure, str]] = Field(
None,
title="Interchange meta data",
description="Metadata for the interchange",
)


class OpenMMInterchange(BaseModel):
"""An object to sit in the place of the Interchance object
Expand Down

0 comments on commit 66cbfa7

Please sign in to comment.