Skip to content

EquFlash

Optional dependency

EquFlashCalculator has no materialsframework extra. It's only installable from its upstream git repository (as the GGNN package), and needs additional manual dependencies beyond that. See Non-Extra Calculators for the verified, platform-specific install commands.

uv pip install "GGNN @ git+https://github.com/SamsungDS/GGNN.git"
uv pip install fairchem-core==1.10.0
uv pip install torch-geometric e3nn cuequivariance==0.6.0 cuequivariance-torch==0.6.0
uv pip install torch_scatter==2.1.2 torch_sparse==0.6.18 \
    --find-links https://data.pyg.org/whl/torch-2.4.1+cpu.html
uv pip install "scipy<1.17.0"
pip install "GGNN @ git+https://github.com/SamsungDS/GGNN.git"
pip install fairchem-core==1.10.0
pip install torch-geometric e3nn cuequivariance==0.6.0 cuequivariance-torch==0.6.0
pip install torch_scatter==2.1.2 torch_sparse==0.6.18 \
    --find-links https://data.pyg.org/whl/torch-2.4.1+cpu.html
pip install "scipy<1.17.0"

EquFlashCalculator

EquFlashCalculator(
    model: str = "",
    device: Literal["cpu", "cuda"] = "cpu",
    seed: int | None = None,
    only_output: list[str] | None = None,
    **kwargs: Any,
)

Calculator for material property calculations and structure relaxation using the EquFlash potential.

EquFlash and EquFlashV2 are the MLFF architectures shipped by the GGNN package, built on fairchem-core with e3nn Clebsch-Gordan tensor products accelerated via cuequivariance/FlashTP. GGNN publishes pretrained checkpoints ("equflash-OAM", "equflash-OMat24", "equflashv2-OAM", "equflashv2-OMat24") that must be downloaded manually and passed as model. See https://github.com/SamsungDS/GGNN#checkpoints for download links.

Attributes:

Name Type Description
AVAILABLE_PROPERTIES list[str]

A list of properties that this calculator can compute, including "energy", "forces", and "stress".

References
  • FlashTP: https://proceedings.mlr.press/v267/lee25l.html

Initializes the EquFlashCalculator with the specified model and calculation settings.

Parameters:

Name Type Description Default
model str

The path to a downloaded EquFlash/EquFlashV2 checkpoint file.

''
device Literal['cuda', 'cpu']

The device to use for calculations. Defaults to "cpu".

'cpu'
seed int

The seed value for reproducibility. Defaults to None, meaning the seed stored in the checkpoint is used.

None
only_output list[str]

Restricts the calculator to a subset of the checkpoint's outputs. Defaults to None, meaning all of the checkpoint's outputs are kept.

None
**kwargs Any

Additional keyword arguments passed to the BaseCalculator and BaseMDCalculator constructors.

{}

calculator

calculator() -> Calculator

Lazily builds the ASE Calculator object for the EquFlash potential, using the settings from initialization.

Returns:

Name Type Description
Calculator Calculator

The ASE Calculator object configured with the EquFlash potential.