machine learning interatomic potentials aiida plugin
The code relies heavily on janus-core, which handles mlip calculations using ASE.
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
Once aiida-mlip
is installed, you have to configure AiiDA by creating a profile to store your data:
verdi presto #Sets up profile and broker for daemon to run
janus-core
[!NOTE] Setting up a message broker like RabbitMQ is recommended to enable full functionality, particularly for production use. If detected,
verdi presto
sets up a complete AiiDA profile, including the computer, database, and broker, but thejanus-core
code must be set up separately, as described above.
Please refer to our user guide for more details on installation and configuring AiiDA.
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)
We recommend installing uv
for dependency management when developing for aiida-mlip
, and setting up PostgreSQL, as this is currently a requirement for testing:
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.
Contributors to this project were funded by