Skip to content

Commit 6d3c351

Browse files
BryantLi-BLIesoteric-ephemeraJaGeojanosh
authored
MPMorph Flows (#938)
* Add NEP MLIP relax, static, and MD makers with tests * Add `SevenNetRelaxMaker` + `SevenNetStaticMaker` to force field jobs * Add elastic workflow and equation of state workflow for FHI-aims * Add possibility to use custom M3GNet potentials instead of only pretrained models * Add new documentation: - Document Models / emmet tutorial - High level overview of atomate2 concepts - Tutorial for blob storage * Fix CP2K TaskDocument schema * Add additional fields as kwargs to PhononBSDOSDoc * Fix JobStoreDocument attribute access * Allow bulk supercell calculation to be skipped in defect workflow * Clean up and standardize MPMorph workflows: - Refactor MPMorph makers for both VASP and force fields - Add from_temperature_and_steps classmethod - Improve equilibration output consistency - Add tests for all MPMorph workflows * Various dependency updates and maintenance: - Update Python package dependencies - Fix linting issues - Clean up documentation --------- Co-authored-by: Aaron Kaplan <[email protected]> Co-authored-by: J. George <[email protected]> Co-authored-by: Janosh Riebesell <[email protected]>
1 parent 6266093 commit 6d3c351

File tree

212 files changed

+2318
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+2318
-146
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ forcefields = [
5454
"calorine<=2.2.1",
5555
"chgnet>=0.2.2",
5656
"mace-torch>=0.3.3",
57+
"torchdata<=0.7.1",
5758
"matgl>=1.1.3",
5859
# quippy-ase support for py3.12 tracked in https://github.com/libAtoms/QUIP/issues/645
5960
"quippy-ase>=0.9.14; python_version < '3.12'",

src/atomate2/ase/jobs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
import logging
6+
from abc import ABCMeta, abstractmethod
67
from dataclasses import dataclass, field
78
from typing import TYPE_CHECKING
89

@@ -28,7 +29,7 @@
2829

2930

3031
@dataclass
31-
class AseMaker(Maker):
32+
class AseMaker(Maker, metaclass=ABCMeta):
3233
"""
3334
Define basic template of ASE-based jobs.
3435
@@ -44,8 +45,6 @@ class AseMaker(Maker):
4445
The name of the job
4546
calculator_kwargs : dict
4647
Keyword arguments that will get passed to the ASE calculator.
47-
calculator_kwargs : dict
48-
Keyword arguments that will get passed to the ASE calculator.
4948
ionic_step_data : tuple[str,...] or None
5049
Quantities to store in the TaskDocument ionic_steps.
5150
Possible options are "struct_or_mol", "energy",
@@ -70,6 +69,7 @@ class AseMaker(Maker):
7069
store_trajectory: StoreTrajectoryOption = StoreTrajectoryOption.NO
7170
tags: list[str] | None = None
7271

72+
@abstractmethod
7373
def run_ase(
7474
self,
7575
mol_or_struct: Structure | Molecule,
@@ -92,6 +92,7 @@ def run_ase(
9292
raise NotImplementedError
9393

9494
@property
95+
@abstractmethod
9596
def calculator(self) -> Calculator:
9697
"""ASE calculator, method to be implemented in subclasses."""
9798
raise NotImplementedError

src/atomate2/ase/md.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import os
88
import sys
99
import time
10+
from abc import ABCMeta, abstractmethod
1011
from collections.abc import Sequence
1112
from dataclasses import dataclass, field
1213
from enum import Enum
@@ -78,7 +79,7 @@ class DynamicsPresets(Enum):
7879

7980

8081
@dataclass
81-
class AseMDMaker(AseMaker):
82+
class AseMDMaker(AseMaker, metaclass=ABCMeta):
8283
"""
8384
Perform MD with the Atomic Simulation Environment (ASE).
8485
@@ -393,6 +394,7 @@ def _callback(dyn: MolecularDynamics = md_runner) -> None:
393394
)
394395

395396
@property
397+
@abstractmethod
396398
def calculator(self) -> Calculator:
397399
"""ASE calculator, to be overwritten by user."""
398400
raise NotImplementedError

0 commit comments

Comments
 (0)