Skip to main content

Fair and transparent benchmark of machine-learned interatomic potentials (MLIPs), beyond basic error metrics

Project description

MLIP Arena

Static Badge Hugging Face GitHub Actions Workflow Status PyPI - Version DOI

MLIP Arena is a unified platform for evaluating foundation machine learning interatomic potentials (MLIPs) beyond conventional error metrics. It focuses on revealing the physical soundness learned by MLIPs and assessing their utilitarian performance agnostic to underlying model architecture. The platform's benchmarks are specifically designed to evaluate the readiness and reliability of open-source, open-weight models in accurately reproducing both qualitative and quantitative behaviors of atomic systems.

MLIP Arena leverages modern pythonic workflow orchestrator Prefect to enable advanced task/flow chaining and caching.

[!NOTE] Contributions of new tasks are very welcome! If you're interested in joining the effort, please reach out to Yuan at cyrusyc@berkeley.edu. See project page for some outstanding tasks, or propose new one in Discussion.

Announcement

Installation

From PyPI (without model running capability)

pip install mlip-arena

From source

[!CAUTION] We recommend clean build in a new virtual environment due to the compatibility issues between multiple popular MLIPs. We provide a single installation script using uv for minimal package conflicts and fast installation!

Linux

# (Optional) Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
# One script uv pip installation
bash scripts/install-linux.sh
# Or from command line
git clone https://github.com/atomind-ai/mlip-arena.git
cd mlip-arena
pip install torch==2.2.0
bash scripts/install-pyg.sh
bash scripts/install-dgl.sh
pip install -e .[test]
pip install -e .[mace]
# DeePMD
DP_ENABLE_TENSORFLOW=0 pip install -e .[deepmd]

Mac

# (Optional) Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
# One script uv pip installation
bash scripts/install-macosx.sh

Quickstart

The first example: Molecular Dynamics

Arena provides a unified interface to run all the compiled MLIPs. This can be achieved simply by looping through MLIPEnum:

from mlip_arena.models import MLIPEnum
from mlip_arena.tasks.md import run as MD 
# from mlip_arena.tasks import MD # for convenient import
from mlip_arena.tasks.utils import get_calculator

from ase import units
from ase.build import bulk

atoms = bulk("Cu", "fcc", a=3.6)

results = []

for model in MLIPEnum:
    result = MD(
        atoms=atoms,
        calculator=get_calculator(
            model,
            calculator_kwargs=dict(), # passing into calculator
            dispersion=True,
            dispersion_kwargs=dict(damping='bj', xc='pbe', cutoff=40.0 * units.Bohr), # passing into TorchDFTD3Calculator
        ),
        ensemble="nve",
        dynamics="velocityverlet",
        total_time=1e3, # 1 ps = 1e3 fs
        time_step=2, # fs
    )
    results.append(result)

🚀 Parallelize Benchmarks at Scale

To run multiple benchmarks in parallel, add .submit before the task function and wrap all the tasks into a flow to dispatch the tasks to worker for concurrent execution. See Prefect Doc on tasks and flow for more details.

...
from prefect import flow

@flow
def run_all_tasks:

    futures = []
    for model in MLIPEnum:
        future = MD.submit(
            atoms=atoms,
            ...
        )
        future.append(future)

    return [f.result(raise_on_failure=False) for f in futures]

For a more practical example, please now refer to MOF classification.

List of implemented tasks

The implemented tasks are available under mlip_arena.tasks.<module>.run or from mlip_arena.tasks import * for convenient imports (currently doesn't work if phonopy is not installed).

  • OPT: Structure optimization
  • EOS: Equation of state (energy-volume scan)
  • MD: Molecular dynamics with flexible dynamics (NVE, NVT, NPT) and temperature/pressure scheduling (annealing, shearing, etc)
  • PHONON: Phonon calculation driven by phonopy
  • NEB: Nudged elastic band
  • NEB_FROM_ENDPOINTS: Nudge elastic band with convenient image interpolation (linear or IDPP)
  • ELASTICITY: Elastic tensor calculation

Contribute

MLIP Arena is now in pre-alpha. If you're interested in joining the effort, please reach out to Yuan at cyrusyc@berkeley.edu.

Development

git lfs fetch --all
git lfs pull
streamlit run serve/app.py

Add new benchmark tasks (WIP)

[!NOTE] Please reuse, extend, or chain the general tasks defined above

Add new MLIP models

If you have pretrained MLIP models that you would like to contribute to the MLIP Arena and show benchmark in real-time, there are two ways:

External ASE Calculator (easy)

  1. Implement new ASE Calculator class in mlip_arena/models/externals.
  2. Name your class with awesome model name and add the same name to registry with metadata.

[!CAUTION] Remove unneccessary outputs under results class attributes to avoid error for MD simulations. Please refer to other class definition for example.

Hugging Face Model (recommended, difficult)

  1. Inherit Hugging Face ModelHubMixin class to your awesome model class definition. We recommend PytorchModelHubMixin.
  2. Create a new Hugging Face Model repository and upload the model file using push_to_hub function.
  3. Follow the template to code the I/O interface for your model here.
  4. Update model registry with metadata

Citation

If you find the work useful, please consider citing the following:

@inproceedings{
    chiang2025mlip,
    title={{MLIP} Arena: Advancing Fairness and Transparency in Machine Learning Interatomic Potentials through an Open and Accessible Benchmark Platform},
    author={Yuan Chiang and Tobias Kreiman and Elizabeth Weaver and Ishan Amin and Matthew Kuner and Christine Zhang and Aaron Kaplan and Daryl Chrzan and Samuel M Blau and Aditi S. Krishnapriyan and Mark Asta},
    booktitle={AI for Accelerated Materials Design - ICLR 2025},
    year={2025},
    url={https://openreview.net/forum?id=ysKfIavYQE}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlip_arena-0.1.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlip_arena-0.1.0-py3-none-any.whl (90.7 kB view details)

Uploaded Python 3

File details

Details for the file mlip_arena-0.1.0.tar.gz.

File metadata

  • Download URL: mlip_arena-0.1.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for mlip_arena-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0dcd200950f2853ff3042330b1617a166c361fcfda28c03a3605838570fe62e7
MD5 36eed71f6a551a623bfdb05b26a6f49a
BLAKE2b-256 c994b191acb9e1c6783ae8e80beda83033c698069bb8dab3028f9916caf5b3ed

See more details on using hashes here.

File details

Details for the file mlip_arena-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mlip_arena-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 90.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for mlip_arena-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db38c13930dbe4c2012c3fbbafefc751dfee6841f600995287fa3144c0f8b14b
MD5 4b85935751b6c0b9a8f6ff03decdabb8
BLAKE2b-256 bb61288e80180649f8f107fbaa89ac8fd33cadd324d151a64f54db8e9bdfed2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page