Skip to main content

Build Status Coverage Status Docs status PyPI version License DOI

aiida-mlip

logo

machine learning interatomic potentials aiida plugin

Features (in development)

  • Supports multiple MLIPs
    • MACE
    • M3GNET
    • CHGNET
  • Single point calculations
  • Geometry optimisation
  • Molecular Dynamics:
    • NVE
    • NVT (Langevin(Eijnden/Ciccotti flavour) and Nosé-Hoover (Melchionna flavour))
    • NPT (Nosé-Hoover (Melchiona flavour))
  • Training MLIPs
    • MACE
  • Fine tuning MLIPs
    • MACE
  • MLIP descriptors
    • MACE

The code relies heavily on janus-core, which handles mlip calculations using ASE.

Getting Started

Installation

We suggest creating a new virtual environment and activating it before running the commands below to install aiida-mlip:

pip install aiida-mlip
verdi plugin list aiida.calculations

The last command should show a list of AiiDA pre-installed calculations and the aiida-mlip plugin calculations:

Registered entry points for aiida.calculations:
* core.arithmetic.add
* core.templatereplacer
* core.transfer
* mlip.opt
* mlip.sp
* mlip.md
* mlip.train
* mlip.descriptors

AiiDA Configuration

Once aiida-mlip is installed, you have to configure AiiDA by creating a profile to store your data:

  1. (Optional) Install RabbitMQ
  2. Run:
verdi presto #Sets up profile and broker for daemon to run
  1. Create a code for janus-core

Please refer to our user guide for more details on installation and configuring AiiDA.

Usage

The examples folder provides scripts to submit calculations in the calculations folder, and tutorials in jupyter notebook format in the tutorials folder.

A quick demo of how to submit a calculation using the provided example files:

verdi daemon start     # make sure the daemon is running
cd examples/calculations
verdi run submit_singlepoint.py "janus@localhost" --struct "path/to/structure" --architecture mace --model "/path/to/model"    # run singlepoint calculation
verdi run submit_geomopt.py "janus@localhost" --struct "path/to/structure" --model "path/to/model" --steps 5 --opt-cell-fully True # run geometry optimisation
verdi run submit_md.py "janus@localhost" --struct "path/to/structure" --model "path/to/model" --ensemble "nve" --md-dict-str "{'temp':300,'steps':4,'traj-every':3,'stats-every':1}" # run molecular dynamics

verdi process list -a  # check record of calculation

Models can be trained by using the Train calcjob. In that case the needed inputs are a config file containig the path to train, test and validation xyz file and other optional parameters. Running

verdi run submit_train.py

a model will be trained using the provided example config file and xyz files (can be found in the tests folder)

Development

Please ensure you have consulted our contribution guidelines and coding style before proceeding.

We recommend installing uv for dependency management when developing for aiida-mlip, and setting up PostgreSQL, as this is currently a requirement for testing:

  1. Install uv
  2. Setup PostgreSQL
  3. Install aiida-mlip with dependencies in a virtual environment:
git clone https://github.com/stfc/aiida-mlip
cd aiida-mlip
uv sync --extra mace # Create a virtual environment and install dependencies with mace for tests
source .venv/bin/activate
pre-commit install  # Install pre-commit hooks
pytest -v  # Discover and run all tests

See the developer guide for more information.

License

BSD 3-Clause License

Funding

Contributors to this project were funded by

PSDI CoSeC

Release files for aiida-mlip 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiida-mlip 0.5.0
File Size Uploaded
aiida_mlip-0.5.0.tar.gz 20.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiida-mlip 0.5.0
File Interpreter ABI Platform
aiida_mlip-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.0 kB

Release files / aiida_mlip-0.5.0.tar.gz

Download URL aiida_mlip-0.5.0.tar.gz
Size 20.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3aa66727fc412eb9bd9dde5c20e6bfc80dd5afb2f4a8a92b2b2c025d2e303bee
BLAKE2b-256 checksum
How to use checksums
c32c89fc113e9722fd08091c01d2f3adde7a8b1fdda9da5d7d769b3f7e8e869e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / aiida_mlip-0.5.0-py3-none-any.whl

Download URL aiida_mlip-0.5.0-py3-none-any.whl
Size 35.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8464e06b7f421b568242a96a23aa58dc2b9ee3440cb473e404791e2586324483
BLAKE2b-256 checksum
How to use checksums
beb54715333a40a176beba8dd5d514871772ee589be862157cc0106228a641c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page