From 9b77213960bfcb7b894dd3af0b60bd5855778707 Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 13:56:37 -0400 Subject: [PATCH 01/17] Refine and organize the core schema for the openmm and openff atomate2 workflows --- emmet-core/emmet/core/classical_md.py | 74 ------ .../emmet/core/classical_md/__init__.py | 1 - .../core/classical_md/openmm/__init__.py | 6 - .../emmet/core/classical_md/openmm/tasks.py | 235 ------------------ emmet-core/emmet/core/openff/__init__.py | 5 + emmet-core/emmet/core/openff/core.py | 9 + .../core/{classical_md => openff}/tasks.py | 22 +- emmet-core/emmet/core/openmm/__init__.py | 7 + emmet-core/emmet/core/openmm/tasks.py | 115 +++++++-- emmet-core/requirements/deployment.txt | 68 +++-- .../{classical_md => }/openmm_md/__init__.py | 0 11 files changed, 163 insertions(+), 379 deletions(-) delete mode 100644 emmet-core/emmet/core/classical_md.py delete mode 100644 emmet-core/emmet/core/classical_md/__init__.py delete mode 100644 emmet-core/emmet/core/classical_md/openmm/__init__.py delete mode 100644 emmet-core/emmet/core/classical_md/openmm/tasks.py create mode 100644 emmet-core/emmet/core/openff/__init__.py create mode 100644 emmet-core/emmet/core/openff/core.py rename emmet-core/emmet/core/{classical_md => openff}/tasks.py (78%) rename emmet-core/tests/{classical_md => }/openmm_md/__init__.py (100%) diff --git a/emmet-core/emmet/core/classical_md.py b/emmet-core/emmet/core/classical_md.py deleted file mode 100644 index f03e5e9be9..0000000000 --- a/emmet-core/emmet/core/classical_md.py +++ /dev/null @@ -1,74 +0,0 @@ -"""Schemas for classical MD package.""" - -from __future__ import annotations - -from dataclasses import dataclass -from datetime import datetime -from typing import Optional - -from monty.json import MSONable - -from emmet.core.vasp.task_valid import TaskState -from pydantic import BaseModel, Field - - -@dataclass -class MoleculeSpec(MSONable): - """A molecule schema to be output by OpenMMGenerators.""" - - name: str - count: int - formal_charge: int - charge_method: str - openff_mol: str # a tk.Molecule object serialized with to_json - - # @field_validator("openff_mol") - # @classmethod - # def _validate_openff_mol(cls, v: str) -> str: - # try: - # tk.Molecule.from_json(v) - # except Exception as e: - # raise ValueError( - # "MoleculeSpec.openff_mol must be able to be" - # "parsed with Molecule.from_json." - # ) from e - # return v - - -class ClassicalMDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-arg] - """Definition of the OpenMM task document.""" - - tags: Optional[list[str]] = Field( - [], title="tag", description="Metadata tagged to a given task." - ) - dir_name: Optional[str] = Field( - None, description="The directory for this VASP task" - ) - state: Optional[TaskState] = Field(None, description="State of this calculation") - - calcs_reversed: Optional[list] = Field( - None, - title="Calcs reversed data", - description="Detailed data for each VASP calculation contributing to " - "the task document.", - ) - - interchange: Optional[str] = Field( - None, description="Final output structure from the task" - ) - - molecule_specs: Optional[list[MoleculeSpec]] = Field( - None, description="Molecules within the box." - ) - - forcefield: Optional[str] = Field(None, description="forcefield") - - task_type: Optional[str] = Field(None, description="The type of calculation.") - - # task_label: Optional[str] = Field(None, description="A description of the task") - # TODO: where does task_label get added - - last_updated: Optional[datetime] = Field( - None, - description="Timestamp for the most recent calculation for this task document", - ) diff --git a/emmet-core/emmet/core/classical_md/__init__.py b/emmet-core/emmet/core/classical_md/__init__.py deleted file mode 100644 index 5617a1f298..0000000000 --- a/emmet-core/emmet/core/classical_md/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from emmet.core.classical_md.tasks import MoleculeSpec, ClassicalMDTaskDocument diff --git a/emmet-core/emmet/core/classical_md/openmm/__init__.py b/emmet-core/emmet/core/classical_md/openmm/__init__.py deleted file mode 100644 index 2036dd1c60..0000000000 --- a/emmet-core/emmet/core/classical_md/openmm/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from emmet.core.classical_md.openmm.tasks import ( - Calculation, - CalculationInput, - CalculationOutput, - OpenMMTaskDocument, -) diff --git a/emmet-core/emmet/core/classical_md/openmm/tasks.py b/emmet-core/emmet/core/classical_md/openmm/tasks.py deleted file mode 100644 index 3670b97d38..0000000000 --- a/emmet-core/emmet/core/classical_md/openmm/tasks.py +++ /dev/null @@ -1,235 +0,0 @@ -"""Schemas for OpenMM tasks.""" - -from __future__ import annotations - -from pathlib import Path -from typing import Optional, Union - -import pandas as pd # type: ignore[import-untyped] -from emmet.core.vasp.task_valid import TaskState # type: ignore[import-untyped] -from pydantic import BaseModel, Field - -from emmet.core.classical_md import ClassicalMDTaskDocument # type: ignore[import-untyped] -from emmet.core.classical_md.tasks import HexBytes # type: ignore[import-untyped] - - -class CalculationInput(BaseModel, extra="allow"): # type: ignore[call-arg] - """OpenMM input settings for a job, these are the attributes of the OpenMMMaker.""" - - n_steps: Optional[int] = Field( - None, description="The number of simulation steps to run." - ) - - step_size: Optional[float] = Field( - None, description="The size of each simulation step (picoseconds)." - ) - - temperature: Optional[float] = Field( - None, description="The simulation temperature (kelvin)." - ) - - friction_coefficient: Optional[float] = Field( - None, - description=( - "The friction coefficient for the integrator (inverse picoseconds)." - ), - ) - - platform_name: Optional[str] = Field( - None, - description=( - "The name of the OpenMM platform to use, passed to " - "Interchange.to_openmm_simulation." - ), - ) - - platform_properties: Optional[dict] = Field( - None, - description=( - "Properties for the OpenMM platform, passed to " - "Interchange.to_openmm_simulation." - ), - ) - - state_interval: Optional[int] = Field( - None, - description=( - "State is saved every `state_interval` timesteps. For no state, set to 0." - ), - ) - - state_file_name: Optional[str] = Field( - None, description="The name of the state file to save." - ) - - traj_interval: Optional[int] = Field( - None, - description=( - "The trajectory is saved every `traj_interval` timesteps. For no trajectory, set to 0." - ), - ) - - wrap_traj: Optional[bool] = Field( - None, description="Whether to wrap trajectory coordinates." - ) - - report_velocities: Optional[bool] = Field( - None, description="Whether to report velocities in the trajectory file." - ) - - traj_file_name: Optional[str] = Field( - None, description="The name of the trajectory file to save." - ) - - traj_file_type: Optional[str] = Field( - None, - description="The type of trajectory file to save.", - ) - - embed_traj: Optional[bool] = Field( - None, - description="Whether to embed the trajectory blob in CalculationOutput.", - ) - - -class CalculationOutput(BaseModel): - """OpenMM calculation output files and extracted data.""" - - dir_name: Optional[str] = Field( - None, description="The directory for this OpenMM task" - ) - - traj_file: Optional[str] = Field( - None, description="Path to the trajectory file relative to `dir_name`" - ) - - traj_blob: Optional[HexBytes] = Field( - None, description="Trajectory file as a binary blob" - ) - - state_file: Optional[str] = Field( - None, description="Path to the state file relative to `dir_name`" - ) - - steps_reported: Optional[list[int]] = Field( - None, description="Steps where outputs are reported" - ) - - time: Optional[list[float]] = Field(None, description="List of times") - - potential_energy: Optional[list[float]] = Field( - None, description="List of potential energies" - ) - - kinetic_energy: Optional[list[float]] = Field( - None, description="List of kinetic energies" - ) - - total_energy: Optional[list[float]] = Field( - None, description="List of total energies" - ) - - temperature: Optional[list[float]] = Field(None, description="List of temperatures") - - volume: Optional[list[float]] = Field(None, description="List of volumes") - - density: Optional[list[float]] = Field(None, description="List of densities") - - elapsed_time: Optional[float] = Field( - None, description="Elapsed time for the calculation (seconds)." - ) - - @classmethod - def from_directory( - cls, - dir_name: Path | str, - state_file_name: str, - traj_file_name: str, - elapsed_time: Optional[float] = None, - n_steps: Optional[int] = None, - state_interval: Optional[int] = None, - embed_traj: bool = False, - ) -> CalculationOutput: - """Extract data from the output files in the directory.""" - state_file = Path(dir_name) / state_file_name - column_name_map = { - '#"Step"': "steps_reported", - "Potential Energy (kJ/mole)": "potential_energy", - "Kinetic Energy (kJ/mole)": "kinetic_energy", - "Total Energy (kJ/mole)": "total_energy", - "Temperature (K)": "temperature", - "Box Volume (nm^3)": "volume", - "Density (g/mL)": "density", - } - state_is_not_empty = state_file.exists() and state_file.stat().st_size > 0 - state_steps = state_interval and n_steps and n_steps // state_interval or 0 - if state_is_not_empty and (state_steps > 0): - data = pd.read_csv(state_file, header=0) - data = data.rename(columns=column_name_map) - data = data.filter(items=column_name_map.values()) - data = data.iloc[-state_steps:] - attributes = data.to_dict(orient="list") - else: - attributes = {name: None for name in column_name_map.values()} - state_file_name = None # type: ignore[assignment] - - traj_file = Path(dir_name) / traj_file_name - traj_is_not_empty = traj_file.exists() and traj_file.stat().st_size > 0 - traj_file_name = traj_file_name if traj_is_not_empty else None # type: ignore - - if embed_traj and traj_is_not_empty: - with open(traj_file, "rb") as f: - traj_blob = f.read() - else: - traj_blob = None - - return CalculationOutput( - dir_name=str(dir_name), - elapsed_time=elapsed_time, - traj_file=traj_file_name, - state_file=state_file_name, - traj_blob=traj_blob, - **attributes, - ) - - -class Calculation(BaseModel): - """All input and output data for an OpenMM calculation.""" - - dir_name: Optional[str] = Field( - None, description="The directory for this OpenMM calculation" - ) - - has_openmm_completed: Optional[Union[TaskState, bool]] = Field( - None, description="Whether OpenMM completed the calculation successfully" - ) - - input: Optional[CalculationInput] = Field( - None, description="OpenMM input settings for the calculation" - ) - output: Optional[CalculationOutput] = Field( - None, description="The OpenMM calculation output" - ) - - completed_at: Optional[str] = Field( - None, description="Timestamp for when the calculation was completed" - ) - task_name: Optional[str] = Field( - None, description="Name of task given by custodian (e.g., relax1, relax2)" - ) - - calc_type: Optional[str] = Field( - None, - description="Return calculation type (run type + task_type). or just new thing", - ) - - -class OpenMMTaskDocument(ClassicalMDTaskDocument): - """Definition of the OpenMM task document.""" - - calcs_reversed: Optional[list[Calculation]] = Field( - None, - title="Calcs reversed data", - description="Detailed data for each OpenMM calculation contributing to the " - "task document.", - ) diff --git a/emmet-core/emmet/core/openff/__init__.py b/emmet-core/emmet/core/openff/__init__.py new file mode 100644 index 0000000000..829a46cca2 --- /dev/null +++ b/emmet-core/emmet/core/openff/__init__.py @@ -0,0 +1,5 @@ +from emmet.core.openff.tasks import ( + MoleculeSpec, + ClassicalMDTaskDocument, + MDTaskDocument, +) diff --git a/emmet-core/emmet/core/openff/core.py b/emmet-core/emmet/core/openff/core.py new file mode 100644 index 0000000000..a36833cc08 --- /dev/null +++ b/emmet-core/emmet/core/openff/core.py @@ -0,0 +1,9 @@ +from emmet.core.openff import MoleculeSpec +from emmet.core.base import EmmetBaseModel + + +class ClassicalMDDoc(EmmetBaseModel): + molecule_specs: MoleculeSpec + + # should contain more information on all molecules + # use MoleculeMetadata somewhere diff --git a/emmet-core/emmet/core/classical_md/tasks.py b/emmet-core/emmet/core/openff/tasks.py similarity index 78% rename from emmet-core/emmet/core/classical_md/tasks.py rename to emmet-core/emmet/core/openff/tasks.py index 48056d8724..a14c77b0ff 100644 --- a/emmet-core/emmet/core/classical_md/tasks.py +++ b/emmet-core/emmet/core/openff/tasks.py @@ -55,7 +55,7 @@ class MoleculeSpec(MSONable): openff_mol: str # a tk.Molecule object serialized with to_json -class ClassicalMDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-arg] +class MDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-arg] """Definition of the OpenMM task document.""" tags: Optional[list[str]] = Field( @@ -66,6 +66,12 @@ class ClassicalMDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-ar state: Optional[TaskState] = Field(None, description="State of this calculation") + job_uuids: Optional[list] = Field( + None, + description="The job_uuids for all contributing jobs, this will only" + "have a value if the taskdoc is generated by a Flow.", + ) + calcs_reversed: Optional[list] = Field( None, title="Calcs reversed data", @@ -75,12 +81,12 @@ class ClassicalMDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-ar interchange: Optional[HexBytes] = Field( None, - description="A byte serialized OpenFF interchange object. " - "To generate, the Interchange is serialized to json and" + description="A byte serialized interchange object. " + "To generate, the Interchange is serialized to json and " "the json is transformed to bytes with a utf-8 encoding. ", ) - molecule_specs: Optional[list[MoleculeSpec]] = Field( + interchange_meta: Optional[list[MoleculeSpec]] = Field( None, description="Molecules within the system." ) @@ -95,3 +101,11 @@ class ClassicalMDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-ar None, description="Timestamp for the most recent calculation for this task document", ) + + +class ClassicalMDTaskDocument(MDTaskDocument): + """Definition of the OpenMM task document.""" + + interchange_meta: Optional[list[MoleculeSpec]] = Field( + None, description="Molecules within the system." + ) diff --git a/emmet-core/emmet/core/openmm/__init__.py b/emmet-core/emmet/core/openmm/__init__.py index e69de29bb2..770ed97af1 100644 --- a/emmet-core/emmet/core/openmm/__init__.py +++ b/emmet-core/emmet/core/openmm/__init__.py @@ -0,0 +1,7 @@ +from emmet.core.openmm.tasks import ( + Calculation, + CalculationInput, + CalculationOutput, + OpenMMTaskDocument, + OpenMMInterchange, +) diff --git a/emmet-core/emmet/core/openmm/tasks.py b/emmet-core/emmet/core/openmm/tasks.py index 5fd079e5df..0142f4e0d0 100644 --- a/emmet-core/emmet/core/openmm/tasks.py +++ b/emmet-core/emmet/core/openmm/tasks.py @@ -2,14 +2,21 @@ from __future__ import annotations +import io from pathlib import Path from typing import Optional, Union - import pandas as pd # type: ignore[import-untyped] + +import openmm +from openmm import XmlSerializer +from openmm.app import Simulation +from openmm.app.pdbfile import PDBFile from emmet.core.vasp.task_valid import TaskState # type: ignore[import-untyped] from pydantic import BaseModel, Field +from pymatgen.core import Structure -from atomate2.classical_md.schemas import ClassicalMDTaskDocument +from emmet.core.openff import MoleculeSpec, MDTaskDocument # type: ignore[import-untyped] +from emmet.core.openff.tasks import HexBytes # type: ignore[import-untyped] class CalculationInput(BaseModel, extra="allow"): # type: ignore[call-arg] @@ -27,10 +34,14 @@ class CalculationInput(BaseModel, extra="allow"): # type: ignore[call-arg] None, description="The simulation temperature (kelvin)." ) + pressure: Optional[float] = Field( + None, description="The simulation pressure (atmospheres)." + ) + friction_coefficient: Optional[float] = Field( None, description=( - "The friction coefficient for the integrator " "(inverse picoseconds)." + "The friction coefficient for the integrator (inverse picoseconds)." ), ) @@ -53,7 +64,7 @@ class CalculationInput(BaseModel, extra="allow"): # type: ignore[call-arg] state_interval: Optional[int] = Field( None, description=( - "The interval for saving simulation state. For no state, set to 0." + "State is saved every `state_interval` timesteps. For no state, set to 0." ), ) @@ -64,7 +75,7 @@ class CalculationInput(BaseModel, extra="allow"): # type: ignore[call-arg] traj_interval: Optional[int] = Field( None, description=( - "The interval for saving trajectory frames. For no trajectory, set to 0." + "The trajectory is saved every `traj_interval` timesteps. For no trajectory, set to 0." ), ) @@ -82,7 +93,12 @@ class CalculationInput(BaseModel, extra="allow"): # type: ignore[call-arg] traj_file_type: Optional[str] = Field( None, - description="The type of trajectory file to save. Options are 'dcd' and 'h5'.", + description="The type of trajectory file to save.", + ) + + embed_traj: Optional[bool] = Field( + None, + description="Whether to embed the trajectory blob in CalculationOutput.", ) @@ -93,15 +109,19 @@ class CalculationOutput(BaseModel): None, description="The directory for this OpenMM task" ) - dcd_file: Optional[str] = Field( - None, description="Path to the DCD file relative to `dir_name`" + traj_file: Optional[str] = Field( + None, description="Path to the trajectory file relative to `dir_name`" + ) + + traj_blob: Optional[HexBytes] = Field( + None, description="Trajectory file as a binary blob" ) state_file: Optional[str] = Field( None, description="Path to the state file relative to `dir_name`" ) - steps: Optional[list[int]] = Field( + steps_reported: Optional[list[int]] = Field( None, description="Steps where outputs are reported" ) @@ -126,7 +146,7 @@ class CalculationOutput(BaseModel): density: Optional[list[float]] = Field(None, description="List of densities") elapsed_time: Optional[float] = Field( - None, description="Elapsed time for the calculation" + None, description="Elapsed time for the calculation (seconds)." ) @classmethod @@ -134,15 +154,14 @@ def from_directory( cls, dir_name: Path | str, state_file_name: str, - dcd_file_name: str, + traj_file_name: str, elapsed_time: Optional[float] = None, - steps: Optional[int] = None, - state_interval: Optional[int] = None, + embed_traj: bool = False, ) -> CalculationOutput: """Extract data from the output files in the directory.""" state_file = Path(dir_name) / state_file_name column_name_map = { - '#"Step"': "steps", + '#"Step"': "steps_reported", "Potential Energy (kJ/mole)": "potential_energy", "Kinetic Energy (kJ/mole)": "kinetic_energy", "Total Energy (kJ/mole)": "total_energy", @@ -151,26 +170,34 @@ def from_directory( "Density (g/mL)": "density", } state_is_not_empty = state_file.exists() and state_file.stat().st_size > 0 - state_steps = state_interval and steps and steps // state_interval or 0 - if state_is_not_empty and (state_steps > 0): + if state_is_not_empty: data = pd.read_csv(state_file, header=0) data = data.rename(columns=column_name_map) data = data.filter(items=column_name_map.values()) - data = data.iloc[-state_steps:] attributes = data.to_dict(orient="list") else: attributes = {name: None for name in column_name_map.values()} state_file_name = None # type: ignore[assignment] - dcd_file = Path(dir_name) / dcd_file_name - dcd_is_not_empty = dcd_file.exists() and dcd_file.stat().st_size > 0 - dcd_file_name = dcd_file_name if dcd_is_not_empty else None # type: ignore + traj_file = Path(dir_name) / traj_file_name + traj_is_not_empty = traj_file.exists() and traj_file.stat().st_size > 0 + traj_file_name = traj_file_name if traj_is_not_empty else None # type: ignore + + if traj_is_not_empty: + if embed_traj: + with open(traj_file, "rb") as f: + traj_blob = f.read() + else: + traj_blob = None + else: + traj_blob = None return CalculationOutput( dir_name=str(dir_name), elapsed_time=elapsed_time, - dcd_file=dcd_file_name, + traj_file=traj_file_name, state_file=state_file_name, + traj_blob=traj_blob, **attributes, ) @@ -206,7 +233,7 @@ class Calculation(BaseModel): ) -class OpenMMTaskDocument(ClassicalMDTaskDocument): +class OpenMMTaskDocument(MDTaskDocument): """Definition of the OpenMM task document.""" calcs_reversed: Optional[list[Calculation]] = Field( @@ -215,3 +242,47 @@ class OpenMMTaskDocument(ClassicalMDTaskDocument): description="Detailed data for each OpenMM calculation contributing to the " "task document.", ) + + interchange_meta: Optional[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 + and serialize the OpenMM system, topology, and state.""" + + system: str = Field(None, description="An XML file representing the OpenMM system.") + state: str = Field( + None, + description="An XML file representing the OpenMM state.", + ) + topology: str = Field( + None, + description="An XML file representing an OpenMM topology object." + "This must correspond to the atom ordering in the system.", + ) + + def to_openmm_simulation( + self, + integrator: openmm.Integrator, + platform: openmm.Platform, + platformProperties: Optional[dict[str, str]] = None, + ): + system = XmlSerializer.deserialize(self.system) + state = XmlSerializer.deserialize(self.state) + with io.StringIO(self.topology) as s: + pdb = PDBFile(s) + topology = pdb.getTopology() + + simulation = Simulation( + topology, + system, + integrator, + platform, + platformProperties or {}, + ) + simulation.context.setState(state) + return simulation diff --git a/emmet-core/requirements/deployment.txt b/emmet-core/requirements/deployment.txt index dc661dc3cb..2a07905154 100644 --- a/emmet-core/requirements/deployment.txt +++ b/emmet-core/requirements/deployment.txt @@ -2,33 +2,33 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --output-file=emmet/emmet-core/requirements/deployment.txt emmet/emmet-core/setup.py python/requirements.txt +# pip-compile --output-file=emmet/emmet-core/requirements/deployment.txt emmet/emmet-core/setup.py # annotated-types==0.7.0 # via pydantic -certifi==2024.8.30 +certifi==2024.2.2 # via requests charset-normalizer==3.3.2 # via requests -contourpy==1.3.0 +contourpy==1.2.1 # via matplotlib cycler==0.12.1 # via matplotlib -fonttools==4.53.1 +fonttools==4.52.1 # via matplotlib -idna==3.8 +future==1.0.0 + # via uncertainties +idna==3.7 # via requests joblib==1.4.2 # via pymatgen -kiwisolver==1.4.7 +kiwisolver==1.4.5 # via matplotlib latexcodec==3.0.0 # via pybtex -matplotlib==3.9.2 - # via - # -r python/requirements.txt - # pymatgen -monty==2024.7.30 +matplotlib==3.9.0 + # via pymatgen +monty==2024.5.24 # via # emmet-core (emmet/emmet-core/setup.py) # pymatgen @@ -38,43 +38,39 @@ networkx==3.3 # via pymatgen numpy==1.26.4 # via - # -r python/requirements.txt # contourpy - # emmet-core (emmet/emmet-core/setup.py) # matplotlib # pandas # pymatgen # scipy # spglib -packaging==24.1 +packaging==24.0 # via # matplotlib # plotly palettable==3.3.3 # via pymatgen pandas==2.2.2 - # via - # -r python/requirements.txt - # pymatgen -pillow==10.4.0 + # via pymatgen +pillow==10.3.0 # via matplotlib -plotly==5.24.0 +plotly==5.22.0 # via pymatgen pybtex==0.24.0 # via # emmet-core (emmet/emmet-core/setup.py) # pymatgen -pydantic==2.8.2 +pydantic==2.7.1 # via # emmet-core (emmet/emmet-core/setup.py) # pydantic-settings -pydantic-core==2.20.1 +pydantic-core==2.18.2 # via pydantic -pydantic-settings==2.4.0 +pydantic-settings==2.2.1 # via emmet-core (emmet/emmet-core/setup.py) -pymatgen==2024.8.9 +pymatgen==2024.4.13 # via emmet-core (emmet/emmet-core/setup.py) -pyparsing==3.1.4 +pyparsing==3.1.2 # via matplotlib python-dateutil==2.9.0.post0 # via @@ -84,40 +80,38 @@ python-dotenv==1.0.1 # via pydantic-settings pytz==2024.1 # via pandas -pyyaml==6.0.2 +pyyaml==6.0.1 # via pybtex -requests==2.32.3 +requests==2.32.2 # via pymatgen ruamel-yaml==0.18.6 # via pymatgen ruamel-yaml-clib==0.2.8 # via ruamel-yaml -scipy==1.14.1 - # via - # -r python/requirements.txt - # pymatgen +scipy==1.13.1 + # via pymatgen six==1.16.0 # via # pybtex # python-dateutil -spglib==2.5.0 +spglib==2.4.0 # via pymatgen -sympy==1.13.2 +sympy==1.12 # via pymatgen tabulate==0.9.0 # via pymatgen -tenacity==9.0.0 +tenacity==8.3.0 # via plotly -tqdm==4.66.5 +tqdm==4.66.4 # via pymatgen -typing-extensions==4.12.2 +typing-extensions==4.12.0 # via # emmet-core (emmet/emmet-core/setup.py) # pydantic # pydantic-core tzdata==2024.1 # via pandas -uncertainties==3.2.2 +uncertainties==3.1.7 # via pymatgen -urllib3==2.2.2 +urllib3==2.2.1 # via requests diff --git a/emmet-core/tests/classical_md/openmm_md/__init__.py b/emmet-core/tests/openmm_md/__init__.py similarity index 100% rename from emmet-core/tests/classical_md/openmm_md/__init__.py rename to emmet-core/tests/openmm_md/__init__.py From 45baaf0b72e3f9e98bcbb7a8bfd1dbead2c9022b Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 13:58:10 -0400 Subject: [PATCH 02/17] Create a calculations task document to organize the outputs of openmm workflows. --- emmet-core/emmet/core/openmm/calculations.py | 71 ++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 emmet-core/emmet/core/openmm/calculations.py diff --git a/emmet-core/emmet/core/openmm/calculations.py b/emmet-core/emmet/core/openmm/calculations.py new file mode 100644 index 0000000000..839452f029 --- /dev/null +++ b/emmet-core/emmet/core/openmm/calculations.py @@ -0,0 +1,71 @@ +from typing import List, Optional, Union +from datetime import datetime + +from pydantic import BaseModel, Field + +from emmet.core.openmm.tasks import Calculation + + +class CalculationsDoc(BaseModel): + task_names: List[str] = Field(None, description="Names of tasks.") + + calc_types: List[str] = Field(None, description="Types of calculations.") + + elapsed_times: List[Union[float, None]] = Field( + None, description="Elapsed time for each calculation." + ) + + steps: List[Union[float, None]] = Field( + None, description="n_steps for each calculation." + ) + + step_sizes: List[Union[float, None]] = Field( + None, description="Step sizes for each calculation." + ) + + temperatures: List[Union[float, None]] = Field( + None, description="Temperature for each calculation." + ) + + pressures: List[Union[float, None]] = Field( + None, description="Pressure for each calculation." + ) + + friction_coefficients: List[Union[float, None]] = Field( + None, description="Friction coefficients for each calculation." + ) + + completed_at: Optional[datetime] = Field( + None, + description="Timestamp for when the final calculation completed.", + ) + + job_uuid: Optional[str] = Field( + None, description="The UUID of the flow that generated this data." + ) + + flow_uuid: Optional[str] = Field( + None, description="The UUID of the top level host from that job." + ) + + @classmethod + def from_calcs_reversed( + cls, + calcs_reversed: List[Calculation], + job_uuid: Optional[str] = None, + flow_uuid: Optional[str] = None, + ) -> "CalculationsDoc": + calcs = calcs_reversed[::-1] + return CalculationsDoc( + task_names=[calc.task_name for calc in calcs], + calc_types=[calc.calc_type for calc in calcs], + elapsed_times=[calc.output.elapsed_time for calc in calcs], + steps=[calc.input.n_steps for calc in calcs], + step_sizes=[calc.input.step_size for calc in calcs], + temperatures=[calc.input.temperature for calc in calcs], + pressures=[calc.input.pressure for calc in calcs], + friction_coefficients=[calc.input.friction_coefficient for calc in calcs], + completed_at=calcs[-1].completed_at, + job_uuid=job_uuid, + flow_uuid=flow_uuid, + ) From 721ec22d0c7cab21915ec3c9f22a9055d6698e43 Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 13:58:32 -0400 Subject: [PATCH 03/17] Create a benchmarking task document to be output by a benchmarking builder. --- emmet-core/emmet/core/openff/benchmarking.py | 99 ++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 emmet-core/emmet/core/openff/benchmarking.py diff --git a/emmet-core/emmet/core/openff/benchmarking.py b/emmet-core/emmet/core/openff/benchmarking.py new file mode 100644 index 0000000000..dc811d09c8 --- /dev/null +++ b/emmet-core/emmet/core/openff/benchmarking.py @@ -0,0 +1,99 @@ +from pydantic import BaseModel, Field +from typing import Optional + +import warnings + +from MDAnalysis import Universe +from MDAnalysis.analysis.dielectric import DielectricConstant + +from transport_analysis.viscosity import ViscosityHelfand + + +class SolventBenchmarkingDoc(BaseModel, arbitrary_types_allowed=True): + density: Optional[float] = Field(None, description="Density of the solvent") + + viscosity_function_values: Optional[list[float]] = Field( + None, description="Viscosity function over time" + ) + + viscosity: Optional[float] = Field(None, description="Viscosity of the solvent") + + dielectric: Optional[float] = Field( + None, description="Dielectric constant of the solvent" + ) + + job_uuid: Optional[str] = Field( + None, description="The UUID of the flow that generated this data." + ) + + flow_uuid: Optional[str] = Field( + None, description="The UUID of the top level host from that job." + ) + + dielectric_run_kwargs: Optional[dict] = Field( + None, description="kwargs passed to the DielectricConstant.run method" + ) + + viscosity_run_kwargs: Optional[dict] = Field( + None, description="kwargs passed to the ViscosityHelfand.run method" + ) + + tags: Optional[list[str]] = Field( + [], title="tag", description="Metadata tagged to the parent job." + ) + + @classmethod + def from_universe( + cls, + u: Universe, + temperature: Optional[float] = None, + density: Optional[float] = None, + job_uuid: Optional[str] = None, + flow_uuid: Optional[str] = None, + dielectric_run_kwargs: Optional[dict] = None, + viscosity_run_kwargs: Optional[dict] = None, + tags: Optional[list[str]] = None, + ) -> "SolventBenchmarkingDoc": + if temperature is not None: + dielectric = DielectricConstant( + u.atoms, temperature=temperature, make_whole=False + ) + dielectric_run_kwargs = dielectric_run_kwargs or {} + dielectric.run(**dielectric_run_kwargs) + eps = dielectric.results.eps_mean + else: + warnings.warn( + "Temperature is not provided, dielectric constant will not be calculated" + ) + eps = None + + if u.atoms.ts.has_velocities: + start, stop = int(0.2 * len(u.trajectory)), int(0.8 * len(u.trajectory)) + viscosity_helfand = ViscosityHelfand( + u.atoms, + temp_avg=temperature, + linear_fit_window=(start, stop), + ) + viscosity_run_kwargs = viscosity_run_kwargs or {} + viscosity_helfand.run(**viscosity_run_kwargs) + viscosity_function_values = viscosity_helfand.results.timeseries.tolist() + viscosity = viscosity_helfand.results.viscosity + + else: + warnings.warn( + "No velocities found in the universe, viscosity will not be calculated." + ) + viscosity_function_values = None + viscosity = None + + return cls( + density=density, + viscosity_function_values=viscosity_function_values, + viscosity=viscosity, + dielectric=eps, + job_uuid=job_uuid, + flow_uuid=flow_uuid, + dielectric_run_kwargs=dielectric_run_kwargs, + viscosity_run_kwargs=viscosity_run_kwargs, + tags=tags, + ) From 4e298b07038b46a5959c3f2cc0a3c39a8f1be5dd Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 13:58:45 -0400 Subject: [PATCH 04/17] Create a solvation task document to be output by a solvation builder. --- emmet-core/emmet/core/openff/solvation.py | 198 ++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 emmet-core/emmet/core/openff/solvation.py diff --git a/emmet-core/emmet/core/openff/solvation.py b/emmet-core/emmet/core/openff/solvation.py new file mode 100644 index 0000000000..0dc5bc75fb --- /dev/null +++ b/emmet-core/emmet/core/openff/solvation.py @@ -0,0 +1,198 @@ +from typing import Optional, Any +from typing_extensions import Annotated + +import pandas as pd +from solvation_analysis.solute import Solute +from pydantic import Field, BaseModel, PlainValidator, PlainSerializer, WithJsonSchema +from io import StringIO + + +def data_frame_validater(o: Any) -> pd.DataFrame: + if isinstance(o, pd.DataFrame): + return o + elif isinstance(o, str): + return pd.read_csv(StringIO(o)) + raise ValueError(f"Invalid DataFrame: {o}") + + +def data_frame_serializer(df: pd.DataFrame) -> str: + return df.to_csv() + + +DataFrame = Annotated[ + pd.DataFrame, + PlainValidator(data_frame_validater), + PlainSerializer(data_frame_serializer), + WithJsonSchema({"type": "string"}), +] + + +# class SolvationDoc(ClassicalMDDoc, arbitrary_types_allowed=True): +class SolvationDoc(BaseModel, arbitrary_types_allowed=True): + solute_name: Optional[str] = Field(None, description="Name of the solute") + + solvent_names: Optional[list[str]] = Field( + None, description="Names of the solvents" + ) + + is_electrolyte: Optional[bool] = Field( + None, description="Whether system is an electrolyte" + ) + + # Solute.coordination + + coordination_numbers: Optional[dict[str, float]] = Field( + None, + description="A dictionary where keys are residue names and values are " + "the mean coordination number of that residue.", + ) + + # coordination_numbers_by_frame: Optional[DataFrame] = Field( + # None, + # description="Coordination number in each frame of the trajectory.", + # ) + + coordinating_atoms: Optional[DataFrame] = Field( + None, + description="Fraction of each atom_type participating in solvation, " + "calculated for each solvent.", + ) + + coordination_vs_random: Optional[dict[str, float]] = Field( + None, + description="Coordination number relative to random coordination.", + ) + + # Solute.networking + + # TODO: In the worst case, this could be extremely large. + # Need to consider what else we might want from this object. + # network_df: Optional[DataFrame] = Field( + # None, + # description="All solute-solvent networks in the system, indexed by the `frame` " + # "and a 'network_ix'. Columns are the species name and res_ix.", + # ) + + network_sizes: Optional[DataFrame] = Field( + None, + description="Sizes of all networks, indexed by frame. Column headers are " + "network sizes, e.g. the integer number of solutes + solvents in the network." + "The values in each column are the number of networks with that size in each " + "frame.", + ) + + solute_status: Optional[dict[str, float]] = Field( + None, + description="A dictionary where the keys are the “status” of the " + "solute and the values are the fraction of solute with that " + "status, averaged over all frames. “isolated” means that the solute not " + "coordinated with any of the networking solvents, network size is 1. " + "“paired” means the solute and is coordinated with a single networking " + "solvent and that solvent is not coordinated to any other solutes, " + "network size is 2. “networked” means that the solute is coordinated to " + "more than one solvent or its solvent is coordinated to more than one " + "solute, network size >= 3.", + ) + + # solute_status_by_frame: Optional[DataFrame] = Field( + # None, description="Solute status in each frame of the trajectory." + # ) + + # Solute.pairing + + solvent_pairing: Optional[dict[str, float]] = Field( + None, description="Fraction of each solvent coordinated to the solute." + ) + + # pairing_by_frame: Optional[DataFrame] = Field( + # None, description="Solvent pairing in each frame." + # ) + + fraction_free_solvents: Optional[dict[str, float]] = Field( + None, description="Fraction of each solvent not coordinated to solute." + ) + + diluent_composition: Optional[dict[str, float]] = Field( + None, description="Fraction of diluent constituted by each solvent." + ) + + # diluent_composition_by_frame: Optional[DataFrame] = Field( + # None, description="Diluent composition in each frame." + # ) + + diluent_counts: Optional[DataFrame] = Field( + None, description="Solvent counts in each frame." + ) + + # Solute.residence + + residence_times: Optional[dict[str, float]] = Field( + None, + description="Average residence time of each solvent." + "Calculated by 1/e cutoff on autocovariance function.", + ) + + residence_times_fit: Optional[dict[str, float]] = Field( + None, + description="Average residence time of each solvent." + "Calculated by fitting the autocovariance function to an exponential decay.", + ) + + # Solute.speciation + + speciation_fraction: Optional[DataFrame] = Field( + None, description="Fraction of shells of each type." + ) + + solvent_co_occurrence: Optional[DataFrame] = Field( + None, + description="The actual co-occurrence of solvents divided by " + "the expected co-occurrence in randomly distributed solvation shells." + "i.e. given a molecule of solvent i in the shell, the probability of " + "solvent j's presence relative to choosing a solvent at random " + "from the pool of all coordinated solvents. ", + ) + + job_uuid: Optional[str] = Field( + None, description="The UUID of the flow that generated this data." + ) + + flow_uuid: Optional[str] = Field( + None, description="The UUID of the top level host from that job." + ) + + @classmethod + def from_solute( + cls, + solute: Solute, + job_uuid: Optional[str] = None, + flow_uuid: Optional[str] = None, + ) -> "SolvationDoc": + # as a dict + props = { + "solute_name": solute.solute_name, + "solvent_names": list(solute.solvents.keys()), + "is_electrolyte": True, + "job_uuid": job_uuid, + "flow_uuid": flow_uuid, + } + if hasattr(solute, "coordination"): + props["coordination_numbers"] = solute.coordination.coordination_numbers + props["coordinating_atoms"] = solute.coordination.coordinating_atoms + props["coordination_vs_random"] = solute.coordination.coordination_vs_random + if hasattr(solute, "pairing"): + props["solvent_pairing"] = solute.pairing.solvent_pairing + props["fraction_free_solvents"] = solute.pairing.fraction_free_solvents + props["diluent_composition"] = solute.pairing.diluent_composition + props["diluent_counts"] = solute.pairing.diluent_counts + if hasattr(solute, "speciation"): + props["speciation_fraction"] = solute.speciation.speciation_fraction + props["solvent_co_occurrence"] = solute.speciation.solvent_co_occurrence + if hasattr(solute, "networking"): + props["network_sizes"] = solute.networking.network_sizes + props["solute_status"] = solute.networking.solute_status + if hasattr(solute, "residence"): + props["residence_times"] = solute.residence.residence_times_cutoff + props["residence_times_fit"] = solute.residence.residence_times_fit + + return SolvationDoc(**props) From 8e94763e01baa16e41613896a4612afc45593810 Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 14:00:01 -0400 Subject: [PATCH 05/17] Refactor the dependencies and CI for emmet-core to include MD-related dependencies and allow installation from conda-forge. --- .github/workflows/testing.yml | 6 +- .../ubuntu-latest_py3.10_extras.txt | 390 +++++++------ .../ubuntu-latest_py3.11_extras.txt | 382 ++++++------ .../ubuntu-latest_py3.9_extras.txt | 543 ++++++++++++++++++ emmet-core/setup.py | 10 +- 5 files changed, 942 insertions(+), 389 deletions(-) create mode 100644 emmet-core/requirements/ubuntu-latest_py3.9_extras.txt diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 867d562536..c0df75c313 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -17,7 +17,7 @@ jobs: matrix: os: ["ubuntu-latest"] # TODO openbabel for windows and mac package: ["emmet-core", "emmet-builders", "emmet-api"] - python-version: ["3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v4 with: @@ -30,7 +30,7 @@ jobs: python-version: ${{ matrix.python-version }} channels: anaconda, conda-forge - - name: Install OpenBabel + - name: Install all conda requirements shell: bash -l {0} run: | conda install openbabel openff-toolkit>=0.14.0 openff-interchange>=0.3.22 sqlite -y @@ -103,7 +103,7 @@ jobs: shell: bash -l {0} run: python${{ matrix.python-version }} -m pytest --cov=emmet --cov-report=xml ${{ matrix.package }}/tests - - uses: codecov/codecov-action@v4.5.0 + - uses: codecov/codecov-action@v4.4.1 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml diff --git a/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt b/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt index 6c95be9106..0be65eb08f 100644 --- a/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt +++ b/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt @@ -4,43 +4,49 @@ # # pip-compile --all-extras --output-file=requirements/ubuntu-latest_py3.10_extras.txt # -aiohappyeyeballs==2.4.0 - # via aiohttp -aiohttp==3.10.5 +aiohttp==3.9.5 # via fsspec -aioitertools==0.12.0 +aioitertools==0.11.0 # via maggma aiosignal==1.3.1 # via aiohttp annotated-types==0.7.0 # via pydantic -ase==3.23.0 +anyio==4.3.0 + # via + # httpx + # starlette + # watchfiles +ase==3.22.1 # via # chgnet # matcalc # matgl - # pymatgen-analysis-diffusion async-timeout==4.0.3 # via aiohttp -attrs==24.2.0 +attrs==23.2.0 # via # aiohttp - # jsonlines # jsonschema # referencing -bcrypt==4.2.0 +bcrypt==4.1.3 # via paramiko -boto3==1.35.12 +blinker==1.8.2 + # via flask +boto3==1.34.112 # via maggma -botocore==1.35.12 +botocore==1.34.112 # via # boto3 # s3transfer -bracex==2.5 +bracex==2.4 # via wcmatch -certifi==2024.8.30 - # via requests -cffi==1.17.0 +certifi==2024.2.2 + # via + # httpcore + # httpx + # requests +cffi==1.16.0 # via # cryptography # pynacl @@ -48,27 +54,31 @@ cfgv==3.4.0 # via pre-commit charset-normalizer==3.3.2 # via requests -chgnet==0.3.8 +chgnet==0.3.5 # via emmet-core (setup.py) click==8.1.7 # via + # flask # mkdocs # mkdocstrings + # mongogrant + # typer + # uvicorn colorama==0.4.6 # via griffe -contourpy==1.3.0 +contourpy==1.2.1 # via matplotlib -coverage[toml]==7.6.1 +coverage[toml]==7.5.1 # via pytest-cov -cryptography==43.0.1 +cryptography==42.0.7 # via paramiko csscompressor==0.9.5 # via mkdocs-minify-plugin -custodian==2024.6.24 +custodian==2024.4.18 # via emmet-core (setup.py) cycler==0.12.1 # via matplotlib -cython==3.0.11 +cython==3.0.10 # via chgnet dgl==2.1.0 # via matgl @@ -76,57 +86,83 @@ distlib==0.3.8 # via virtualenv dnspython==2.6.1 # via + # email-validator # maggma # pymongo -emmet-core==0.84.2rc7 +email-validator==2.1.1 + # via fastapi +emmet-core==0.83.6 # via mp-api -exceptiongroup==1.2.2 - # via pytest +exceptiongroup==1.2.1 + # via + # anyio + # pytest +fastapi==0.111.0 + # via maggma +fastapi-cli==0.0.4 + # via fastapi fasteners==0.19 # via mdanalysis -filelock==3.15.4 +filelock==3.14.0 # via # torch - # triton # virtualenv -flake8==7.1.1 +flake8==7.0.0 # via emmet-core (setup.py) -fonttools==4.53.1 +flask==3.0.3 + # via mongogrant +fonttools==4.51.0 # via matplotlib frozenlist==1.4.1 # via # aiohttp # aiosignal -fsspec[http]==2024.9.0 +fsspec[http]==2024.5.0 # via - # lightning # pytorch-lightning # torch +future==1.0.0 + # via uncertainties ghp-import==2.1.0 # via mkdocs griddataformats==1.0.2 # via mdanalysis -griffe==1.2.0 +griffe==0.45.2 # via mkdocstrings-python +h11==0.14.0 + # via + # httpcore + # uvicorn h5py==3.11.0 # via phonopy htmlmin2==0.1.13 # via mkdocs-minify-plugin -identify==2.6.0 +httpcore==1.0.5 + # via httpx +httptools==0.6.1 + # via uvicorn +httpx==0.27.0 + # via fastapi +identify==2.5.36 # via pre-commit -idna==3.8 +idna==3.7 # via + # anyio + # email-validator + # httpx # requests # yarl -imageio==2.35.1 - # via scikit-image -inflect==7.3.1 +inflect==7.2.1 # via robocrys iniconfig==2.0.0 # via pytest +itsdangerous==2.2.0 + # via flask jinja2==3.1.4 # via # emmet-core (setup.py) + # fastapi + # flask # mkdocs # mkdocs-material # mkdocstrings @@ -144,55 +180,50 @@ joblib==1.4.2 # scikit-learn jsmin==3.0.1 # via mkdocs-minify-plugin -jsonlines==4.0.0 - # via maggma -jsonschema==4.23.0 +jsonschema==4.22.0 # via maggma jsonschema-specifications==2023.12.1 # via jsonschema -kiwisolver==1.4.7 +kiwisolver==1.4.5 # via matplotlib latexcodec==3.0.0 # via pybtex -lazy-loader==0.4 - # via scikit-image -lightning==2.4.0 - # via matgl -lightning-utilities==0.11.7 +lightning-utilities==0.11.2 # via - # lightning # pytorch-lightning # torchmetrics -livereload==2.7.0 +livereload==2.6.3 # via emmet-core (setup.py) -maggma==0.69.3 +maggma==0.67.0 # via mp-api -markdown==3.7 +markdown==3.6 # via # mkdocs # mkdocs-autorefs # mkdocs-material # mkdocstrings # pymdown-extensions +markdown-it-py==3.0.0 + # via rich markupsafe==2.1.5 # via # jinja2 # mkdocs # mkdocs-autorefs # mkdocstrings + # werkzeug matcalc==0.0.4 # via emmet-core (setup.py) -matgl==1.1.3 +matgl==1.1.1 # via emmet-core (setup.py) matminer==0.9.2 # via robocrys -matplotlib==3.9.2 +matplotlib==3.9.0 # via # ase # mdanalysis # phonopy # pymatgen - # seaborn # solvation-analysis mccabe==0.7.0 # via flake8 @@ -202,11 +233,13 @@ mdanalysis==2.7.0 # via # emmet-core (setup.py) # solvation-analysis +mdurl==0.1.2 + # via markdown-it-py mergedeep==1.3.4 # via # mkdocs # mkdocs-get-deps -mkdocs==1.6.1 +mkdocs==1.6.0 # via # emmet-core (setup.py) # mkdocs-autorefs @@ -215,15 +248,13 @@ mkdocs==1.6.1 # mkdocs-material # mkdocs-minify-plugin # mkdocstrings -mkdocs-autorefs==1.2.0 - # via - # mkdocstrings - # mkdocstrings-python -mkdocs-awesome-pages-plugin==2.9.3 +mkdocs-autorefs==1.0.1 + # via mkdocstrings +mkdocs-awesome-pages-plugin==2.9.2 # via emmet-core (setup.py) mkdocs-get-deps==0.2.0 # via mkdocs -mkdocs-markdownextradata-plugin==0.2.6 +mkdocs-markdownextradata-plugin==0.2.5 # via emmet-core (setup.py) mkdocs-material==8.2.16 # via emmet-core (setup.py) @@ -233,17 +264,19 @@ mkdocs-material-extensions==1.3.1 # mkdocs-material mkdocs-minify-plugin==0.8.0 # via emmet-core (setup.py) -mkdocstrings[python]==0.26.0 +mkdocstrings[python]==0.25.1 # via # emmet-core (setup.py) # mkdocstrings-python -mkdocstrings-python==1.11.1 +mkdocstrings-python==1.10.3 # via mkdocstrings mmtf-python==1.1.3 # via mdanalysis +mongogrant==0.3.3 + # via maggma mongomock==4.1.2 # via maggma -monty==2024.7.30 +monty==2024.5.15 # via # custodian # emmet-core @@ -253,15 +286,13 @@ monty==2024.7.30 # mp-api # pymatgen # robocrys -more-itertools==10.4.0 +more-itertools==10.2.0 # via inflect -mp-api==0.42.1 +mp-api==0.41.2 # via robocrys -mp-pyrho==0.4.4 - # via pymatgen-analysis-defects mpmath==1.3.0 # via sympy -mrcfile==1.5.3 +mrcfile==1.5.0 # via griddataformats msgpack==1.0.8 # via @@ -272,7 +303,7 @@ multidict==6.0.5 # via # aiohttp # yarl -mypy==1.11.2 +mypy==1.10.0 # via emmet-core (setup.py) mypy-extensions==1.0.0 # via @@ -285,9 +316,8 @@ networkx==3.3 # dgl # pymatgen # robocrys - # scikit-image # torch -nodeenv==1.9.1 +nodeenv==1.8.0 # via pre-commit numpy==1.26.4 # via @@ -295,11 +325,8 @@ numpy==1.26.4 # chgnet # contourpy # dgl - # emmet-core - # emmet-core (setup.py) # griddataformats # h5py - # imageio # maggma # matminer # matplotlib @@ -309,60 +336,25 @@ numpy==1.26.4 # patsy # phonopy # pymatgen - # pymatgen-analysis-defects - # pymatgen-analysis-diffusion + # pytorch-lightning # rdkit # robocrys - # scikit-image # scikit-learn # scipy - # seaborn # seekpath # shapely # solvation-analysis # spglib # statsmodels - # tifffile # torchmetrics -nvidia-cublas-cu12==12.1.3.1 - # via - # nvidia-cudnn-cu12 - # nvidia-cusolver-cu12 - # torch -nvidia-cuda-cupti-cu12==12.1.105 - # via torch -nvidia-cuda-nvrtc-cu12==12.1.105 - # via torch -nvidia-cuda-runtime-cu12==12.1.105 - # via torch -nvidia-cudnn-cu12==9.1.0.70 - # via torch -nvidia-cufft-cu12==11.0.2.54 - # via torch -nvidia-curand-cu12==10.3.2.106 - # via torch -nvidia-cusolver-cu12==11.4.5.107 - # via torch -nvidia-cusparse-cu12==12.1.0.106 - # via - # nvidia-cusolver-cu12 - # torch nvidia-ml-py3==7.352.0 # via chgnet -nvidia-nccl-cu12==2.20.5 - # via torch -nvidia-nvjitlink-cu12==12.6.68 - # via - # nvidia-cusolver-cu12 - # nvidia-cusparse-cu12 -nvidia-nvtx-cu12==12.1.105 - # via torch -orjson==3.10.7 - # via maggma -packaging==24.1 +orjson==3.10.3 + # via + # fastapi + # maggma +packaging==24.0 # via - # lazy-loader - # lightning # lightning-utilities # matplotlib # mdanalysis @@ -371,47 +363,42 @@ packaging==24.1 # plotly # pytest # pytorch-lightning - # scikit-image # statsmodels # torchmetrics palettable==3.3.3 # via pymatgen pandas==2.2.2 # via - # maggma # matminer # pymatgen - # seaborn # solvation-analysis # statsmodels -paramiko==3.4.1 +paramiko==3.4.0 # via sshtunnel pathspec==0.12.1 # via mkdocs patsy==0.5.6 # via statsmodels -phonopy==2.27.0 +phonopy==2.23.1 # via matcalc -pillow==10.4.0 +pillow==10.3.0 # via - # imageio # matplotlib # rdkit - # scikit-image platformdirs==4.2.2 # via # mkdocs-get-deps # mkdocstrings # virtualenv -plotly==5.24.0 +plotly==5.22.0 # via # pymatgen # solvation-analysis pluggy==1.5.0 # via pytest -pre-commit==3.8.0 +pre-commit==3.7.1 # via emmet-core (setup.py) -psutil==6.0.0 +psutil==5.9.8 # via # custodian # dgl @@ -423,35 +410,38 @@ pybtex==0.24.0 # emmet-core (setup.py) # pymatgen # robocrys -pycodestyle==2.12.1 +pycodestyle==2.11.1 # via # emmet-core (setup.py) # flake8 pycparser==2.22 # via cffi -pydantic==2.8.2 +pydantic==2.7.1 # via # emmet-core # emmet-core (setup.py) + # fastapi # maggma # matgl # pydantic-settings -pydantic-core==2.20.1 +pydantic-core==2.18.2 # via pydantic -pydantic-settings==2.4.0 +pydantic-settings==2.2.1 # via # emmet-core # emmet-core (setup.py) # maggma -pydash==8.0.3 +pydash==8.0.1 # via maggma pydocstyle==6.3.0 # via emmet-core (setup.py) pyflakes==3.2.0 # via flake8 pygments==2.18.0 - # via mkdocs-material -pymatgen==2024.8.9 + # via + # mkdocs-material + # rich +pymatgen==2024.4.13 # via # chgnet # emmet-core @@ -460,30 +450,27 @@ pymatgen==2024.8.9 # matgl # matminer # mp-api - # mp-pyrho # pymatgen-analysis-alloys - # pymatgen-analysis-defects # pymatgen-analysis-diffusion # robocrys pymatgen-analysis-alloys==0.0.6 # via emmet-core (setup.py) -pymatgen-analysis-defects==2024.7.19 +pymatgen-analysis-diffusion==2023.8.15 # via emmet-core (setup.py) -pymatgen-analysis-diffusion==2024.7.15 - # via emmet-core (setup.py) -pymdown-extensions==10.9 +pymdown-extensions==10.8.1 # via # mkdocs-material # mkdocstrings -pymongo==4.8.0 +pymongo==4.7.2 # via # maggma # matminer + # mongogrant pynacl==1.5.0 # via paramiko -pyparsing==3.1.4 +pyparsing==3.1.2 # via matplotlib -pytest==8.3.2 +pytest==8.2.1 # via # emmet-core (setup.py) # pytest-cov @@ -498,14 +485,17 @@ python-dateutil==2.9.0.post0 # matplotlib # pandas python-dotenv==1.0.1 - # via pydantic-settings -pytorch-lightning==2.4.0 - # via lightning + # via + # pydantic-settings + # uvicorn +python-multipart==0.0.9 + # via fastapi +pytorch-lightning==2.2.5 + # via matgl pytz==2024.1 # via pandas -pyyaml==6.0.2 +pyyaml==6.0.1 # via - # lightning # mkdocs # mkdocs-get-deps # mkdocs-markdownextradata-plugin @@ -515,26 +505,30 @@ pyyaml==6.0.2 # pymdown-extensions # pytorch-lightning # pyyaml-env-tag + # uvicorn pyyaml-env-tag==0.1 # via mkdocs -pyzmq==26.2.0 +pyzmq==26.0.3 # via maggma -rdkit==2024.3.5 +rdkit==2023.9.6 # via solvation-analysis referencing==0.35.1 # via # jsonschema # jsonschema-specifications -requests==2.32.3 +requests==2.32.2 # via # dgl # matminer + # mongogrant # mp-api # pymatgen # torchdata +rich==13.7.1 + # via typer robocrys==0.2.9 # via emmet-core (setup.py) -rpds-py==0.20.0 +rpds-py==0.18.1 # via # jsonschema # referencing @@ -546,13 +540,11 @@ ruamel-yaml==0.18.6 # robocrys ruamel-yaml-clib==0.2.8 # via ruamel-yaml -s3transfer==0.10.2 +s3transfer==0.10.1 # via boto3 -scikit-image==0.24.0 - # via pymatgen-analysis-defects -scikit-learn==1.5.1 +scikit-learn==1.5.0 # via matminer -scipy==1.14.1 +scipy==1.12.0 # via # ase # dgl @@ -560,30 +552,34 @@ scipy==1.14.1 # mdanalysis # pymatgen # robocrys - # scikit-image # scikit-learn # solvation-analysis # statsmodels -seaborn==0.13.2 - # via pymatgen-analysis-diffusion seekpath==2.1.0 # via emmet-core (setup.py) sentinels==1.0.0 # via mongomock -shapely==2.0.6 +shapely==2.0.4 # via pymatgen-analysis-alloys +shellingham==1.5.4 + # via typer six==1.16.0 # via + # livereload # patsy # pybtex # python-dateutil smart-open==7.0.4 # via mp-api +sniffio==1.3.1 + # via + # anyio + # httpx snowballstemmer==2.2.0 # via pydocstyle -solvation-analysis==0.4.1 +solvation-analysis==0.4.0 # via emmet-core (setup.py) -spglib==2.5.0 +spglib==2.4.0 # via # phonopy # pymatgen @@ -591,68 +587,64 @@ spglib==2.5.0 # seekpath sshtunnel==0.4.0 # via maggma +starlette==0.37.2 + # via fastapi statsmodels==0.14.2 # via solvation-analysis -sympy==1.13.2 +sympy==1.12 # via # matminer # pymatgen # torch tabulate==0.9.0 # via pymatgen -tenacity==9.0.0 +tenacity==8.3.0 # via plotly threadpoolctl==3.5.0 # via # mdanalysis # scikit-learn -tifffile==2024.8.30 - # via scikit-image tomli==2.0.1 # via # coverage # mypy # pytest -torch==2.4.1 +torch==2.2.1 # via # chgnet - # lightning # matgl # pytorch-lightning # torchdata # torchmetrics torchdata==0.7.1 - # via - # dgl - # matgl -torchmetrics==1.4.1 - # via - # lightning - # pytorch-lightning -tornado==6.4.1 + # via dgl +torchmetrics==1.4.0.post0 + # via pytorch-lightning +tornado==6.4 # via livereload -tqdm==4.66.5 +tqdm==4.66.4 # via # dgl - # lightning # maggma # matminer # mdanalysis # pymatgen # pytorch-lightning -triton==3.0.0 - # via torch -typeguard==4.3.0 +typeguard==4.2.1 # via inflect -types-requests==2.32.0.20240712 +typer==0.12.3 + # via fastapi-cli +types-requests==2.32.0.20240523 # via emmet-core (setup.py) -types-setuptools==74.0.0.20240831 +types-setuptools==70.0.0.20240523 # via emmet-core (setup.py) -typing-extensions==4.12.2 +typing-extensions==4.11.0 # via + # anyio # emmet-core # emmet-core (setup.py) - # lightning + # fastapi + # inflect # lightning-utilities # mp-api # mypy @@ -662,27 +654,43 @@ typing-extensions==4.12.2 # pytorch-lightning # torch # typeguard + # typer + # uvicorn tzdata==2024.1 # via pandas -uncertainties==3.2.2 +ujson==5.10.0 + # via fastapi +uncertainties==3.1.7 # via pymatgen -urllib3==2.2.2 +urllib3==2.2.1 # via # botocore # requests # torchdata # types-requests -virtualenv==20.26.3 +uvicorn[standard]==0.29.0 + # via + # fastapi + # maggma +uvloop==0.19.0 + # via uvicorn +virtualenv==20.26.2 # via pre-commit -watchdog==5.0.2 +watchdog==4.0.1 # via mkdocs -wcmatch==9.0 +watchfiles==0.21.0 + # via uvicorn +wcmatch==8.5.2 # via mkdocs-awesome-pages-plugin -wincertstore==0.2.1 +websockets==12.0 + # via uvicorn +werkzeug==3.0.3 + # via flask +wincertstore==0.2 # via emmet-core (setup.py) wrapt==1.16.0 # via smart-open -yarl==1.9.8 +yarl==1.9.4 # via aiohttp # The following packages are considered to be unsafe in a requirements file: diff --git a/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt b/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt index e62b3a64f9..17b5219e68 100644 --- a/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt +++ b/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt @@ -4,41 +4,47 @@ # # pip-compile --all-extras --output-file=requirements/ubuntu-latest_py3.11_extras.txt # -aiohappyeyeballs==2.4.0 - # via aiohttp -aiohttp==3.10.5 +aiohttp==3.9.5 # via fsspec -aioitertools==0.12.0 +aioitertools==0.11.0 # via maggma aiosignal==1.3.1 # via aiohttp annotated-types==0.7.0 # via pydantic -ase==3.23.0 +anyio==4.3.0 + # via + # httpx + # starlette + # watchfiles +ase==3.22.1 # via # chgnet # matcalc # matgl - # pymatgen-analysis-diffusion -attrs==24.2.0 +attrs==23.2.0 # via # aiohttp - # jsonlines # jsonschema # referencing -bcrypt==4.2.0 +bcrypt==4.1.3 # via paramiko -boto3==1.35.12 +blinker==1.8.2 + # via flask +boto3==1.34.112 # via maggma -botocore==1.35.12 +botocore==1.34.112 # via # boto3 # s3transfer -bracex==2.5 +bracex==2.4 # via wcmatch -certifi==2024.8.30 - # via requests -cffi==1.17.0 +certifi==2024.2.2 + # via + # httpcore + # httpx + # requests +cffi==1.16.0 # via # cryptography # pynacl @@ -46,27 +52,31 @@ cfgv==3.4.0 # via pre-commit charset-normalizer==3.3.2 # via requests -chgnet==0.3.8 +chgnet==0.3.5 # via emmet-core (setup.py) click==8.1.7 # via + # flask # mkdocs # mkdocstrings + # mongogrant + # typer + # uvicorn colorama==0.4.6 # via griffe -contourpy==1.3.0 +contourpy==1.2.1 # via matplotlib -coverage[toml]==7.6.1 +coverage[toml]==7.5.1 # via pytest-cov -cryptography==43.0.1 +cryptography==42.0.7 # via paramiko csscompressor==0.9.5 # via mkdocs-minify-plugin -custodian==2024.6.24 +custodian==2024.4.18 # via emmet-core (setup.py) cycler==0.12.1 # via matplotlib -cython==3.0.11 +cython==3.0.10 # via chgnet dgl==2.1.0 # via matgl @@ -74,55 +84,79 @@ distlib==0.3.8 # via virtualenv dnspython==2.6.1 # via + # email-validator # maggma # pymongo -emmet-core==0.84.2rc7 +email-validator==2.1.1 + # via fastapi +emmet-core==0.83.6 # via mp-api +fastapi==0.111.0 + # via maggma +fastapi-cli==0.0.4 + # via fastapi fasteners==0.19 # via mdanalysis -filelock==3.15.4 +filelock==3.14.0 # via # torch - # triton # virtualenv -flake8==7.1.1 +flake8==7.0.0 # via emmet-core (setup.py) -fonttools==4.53.1 +flask==3.0.3 + # via mongogrant +fonttools==4.51.0 # via matplotlib frozenlist==1.4.1 # via # aiohttp # aiosignal -fsspec[http]==2024.9.0 +fsspec[http]==2024.5.0 # via - # lightning # pytorch-lightning # torch +future==1.0.0 + # via uncertainties ghp-import==2.1.0 # via mkdocs griddataformats==1.0.2 # via mdanalysis -griffe==1.2.0 +griffe==0.45.2 # via mkdocstrings-python +h11==0.14.0 + # via + # httpcore + # uvicorn h5py==3.11.0 # via phonopy htmlmin2==0.1.13 # via mkdocs-minify-plugin -identify==2.6.0 +httpcore==1.0.5 + # via httpx +httptools==0.6.1 + # via uvicorn +httpx==0.27.0 + # via fastapi +identify==2.5.36 # via pre-commit -idna==3.8 +idna==3.7 # via + # anyio + # email-validator + # httpx # requests # yarl -imageio==2.35.1 - # via scikit-image -inflect==7.3.1 +inflect==7.2.1 # via robocrys iniconfig==2.0.0 # via pytest +itsdangerous==2.2.0 + # via flask jinja2==3.1.4 # via # emmet-core (setup.py) + # fastapi + # flask # mkdocs # mkdocs-material # mkdocstrings @@ -140,55 +174,50 @@ joblib==1.4.2 # scikit-learn jsmin==3.0.1 # via mkdocs-minify-plugin -jsonlines==4.0.0 - # via maggma -jsonschema==4.23.0 +jsonschema==4.22.0 # via maggma jsonschema-specifications==2023.12.1 # via jsonschema -kiwisolver==1.4.7 +kiwisolver==1.4.5 # via matplotlib latexcodec==3.0.0 # via pybtex -lazy-loader==0.4 - # via scikit-image -lightning==2.4.0 - # via matgl -lightning-utilities==0.11.7 +lightning-utilities==0.11.2 # via - # lightning # pytorch-lightning # torchmetrics -livereload==2.7.0 +livereload==2.6.3 # via emmet-core (setup.py) -maggma==0.69.3 +maggma==0.67.0 # via mp-api -markdown==3.7 +markdown==3.6 # via # mkdocs # mkdocs-autorefs # mkdocs-material # mkdocstrings # pymdown-extensions +markdown-it-py==3.0.0 + # via rich markupsafe==2.1.5 # via # jinja2 # mkdocs # mkdocs-autorefs # mkdocstrings + # werkzeug matcalc==0.0.4 # via emmet-core (setup.py) -matgl==1.1.3 +matgl==1.1.1 # via emmet-core (setup.py) matminer==0.9.2 # via robocrys -matplotlib==3.9.2 +matplotlib==3.9.0 # via # ase # mdanalysis # phonopy # pymatgen - # seaborn # solvation-analysis mccabe==0.7.0 # via flake8 @@ -198,11 +227,13 @@ mdanalysis==2.7.0 # via # emmet-core (setup.py) # solvation-analysis +mdurl==0.1.2 + # via markdown-it-py mergedeep==1.3.4 # via # mkdocs # mkdocs-get-deps -mkdocs==1.6.1 +mkdocs==1.6.0 # via # emmet-core (setup.py) # mkdocs-autorefs @@ -211,15 +242,13 @@ mkdocs==1.6.1 # mkdocs-material # mkdocs-minify-plugin # mkdocstrings -mkdocs-autorefs==1.2.0 - # via - # mkdocstrings - # mkdocstrings-python -mkdocs-awesome-pages-plugin==2.9.3 +mkdocs-autorefs==1.0.1 + # via mkdocstrings +mkdocs-awesome-pages-plugin==2.9.2 # via emmet-core (setup.py) mkdocs-get-deps==0.2.0 # via mkdocs -mkdocs-markdownextradata-plugin==0.2.6 +mkdocs-markdownextradata-plugin==0.2.5 # via emmet-core (setup.py) mkdocs-material==8.2.16 # via emmet-core (setup.py) @@ -229,17 +258,19 @@ mkdocs-material-extensions==1.3.1 # mkdocs-material mkdocs-minify-plugin==0.8.0 # via emmet-core (setup.py) -mkdocstrings[python]==0.26.0 +mkdocstrings[python]==0.25.1 # via # emmet-core (setup.py) # mkdocstrings-python -mkdocstrings-python==1.11.1 +mkdocstrings-python==1.10.3 # via mkdocstrings mmtf-python==1.1.3 # via mdanalysis +mongogrant==0.3.3 + # via maggma mongomock==4.1.2 # via maggma -monty==2024.7.30 +monty==2024.5.15 # via # custodian # emmet-core @@ -249,15 +280,13 @@ monty==2024.7.30 # mp-api # pymatgen # robocrys -more-itertools==10.4.0 +more-itertools==10.2.0 # via inflect -mp-api==0.42.1 +mp-api==0.41.2 # via robocrys -mp-pyrho==0.4.4 - # via pymatgen-analysis-defects mpmath==1.3.0 # via sympy -mrcfile==1.5.3 +mrcfile==1.5.0 # via griddataformats msgpack==1.0.8 # via @@ -268,7 +297,7 @@ multidict==6.0.5 # via # aiohttp # yarl -mypy==1.11.2 +mypy==1.10.0 # via emmet-core (setup.py) mypy-extensions==1.0.0 # via @@ -281,9 +310,8 @@ networkx==3.3 # dgl # pymatgen # robocrys - # scikit-image # torch -nodeenv==1.9.1 +nodeenv==1.8.0 # via pre-commit numpy==1.26.4 # via @@ -291,11 +319,8 @@ numpy==1.26.4 # chgnet # contourpy # dgl - # emmet-core - # emmet-core (setup.py) # griddataformats # h5py - # imageio # maggma # matminer # matplotlib @@ -305,60 +330,25 @@ numpy==1.26.4 # patsy # phonopy # pymatgen - # pymatgen-analysis-defects - # pymatgen-analysis-diffusion + # pytorch-lightning # rdkit # robocrys - # scikit-image # scikit-learn # scipy - # seaborn # seekpath # shapely # solvation-analysis # spglib # statsmodels - # tifffile # torchmetrics -nvidia-cublas-cu12==12.1.3.1 - # via - # nvidia-cudnn-cu12 - # nvidia-cusolver-cu12 - # torch -nvidia-cuda-cupti-cu12==12.1.105 - # via torch -nvidia-cuda-nvrtc-cu12==12.1.105 - # via torch -nvidia-cuda-runtime-cu12==12.1.105 - # via torch -nvidia-cudnn-cu12==9.1.0.70 - # via torch -nvidia-cufft-cu12==11.0.2.54 - # via torch -nvidia-curand-cu12==10.3.2.106 - # via torch -nvidia-cusolver-cu12==11.4.5.107 - # via torch -nvidia-cusparse-cu12==12.1.0.106 - # via - # nvidia-cusolver-cu12 - # torch nvidia-ml-py3==7.352.0 # via chgnet -nvidia-nccl-cu12==2.20.5 - # via torch -nvidia-nvjitlink-cu12==12.6.68 - # via - # nvidia-cusolver-cu12 - # nvidia-cusparse-cu12 -nvidia-nvtx-cu12==12.1.105 - # via torch -orjson==3.10.7 - # via maggma -packaging==24.1 +orjson==3.10.3 + # via + # fastapi + # maggma +packaging==24.0 # via - # lazy-loader - # lightning # lightning-utilities # matplotlib # mdanalysis @@ -367,47 +357,42 @@ packaging==24.1 # plotly # pytest # pytorch-lightning - # scikit-image # statsmodels # torchmetrics palettable==3.3.3 # via pymatgen pandas==2.2.2 # via - # maggma # matminer # pymatgen - # seaborn # solvation-analysis # statsmodels -paramiko==3.4.1 +paramiko==3.4.0 # via sshtunnel pathspec==0.12.1 # via mkdocs patsy==0.5.6 # via statsmodels -phonopy==2.27.0 +phonopy==2.23.1 # via matcalc -pillow==10.4.0 +pillow==10.3.0 # via - # imageio # matplotlib # rdkit - # scikit-image platformdirs==4.2.2 # via # mkdocs-get-deps # mkdocstrings # virtualenv -plotly==5.24.0 +plotly==5.22.0 # via # pymatgen # solvation-analysis pluggy==1.5.0 # via pytest -pre-commit==3.8.0 +pre-commit==3.7.1 # via emmet-core (setup.py) -psutil==6.0.0 +psutil==5.9.8 # via # custodian # dgl @@ -419,35 +404,38 @@ pybtex==0.24.0 # emmet-core (setup.py) # pymatgen # robocrys -pycodestyle==2.12.1 +pycodestyle==2.11.1 # via # emmet-core (setup.py) # flake8 pycparser==2.22 # via cffi -pydantic==2.8.2 +pydantic==2.7.1 # via # emmet-core # emmet-core (setup.py) + # fastapi # maggma # matgl # pydantic-settings -pydantic-core==2.20.1 +pydantic-core==2.18.2 # via pydantic -pydantic-settings==2.4.0 +pydantic-settings==2.2.1 # via # emmet-core # emmet-core (setup.py) # maggma -pydash==8.0.3 +pydash==8.0.1 # via maggma pydocstyle==6.3.0 # via emmet-core (setup.py) pyflakes==3.2.0 # via flake8 pygments==2.18.0 - # via mkdocs-material -pymatgen==2024.8.9 + # via + # mkdocs-material + # rich +pymatgen==2024.4.13 # via # chgnet # emmet-core @@ -456,30 +444,27 @@ pymatgen==2024.8.9 # matgl # matminer # mp-api - # mp-pyrho # pymatgen-analysis-alloys - # pymatgen-analysis-defects # pymatgen-analysis-diffusion # robocrys pymatgen-analysis-alloys==0.0.6 # via emmet-core (setup.py) -pymatgen-analysis-defects==2024.7.19 +pymatgen-analysis-diffusion==2023.8.15 # via emmet-core (setup.py) -pymatgen-analysis-diffusion==2024.7.15 - # via emmet-core (setup.py) -pymdown-extensions==10.9 +pymdown-extensions==10.8.1 # via # mkdocs-material # mkdocstrings -pymongo==4.8.0 +pymongo==4.7.2 # via # maggma # matminer + # mongogrant pynacl==1.5.0 # via paramiko -pyparsing==3.1.4 +pyparsing==3.1.2 # via matplotlib -pytest==8.3.2 +pytest==8.2.1 # via # emmet-core (setup.py) # pytest-cov @@ -494,14 +479,17 @@ python-dateutil==2.9.0.post0 # matplotlib # pandas python-dotenv==1.0.1 - # via pydantic-settings -pytorch-lightning==2.4.0 - # via lightning + # via + # pydantic-settings + # uvicorn +python-multipart==0.0.9 + # via fastapi +pytorch-lightning==2.2.5 + # via matgl pytz==2024.1 # via pandas -pyyaml==6.0.2 +pyyaml==6.0.1 # via - # lightning # mkdocs # mkdocs-get-deps # mkdocs-markdownextradata-plugin @@ -511,26 +499,30 @@ pyyaml==6.0.2 # pymdown-extensions # pytorch-lightning # pyyaml-env-tag + # uvicorn pyyaml-env-tag==0.1 # via mkdocs -pyzmq==26.2.0 +pyzmq==26.0.3 # via maggma -rdkit==2024.3.5 +rdkit==2023.9.6 # via solvation-analysis referencing==0.35.1 # via # jsonschema # jsonschema-specifications -requests==2.32.3 +requests==2.32.2 # via # dgl # matminer + # mongogrant # mp-api # pymatgen # torchdata +rich==13.7.1 + # via typer robocrys==0.2.9 # via emmet-core (setup.py) -rpds-py==0.20.0 +rpds-py==0.18.1 # via # jsonschema # referencing @@ -542,13 +534,11 @@ ruamel-yaml==0.18.6 # robocrys ruamel-yaml-clib==0.2.8 # via ruamel-yaml -s3transfer==0.10.2 +s3transfer==0.10.1 # via boto3 -scikit-image==0.24.0 - # via pymatgen-analysis-defects -scikit-learn==1.5.1 +scikit-learn==1.5.0 # via matminer -scipy==1.14.1 +scipy==1.12.0 # via # ase # dgl @@ -556,30 +546,34 @@ scipy==1.14.1 # mdanalysis # pymatgen # robocrys - # scikit-image # scikit-learn # solvation-analysis # statsmodels -seaborn==0.13.2 - # via pymatgen-analysis-diffusion seekpath==2.1.0 # via emmet-core (setup.py) sentinels==1.0.0 # via mongomock -shapely==2.0.6 +shapely==2.0.4 # via pymatgen-analysis-alloys +shellingham==1.5.4 + # via typer six==1.16.0 # via + # livereload # patsy # pybtex # python-dateutil smart-open==7.0.4 # via mp-api +sniffio==1.3.1 + # via + # anyio + # httpx snowballstemmer==2.2.0 # via pydocstyle -solvation-analysis==0.4.1 +solvation-analysis==0.4.0 # via emmet-core (setup.py) -spglib==2.5.0 +spglib==2.4.0 # via # phonopy # pymatgen @@ -587,63 +581,58 @@ spglib==2.5.0 # seekpath sshtunnel==0.4.0 # via maggma +starlette==0.37.2 + # via fastapi statsmodels==0.14.2 # via solvation-analysis -sympy==1.13.2 +sympy==1.12 # via # matminer # pymatgen # torch tabulate==0.9.0 # via pymatgen -tenacity==9.0.0 +tenacity==8.3.0 # via plotly threadpoolctl==3.5.0 # via # mdanalysis # scikit-learn -tifffile==2024.8.30 - # via scikit-image -torch==2.4.1 +torch==2.2.1 # via # chgnet - # lightning # matgl # pytorch-lightning # torchdata # torchmetrics torchdata==0.7.1 - # via - # dgl - # matgl -torchmetrics==1.4.1 - # via - # lightning - # pytorch-lightning -tornado==6.4.1 + # via dgl +torchmetrics==1.4.0.post0 + # via pytorch-lightning +tornado==6.4 # via livereload -tqdm==4.66.5 +tqdm==4.66.4 # via # dgl - # lightning # maggma # matminer # mdanalysis # pymatgen # pytorch-lightning -triton==3.0.0 - # via torch -typeguard==4.3.0 +typeguard==4.2.1 # via inflect -types-requests==2.32.0.20240712 +typer==0.12.3 + # via fastapi-cli +types-requests==2.32.0.20240523 # via emmet-core (setup.py) -types-setuptools==74.0.0.20240831 +types-setuptools==70.0.0.20240523 # via emmet-core (setup.py) -typing-extensions==4.12.2 +typing-extensions==4.11.0 # via # emmet-core # emmet-core (setup.py) - # lightning + # fastapi + # inflect # lightning-utilities # mp-api # mypy @@ -653,27 +642,42 @@ typing-extensions==4.12.2 # pytorch-lightning # torch # typeguard + # typer tzdata==2024.1 # via pandas -uncertainties==3.2.2 +ujson==5.10.0 + # via fastapi +uncertainties==3.1.7 # via pymatgen -urllib3==2.2.2 +urllib3==2.2.1 # via # botocore # requests # torchdata # types-requests -virtualenv==20.26.3 +uvicorn[standard]==0.29.0 + # via + # fastapi + # maggma +uvloop==0.19.0 + # via uvicorn +virtualenv==20.26.2 # via pre-commit -watchdog==5.0.2 +watchdog==4.0.1 # via mkdocs -wcmatch==9.0 +watchfiles==0.21.0 + # via uvicorn +wcmatch==8.5.2 # via mkdocs-awesome-pages-plugin -wincertstore==0.2.1 +websockets==12.0 + # via uvicorn +werkzeug==3.0.3 + # via flask +wincertstore==0.2 # via emmet-core (setup.py) wrapt==1.16.0 # via smart-open -yarl==1.9.8 +yarl==1.9.4 # via aiohttp # The following packages are considered to be unsafe in a requirements file: diff --git a/emmet-core/requirements/ubuntu-latest_py3.9_extras.txt b/emmet-core/requirements/ubuntu-latest_py3.9_extras.txt new file mode 100644 index 0000000000..bf074ff749 --- /dev/null +++ b/emmet-core/requirements/ubuntu-latest_py3.9_extras.txt @@ -0,0 +1,543 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --all-extras --output-file=requirements/ubuntu-latest_py3.9_extras.txt +# +aiohttp==3.9.5 + # via fsspec +aiosignal==1.3.1 + # via aiohttp +annotated-types==0.7.0 + # via pydantic +ase==3.23.0 + # via + # chgnet + # matcalc + # matgl +async-timeout==4.0.3 + # via aiohttp +attrs==23.2.0 + # via aiohttp +bracex==2.4 + # via wcmatch +certifi==2024.6.2 + # via requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.3.2 + # via requests +chgnet==0.3.7 + # via emmet-core (setup.py) +click==8.1.7 + # via + # mkdocs + # mkdocstrings +colorama==0.4.6 + # via griffe +contourpy==1.2.1 + # via matplotlib +coverage[toml]==7.5.3 + # via pytest-cov +csscompressor==0.9.5 + # via mkdocs-minify-plugin +custodian==2024.4.18 + # via emmet-core (setup.py) +cycler==0.12.1 + # via matplotlib +cython==3.0.10 + # via chgnet +dgl==2.1.0 + # via matgl +distlib==0.3.8 + # via virtualenv +dnspython==2.6.1 + # via pymongo +emmet-core==0.83.8 + # via mp-api +exceptiongroup==1.2.1 + # via pytest +fasteners==0.19 + # via mdanalysis +filelock==3.14.0 + # via + # torch + # virtualenv +flake8==7.0.0 + # via emmet-core (setup.py) +fonttools==4.53.0 + # via matplotlib +frozenlist==1.4.1 + # via + # aiohttp + # aiosignal +fsspec[http]==2024.5.0 + # via + # pytorch-lightning + # torch +ghp-import==2.1.0 + # via mkdocs +griddataformats==1.0.2 + # via mdanalysis +griffe==0.45.2 + # via mkdocstrings-python +h5py==3.11.0 + # via phonopy +htmlmin2==0.1.13 + # via mkdocs-minify-plugin +identify==2.5.36 + # via pre-commit +idna==3.7 + # via + # requests + # yarl +importlib-metadata==7.1.0 + # via + # markdown + # mkdocs + # mkdocs-get-deps + # mkdocstrings + # typeguard +importlib-resources==6.4.0 + # via + # matplotlib + # spglib +inflect==7.2.1 + # via robocrys +iniconfig==2.0.0 + # via pytest +jinja2==3.1.4 + # via + # emmet-core (setup.py) + # mkdocs + # mkdocs-material + # mkdocstrings + # torch +joblib==1.4.2 + # via + # matcalc + # mdanalysis + # pymatgen + # pymatgen-analysis-diffusion + # scikit-learn +jsmin==3.0.1 + # via mkdocs-minify-plugin +kiwisolver==1.4.5 + # via matplotlib +latexcodec==3.0.0 + # via pybtex +lightning-utilities==0.11.2 + # via + # pytorch-lightning + # torchmetrics +livereload==2.6.3 + # via emmet-core (setup.py) +markdown==3.6 + # via + # mkdocs + # mkdocs-autorefs + # mkdocs-material + # mkdocstrings + # pymdown-extensions +markupsafe==2.1.5 + # via + # jinja2 + # mkdocs + # mkdocs-autorefs + # mkdocstrings +matcalc==0.0.4 + # via emmet-core (setup.py) +matgl==1.1.1 + # via emmet-core (setup.py) +matminer==0.9.2 + # via robocrys +matplotlib==3.9.0 + # via + # ase + # mdanalysis + # phonopy + # pymatgen + # solvation-analysis +mccabe==0.7.0 + # via flake8 +mda-xdrlib==0.2.0 + # via mdanalysis +mdanalysis==2.7.0 + # via + # emmet-core (setup.py) + # solvation-analysis +mergedeep==1.3.4 + # via + # mkdocs + # mkdocs-get-deps +mkdocs==1.6.0 + # via + # emmet-core (setup.py) + # mkdocs-autorefs + # mkdocs-awesome-pages-plugin + # mkdocs-markdownextradata-plugin + # mkdocs-material + # mkdocs-minify-plugin + # mkdocstrings +mkdocs-autorefs==1.0.1 + # via mkdocstrings +mkdocs-awesome-pages-plugin==2.9.2 + # via emmet-core (setup.py) +mkdocs-get-deps==0.2.0 + # via mkdocs +mkdocs-markdownextradata-plugin==0.2.5 + # via emmet-core (setup.py) +mkdocs-material==8.2.16 + # via emmet-core (setup.py) +mkdocs-material-extensions==1.3.1 + # via + # emmet-core (setup.py) + # mkdocs-material +mkdocs-minify-plugin==0.8.0 + # via emmet-core (setup.py) +mkdocstrings[python]==0.25.1 + # via + # emmet-core (setup.py) + # mkdocstrings-python +mkdocstrings-python==1.10.3 + # via mkdocstrings +mmtf-python==1.1.3 + # via mdanalysis +monty==2024.5.24 + # via + # custodian + # emmet-core + # emmet-core (setup.py) + # matminer + # mp-api + # pymatgen + # robocrys +more-itertools==10.2.0 + # via inflect +mp-api==0.36.1 + # via robocrys +mpmath==1.3.0 + # via sympy +mrcfile==1.5.0 + # via griddataformats +msgpack==1.0.8 + # via + # mmtf-python + # mp-api +multidict==6.0.5 + # via + # aiohttp + # yarl +mypy==1.10.0 + # via emmet-core (setup.py) +mypy-extensions==1.0.0 + # via + # emmet-core (setup.py) + # mypy +natsort==8.4.0 + # via mkdocs-awesome-pages-plugin +networkx==3.2.1 + # via + # dgl + # pymatgen + # robocrys + # torch +nodeenv==1.9.0 + # via pre-commit +numpy==1.26.4 + # via + # ase + # chgnet + # contourpy + # dgl + # griddataformats + # h5py + # matminer + # matplotlib + # mdanalysis + # mrcfile + # pandas + # patsy + # phonopy + # pymatgen + # pytorch-lightning + # rdkit + # robocrys + # scikit-learn + # scipy + # seekpath + # shapely + # solvation-analysis + # spglib + # statsmodels + # torchmetrics +nvidia-ml-py3==7.352.0 + # via chgnet +packaging==24.0 + # via + # lightning-utilities + # matplotlib + # mdanalysis + # mkdocs + # plotly + # pytest + # pytorch-lightning + # statsmodels + # torchmetrics +palettable==3.3.3 + # via pymatgen +pandas==2.2.2 + # via + # matminer + # pymatgen + # solvation-analysis + # statsmodels +pathspec==0.12.1 + # via mkdocs +patsy==0.5.6 + # via statsmodels +phonopy==2.23.1 + # via matcalc +pillow==10.3.0 + # via + # matplotlib + # rdkit +platformdirs==4.2.2 + # via + # mkdocs-get-deps + # mkdocstrings + # virtualenv +plotly==5.22.0 + # via + # pymatgen + # solvation-analysis +pluggy==1.5.0 + # via pytest +pre-commit==3.7.1 + # via emmet-core (setup.py) +psutil==5.9.8 + # via + # custodian + # dgl +pubchempy==1.0.4 + # via robocrys +pybtex==0.24.0 + # via + # emmet-core + # emmet-core (setup.py) + # pymatgen + # robocrys +pycodestyle==2.11.1 + # via + # emmet-core (setup.py) + # flake8 +pydantic==2.7.3 + # via + # emmet-core + # emmet-core (setup.py) + # matgl + # pydantic-settings +pydantic-core==2.18.4 + # via pydantic +pydantic-settings==2.3.0 + # via + # emmet-core + # emmet-core (setup.py) +pydocstyle==6.3.0 + # via emmet-core (setup.py) +pyflakes==3.2.0 + # via flake8 +pygments==2.18.0 + # via mkdocs-material +pymatgen==2024.4.13 + # via + # chgnet + # emmet-core + # emmet-core (setup.py) + # matcalc + # matgl + # matminer + # mp-api + # pymatgen-analysis-alloys + # pymatgen-analysis-diffusion + # robocrys +pymatgen-analysis-alloys==0.0.6 + # via emmet-core (setup.py) +pymatgen-analysis-diffusion==2023.8.15 + # via emmet-core (setup.py) +pymdown-extensions==10.8.1 + # via + # mkdocs-material + # mkdocstrings +pymongo==4.7.2 + # via matminer +pyparsing==3.1.2 + # via matplotlib +pytest==8.2.1 + # via + # emmet-core (setup.py) + # pytest-cov + # solvation-analysis +pytest-cov==5.0.0 + # via emmet-core (setup.py) +python-dateutil==2.9.0.post0 + # via + # ghp-import + # matplotlib + # pandas +python-dotenv==1.0.1 + # via pydantic-settings +pytorch-lightning==2.2.5 + # via matgl +pytz==2024.1 + # via pandas +pyyaml==6.0.1 + # via + # mkdocs + # mkdocs-get-deps + # mkdocs-markdownextradata-plugin + # phonopy + # pre-commit + # pybtex + # pymdown-extensions + # pytorch-lightning + # pyyaml-env-tag +pyyaml-env-tag==0.1 + # via mkdocs +rdkit==2023.9.6 + # via solvation-analysis +requests==2.32.3 + # via + # dgl + # matminer + # mp-api + # pymatgen + # torchdata +robocrys==0.2.9 + # via emmet-core (setup.py) +ruamel-yaml==0.18.6 + # via + # custodian + # pymatgen + # robocrys +ruamel-yaml-clib==0.2.8 + # via ruamel-yaml +scikit-learn==1.5.0 + # via matminer +scipy==1.12.0 + # via + # ase + # dgl + # griddataformats + # mdanalysis + # pymatgen + # robocrys + # scikit-learn + # solvation-analysis + # statsmodels +seekpath==2.1.0 + # via emmet-core (setup.py) +shapely==2.0.4 + # via pymatgen-analysis-alloys +six==1.16.0 + # via + # livereload + # patsy + # pybtex + # python-dateutil +snowballstemmer==2.2.0 + # via pydocstyle +solvation-analysis==0.4.0 + # via emmet-core (setup.py) +spglib==2.4.0 + # via + # phonopy + # pymatgen + # robocrys + # seekpath +statsmodels==0.14.2 + # via solvation-analysis +sympy==1.12.1 + # via + # matminer + # pymatgen + # torch +tabulate==0.9.0 + # via pymatgen +tenacity==8.3.0 + # via plotly +threadpoolctl==3.5.0 + # via + # mdanalysis + # scikit-learn +tomli==2.0.1 + # via + # coverage + # mypy + # pytest +torch==2.2.1 + # via + # chgnet + # matgl + # pytorch-lightning + # torchdata + # torchmetrics +torchdata==0.7.1 + # via dgl +torchmetrics==1.4.0.post0 + # via pytorch-lightning +tornado==6.4 + # via livereload +tqdm==4.66.4 + # via + # dgl + # matminer + # mdanalysis + # pymatgen + # pytorch-lightning +typeguard==4.3.0 + # via inflect +types-requests==2.32.0.20240602 + # via emmet-core (setup.py) +types-setuptools==70.0.0.20240524 + # via emmet-core (setup.py) +typing-extensions==4.12.1 + # via + # emmet-core + # emmet-core (setup.py) + # inflect + # lightning-utilities + # mkdocstrings + # mp-api + # mypy + # pydantic + # pydantic-core + # pytorch-lightning + # torch + # typeguard +tzdata==2024.1 + # via pandas +uncertainties==3.2.0 + # via pymatgen +urllib3==2.2.1 + # via + # requests + # torchdata + # types-requests +virtualenv==20.26.2 + # via pre-commit +watchdog==4.0.1 + # via mkdocs +wcmatch==8.5.2 + # via mkdocs-awesome-pages-plugin +wincertstore==0.2 + # via emmet-core (setup.py) +yarl==1.9.4 + # via aiohttp +zipp==3.19.1 + # via + # importlib-metadata + # importlib-resources + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/emmet-core/setup.py b/emmet-core/setup.py index bbcfb7de7b..f2af029cd0 100644 --- a/emmet-core/setup.py +++ b/emmet-core/setup.py @@ -27,8 +27,7 @@ }, include_package_data=True, install_requires=[ - "numpy<2", - "pymatgen", + "pymatgen==2024.4.13", "monty>=2024.2.2", "pydantic>=2.0", "pydantic-settings>=2.0", @@ -40,10 +39,9 @@ "matcalc>=0.0.4", "seekpath>=2.0.1", "robocrys>=0.2.8", - "pymatgen-analysis-defects>=2024.7.18", - "pymatgen-analysis-diffusion>=2024.7.15", - "pymatgen-analysis-alloys>=0.0.6", - "solvation-analysis>=0.4.1", + "pymatgen-analysis-diffusion>=2023.8.15", + "pymatgen-analysis-alloys>=0.0.3", + "solvation-analysis>=0.4.0", "MDAnalysis>=2.7.0", ], "ml": ["chgnet", "matgl"], From 26cd2819d0e99e7f94e1d7a9b1257376d92e24d2 Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 14:03:43 -0400 Subject: [PATCH 06/17] Add testing for calc output from directory and related test files. --- .../openmm_md/test_tasks.py | 6 ++---- test_files/classical_md/calc_output/state.csv | 18 ------------------ test_files/openmm/calc_output/state.csv | 16 ++++++++++++++++ .../calc_output/trajectory.dcd | Bin 4 files changed, 18 insertions(+), 22 deletions(-) rename emmet-core/tests/{classical_md => }/openmm_md/test_tasks.py (88%) delete mode 100644 test_files/classical_md/calc_output/state.csv create mode 100644 test_files/openmm/calc_output/state.csv rename test_files/{classical_md => openmm}/calc_output/trajectory.dcd (100%) diff --git a/emmet-core/tests/classical_md/openmm_md/test_tasks.py b/emmet-core/tests/openmm_md/test_tasks.py similarity index 88% rename from emmet-core/tests/classical_md/openmm_md/test_tasks.py rename to emmet-core/tests/openmm_md/test_tasks.py index 2c847782f6..6e7905f0aa 100644 --- a/emmet-core/tests/classical_md/openmm_md/test_tasks.py +++ b/emmet-core/tests/openmm_md/test_tasks.py @@ -1,19 +1,17 @@ from pathlib import Path import numpy as np -from emmet.core.classical_md.openmm import CalculationOutput +from emmet.core.openmm.tasks import CalculationOutput def test_calc_output_from_directory(test_dir): - output_dir = test_dir / "classical_md" / "calc_output" + output_dir = test_dir / "openmm" / "calc_output" # Call the from_directory function calc_out = CalculationOutput.from_directory( output_dir, "state.csv", "trajectory.dcd", elapsed_time=10.0, - n_steps=1500, - state_interval=100, ) # Assert the expected attributes of the CalculationOutput object diff --git a/test_files/classical_md/calc_output/state.csv b/test_files/classical_md/calc_output/state.csv deleted file mode 100644 index f0ef40c9c6..0000000000 --- a/test_files/classical_md/calc_output/state.csv +++ /dev/null @@ -1,18 +0,0 @@ -#"Step","Potential Energy (kJ/mole)","Kinetic Energy (kJ/mole)","Total Energy (kJ/mole)","Temperature (K)","Box Volume (nm^3)","Density (g/mL)" -1000,-26192.479795343505,609.4196914344211,-25583.060103909083,29.614683433627977,21.873459457163882,0.9954543820541577 -2000,-25648.552310042112,1110.4255423058567,-24538.126767736256,53.96100811019054,21.896418997832697,0.9944105960647234 -100,-26192.479795343505,609.4196914344211,-25583.060103909083,29.614683433627977,21.873459457163882,0.9954543820541577 -200,-25648.552310042112,1110.4255423058567,-24538.126767736256,53.96100811019054,21.896418997832697,0.9944105960647234 -300,-25149.615762218746,1576.3685252566356,-23573.24723696211,76.60345654458364,21.902472359270778,0.9941357628560747 -400,-24737.794927124953,2048.908203465864,-22688.88672365909,99.5664706655355,22.025973627010902,0.988561569901083 -500,-24236.83499597991,2362.5727053481387,-21874.26229063177,114.80896292197377,22.427603013306435,0.9708585912814258 -600,-23952.5612414965,2744.7859341483563,-21207.775307348144,133.38257308612992,22.451255694017004,0.9698357795248072 -700,-23561.24490686599,2981.7360809766687,-20579.508825889323,144.89713962623532,22.617654864431856,0.9627006512314953 -800,-23257.599271389336,3263.6894834260456,-19993.90978796329,158.59863446457717,22.561532702010723,0.9650953840284621 -900,-22989.069612634717,3515.5816009845585,-19473.48801165016,170.83930444254142,22.982310428217957,0.9474256792121007 -1000,-22721.45251535368,3712.6360813537613,-19008.81643399992,180.4151454226322,23.05915218995153,0.9442685007650109 -1100,-22390.948659398535,3880.3415879751556,-18510.60707142338,188.5647762246478,23.158223282091488,0.9402289114362175 -1200,-22183.04180200165,4033.800234109862,-18149.24156789179,196.02208239526976,23.20718359651434,0.9382453056728586 -1300,-22048.592668279394,4216.629234793596,-17831.9634334858,204.90663774167015,22.84203464974821,0.9532439382565145 -1400,-21737.752101440245,4308.225194310769,-17429.526907129475,209.35773340370193,23.121043846718113,0.94174083193084 -1500,-21603.87279039141,4662.04510079883,-16941.82768959258,226.55157316706197,23.185483890016233,0.9391234261318885 diff --git a/test_files/openmm/calc_output/state.csv b/test_files/openmm/calc_output/state.csv new file mode 100644 index 0000000000..db5a2d3b5e --- /dev/null +++ b/test_files/openmm/calc_output/state.csv @@ -0,0 +1,16 @@ +"#""Step""",Potential Energy (kJ/mole),Kinetic Energy (kJ/mole),Total Energy (kJ/mole),Temperature (K),Box Volume (nm^3),Density (g/mL) +100,-26192.4798,609.4196914344211,-25583.0601,29.614683433627977,21.873459457163882,0.9954543820541577 +200,-25648.55231,1110.4255423058567,-24538.12677,53.96100811019054,21.896418997832697,0.9944105960647234 +300,-25149.61576,1576.3685252566356,-23573.24724,76.60345654458364,21.902472359270778,0.9941357628560747 +400,-24737.79493,2048.908203465864,-22688.88672,99.56647067,22.025973627010902,0.98856157 +500,-24236.835,2362.5727053481387,-21874.26229,114.80896292197377,22.427603013306435,0.9708585912814258 +600,-23952.56124,2744.7859341483563,-21207.77531,133.38257308612992,22.451255694017004,0.9698357795248072 +700,-23561.24491,2981.7360809766687,-20579.50883,144.89713962623532,22.617654864431856,0.9627006512314953 +800,-23257.59927,3263.6894834260456,-19993.90979,158.59863446457717,22.561532702010723,0.9650953840284621 +900,-22989.06961,3515.5816009845585,-19473.48801,170.83930444254142,22.982310428217957,0.9474256792121007 +1000,-22721.45252,3712.6360813537613,-19008.81643,180.4151454226322,23.05915218995153,0.9442685007650109 +1100,-22390.94866,3880.3415879751556,-18510.60707,188.5647762246478,23.158223282091488,0.9402289114362175 +1200,-22183.0418,4033.800234109862,-18149.24157,196.02208239526976,23.20718359651434,0.9382453056728586 +1300,-22048.59267,4216.629234793596,-17831.96343,204.90663774167015,22.84203464974821,0.9532439382565145 +1400,-21737.7521,4308.225194310769,-17429.52691,209.35773340370193,23.121043846718113,0.941740832 +1500,-21603.87279,4662.045101,-16941.82769,226.55157316706197,23.185483890016233,0.9391234261318885 diff --git a/test_files/classical_md/calc_output/trajectory.dcd b/test_files/openmm/calc_output/trajectory.dcd similarity index 100% rename from test_files/classical_md/calc_output/trajectory.dcd rename to test_files/openmm/calc_output/trajectory.dcd From 3029fd43500f2ba5de0e485cf9bf5db763dd8f8e Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 14:12:22 -0400 Subject: [PATCH 07/17] Fix linting error in molecules api code. --- emmet-api/emmet/api/routes/molecules/summary/resources.py | 1 - 1 file changed, 1 deletion(-) diff --git a/emmet-api/emmet/api/routes/molecules/summary/resources.py b/emmet-api/emmet/api/routes/molecules/summary/resources.py index c7fcbc853a..4f93958b7c 100644 --- a/emmet-api/emmet/api/routes/molecules/summary/resources.py +++ b/emmet-api/emmet/api/routes/molecules/summary/resources.py @@ -13,7 +13,6 @@ ChargeSpinQuery, HashQuery, StringRepQuery, - DeprecationQuery, ) from emmet.api.routes.materials.summary.query_operators import HasPropsQuery from emmet.api.routes.molecules.summary.hint_scheme import SummaryHintScheme From 16f1b44d3362a9dfd607b41952b2ab7309dafe48 Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 14:37:44 -0400 Subject: [PATCH 08/17] fixup! Refactor the dependencies and CI for emmet-core to include MD-related dependencies and allow installation from conda-forge. --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c0df75c313..508e18b67c 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -17,7 +17,7 @@ jobs: matrix: os: ["ubuntu-latest"] # TODO openbabel for windows and mac package: ["emmet-core", "emmet-builders", "emmet-api"] - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11"] steps: - uses: actions/checkout@v4 with: @@ -103,7 +103,7 @@ jobs: shell: bash -l {0} run: python${{ matrix.python-version }} -m pytest --cov=emmet --cov-report=xml ${{ matrix.package }}/tests - - uses: codecov/codecov-action@v4.4.1 + - uses: codecov/codecov-action@v4.5.0 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml From 64d05dcbd6c0da1b6b47ca460903417d54733017 Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 15:21:13 -0400 Subject: [PATCH 09/17] Respond to tsmathis review Remove SolvationDoc and updated documentation of CalculationsDoc Fix dependencies in setup.py Remove warnings --- emmet-core/emmet/core/openff/benchmarking.py | 8 -------- emmet-core/emmet/core/openff/core.py | 9 --------- emmet-core/emmet/core/openmm/calculations.py | 17 ++++++++++------- emmet-core/setup.py | 10 ++++++---- 4 files changed, 16 insertions(+), 28 deletions(-) delete mode 100644 emmet-core/emmet/core/openff/core.py diff --git a/emmet-core/emmet/core/openff/benchmarking.py b/emmet-core/emmet/core/openff/benchmarking.py index dc811d09c8..d06b0b9356 100644 --- a/emmet-core/emmet/core/openff/benchmarking.py +++ b/emmet-core/emmet/core/openff/benchmarking.py @@ -1,8 +1,6 @@ from pydantic import BaseModel, Field from typing import Optional -import warnings - from MDAnalysis import Universe from MDAnalysis.analysis.dielectric import DielectricConstant @@ -62,9 +60,6 @@ def from_universe( dielectric.run(**dielectric_run_kwargs) eps = dielectric.results.eps_mean else: - warnings.warn( - "Temperature is not provided, dielectric constant will not be calculated" - ) eps = None if u.atoms.ts.has_velocities: @@ -80,9 +75,6 @@ def from_universe( viscosity = viscosity_helfand.results.viscosity else: - warnings.warn( - "No velocities found in the universe, viscosity will not be calculated." - ) viscosity_function_values = None viscosity = None diff --git a/emmet-core/emmet/core/openff/core.py b/emmet-core/emmet/core/openff/core.py deleted file mode 100644 index a36833cc08..0000000000 --- a/emmet-core/emmet/core/openff/core.py +++ /dev/null @@ -1,9 +0,0 @@ -from emmet.core.openff import MoleculeSpec -from emmet.core.base import EmmetBaseModel - - -class ClassicalMDDoc(EmmetBaseModel): - molecule_specs: MoleculeSpec - - # should contain more information on all molecules - # use MoleculeMetadata somewhere diff --git a/emmet-core/emmet/core/openmm/calculations.py b/emmet-core/emmet/core/openmm/calculations.py index 839452f029..6ac2f32d59 100644 --- a/emmet-core/emmet/core/openmm/calculations.py +++ b/emmet-core/emmet/core/openmm/calculations.py @@ -9,30 +9,33 @@ class CalculationsDoc(BaseModel): task_names: List[str] = Field(None, description="Names of tasks.") - calc_types: List[str] = Field(None, description="Types of calculations.") + calc_types: List[str] = Field( + None, description="Types of calculations in order of execution." + ) elapsed_times: List[Union[float, None]] = Field( - None, description="Elapsed time for each calculation." + None, description="Elapsed time for calculations in order of execution." ) steps: List[Union[float, None]] = Field( - None, description="n_steps for each calculation." + None, description="n_steps for calculations in order of execution." ) step_sizes: List[Union[float, None]] = Field( - None, description="Step sizes for each calculation." + None, description="Step sizes for each calculations in order of execution." ) temperatures: List[Union[float, None]] = Field( - None, description="Temperature for each calculation." + None, description="Temperature for each calculations in order of execution." ) pressures: List[Union[float, None]] = Field( - None, description="Pressure for each calculation." + None, description="Pressure for each calculations in order of execution." ) friction_coefficients: List[Union[float, None]] = Field( - None, description="Friction coefficients for each calculation." + None, + description="Friction coefficients for each calculations in order of execution.", ) completed_at: Optional[datetime] = Field( diff --git a/emmet-core/setup.py b/emmet-core/setup.py index f2af029cd0..bbcfb7de7b 100644 --- a/emmet-core/setup.py +++ b/emmet-core/setup.py @@ -27,7 +27,8 @@ }, include_package_data=True, install_requires=[ - "pymatgen==2024.4.13", + "numpy<2", + "pymatgen", "monty>=2024.2.2", "pydantic>=2.0", "pydantic-settings>=2.0", @@ -39,9 +40,10 @@ "matcalc>=0.0.4", "seekpath>=2.0.1", "robocrys>=0.2.8", - "pymatgen-analysis-diffusion>=2023.8.15", - "pymatgen-analysis-alloys>=0.0.3", - "solvation-analysis>=0.4.0", + "pymatgen-analysis-defects>=2024.7.18", + "pymatgen-analysis-diffusion>=2024.7.15", + "pymatgen-analysis-alloys>=0.0.6", + "solvation-analysis>=0.4.1", "MDAnalysis>=2.7.0", ], "ml": ["chgnet", "matgl"], From bb75a08f0c07b2df1896da6237133287581e3c22 Mon Sep 17 00:00:00 2001 From: Tyler Mathis <35553152+tsmathis@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:27:22 -0700 Subject: [PATCH 10/17] rm py3.9 reqs file --- .../ubuntu-latest_py3.9_extras.txt | 543 ------------------ 1 file changed, 543 deletions(-) delete mode 100644 emmet-core/requirements/ubuntu-latest_py3.9_extras.txt diff --git a/emmet-core/requirements/ubuntu-latest_py3.9_extras.txt b/emmet-core/requirements/ubuntu-latest_py3.9_extras.txt deleted file mode 100644 index bf074ff749..0000000000 --- a/emmet-core/requirements/ubuntu-latest_py3.9_extras.txt +++ /dev/null @@ -1,543 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --all-extras --output-file=requirements/ubuntu-latest_py3.9_extras.txt -# -aiohttp==3.9.5 - # via fsspec -aiosignal==1.3.1 - # via aiohttp -annotated-types==0.7.0 - # via pydantic -ase==3.23.0 - # via - # chgnet - # matcalc - # matgl -async-timeout==4.0.3 - # via aiohttp -attrs==23.2.0 - # via aiohttp -bracex==2.4 - # via wcmatch -certifi==2024.6.2 - # via requests -cfgv==3.4.0 - # via pre-commit -charset-normalizer==3.3.2 - # via requests -chgnet==0.3.7 - # via emmet-core (setup.py) -click==8.1.7 - # via - # mkdocs - # mkdocstrings -colorama==0.4.6 - # via griffe -contourpy==1.2.1 - # via matplotlib -coverage[toml]==7.5.3 - # via pytest-cov -csscompressor==0.9.5 - # via mkdocs-minify-plugin -custodian==2024.4.18 - # via emmet-core (setup.py) -cycler==0.12.1 - # via matplotlib -cython==3.0.10 - # via chgnet -dgl==2.1.0 - # via matgl -distlib==0.3.8 - # via virtualenv -dnspython==2.6.1 - # via pymongo -emmet-core==0.83.8 - # via mp-api -exceptiongroup==1.2.1 - # via pytest -fasteners==0.19 - # via mdanalysis -filelock==3.14.0 - # via - # torch - # virtualenv -flake8==7.0.0 - # via emmet-core (setup.py) -fonttools==4.53.0 - # via matplotlib -frozenlist==1.4.1 - # via - # aiohttp - # aiosignal -fsspec[http]==2024.5.0 - # via - # pytorch-lightning - # torch -ghp-import==2.1.0 - # via mkdocs -griddataformats==1.0.2 - # via mdanalysis -griffe==0.45.2 - # via mkdocstrings-python -h5py==3.11.0 - # via phonopy -htmlmin2==0.1.13 - # via mkdocs-minify-plugin -identify==2.5.36 - # via pre-commit -idna==3.7 - # via - # requests - # yarl -importlib-metadata==7.1.0 - # via - # markdown - # mkdocs - # mkdocs-get-deps - # mkdocstrings - # typeguard -importlib-resources==6.4.0 - # via - # matplotlib - # spglib -inflect==7.2.1 - # via robocrys -iniconfig==2.0.0 - # via pytest -jinja2==3.1.4 - # via - # emmet-core (setup.py) - # mkdocs - # mkdocs-material - # mkdocstrings - # torch -joblib==1.4.2 - # via - # matcalc - # mdanalysis - # pymatgen - # pymatgen-analysis-diffusion - # scikit-learn -jsmin==3.0.1 - # via mkdocs-minify-plugin -kiwisolver==1.4.5 - # via matplotlib -latexcodec==3.0.0 - # via pybtex -lightning-utilities==0.11.2 - # via - # pytorch-lightning - # torchmetrics -livereload==2.6.3 - # via emmet-core (setup.py) -markdown==3.6 - # via - # mkdocs - # mkdocs-autorefs - # mkdocs-material - # mkdocstrings - # pymdown-extensions -markupsafe==2.1.5 - # via - # jinja2 - # mkdocs - # mkdocs-autorefs - # mkdocstrings -matcalc==0.0.4 - # via emmet-core (setup.py) -matgl==1.1.1 - # via emmet-core (setup.py) -matminer==0.9.2 - # via robocrys -matplotlib==3.9.0 - # via - # ase - # mdanalysis - # phonopy - # pymatgen - # solvation-analysis -mccabe==0.7.0 - # via flake8 -mda-xdrlib==0.2.0 - # via mdanalysis -mdanalysis==2.7.0 - # via - # emmet-core (setup.py) - # solvation-analysis -mergedeep==1.3.4 - # via - # mkdocs - # mkdocs-get-deps -mkdocs==1.6.0 - # via - # emmet-core (setup.py) - # mkdocs-autorefs - # mkdocs-awesome-pages-plugin - # mkdocs-markdownextradata-plugin - # mkdocs-material - # mkdocs-minify-plugin - # mkdocstrings -mkdocs-autorefs==1.0.1 - # via mkdocstrings -mkdocs-awesome-pages-plugin==2.9.2 - # via emmet-core (setup.py) -mkdocs-get-deps==0.2.0 - # via mkdocs -mkdocs-markdownextradata-plugin==0.2.5 - # via emmet-core (setup.py) -mkdocs-material==8.2.16 - # via emmet-core (setup.py) -mkdocs-material-extensions==1.3.1 - # via - # emmet-core (setup.py) - # mkdocs-material -mkdocs-minify-plugin==0.8.0 - # via emmet-core (setup.py) -mkdocstrings[python]==0.25.1 - # via - # emmet-core (setup.py) - # mkdocstrings-python -mkdocstrings-python==1.10.3 - # via mkdocstrings -mmtf-python==1.1.3 - # via mdanalysis -monty==2024.5.24 - # via - # custodian - # emmet-core - # emmet-core (setup.py) - # matminer - # mp-api - # pymatgen - # robocrys -more-itertools==10.2.0 - # via inflect -mp-api==0.36.1 - # via robocrys -mpmath==1.3.0 - # via sympy -mrcfile==1.5.0 - # via griddataformats -msgpack==1.0.8 - # via - # mmtf-python - # mp-api -multidict==6.0.5 - # via - # aiohttp - # yarl -mypy==1.10.0 - # via emmet-core (setup.py) -mypy-extensions==1.0.0 - # via - # emmet-core (setup.py) - # mypy -natsort==8.4.0 - # via mkdocs-awesome-pages-plugin -networkx==3.2.1 - # via - # dgl - # pymatgen - # robocrys - # torch -nodeenv==1.9.0 - # via pre-commit -numpy==1.26.4 - # via - # ase - # chgnet - # contourpy - # dgl - # griddataformats - # h5py - # matminer - # matplotlib - # mdanalysis - # mrcfile - # pandas - # patsy - # phonopy - # pymatgen - # pytorch-lightning - # rdkit - # robocrys - # scikit-learn - # scipy - # seekpath - # shapely - # solvation-analysis - # spglib - # statsmodels - # torchmetrics -nvidia-ml-py3==7.352.0 - # via chgnet -packaging==24.0 - # via - # lightning-utilities - # matplotlib - # mdanalysis - # mkdocs - # plotly - # pytest - # pytorch-lightning - # statsmodels - # torchmetrics -palettable==3.3.3 - # via pymatgen -pandas==2.2.2 - # via - # matminer - # pymatgen - # solvation-analysis - # statsmodels -pathspec==0.12.1 - # via mkdocs -patsy==0.5.6 - # via statsmodels -phonopy==2.23.1 - # via matcalc -pillow==10.3.0 - # via - # matplotlib - # rdkit -platformdirs==4.2.2 - # via - # mkdocs-get-deps - # mkdocstrings - # virtualenv -plotly==5.22.0 - # via - # pymatgen - # solvation-analysis -pluggy==1.5.0 - # via pytest -pre-commit==3.7.1 - # via emmet-core (setup.py) -psutil==5.9.8 - # via - # custodian - # dgl -pubchempy==1.0.4 - # via robocrys -pybtex==0.24.0 - # via - # emmet-core - # emmet-core (setup.py) - # pymatgen - # robocrys -pycodestyle==2.11.1 - # via - # emmet-core (setup.py) - # flake8 -pydantic==2.7.3 - # via - # emmet-core - # emmet-core (setup.py) - # matgl - # pydantic-settings -pydantic-core==2.18.4 - # via pydantic -pydantic-settings==2.3.0 - # via - # emmet-core - # emmet-core (setup.py) -pydocstyle==6.3.0 - # via emmet-core (setup.py) -pyflakes==3.2.0 - # via flake8 -pygments==2.18.0 - # via mkdocs-material -pymatgen==2024.4.13 - # via - # chgnet - # emmet-core - # emmet-core (setup.py) - # matcalc - # matgl - # matminer - # mp-api - # pymatgen-analysis-alloys - # pymatgen-analysis-diffusion - # robocrys -pymatgen-analysis-alloys==0.0.6 - # via emmet-core (setup.py) -pymatgen-analysis-diffusion==2023.8.15 - # via emmet-core (setup.py) -pymdown-extensions==10.8.1 - # via - # mkdocs-material - # mkdocstrings -pymongo==4.7.2 - # via matminer -pyparsing==3.1.2 - # via matplotlib -pytest==8.2.1 - # via - # emmet-core (setup.py) - # pytest-cov - # solvation-analysis -pytest-cov==5.0.0 - # via emmet-core (setup.py) -python-dateutil==2.9.0.post0 - # via - # ghp-import - # matplotlib - # pandas -python-dotenv==1.0.1 - # via pydantic-settings -pytorch-lightning==2.2.5 - # via matgl -pytz==2024.1 - # via pandas -pyyaml==6.0.1 - # via - # mkdocs - # mkdocs-get-deps - # mkdocs-markdownextradata-plugin - # phonopy - # pre-commit - # pybtex - # pymdown-extensions - # pytorch-lightning - # pyyaml-env-tag -pyyaml-env-tag==0.1 - # via mkdocs -rdkit==2023.9.6 - # via solvation-analysis -requests==2.32.3 - # via - # dgl - # matminer - # mp-api - # pymatgen - # torchdata -robocrys==0.2.9 - # via emmet-core (setup.py) -ruamel-yaml==0.18.6 - # via - # custodian - # pymatgen - # robocrys -ruamel-yaml-clib==0.2.8 - # via ruamel-yaml -scikit-learn==1.5.0 - # via matminer -scipy==1.12.0 - # via - # ase - # dgl - # griddataformats - # mdanalysis - # pymatgen - # robocrys - # scikit-learn - # solvation-analysis - # statsmodels -seekpath==2.1.0 - # via emmet-core (setup.py) -shapely==2.0.4 - # via pymatgen-analysis-alloys -six==1.16.0 - # via - # livereload - # patsy - # pybtex - # python-dateutil -snowballstemmer==2.2.0 - # via pydocstyle -solvation-analysis==0.4.0 - # via emmet-core (setup.py) -spglib==2.4.0 - # via - # phonopy - # pymatgen - # robocrys - # seekpath -statsmodels==0.14.2 - # via solvation-analysis -sympy==1.12.1 - # via - # matminer - # pymatgen - # torch -tabulate==0.9.0 - # via pymatgen -tenacity==8.3.0 - # via plotly -threadpoolctl==3.5.0 - # via - # mdanalysis - # scikit-learn -tomli==2.0.1 - # via - # coverage - # mypy - # pytest -torch==2.2.1 - # via - # chgnet - # matgl - # pytorch-lightning - # torchdata - # torchmetrics -torchdata==0.7.1 - # via dgl -torchmetrics==1.4.0.post0 - # via pytorch-lightning -tornado==6.4 - # via livereload -tqdm==4.66.4 - # via - # dgl - # matminer - # mdanalysis - # pymatgen - # pytorch-lightning -typeguard==4.3.0 - # via inflect -types-requests==2.32.0.20240602 - # via emmet-core (setup.py) -types-setuptools==70.0.0.20240524 - # via emmet-core (setup.py) -typing-extensions==4.12.1 - # via - # emmet-core - # emmet-core (setup.py) - # inflect - # lightning-utilities - # mkdocstrings - # mp-api - # mypy - # pydantic - # pydantic-core - # pytorch-lightning - # torch - # typeguard -tzdata==2024.1 - # via pandas -uncertainties==3.2.0 - # via pymatgen -urllib3==2.2.1 - # via - # requests - # torchdata - # types-requests -virtualenv==20.26.2 - # via pre-commit -watchdog==4.0.1 - # via mkdocs -wcmatch==8.5.2 - # via mkdocs-awesome-pages-plugin -wincertstore==0.2 - # via emmet-core (setup.py) -yarl==1.9.4 - # via aiohttp -zipp==3.19.1 - # via - # importlib-metadata - # importlib-resources - -# The following packages are considered to be unsafe in a requirements file: -# setuptools From 2277660e718a51775b53605b2b43f9b48c286e46 Mon Sep 17 00:00:00 2001 From: Tyler Mathis <35553152+tsmathis@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:45:09 -0700 Subject: [PATCH 11/17] re pip-compile --- emmet-core/requirements/deployment.txt | 57 +-- .../requirements/ubuntu-latest_py3.10.txt | 8 +- .../ubuntu-latest_py3.10_extras.txt | 363 ++++++++---------- .../requirements/ubuntu-latest_py3.11.txt | 8 +- .../ubuntu-latest_py3.11_extras.txt | 355 ++++++++--------- 5 files changed, 361 insertions(+), 430 deletions(-) diff --git a/emmet-core/requirements/deployment.txt b/emmet-core/requirements/deployment.txt index 2a07905154..6cbeb011aa 100644 --- a/emmet-core/requirements/deployment.txt +++ b/emmet-core/requirements/deployment.txt @@ -6,29 +6,27 @@ # annotated-types==0.7.0 # via pydantic -certifi==2024.2.2 +certifi==2024.8.30 # via requests charset-normalizer==3.3.2 # via requests -contourpy==1.2.1 +contourpy==1.3.0 # via matplotlib cycler==0.12.1 # via matplotlib -fonttools==4.52.1 +fonttools==4.53.1 # via matplotlib -future==1.0.0 - # via uncertainties -idna==3.7 +idna==3.8 # via requests joblib==1.4.2 # via pymatgen -kiwisolver==1.4.5 +kiwisolver==1.4.7 # via matplotlib latexcodec==3.0.0 # via pybtex -matplotlib==3.9.0 +matplotlib==3.9.2 # via pymatgen -monty==2024.5.24 +monty==2024.7.30 # via # emmet-core (emmet/emmet-core/setup.py) # pymatgen @@ -39,12 +37,13 @@ networkx==3.3 numpy==1.26.4 # via # contourpy + # emmet-core (emmet/emmet-core/setup.py) # matplotlib # pandas # pymatgen # scipy # spglib -packaging==24.0 +packaging==24.1 # via # matplotlib # plotly @@ -52,25 +51,25 @@ palettable==3.3.3 # via pymatgen pandas==2.2.2 # via pymatgen -pillow==10.3.0 +pillow==10.4.0 # via matplotlib -plotly==5.22.0 +plotly==5.24.0 # via pymatgen pybtex==0.24.0 # via # emmet-core (emmet/emmet-core/setup.py) # pymatgen -pydantic==2.7.1 +pydantic==2.9.0 # via # emmet-core (emmet/emmet-core/setup.py) # pydantic-settings -pydantic-core==2.18.2 +pydantic-core==2.23.2 # via pydantic -pydantic-settings==2.2.1 +pydantic-settings==2.4.0 # via emmet-core (emmet/emmet-core/setup.py) -pymatgen==2024.4.13 +pymatgen==2024.8.9 # via emmet-core (emmet/emmet-core/setup.py) -pyparsing==3.1.2 +pyparsing==3.1.4 # via matplotlib python-dateutil==2.9.0.post0 # via @@ -80,38 +79,40 @@ python-dotenv==1.0.1 # via pydantic-settings pytz==2024.1 # via pandas -pyyaml==6.0.1 +pyyaml==6.0.2 # via pybtex -requests==2.32.2 +requests==2.32.3 # via pymatgen ruamel-yaml==0.18.6 # via pymatgen ruamel-yaml-clib==0.2.8 # via ruamel-yaml -scipy==1.13.1 +scipy==1.14.1 # via pymatgen six==1.16.0 # via # pybtex # python-dateutil -spglib==2.4.0 +spglib==2.5.0 # via pymatgen -sympy==1.12 +sympy==1.13.2 # via pymatgen tabulate==0.9.0 # via pymatgen -tenacity==8.3.0 +tenacity==9.0.0 # via plotly -tqdm==4.66.4 +tqdm==4.66.5 # via pymatgen -typing-extensions==4.12.0 +typing-extensions==4.12.2 # via # emmet-core (emmet/emmet-core/setup.py) # pydantic # pydantic-core tzdata==2024.1 - # via pandas -uncertainties==3.1.7 + # via + # pandas + # pydantic +uncertainties==3.2.2 # via pymatgen -urllib3==2.2.1 +urllib3==2.2.2 # via requests diff --git a/emmet-core/requirements/ubuntu-latest_py3.10.txt b/emmet-core/requirements/ubuntu-latest_py3.10.txt index ecdfe3fc70..6c647afb8b 100644 --- a/emmet-core/requirements/ubuntu-latest_py3.10.txt +++ b/emmet-core/requirements/ubuntu-latest_py3.10.txt @@ -59,11 +59,11 @@ pybtex==0.24.0 # via # emmet-core (setup.py) # pymatgen -pydantic==2.8.2 +pydantic==2.9.0 # via # emmet-core (setup.py) # pydantic-settings -pydantic-core==2.20.1 +pydantic-core==2.23.2 # via pydantic pydantic-settings==2.4.0 # via emmet-core (setup.py) @@ -109,7 +109,9 @@ typing-extensions==4.12.2 # pydantic # pydantic-core tzdata==2024.1 - # via pandas + # via + # pandas + # pydantic uncertainties==3.2.2 # via pymatgen urllib3==2.2.2 diff --git a/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt b/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt index 0be65eb08f..6583c7a087 100644 --- a/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt +++ b/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt @@ -4,49 +4,43 @@ # # pip-compile --all-extras --output-file=requirements/ubuntu-latest_py3.10_extras.txt # -aiohttp==3.9.5 +aiohappyeyeballs==2.4.0 + # via aiohttp +aiohttp==3.10.5 # via fsspec -aioitertools==0.11.0 +aioitertools==0.12.0 # via maggma aiosignal==1.3.1 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.3.0 - # via - # httpx - # starlette - # watchfiles -ase==3.22.1 +ase==3.23.0 # via # chgnet # matcalc # matgl + # pymatgen-analysis-diffusion async-timeout==4.0.3 # via aiohttp -attrs==23.2.0 +attrs==24.2.0 # via # aiohttp + # jsonlines # jsonschema # referencing -bcrypt==4.1.3 +bcrypt==4.2.0 # via paramiko -blinker==1.8.2 - # via flask -boto3==1.34.112 +boto3==1.35.13 # via maggma -botocore==1.34.112 +botocore==1.35.13 # via # boto3 # s3transfer -bracex==2.4 +bracex==2.5 # via wcmatch -certifi==2024.2.2 - # via - # httpcore - # httpx - # requests -cffi==1.16.0 +certifi==2024.8.30 + # via requests +cffi==1.17.1 # via # cryptography # pynacl @@ -54,115 +48,84 @@ cfgv==3.4.0 # via pre-commit charset-normalizer==3.3.2 # via requests -chgnet==0.3.5 +chgnet==0.3.8 # via emmet-core (setup.py) click==8.1.7 # via - # flask # mkdocs # mkdocstrings - # mongogrant - # typer - # uvicorn colorama==0.4.6 # via griffe -contourpy==1.2.1 +contourpy==1.3.0 # via matplotlib -coverage[toml]==7.5.1 +coverage[toml]==7.6.1 # via pytest-cov -cryptography==42.0.7 +cryptography==43.0.1 # via paramiko csscompressor==0.9.5 # via mkdocs-minify-plugin -custodian==2024.4.18 +custodian==2024.6.24 # via emmet-core (setup.py) cycler==0.12.1 # via matplotlib -cython==3.0.10 +cython==3.0.11 # via chgnet -dgl==2.1.0 +dgl==2.2.0 # via matgl distlib==0.3.8 # via virtualenv dnspython==2.6.1 # via - # email-validator # maggma # pymongo -email-validator==2.1.1 - # via fastapi -emmet-core==0.83.6 +emmet-core==0.84.2rc7 # via mp-api -exceptiongroup==1.2.1 - # via - # anyio - # pytest -fastapi==0.111.0 - # via maggma -fastapi-cli==0.0.4 - # via fastapi +exceptiongroup==1.2.2 + # via pytest fasteners==0.19 # via mdanalysis -filelock==3.14.0 +filelock==3.15.4 # via # torch # virtualenv -flake8==7.0.0 +flake8==7.1.1 # via emmet-core (setup.py) -flask==3.0.3 - # via mongogrant -fonttools==4.51.0 +fonttools==4.53.1 # via matplotlib frozenlist==1.4.1 # via # aiohttp # aiosignal -fsspec[http]==2024.5.0 +fsspec[http]==2024.9.0 # via + # lightning # pytorch-lightning # torch -future==1.0.0 - # via uncertainties ghp-import==2.1.0 # via mkdocs griddataformats==1.0.2 # via mdanalysis -griffe==0.45.2 +griffe==1.2.0 # via mkdocstrings-python -h11==0.14.0 - # via - # httpcore - # uvicorn h5py==3.11.0 # via phonopy htmlmin2==0.1.13 # via mkdocs-minify-plugin -httpcore==1.0.5 - # via httpx -httptools==0.6.1 - # via uvicorn -httpx==0.27.0 - # via fastapi -identify==2.5.36 +identify==2.6.0 # via pre-commit -idna==3.7 +idna==3.8 # via - # anyio - # email-validator - # httpx # requests # yarl -inflect==7.2.1 +imageio==2.35.1 + # via scikit-image +inflect==7.3.1 # via robocrys iniconfig==2.0.0 # via pytest -itsdangerous==2.2.0 - # via flask jinja2==3.1.4 # via # emmet-core (setup.py) - # fastapi - # flask # mkdocs # mkdocs-material # mkdocstrings @@ -180,50 +143,55 @@ joblib==1.4.2 # scikit-learn jsmin==3.0.1 # via mkdocs-minify-plugin -jsonschema==4.22.0 +jsonlines==4.0.0 + # via maggma +jsonschema==4.23.0 # via maggma jsonschema-specifications==2023.12.1 # via jsonschema -kiwisolver==1.4.5 +kiwisolver==1.4.7 # via matplotlib latexcodec==3.0.0 # via pybtex -lightning-utilities==0.11.2 +lazy-loader==0.4 + # via scikit-image +lightning==2.4.0 + # via matgl +lightning-utilities==0.11.7 # via + # lightning # pytorch-lightning # torchmetrics -livereload==2.6.3 +livereload==2.7.0 # via emmet-core (setup.py) -maggma==0.67.0 +maggma==0.69.3 # via mp-api -markdown==3.6 +markdown==3.7 # via # mkdocs # mkdocs-autorefs # mkdocs-material # mkdocstrings # pymdown-extensions -markdown-it-py==3.0.0 - # via rich markupsafe==2.1.5 # via # jinja2 # mkdocs # mkdocs-autorefs # mkdocstrings - # werkzeug matcalc==0.0.4 # via emmet-core (setup.py) -matgl==1.1.1 +matgl==1.1.3 # via emmet-core (setup.py) matminer==0.9.2 # via robocrys -matplotlib==3.9.0 +matplotlib==3.9.2 # via # ase # mdanalysis # phonopy # pymatgen + # seaborn # solvation-analysis mccabe==0.7.0 # via flake8 @@ -233,13 +201,11 @@ mdanalysis==2.7.0 # via # emmet-core (setup.py) # solvation-analysis -mdurl==0.1.2 - # via markdown-it-py mergedeep==1.3.4 # via # mkdocs # mkdocs-get-deps -mkdocs==1.6.0 +mkdocs==1.6.1 # via # emmet-core (setup.py) # mkdocs-autorefs @@ -248,13 +214,15 @@ mkdocs==1.6.0 # mkdocs-material # mkdocs-minify-plugin # mkdocstrings -mkdocs-autorefs==1.0.1 - # via mkdocstrings -mkdocs-awesome-pages-plugin==2.9.2 +mkdocs-autorefs==1.2.0 + # via + # mkdocstrings + # mkdocstrings-python +mkdocs-awesome-pages-plugin==2.9.3 # via emmet-core (setup.py) mkdocs-get-deps==0.2.0 # via mkdocs -mkdocs-markdownextradata-plugin==0.2.5 +mkdocs-markdownextradata-plugin==0.2.6 # via emmet-core (setup.py) mkdocs-material==8.2.16 # via emmet-core (setup.py) @@ -264,19 +232,17 @@ mkdocs-material-extensions==1.3.1 # mkdocs-material mkdocs-minify-plugin==0.8.0 # via emmet-core (setup.py) -mkdocstrings[python]==0.25.1 +mkdocstrings[python]==0.26.0 # via # emmet-core (setup.py) # mkdocstrings-python -mkdocstrings-python==1.10.3 +mkdocstrings-python==1.11.1 # via mkdocstrings mmtf-python==1.1.3 # via mdanalysis -mongogrant==0.3.3 - # via maggma mongomock==4.1.2 # via maggma -monty==2024.5.15 +monty==2024.7.30 # via # custodian # emmet-core @@ -286,13 +252,15 @@ monty==2024.5.15 # mp-api # pymatgen # robocrys -more-itertools==10.2.0 +more-itertools==10.5.0 # via inflect -mp-api==0.41.2 +mp-api==0.42.1 # via robocrys +mp-pyrho==0.4.4 + # via pymatgen-analysis-defects mpmath==1.3.0 # via sympy -mrcfile==1.5.0 +mrcfile==1.5.3 # via griddataformats msgpack==1.0.8 # via @@ -303,7 +271,7 @@ multidict==6.0.5 # via # aiohttp # yarl -mypy==1.10.0 +mypy==1.11.2 # via emmet-core (setup.py) mypy-extensions==1.0.0 # via @@ -316,8 +284,9 @@ networkx==3.3 # dgl # pymatgen # robocrys + # scikit-image # torch -nodeenv==1.8.0 +nodeenv==1.9.1 # via pre-commit numpy==1.26.4 # via @@ -325,8 +294,11 @@ numpy==1.26.4 # chgnet # contourpy # dgl + # emmet-core + # emmet-core (setup.py) # griddataformats # h5py + # imageio # maggma # matminer # matplotlib @@ -336,25 +308,29 @@ numpy==1.26.4 # patsy # phonopy # pymatgen - # pytorch-lightning + # pymatgen-analysis-defects + # pymatgen-analysis-diffusion # rdkit # robocrys + # scikit-image # scikit-learn # scipy + # seaborn # seekpath # shapely # solvation-analysis # spglib # statsmodels + # tifffile # torchmetrics nvidia-ml-py3==7.352.0 # via chgnet -orjson==3.10.3 - # via - # fastapi - # maggma -packaging==24.0 +orjson==3.10.7 + # via maggma +packaging==24.1 # via + # lazy-loader + # lightning # lightning-utilities # matplotlib # mdanalysis @@ -363,42 +339,48 @@ packaging==24.0 # plotly # pytest # pytorch-lightning + # scikit-image # statsmodels # torchmetrics palettable==3.3.3 # via pymatgen pandas==2.2.2 # via + # dgl + # maggma # matminer # pymatgen + # seaborn # solvation-analysis # statsmodels -paramiko==3.4.0 +paramiko==3.4.1 # via sshtunnel pathspec==0.12.1 # via mkdocs patsy==0.5.6 # via statsmodels -phonopy==2.23.1 +phonopy==2.27.0 # via matcalc -pillow==10.3.0 +pillow==10.4.0 # via + # imageio # matplotlib # rdkit + # scikit-image platformdirs==4.2.2 # via # mkdocs-get-deps # mkdocstrings # virtualenv -plotly==5.22.0 +plotly==5.24.0 # via # pymatgen # solvation-analysis pluggy==1.5.0 # via pytest -pre-commit==3.7.1 +pre-commit==3.8.0 # via emmet-core (setup.py) -psutil==5.9.8 +psutil==6.0.0 # via # custodian # dgl @@ -410,38 +392,35 @@ pybtex==0.24.0 # emmet-core (setup.py) # pymatgen # robocrys -pycodestyle==2.11.1 +pycodestyle==2.12.1 # via # emmet-core (setup.py) # flake8 pycparser==2.22 # via cffi -pydantic==2.7.1 +pydantic==2.9.0 # via # emmet-core # emmet-core (setup.py) - # fastapi # maggma # matgl # pydantic-settings -pydantic-core==2.18.2 +pydantic-core==2.23.2 # via pydantic -pydantic-settings==2.2.1 +pydantic-settings==2.4.0 # via # emmet-core # emmet-core (setup.py) # maggma -pydash==8.0.1 +pydash==8.0.3 # via maggma pydocstyle==6.3.0 # via emmet-core (setup.py) pyflakes==3.2.0 # via flake8 pygments==2.18.0 - # via - # mkdocs-material - # rich -pymatgen==2024.4.13 + # via mkdocs-material +pymatgen==2024.8.9 # via # chgnet # emmet-core @@ -450,27 +429,30 @@ pymatgen==2024.4.13 # matgl # matminer # mp-api + # mp-pyrho # pymatgen-analysis-alloys + # pymatgen-analysis-defects # pymatgen-analysis-diffusion # robocrys pymatgen-analysis-alloys==0.0.6 # via emmet-core (setup.py) -pymatgen-analysis-diffusion==2023.8.15 +pymatgen-analysis-defects==2024.7.19 # via emmet-core (setup.py) -pymdown-extensions==10.8.1 +pymatgen-analysis-diffusion==2024.7.15 + # via emmet-core (setup.py) +pymdown-extensions==10.9 # via # mkdocs-material # mkdocstrings -pymongo==4.7.2 +pymongo==4.8.0 # via # maggma # matminer - # mongogrant pynacl==1.5.0 # via paramiko -pyparsing==3.1.2 +pyparsing==3.1.4 # via matplotlib -pytest==8.2.1 +pytest==8.3.2 # via # emmet-core (setup.py) # pytest-cov @@ -485,17 +467,14 @@ python-dateutil==2.9.0.post0 # matplotlib # pandas python-dotenv==1.0.1 - # via - # pydantic-settings - # uvicorn -python-multipart==0.0.9 - # via fastapi -pytorch-lightning==2.2.5 - # via matgl + # via pydantic-settings +pytorch-lightning==2.4.0 + # via lightning pytz==2024.1 # via pandas -pyyaml==6.0.1 +pyyaml==6.0.2 # via + # lightning # mkdocs # mkdocs-get-deps # mkdocs-markdownextradata-plugin @@ -505,30 +484,26 @@ pyyaml==6.0.1 # pymdown-extensions # pytorch-lightning # pyyaml-env-tag - # uvicorn pyyaml-env-tag==0.1 # via mkdocs -pyzmq==26.0.3 +pyzmq==26.2.0 # via maggma -rdkit==2023.9.6 +rdkit==2024.3.5 # via solvation-analysis referencing==0.35.1 # via # jsonschema # jsonschema-specifications -requests==2.32.2 +requests==2.32.3 # via # dgl # matminer - # mongogrant # mp-api # pymatgen # torchdata -rich==13.7.1 - # via typer robocrys==0.2.9 # via emmet-core (setup.py) -rpds-py==0.18.1 +rpds-py==0.20.0 # via # jsonschema # referencing @@ -540,11 +515,13 @@ ruamel-yaml==0.18.6 # robocrys ruamel-yaml-clib==0.2.8 # via ruamel-yaml -s3transfer==0.10.1 +s3transfer==0.10.2 # via boto3 -scikit-learn==1.5.0 +scikit-image==0.24.0 + # via pymatgen-analysis-defects +scikit-learn==1.5.1 # via matminer -scipy==1.12.0 +scipy==1.14.1 # via # ase # dgl @@ -552,34 +529,30 @@ scipy==1.12.0 # mdanalysis # pymatgen # robocrys + # scikit-image # scikit-learn # solvation-analysis # statsmodels +seaborn==0.13.2 + # via pymatgen-analysis-diffusion seekpath==2.1.0 # via emmet-core (setup.py) sentinels==1.0.0 # via mongomock -shapely==2.0.4 +shapely==2.0.6 # via pymatgen-analysis-alloys -shellingham==1.5.4 - # via typer six==1.16.0 # via - # livereload # patsy # pybtex # python-dateutil smart-open==7.0.4 # via mp-api -sniffio==1.3.1 - # via - # anyio - # httpx snowballstemmer==2.2.0 # via pydocstyle -solvation-analysis==0.4.0 +solvation-analysis==0.4.1 # via emmet-core (setup.py) -spglib==2.4.0 +spglib==2.5.0 # via # phonopy # pymatgen @@ -587,64 +560,66 @@ spglib==2.4.0 # seekpath sshtunnel==0.4.0 # via maggma -starlette==0.37.2 - # via fastapi statsmodels==0.14.2 # via solvation-analysis -sympy==1.12 +sympy==1.13.2 # via # matminer # pymatgen # torch tabulate==0.9.0 # via pymatgen -tenacity==8.3.0 +tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via # mdanalysis # scikit-learn +tifffile==2024.8.30 + # via scikit-image tomli==2.0.1 # via # coverage # mypy # pytest -torch==2.2.1 +torch==2.4.1 # via # chgnet + # lightning # matgl # pytorch-lightning # torchdata # torchmetrics torchdata==0.7.1 - # via dgl -torchmetrics==1.4.0.post0 - # via pytorch-lightning -tornado==6.4 + # via + # dgl + # matgl +torchmetrics==1.4.1 + # via + # lightning + # pytorch-lightning +tornado==6.4.1 # via livereload -tqdm==4.66.4 +tqdm==4.66.5 # via # dgl + # lightning # maggma # matminer # mdanalysis # pymatgen # pytorch-lightning -typeguard==4.2.1 +typeguard==4.3.0 # via inflect -typer==0.12.3 - # via fastapi-cli -types-requests==2.32.0.20240523 +types-requests==2.32.0.20240905 # via emmet-core (setup.py) -types-setuptools==70.0.0.20240523 +types-setuptools==74.0.0.20240831 # via emmet-core (setup.py) -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via - # anyio # emmet-core # emmet-core (setup.py) - # fastapi - # inflect + # lightning # lightning-utilities # mp-api # mypy @@ -654,43 +629,29 @@ typing-extensions==4.11.0 # pytorch-lightning # torch # typeguard - # typer - # uvicorn tzdata==2024.1 - # via pandas -ujson==5.10.0 - # via fastapi -uncertainties==3.1.7 + # via + # pandas + # pydantic +uncertainties==3.2.2 # via pymatgen -urllib3==2.2.1 +urllib3==2.2.2 # via # botocore # requests # torchdata # types-requests -uvicorn[standard]==0.29.0 - # via - # fastapi - # maggma -uvloop==0.19.0 - # via uvicorn -virtualenv==20.26.2 +virtualenv==20.26.3 # via pre-commit -watchdog==4.0.1 +watchdog==5.0.2 # via mkdocs -watchfiles==0.21.0 - # via uvicorn -wcmatch==8.5.2 +wcmatch==9.0 # via mkdocs-awesome-pages-plugin -websockets==12.0 - # via uvicorn -werkzeug==3.0.3 - # via flask -wincertstore==0.2 +wincertstore==0.2.1 # via emmet-core (setup.py) wrapt==1.16.0 # via smart-open -yarl==1.9.4 +yarl==1.9.11 # via aiohttp # The following packages are considered to be unsafe in a requirements file: diff --git a/emmet-core/requirements/ubuntu-latest_py3.11.txt b/emmet-core/requirements/ubuntu-latest_py3.11.txt index 4582296caa..e1ed9d0a3d 100644 --- a/emmet-core/requirements/ubuntu-latest_py3.11.txt +++ b/emmet-core/requirements/ubuntu-latest_py3.11.txt @@ -59,11 +59,11 @@ pybtex==0.24.0 # via # emmet-core (setup.py) # pymatgen -pydantic==2.8.2 +pydantic==2.9.0 # via # emmet-core (setup.py) # pydantic-settings -pydantic-core==2.20.1 +pydantic-core==2.23.2 # via pydantic pydantic-settings==2.4.0 # via emmet-core (setup.py) @@ -109,7 +109,9 @@ typing-extensions==4.12.2 # pydantic # pydantic-core tzdata==2024.1 - # via pandas + # via + # pandas + # pydantic uncertainties==3.2.2 # via pymatgen urllib3==2.2.2 diff --git a/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt b/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt index 17b5219e68..a8293b51fc 100644 --- a/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt +++ b/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt @@ -4,47 +4,41 @@ # # pip-compile --all-extras --output-file=requirements/ubuntu-latest_py3.11_extras.txt # -aiohttp==3.9.5 +aiohappyeyeballs==2.4.0 + # via aiohttp +aiohttp==3.10.5 # via fsspec -aioitertools==0.11.0 +aioitertools==0.12.0 # via maggma aiosignal==1.3.1 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.3.0 - # via - # httpx - # starlette - # watchfiles -ase==3.22.1 +ase==3.23.0 # via # chgnet # matcalc # matgl -attrs==23.2.0 + # pymatgen-analysis-diffusion +attrs==24.2.0 # via # aiohttp + # jsonlines # jsonschema # referencing -bcrypt==4.1.3 +bcrypt==4.2.0 # via paramiko -blinker==1.8.2 - # via flask -boto3==1.34.112 +boto3==1.35.13 # via maggma -botocore==1.34.112 +botocore==1.35.13 # via # boto3 # s3transfer -bracex==2.4 +bracex==2.5 # via wcmatch -certifi==2024.2.2 - # via - # httpcore - # httpx - # requests -cffi==1.16.0 +certifi==2024.8.30 + # via requests +cffi==1.17.1 # via # cryptography # pynacl @@ -52,111 +46,82 @@ cfgv==3.4.0 # via pre-commit charset-normalizer==3.3.2 # via requests -chgnet==0.3.5 +chgnet==0.3.8 # via emmet-core (setup.py) click==8.1.7 # via - # flask # mkdocs # mkdocstrings - # mongogrant - # typer - # uvicorn colorama==0.4.6 # via griffe -contourpy==1.2.1 +contourpy==1.3.0 # via matplotlib -coverage[toml]==7.5.1 +coverage[toml]==7.6.1 # via pytest-cov -cryptography==42.0.7 +cryptography==43.0.1 # via paramiko csscompressor==0.9.5 # via mkdocs-minify-plugin -custodian==2024.4.18 +custodian==2024.6.24 # via emmet-core (setup.py) cycler==0.12.1 # via matplotlib -cython==3.0.10 +cython==3.0.11 # via chgnet -dgl==2.1.0 +dgl==2.2.0 # via matgl distlib==0.3.8 # via virtualenv dnspython==2.6.1 # via - # email-validator # maggma # pymongo -email-validator==2.1.1 - # via fastapi -emmet-core==0.83.6 +emmet-core==0.84.2rc7 # via mp-api -fastapi==0.111.0 - # via maggma -fastapi-cli==0.0.4 - # via fastapi fasteners==0.19 # via mdanalysis -filelock==3.14.0 +filelock==3.15.4 # via # torch # virtualenv -flake8==7.0.0 +flake8==7.1.1 # via emmet-core (setup.py) -flask==3.0.3 - # via mongogrant -fonttools==4.51.0 +fonttools==4.53.1 # via matplotlib frozenlist==1.4.1 # via # aiohttp # aiosignal -fsspec[http]==2024.5.0 +fsspec[http]==2024.9.0 # via + # lightning # pytorch-lightning # torch -future==1.0.0 - # via uncertainties ghp-import==2.1.0 # via mkdocs griddataformats==1.0.2 # via mdanalysis -griffe==0.45.2 +griffe==1.2.0 # via mkdocstrings-python -h11==0.14.0 - # via - # httpcore - # uvicorn h5py==3.11.0 # via phonopy htmlmin2==0.1.13 # via mkdocs-minify-plugin -httpcore==1.0.5 - # via httpx -httptools==0.6.1 - # via uvicorn -httpx==0.27.0 - # via fastapi -identify==2.5.36 +identify==2.6.0 # via pre-commit -idna==3.7 +idna==3.8 # via - # anyio - # email-validator - # httpx # requests # yarl -inflect==7.2.1 +imageio==2.35.1 + # via scikit-image +inflect==7.3.1 # via robocrys iniconfig==2.0.0 # via pytest -itsdangerous==2.2.0 - # via flask jinja2==3.1.4 # via # emmet-core (setup.py) - # fastapi - # flask # mkdocs # mkdocs-material # mkdocstrings @@ -174,50 +139,55 @@ joblib==1.4.2 # scikit-learn jsmin==3.0.1 # via mkdocs-minify-plugin -jsonschema==4.22.0 +jsonlines==4.0.0 + # via maggma +jsonschema==4.23.0 # via maggma jsonschema-specifications==2023.12.1 # via jsonschema -kiwisolver==1.4.5 +kiwisolver==1.4.7 # via matplotlib latexcodec==3.0.0 # via pybtex -lightning-utilities==0.11.2 +lazy-loader==0.4 + # via scikit-image +lightning==2.4.0 + # via matgl +lightning-utilities==0.11.7 # via + # lightning # pytorch-lightning # torchmetrics -livereload==2.6.3 +livereload==2.7.0 # via emmet-core (setup.py) -maggma==0.67.0 +maggma==0.69.3 # via mp-api -markdown==3.6 +markdown==3.7 # via # mkdocs # mkdocs-autorefs # mkdocs-material # mkdocstrings # pymdown-extensions -markdown-it-py==3.0.0 - # via rich markupsafe==2.1.5 # via # jinja2 # mkdocs # mkdocs-autorefs # mkdocstrings - # werkzeug matcalc==0.0.4 # via emmet-core (setup.py) -matgl==1.1.1 +matgl==1.1.3 # via emmet-core (setup.py) matminer==0.9.2 # via robocrys -matplotlib==3.9.0 +matplotlib==3.9.2 # via # ase # mdanalysis # phonopy # pymatgen + # seaborn # solvation-analysis mccabe==0.7.0 # via flake8 @@ -227,13 +197,11 @@ mdanalysis==2.7.0 # via # emmet-core (setup.py) # solvation-analysis -mdurl==0.1.2 - # via markdown-it-py mergedeep==1.3.4 # via # mkdocs # mkdocs-get-deps -mkdocs==1.6.0 +mkdocs==1.6.1 # via # emmet-core (setup.py) # mkdocs-autorefs @@ -242,13 +210,15 @@ mkdocs==1.6.0 # mkdocs-material # mkdocs-minify-plugin # mkdocstrings -mkdocs-autorefs==1.0.1 - # via mkdocstrings -mkdocs-awesome-pages-plugin==2.9.2 +mkdocs-autorefs==1.2.0 + # via + # mkdocstrings + # mkdocstrings-python +mkdocs-awesome-pages-plugin==2.9.3 # via emmet-core (setup.py) mkdocs-get-deps==0.2.0 # via mkdocs -mkdocs-markdownextradata-plugin==0.2.5 +mkdocs-markdownextradata-plugin==0.2.6 # via emmet-core (setup.py) mkdocs-material==8.2.16 # via emmet-core (setup.py) @@ -258,19 +228,17 @@ mkdocs-material-extensions==1.3.1 # mkdocs-material mkdocs-minify-plugin==0.8.0 # via emmet-core (setup.py) -mkdocstrings[python]==0.25.1 +mkdocstrings[python]==0.26.0 # via # emmet-core (setup.py) # mkdocstrings-python -mkdocstrings-python==1.10.3 +mkdocstrings-python==1.11.1 # via mkdocstrings mmtf-python==1.1.3 # via mdanalysis -mongogrant==0.3.3 - # via maggma mongomock==4.1.2 # via maggma -monty==2024.5.15 +monty==2024.7.30 # via # custodian # emmet-core @@ -280,13 +248,15 @@ monty==2024.5.15 # mp-api # pymatgen # robocrys -more-itertools==10.2.0 +more-itertools==10.5.0 # via inflect -mp-api==0.41.2 +mp-api==0.42.1 # via robocrys +mp-pyrho==0.4.4 + # via pymatgen-analysis-defects mpmath==1.3.0 # via sympy -mrcfile==1.5.0 +mrcfile==1.5.3 # via griddataformats msgpack==1.0.8 # via @@ -297,7 +267,7 @@ multidict==6.0.5 # via # aiohttp # yarl -mypy==1.10.0 +mypy==1.11.2 # via emmet-core (setup.py) mypy-extensions==1.0.0 # via @@ -310,8 +280,9 @@ networkx==3.3 # dgl # pymatgen # robocrys + # scikit-image # torch -nodeenv==1.8.0 +nodeenv==1.9.1 # via pre-commit numpy==1.26.4 # via @@ -319,8 +290,11 @@ numpy==1.26.4 # chgnet # contourpy # dgl + # emmet-core + # emmet-core (setup.py) # griddataformats # h5py + # imageio # maggma # matminer # matplotlib @@ -330,25 +304,29 @@ numpy==1.26.4 # patsy # phonopy # pymatgen - # pytorch-lightning + # pymatgen-analysis-defects + # pymatgen-analysis-diffusion # rdkit # robocrys + # scikit-image # scikit-learn # scipy + # seaborn # seekpath # shapely # solvation-analysis # spglib # statsmodels + # tifffile # torchmetrics nvidia-ml-py3==7.352.0 # via chgnet -orjson==3.10.3 - # via - # fastapi - # maggma -packaging==24.0 +orjson==3.10.7 + # via maggma +packaging==24.1 # via + # lazy-loader + # lightning # lightning-utilities # matplotlib # mdanalysis @@ -357,42 +335,48 @@ packaging==24.0 # plotly # pytest # pytorch-lightning + # scikit-image # statsmodels # torchmetrics palettable==3.3.3 # via pymatgen pandas==2.2.2 # via + # dgl + # maggma # matminer # pymatgen + # seaborn # solvation-analysis # statsmodels -paramiko==3.4.0 +paramiko==3.4.1 # via sshtunnel pathspec==0.12.1 # via mkdocs patsy==0.5.6 # via statsmodels -phonopy==2.23.1 +phonopy==2.27.0 # via matcalc -pillow==10.3.0 +pillow==10.4.0 # via + # imageio # matplotlib # rdkit + # scikit-image platformdirs==4.2.2 # via # mkdocs-get-deps # mkdocstrings # virtualenv -plotly==5.22.0 +plotly==5.24.0 # via # pymatgen # solvation-analysis pluggy==1.5.0 # via pytest -pre-commit==3.7.1 +pre-commit==3.8.0 # via emmet-core (setup.py) -psutil==5.9.8 +psutil==6.0.0 # via # custodian # dgl @@ -404,38 +388,35 @@ pybtex==0.24.0 # emmet-core (setup.py) # pymatgen # robocrys -pycodestyle==2.11.1 +pycodestyle==2.12.1 # via # emmet-core (setup.py) # flake8 pycparser==2.22 # via cffi -pydantic==2.7.1 +pydantic==2.9.0 # via # emmet-core # emmet-core (setup.py) - # fastapi # maggma # matgl # pydantic-settings -pydantic-core==2.18.2 +pydantic-core==2.23.2 # via pydantic -pydantic-settings==2.2.1 +pydantic-settings==2.4.0 # via # emmet-core # emmet-core (setup.py) # maggma -pydash==8.0.1 +pydash==8.0.3 # via maggma pydocstyle==6.3.0 # via emmet-core (setup.py) pyflakes==3.2.0 # via flake8 pygments==2.18.0 - # via - # mkdocs-material - # rich -pymatgen==2024.4.13 + # via mkdocs-material +pymatgen==2024.8.9 # via # chgnet # emmet-core @@ -444,27 +425,30 @@ pymatgen==2024.4.13 # matgl # matminer # mp-api + # mp-pyrho # pymatgen-analysis-alloys + # pymatgen-analysis-defects # pymatgen-analysis-diffusion # robocrys pymatgen-analysis-alloys==0.0.6 # via emmet-core (setup.py) -pymatgen-analysis-diffusion==2023.8.15 +pymatgen-analysis-defects==2024.7.19 + # via emmet-core (setup.py) +pymatgen-analysis-diffusion==2024.7.15 # via emmet-core (setup.py) -pymdown-extensions==10.8.1 +pymdown-extensions==10.9 # via # mkdocs-material # mkdocstrings -pymongo==4.7.2 +pymongo==4.8.0 # via # maggma # matminer - # mongogrant pynacl==1.5.0 # via paramiko -pyparsing==3.1.2 +pyparsing==3.1.4 # via matplotlib -pytest==8.2.1 +pytest==8.3.2 # via # emmet-core (setup.py) # pytest-cov @@ -479,17 +463,14 @@ python-dateutil==2.9.0.post0 # matplotlib # pandas python-dotenv==1.0.1 - # via - # pydantic-settings - # uvicorn -python-multipart==0.0.9 - # via fastapi -pytorch-lightning==2.2.5 - # via matgl + # via pydantic-settings +pytorch-lightning==2.4.0 + # via lightning pytz==2024.1 # via pandas -pyyaml==6.0.1 +pyyaml==6.0.2 # via + # lightning # mkdocs # mkdocs-get-deps # mkdocs-markdownextradata-plugin @@ -499,30 +480,26 @@ pyyaml==6.0.1 # pymdown-extensions # pytorch-lightning # pyyaml-env-tag - # uvicorn pyyaml-env-tag==0.1 # via mkdocs -pyzmq==26.0.3 +pyzmq==26.2.0 # via maggma -rdkit==2023.9.6 +rdkit==2024.3.5 # via solvation-analysis referencing==0.35.1 # via # jsonschema # jsonschema-specifications -requests==2.32.2 +requests==2.32.3 # via # dgl # matminer - # mongogrant # mp-api # pymatgen # torchdata -rich==13.7.1 - # via typer robocrys==0.2.9 # via emmet-core (setup.py) -rpds-py==0.18.1 +rpds-py==0.20.0 # via # jsonschema # referencing @@ -534,11 +511,13 @@ ruamel-yaml==0.18.6 # robocrys ruamel-yaml-clib==0.2.8 # via ruamel-yaml -s3transfer==0.10.1 +s3transfer==0.10.2 # via boto3 -scikit-learn==1.5.0 +scikit-image==0.24.0 + # via pymatgen-analysis-defects +scikit-learn==1.5.1 # via matminer -scipy==1.12.0 +scipy==1.14.1 # via # ase # dgl @@ -546,34 +525,30 @@ scipy==1.12.0 # mdanalysis # pymatgen # robocrys + # scikit-image # scikit-learn # solvation-analysis # statsmodels +seaborn==0.13.2 + # via pymatgen-analysis-diffusion seekpath==2.1.0 # via emmet-core (setup.py) sentinels==1.0.0 # via mongomock -shapely==2.0.4 +shapely==2.0.6 # via pymatgen-analysis-alloys -shellingham==1.5.4 - # via typer six==1.16.0 # via - # livereload # patsy # pybtex # python-dateutil smart-open==7.0.4 # via mp-api -sniffio==1.3.1 - # via - # anyio - # httpx snowballstemmer==2.2.0 # via pydocstyle -solvation-analysis==0.4.0 +solvation-analysis==0.4.1 # via emmet-core (setup.py) -spglib==2.4.0 +spglib==2.5.0 # via # phonopy # pymatgen @@ -581,58 +556,61 @@ spglib==2.4.0 # seekpath sshtunnel==0.4.0 # via maggma -starlette==0.37.2 - # via fastapi statsmodels==0.14.2 # via solvation-analysis -sympy==1.12 +sympy==1.13.2 # via # matminer # pymatgen # torch tabulate==0.9.0 # via pymatgen -tenacity==8.3.0 +tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via # mdanalysis # scikit-learn -torch==2.2.1 +tifffile==2024.8.30 + # via scikit-image +torch==2.4.1 # via # chgnet + # lightning # matgl # pytorch-lightning # torchdata # torchmetrics torchdata==0.7.1 - # via dgl -torchmetrics==1.4.0.post0 - # via pytorch-lightning -tornado==6.4 + # via + # dgl + # matgl +torchmetrics==1.4.1 + # via + # lightning + # pytorch-lightning +tornado==6.4.1 # via livereload -tqdm==4.66.4 +tqdm==4.66.5 # via # dgl + # lightning # maggma # matminer # mdanalysis # pymatgen # pytorch-lightning -typeguard==4.2.1 +typeguard==4.3.0 # via inflect -typer==0.12.3 - # via fastapi-cli -types-requests==2.32.0.20240523 +types-requests==2.32.0.20240905 # via emmet-core (setup.py) -types-setuptools==70.0.0.20240523 +types-setuptools==74.0.0.20240831 # via emmet-core (setup.py) -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via # emmet-core # emmet-core (setup.py) - # fastapi - # inflect + # lightning # lightning-utilities # mp-api # mypy @@ -642,42 +620,29 @@ typing-extensions==4.11.0 # pytorch-lightning # torch # typeguard - # typer tzdata==2024.1 - # via pandas -ujson==5.10.0 - # via fastapi -uncertainties==3.1.7 + # via + # pandas + # pydantic +uncertainties==3.2.2 # via pymatgen -urllib3==2.2.1 +urllib3==2.2.2 # via # botocore # requests # torchdata # types-requests -uvicorn[standard]==0.29.0 - # via - # fastapi - # maggma -uvloop==0.19.0 - # via uvicorn -virtualenv==20.26.2 +virtualenv==20.26.3 # via pre-commit -watchdog==4.0.1 +watchdog==5.0.2 # via mkdocs -watchfiles==0.21.0 - # via uvicorn -wcmatch==8.5.2 +wcmatch==9.0 # via mkdocs-awesome-pages-plugin -websockets==12.0 - # via uvicorn -werkzeug==3.0.3 - # via flask -wincertstore==0.2 +wincertstore==0.2.1 # via emmet-core (setup.py) wrapt==1.16.0 # via smart-open -yarl==1.9.4 +yarl==1.9.11 # via aiohttp # The following packages are considered to be unsafe in a requirements file: From 5926ec17e29e10ed7b705645a93f440808a6006f Mon Sep 17 00:00:00 2001 From: orionarcher Date: Thu, 5 Sep 2024 16:52:39 -0400 Subject: [PATCH 12/17] Add docstring to calculations doc, clean up in line descriptions. --- emmet-core/emmet/core/openmm/calculations.py | 22 ++++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/emmet-core/emmet/core/openmm/calculations.py b/emmet-core/emmet/core/openmm/calculations.py index 6ac2f32d59..d594e6d880 100644 --- a/emmet-core/emmet/core/openmm/calculations.py +++ b/emmet-core/emmet/core/openmm/calculations.py @@ -7,35 +7,39 @@ class CalculationsDoc(BaseModel): + """ + A document for storing metadata from a list of OpenMM calculations. + + In each field, calculations are listed sequentially, in the order they were run. + """ + task_names: List[str] = Field(None, description="Names of tasks.") - calc_types: List[str] = Field( - None, description="Types of calculations in order of execution." - ) + calc_types: List[str] = Field(None, description="Types of calculations.") elapsed_times: List[Union[float, None]] = Field( - None, description="Elapsed time for calculations in order of execution." + None, description="Elapsed time for calculations." ) steps: List[Union[float, None]] = Field( - None, description="n_steps for calculations in order of execution." + None, description="n_steps for calculations." ) step_sizes: List[Union[float, None]] = Field( - None, description="Step sizes for each calculations in order of execution." + None, description="Step sizes for each calculations." ) temperatures: List[Union[float, None]] = Field( - None, description="Temperature for each calculations in order of execution." + None, description="Temperature for each calculations." ) pressures: List[Union[float, None]] = Field( - None, description="Pressure for each calculations in order of execution." + None, description="Pressure for each calculations." ) friction_coefficients: List[Union[float, None]] = Field( None, - description="Friction coefficients for each calculations in order of execution.", + description="Friction coefficients for each calculations.", ) completed_at: Optional[datetime] = Field( From d4c5214b67a1c99288f91b4d9d7425442b68e414 Mon Sep 17 00:00:00 2001 From: Tyler Mathis <35553152+tsmathis@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:05:12 -0700 Subject: [PATCH 13/17] pin dgl for ml reqs, re pip-compile --- emmet-core/requirements/ubuntu-latest_py3.10_extras.txt | 7 ++++--- emmet-core/requirements/ubuntu-latest_py3.11_extras.txt | 7 ++++--- emmet-core/setup.py | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt b/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt index 6583c7a087..a02621ae56 100644 --- a/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt +++ b/emmet-core/requirements/ubuntu-latest_py3.10_extras.txt @@ -70,8 +70,10 @@ cycler==0.12.1 # via matplotlib cython==3.0.11 # via chgnet -dgl==2.2.0 - # via matgl +dgl==2.1.0 + # via + # emmet-core (setup.py) + # matgl distlib==0.3.8 # via virtualenv dnspython==2.6.1 @@ -346,7 +348,6 @@ palettable==3.3.3 # via pymatgen pandas==2.2.2 # via - # dgl # maggma # matminer # pymatgen diff --git a/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt b/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt index a8293b51fc..ba28b160de 100644 --- a/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt +++ b/emmet-core/requirements/ubuntu-latest_py3.11_extras.txt @@ -68,8 +68,10 @@ cycler==0.12.1 # via matplotlib cython==3.0.11 # via chgnet -dgl==2.2.0 - # via matgl +dgl==2.1.0 + # via + # emmet-core (setup.py) + # matgl distlib==0.3.8 # via virtualenv dnspython==2.6.1 @@ -342,7 +344,6 @@ palettable==3.3.3 # via pymatgen pandas==2.2.2 # via - # dgl # maggma # matminer # pymatgen diff --git a/emmet-core/setup.py b/emmet-core/setup.py index bbcfb7de7b..7c540a96ee 100644 --- a/emmet-core/setup.py +++ b/emmet-core/setup.py @@ -46,7 +46,7 @@ "solvation-analysis>=0.4.1", "MDAnalysis>=2.7.0", ], - "ml": ["chgnet", "matgl"], + "ml": ["chgnet", "matgl", "dgl<=2.1"], "test": [ "pre-commit", "pytest", From 89779649ea2215afd8b26cc27adf997a862ff3f9 Mon Sep 17 00:00:00 2001 From: orionarcher Date: Fri, 6 Sep 2024 14:32:30 -0400 Subject: [PATCH 14/17] Multiple WIP changes to change HexBytes to CompressedStr --- emmet-core/emmet/core/openff/tasks.py | 25 ++++++++++++++++++++++++- emmet-core/emmet/core/openmm/tasks.py | 6 +++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/emmet-core/emmet/core/openff/tasks.py b/emmet-core/emmet/core/openff/tasks.py index a14c77b0ff..a5a3cd83c9 100644 --- a/emmet-core/emmet/core/openff/tasks.py +++ b/emmet-core/emmet/core/openff/tasks.py @@ -28,6 +28,7 @@ def hex_bytes_validator(o: Any) -> bytes: elif isinstance(o, bytearray): return bytes(o) elif isinstance(o, str): + # return None return zlib.decompress(bytes.fromhex(o)) raise errors.BytesError() @@ -44,6 +45,28 @@ def hex_bytes_serializer(b: bytes) -> str: ] +def compressed_str_validator(s: str) -> str: + try: + compressed_bytes = bytes.fromhex(s) + decompressed_bytes = zlib.decompress(compressed_bytes) + return decompressed_bytes.decode("utf-8") + except: + return s + + +def compressed_str_serializer(s: str) -> str: + decompressed_bytes = s.encode("utf-8") + return zlib.compress(decompressed_bytes).hex() + + +CompressedStr = Annotated[ + str, + PlainValidator(compressed_str_validator), + PlainSerializer(compressed_str_serializer), + WithJsonSchema({"type": "string"}), +] + + @dataclass class MoleculeSpec(MSONable): """A molecule schema to be output by OpenMMGenerators.""" @@ -79,7 +102,7 @@ class MDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-arg] "the task document.", ) - interchange: Optional[HexBytes] = Field( + interchange: Optional[CompressedStr] = Field( None, description="A byte serialized interchange object. " "To generate, the Interchange is serialized to json and " diff --git a/emmet-core/emmet/core/openmm/tasks.py b/emmet-core/emmet/core/openmm/tasks.py index 0142f4e0d0..19a972826b 100644 --- a/emmet-core/emmet/core/openmm/tasks.py +++ b/emmet-core/emmet/core/openmm/tasks.py @@ -16,7 +16,7 @@ from pymatgen.core import Structure from emmet.core.openff import MoleculeSpec, MDTaskDocument # type: ignore[import-untyped] -from emmet.core.openff.tasks import HexBytes # type: ignore[import-untyped] +from emmet.core.openff.tasks import HexBytes, CompressedStr # type: ignore[import-untyped] class CalculationInput(BaseModel, extra="allow"): # type: ignore[call-arg] @@ -113,7 +113,7 @@ class CalculationOutput(BaseModel): None, description="Path to the trajectory file relative to `dir_name`" ) - traj_blob: Optional[HexBytes] = Field( + traj_blob: Optional[CompressedStr] = Field( None, description="Trajectory file as a binary blob" ) @@ -186,7 +186,7 @@ def from_directory( if traj_is_not_empty: if embed_traj: with open(traj_file, "rb") as f: - traj_blob = f.read() + traj_blob = f.read().hex() else: traj_blob = None else: From aa8d2bdf59bc966ec9d34cad43b63a9425331dda Mon Sep 17 00:00:00 2001 From: orionarcher Date: Mon, 9 Sep 2024 16:52:28 -0400 Subject: [PATCH 15/17] Delete classical_md folder --- emmet-core/tests/classical_md/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 emmet-core/tests/classical_md/__init__.py diff --git a/emmet-core/tests/classical_md/__init__.py b/emmet-core/tests/classical_md/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 From 2252a3cfeea3802f8b68c8f7c40f240859fb7db6 Mon Sep 17 00:00:00 2001 From: orionarcher Date: Mon, 9 Sep 2024 16:55:07 -0400 Subject: [PATCH 16/17] Improve documentation of CompressedStr --- emmet-core/emmet/core/openff/tasks.py | 7 +++---- emmet-core/emmet/core/openmm/tasks.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/emmet-core/emmet/core/openff/tasks.py b/emmet-core/emmet/core/openff/tasks.py index a5a3cd83c9..da5a6ca585 100644 --- a/emmet-core/emmet/core/openff/tasks.py +++ b/emmet-core/emmet/core/openff/tasks.py @@ -59,6 +59,8 @@ def compressed_str_serializer(s: str) -> str: return zlib.compress(decompressed_bytes).hex() +# this type will take a string and automatically compress and +# decompress it when it is serialized and deserialized CompressedStr = Annotated[ str, PlainValidator(compressed_str_validator), @@ -103,10 +105,7 @@ class MDTaskDocument(BaseModel, extra="allow"): # type: ignore[call-arg] ) interchange: Optional[CompressedStr] = Field( - None, - description="A byte serialized interchange object. " - "To generate, the Interchange is serialized to json and " - "the json is transformed to bytes with a utf-8 encoding. ", + None, description="An interchange object serialized to json." ) interchange_meta: Optional[list[MoleculeSpec]] = Field( diff --git a/emmet-core/emmet/core/openmm/tasks.py b/emmet-core/emmet/core/openmm/tasks.py index 19a972826b..6f7df7a591 100644 --- a/emmet-core/emmet/core/openmm/tasks.py +++ b/emmet-core/emmet/core/openmm/tasks.py @@ -114,7 +114,7 @@ class CalculationOutput(BaseModel): ) traj_blob: Optional[CompressedStr] = Field( - None, description="Trajectory file as a binary blob" + None, description="Trajectory file bytes blob hex encoded to a string" ) state_file: Optional[str] = Field( From 0aeacc9f77234032f5825c21255162bc6b8b0bd6 Mon Sep 17 00:00:00 2001 From: orionarcher Date: Mon, 9 Sep 2024 16:56:44 -0400 Subject: [PATCH 17/17] Improve documentation of CompressedStr --- emmet-core/emmet/core/openff/tasks.py | 27 +-------------------------- emmet-core/emmet/core/openmm/tasks.py | 2 +- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/emmet-core/emmet/core/openff/tasks.py b/emmet-core/emmet/core/openff/tasks.py index da5a6ca585..7441c91871 100644 --- a/emmet-core/emmet/core/openff/tasks.py +++ b/emmet-core/emmet/core/openff/tasks.py @@ -7,7 +7,6 @@ from typing import Optional from typing_extensions import Annotated import zlib -from typing import Any from pydantic import ( BaseModel, @@ -15,42 +14,18 @@ PlainValidator, PlainSerializer, WithJsonSchema, - errors, ) from monty.json import MSONable from emmet.core.vasp.task_valid import TaskState # type: ignore[import-untyped] -def hex_bytes_validator(o: Any) -> bytes: - if isinstance(o, bytes): - return o - elif isinstance(o, bytearray): - return bytes(o) - elif isinstance(o, str): - # return None - return zlib.decompress(bytes.fromhex(o)) - raise errors.BytesError() - - -def hex_bytes_serializer(b: bytes) -> str: - return zlib.compress(b).hex() - - -HexBytes = Annotated[ - bytes, - PlainValidator(hex_bytes_validator), - PlainSerializer(hex_bytes_serializer), - WithJsonSchema({"type": "string"}), -] - - def compressed_str_validator(s: str) -> str: try: compressed_bytes = bytes.fromhex(s) decompressed_bytes = zlib.decompress(compressed_bytes) return decompressed_bytes.decode("utf-8") - except: + except: # noqa return s diff --git a/emmet-core/emmet/core/openmm/tasks.py b/emmet-core/emmet/core/openmm/tasks.py index 6f7df7a591..3096ce1834 100644 --- a/emmet-core/emmet/core/openmm/tasks.py +++ b/emmet-core/emmet/core/openmm/tasks.py @@ -16,7 +16,7 @@ from pymatgen.core import Structure from emmet.core.openff import MoleculeSpec, MDTaskDocument # type: ignore[import-untyped] -from emmet.core.openff.tasks import HexBytes, CompressedStr # type: ignore[import-untyped] +from emmet.core.openff.tasks import CompressedStr # type: ignore[import-untyped] class CalculationInput(BaseModel, extra="allow"): # type: ignore[call-arg]