Machine learning interatomic potentials AiiDA plugin
Project description
aiida-mlip
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:
- (Optional) Install RabbitMQ
- Run:
verdi presto #Sets up profile and broker for daemon to run
- Create a code for
janus-core
[!NOTE] Setting up a message broker like RabbitMQ is recommended to enable full functionality, particularly for production use. If detected,
verdi prestosets up a complete AiiDA profile, including the computer, database, and broker, but thejanus-corecode must be set up separately, as described above.
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:
- Install uv
- Setup PostgreSQL
- Install
aiida-mlipwith 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
Funding
Contributors to this project were funded by
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiida_mlip-0.4.1.tar.gz.
File metadata
- Download URL: aiida_mlip-0.4.1.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
931ef74abd3d3992a20ccebdd29c18a06e24a047947e8256298bd5138e0161d9
|
|
| MD5 |
d1296e22274cab9e3898ebe0eb0ea3b4
|
|
| BLAKE2b-256 |
e71901f94e8ea57d8051e060dc2053a872ef5f3ca0943e3ef45b29101acc95c5
|
File details
Details for the file aiida_mlip-0.4.1-py3-none-any.whl.
File metadata
- Download URL: aiida_mlip-0.4.1-py3-none-any.whl
- Upload date:
- Size: 31.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a837cd0f528c77cf26517d37a5110d7c0e097a615285b3665e1a37e580e8ca80
|
|
| MD5 |
3b056966cc604561bb28badd40874720
|
|
| BLAKE2b-256 |
cd99aafb97c35bd7f34106b46d694fa005544bf0df4c64840b394b02c593b959
|