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 ML potentials (MACE only planned)
- Fine tunning MLIPs (MACE only planned)
The code relies heavily on janus-core, which handles mlip calculations using ASE.
Installation
pip install aiida-mlip
verdi quicksetup # better to set up a new profile
verdi plugin list aiida.calculations
The last command should show a list of AiiDA pre-installed calculations and the aiida-mlip plugin calculations (janus.opt, janus.sp)
Registered entry points for aiida.calculations:
* core.arithmetic.add
* core.templatereplacer
* core.transfer
* janus.opt
* janus.sp
* janus.md
Usage
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 --fully_opt 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
Development
- Install poetry
- (Optional) Create a virtual environment
- Install
aiida-mlip
with dependencies:
git clone https://github.com/stfc/aiida-mlip
cd aiida-mlip
pip install --upgrade pip
poetry install --with pre-commit,dev,docs # install extra dependencies
pre-commit install # install pre-commit hooks
pytest -v # discover and run all tests
See the developer guide for more information.
Repository contents
.github/
: Github Actions configurationci.yml
: runs tests, checks test coverage and builds documentation at every new commitpublish-on-pypi.yml
: automatically deploy git tags to PyPI - just generate a PyPI API token for your PyPI account and add it to thepypi_token
secret of your github repositorydocs.yml
: builds and deploys the documentation
aiida_mlip/
: The main source code of the plugin packagedata/
: PluginData
classesmodel.py
ModelData
class to save mlip models as AiiDA data types
calculations/
: PluginCalcjob
classesbase.py
: BaseCalcjob
class for other calculationssinglepoint.py
:Calcjob
class to run single point calculations using mlipsgeomopt.py
:Calcjob
class to perform geometry optimization using mlipsmd.py
:Calcjob
class to perform molecular dynamics using mlips
parsers/
:Parsers
for the calculationsbase_parser.py
: BaseParser
for all calculations.sp_parser.py
:Parser
forSinglepoint
calculation.opt_parser.py
:Parser
forGeomopt
calculation.md_parser.py
:Parser
forMD
calculation.
helpers/
:Helpers
to run calculations.
docs/
: Code documentationapidoc/
: API documentationdeveloper_guide/
: Documentation for developersuser_guide/
: Documentation for usersimages/
: Logos etc used in the documentation
examples/
: Examples for submitting calculations using this plugincalculations/
: Scripts for submitting calculationssubmit_singlepoint.py
: Script for submitting a singlepoint calculationsubmit_geomopt.py
: Script for submitting a geometry optimisation calculationsubmit_md.py
: Script for submitting a molecular dynamics calculation
tests/
: Basic regression tests using the pytest framework (submitting a calculation, ...). Installpip install -e .[testing]
and runpytest
.conftest.py
: Configuration of fixtures for pytestcalculations/
: Calculationstest_singlepoint.py
: TestSinglePoint
calculationtest_geomopt.py
: TestGeomopt
calculationtest_md.py
: TestMD
calculation
data/
:ModelData
test_model.py
: TestModelData
type
.gitignore
: Telling git which files to ignore.pre-commit-config.yaml
: Configuration of pre-commit hooks that sanitize coding style and check for syntax errors. Enable viapip install -e .[pre-commit] && pre-commit install
LICENSE
: License for the pluginREADME.md
: This filetox.ini
: File to set up toxpyproject.toml
: Python package metadata for registration on PyPI and the AiiDA plugin registry (including entry points)
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
aiida_mlip-0.1.0b1.tar.gz
(17.9 kB
view hashes)
Built Distribution
Close
Hashes for aiida_mlip-0.1.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efae7dc17845fe830c035db5701c33db56cf4016c13964c4e7fa2234ac8188a2 |
|
MD5 | 24349049f8550eed52f0c6b867eb5fba |
|
BLAKE2b-256 | 078393ba528bdc7eeab4d5fbd26afb5cad83a59506da3dcad478d16d3d6a91cd |