Skip to content

Commit

Permalink
MPMorph Flows (#938)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
4 people authored Nov 1, 2024
1 parent 6266093 commit 6d3c351
Show file tree
Hide file tree
Showing 212 changed files with 2,318 additions and 146 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ forcefields = [
"calorine<=2.2.1",
"chgnet>=0.2.2",
"mace-torch>=0.3.3",
"torchdata<=0.7.1",
"matgl>=1.1.3",
# quippy-ase support for py3.12 tracked in https://github.com/libAtoms/QUIP/issues/645
"quippy-ase>=0.9.14; python_version < '3.12'",
Expand Down
7 changes: 4 additions & 3 deletions src/atomate2/ase/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import logging
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass, field
from typing import TYPE_CHECKING

Expand All @@ -28,7 +29,7 @@


@dataclass
class AseMaker(Maker):
class AseMaker(Maker, metaclass=ABCMeta):
"""
Define basic template of ASE-based jobs.
Expand All @@ -44,8 +45,6 @@ class AseMaker(Maker):
The name of the job
calculator_kwargs : dict
Keyword arguments that will get passed to the ASE calculator.
calculator_kwargs : dict
Keyword arguments that will get passed to the ASE calculator.
ionic_step_data : tuple[str,...] or None
Quantities to store in the TaskDocument ionic_steps.
Possible options are "struct_or_mol", "energy",
Expand All @@ -70,6 +69,7 @@ class AseMaker(Maker):
store_trajectory: StoreTrajectoryOption = StoreTrajectoryOption.NO
tags: list[str] | None = None

@abstractmethod
def run_ase(
self,
mol_or_struct: Structure | Molecule,
Expand All @@ -92,6 +92,7 @@ def run_ase(
raise NotImplementedError

@property
@abstractmethod
def calculator(self) -> Calculator:
"""ASE calculator, method to be implemented in subclasses."""
raise NotImplementedError
Expand Down
4 changes: 3 additions & 1 deletion src/atomate2/ase/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import sys
import time
from abc import ABCMeta, abstractmethod
from collections.abc import Sequence
from dataclasses import dataclass, field
from enum import Enum
Expand Down Expand Up @@ -78,7 +79,7 @@ class DynamicsPresets(Enum):


@dataclass
class AseMDMaker(AseMaker):
class AseMDMaker(AseMaker, metaclass=ABCMeta):
"""
Perform MD with the Atomic Simulation Environment (ASE).
Expand Down Expand Up @@ -393,6 +394,7 @@ def _callback(dyn: MolecularDynamics = md_runner) -> None:
)

@property
@abstractmethod
def calculator(self) -> Calculator:
"""ASE calculator, to be overwritten by user."""
raise NotImplementedError
Expand Down
Loading

0 comments on commit 6d3c351

Please sign in to comment.