- External ASE Calculator (easy)
- HuggingFace Model (recommended)
External ASE Calculator
This approach is recommended when your model already ships an ASE Calculator class, or when you want to wrap an existing third-party package quickly.1
Implement your calculator class
Create a new Python file in Use
mlip_arena/models/externals/. Name the file after your model family (e.g., mymodel.py).Subclass the upstream ASE calculator for your model and override __init__ and calculate as needed. The following is the complete CHGNet implementation as a reference:chgnet.py
get_freer_device() from mlip_arena.models.utils to automatically select the least-loaded GPU, or fall back to CPU when no GPU is available. Pass device as a constructor argument so callers can override it.2
Add your model to registry.yaml
Open See the registry fields reference below for a description of every field.
mlip_arena/models/registry.yaml and add an entry for your model. Use the class name as the top-level key:3
Test your calculator
Run the external calculator test suite to confirm your model loads and produces valid outputs:The test instantiates every registered model, creates a two-atom
Atoms object, and asserts that get_potential_energy(), get_forces(), and get_stress() return arrays of the correct shape and dtype.4
Open a pull request
Commit your new file and the registry entry, then open a PR against
main. The CI pipeline will run the full test suite and perform a trial sync to the Hugging Face Space.registry.yaml fields
Every entry inmlip_arena/models/registry.yaml supports the following fields: