Skip to main content
MLIP Arena provides a unified interface to 15+ foundation machine learning interatomic potentials. Every model is exposed as an ASE Calculator and enumerated in MLIPEnum for easy iteration across benchmarks.

MLIPEnum

MLIPEnum is a Python Enum built dynamically at import time from registry.yaml. Each member’s name is the model’s display name and its value is the calculator class.
MLIPEnum only contains models whose packages are installed in the current environment. If a model’s dependency is missing, it is silently skipped with a warning rather than raising an import error.

The MLIP base class

HuggingFace-hosted models inherit from MLIP, defined in mlip_arena/models/__init__.py:
The PyTorchModelHubMixin inheritance means any MLIP subclass can be uploaded to and downloaded from HuggingFace Hub with push_to_hub() and from_pretrained().

MLIPCalculator

MLIPCalculator combines MLIP (the neural network) with ASE’s Calculator interface:
Device selection is automatic: get_freer_device() picks the CUDA GPU with the most free memory, falls back to MPS on Apple Silicon, and finally to CPU.

External ASE calculators vs HuggingFace models

Most models in the registry are implemented as external ASE calculators under mlip_arena/models/externals/. They wrap third-party packages and set module: externals in the registry.When to use this approach:
  • The model already ships its own inference code (e.g., mace-torch, chgnet, matgl).
  • You want to add a model quickly without implementing a custom graph network.
Remove any unnecessary entries from the results class attribute on your calculator. Extra properties (e.g., magnetic moments) can cause errors during MD simulations. See the CHGNet implementation as a reference.

The model registry.yaml structure

Each entry in mlip_arena/models/registry.yaml has the following fields:

Dynamic loading at import time

When you import mlip_arena.models, the __init__.py reads registry.yaml and dynamically imports each model class:
Models whose packages are not installed produce a warning and are excluded from MLIPEnum. This allows you to install only a subset of models and still use the library.

Available models

Prediction types: E = energy, F = forces, S = stress, M = magnetic moments.

Using get_calculator()

get_calculator() from mlip_arena.tasks.utils is the recommended way to instantiate a calculator. It handles device selection, optional dispersion correction via TorchDFTD3Calculator, and accepts multiple input types:
get_calculator() returns a BaseCalculator instance, so it is compatible with all MLIP Arena tasks.