[![Build Status][ci-badge]][ci-link]
[![Coverage Status][cov-badge]][cov-link]
[![Docs status][docs-badge]][docs-link]
[![PyPI version][pypi-badge]][pypi-link]
[![License][license-badge]][license-link]
[![DOI][doi-badge]][doi-link]
# aiida-mlip
![logo][logo]
machine learning interatomic potentials aiida plugin
## Features (in development)
- [x] Supports multiple MLIPs
- MACE
- M3GNET
- CHGNET
- [x] Single point calculations
- [x] Geometry optimisation
- [x] 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](https://github.com/stfc/janus-core), which handles mlip calculations using ASE.
## Installation
```shell
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:
```shell
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
1. Install [poetry](https://python-poetry.org/docs/#installation)
2. (Optional) Create a virtual environment
3. Install `aiida-mlip` with dependencies:
```shell
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](https://stfc.github.io/aiida-mlip/developer_guide/index.html) for more information.
## Repository contents
* [`.github/`](.github/): [Github Actions](https://github.com/features/actions) configuration
* [`ci.yml`](.github/workflows/ci.yml): runs tests, checks test coverage and builds documentation at every new commit
* [`publish-on-pypi.yml`](.github/workflows/publish-on-pypi.yml): automatically deploy git tags to PyPI - just generate a [PyPI API token](https://pypi.org/help/#apitoken) for your PyPI account and add it to the `pypi_token` secret of your github repository
* [`docs.yml`](.github/workflows/docs.yml): builds and deploys the documentation
* [`aiida_mlip/`](aiida_mlip/): The main source code of the plugin package
* [`data/`](aiida_mlip/data/): Plugin `Data` classes
* [`model.py`](aiida_mlip/data/model.py) `ModelData` class to save mlip models as AiiDA data types
* [`calculations/`](aiida_mlip/calculations/): Plugin `Calcjob` classes
* [`base.py`](aiida_mlip/calculations/base.py): Base `Calcjob` class for other calculations
* [`singlepoint.py`](aiida_mlip/calculations/singlepoint.py): `Calcjob` class to run single point calculations using mlips
* [`geomopt.py`](aiida_mlip/calculations/geomopt.py): `Calcjob` class to perform geometry optimization using mlips
* [`md.py`](aiida_mlip/calculations/md.py): `Calcjob` class to perform molecular dynamics using mlips
* [`parsers/`](aiida_mlip/parsers/): `Parsers` for the calculations
* [`base_parser.py`](aiida_mlip/parsers/base_parser.py): Base `Parser` for all calculations.
* [`sp_parser.py`](aiida_mlip/parsers/sp_parser.py): `Parser` for `Singlepoint` calculation.
* [`opt_parser.py`](aiida_mlip/parsers/opt_parser.py): `Parser` for `Geomopt` calculation.
* [`md_parser.py`](aiida_mlip/parsers/md_parser.py): `Parser` for `MD` calculation.
* [`helpers/`](aiida_mlip/helpers/): `Helpers` to run calculations.
* [`docs/`](docs/source/): Code documentation
* [`apidoc/`](docs/source/apidoc/): API documentation
* [`developer_guide/`](docs/source/developer_guide/): Documentation for developers
* [`user_guide/`](docs/source/user_guide/): Documentation for users
* [`images/`](docs/source/images/): Logos etc used in the documentation
* [`examples/`](examples/): Examples for submitting calculations using this plugin
* [`calculations/`](examples/calculations/): Scripts for submitting calculations
* [`submit_singlepoint.py`](examples/calculations/submit_singlepoint.py): Script for submitting a singlepoint calculation
* [`submit_geomopt.py`](examples/calculations/submit_geomopt.py): Script for submitting a geometry optimisation calculation
* [`submit_md.py`](examples/calculations/submit_md.py): Script for submitting a molecular dynamics calculation
* [`tests/`](tests/): Basic regression tests using the [pytest](https://docs.pytest.org/en/latest/) framework (submitting a calculation, ...). Install `pip install -e .[testing]` and run `pytest`.
* [`conftest.py`](tests/conftest.py): Configuration of fixtures for [pytest](https://docs.pytest.org/en/latest/)
* [`calculations/`](tests/calculations): Calculations
* [`test_singlepoint.py`](tests/calculations/test_singlepoint.py): Test `SinglePoint` calculation
* [`test_geomopt.py`](tests/calculations/test_geomopt.py): Test `Geomopt` calculation
* [`test_md.py`](tests/calculations/test_md.py): Test `MD` calculation
* [`data/`](tests/data): `ModelData`
* [`test_model.py`](tests/data/test_model.py): Test `ModelData` type
* [`.gitignore`](.gitignore): Telling git which files to ignore
* [`.pre-commit-config.yaml`](.pre-commit-config.yaml): Configuration of [pre-commit hooks](https://pre-commit.com/) that sanitize coding style and check for syntax errors. Enable via `pip install -e .[pre-commit] && pre-commit install`
* [`LICENSE`](LICENSE): License for the plugin
* [`README.md`](README.md): This file
* [`tox.ini`](tox.ini): File to set up tox
* [`pyproject.toml`](pyproject.toml): Python package metadata for registration on [PyPI](https://pypi.org/) and the [AiiDA plugin registry](https://aiidateam.github.io/aiida-registry/) (including entry points)
## License
[BSD 3-Clause License](LICENSE)
## Funding
Contributors to this project were funded by
[![PSDI](https://raw.githubusercontent.com/stfc/aiida-mlip/main/docs/source/images/psdi-100.webp)](https://www.psdi.ac.uk/)
[![ALC](https://raw.githubusercontent.com/stfc/aiida-mlip/main/docs/source/images/alc-100.webp)](https://adalovelacecentre.ac.uk/)
[![CoSeC](https://raw.githubusercontent.com/stfc/aiida-mlip/main/docs/source/images/cosec-100.webp)](https://www.scd.stfc.ac.uk/Pages/CoSeC.aspx)
[ci-badge]: https://github.com/stfc/aiida-mlip/workflows/ci/badge.svg
[ci-link]: https://github.com/stfc/aiida-mlip/actions
[cov-badge]: https://coveralls.io/repos/github/stfc/aiida-mlip/badge.svg?branch=main
[cov-link]: https://coveralls.io/github/stfc/aiida-mlip?branch=main
[docs-badge]: https://github.com/stfc/aiida-mlip/actions/workflows/docs.yml/badge.svg
[docs-link]: https://stfc.github.io/aiida-mlip/
[pypi-badge]: https://badge.fury.io/py/aiida-mlip.svg
[pypi-link]: https://badge.fury.io/py/aiida-mlip
[license-badge]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
[license-link]: https://opensource.org/licenses/BSD-3-Clause
[doi-link]: https://zenodo.org/badge/latestdoi/750834002
[doi-badge]: https://zenodo.org/badge/750834002.svg
[logo]: https://raw.githubusercontent.com/stfc/aiida-mlip/main/docs/source/images/aiida-mlip-100.png
Raw data
{
"_id": null,
"home_page": "https://github.com/stfc/aiida-mlip/",
"name": "aiida-mlip",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "aiida, plugin",
"author": "Federica Zanca",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/18/12/6ef187d2ad85e43320820373b8481a29e24ce7bd69e9fc7f53e0b4bb1a94/aiida_mlip-0.1.0b1.tar.gz",
"platform": null,
"description": "[![Build Status][ci-badge]][ci-link]\n[![Coverage Status][cov-badge]][cov-link]\n[![Docs status][docs-badge]][docs-link]\n[![PyPI version][pypi-badge]][pypi-link]\n[![License][license-badge]][license-link]\n[![DOI][doi-badge]][doi-link]\n\n# aiida-mlip\n![logo][logo]\n\nmachine learning interatomic potentials aiida plugin\n\n## Features (in development)\n\n- [x] Supports multiple MLIPs\n - MACE\n - M3GNET\n - CHGNET\n- [x] Single point calculations\n- [x] Geometry optimisation\n- [x] Molecular Dynamics:\n - NVE\n - NVT (Langevin(Eijnden/Ciccotti flavour) and Nos\u00e9-Hoover (Melchionna flavour))\n - NPT (Nos\u00e9-Hoover (Melchiona flavour))\n- [ ] Training ML potentials (MACE only planned)\n- [ ] Fine tunning MLIPs (MACE only planned)\n\nThe code relies heavily on [janus-core](https://github.com/stfc/janus-core), which handles mlip calculations using ASE.\n\n\n\n## Installation\n\n```shell\npip install aiida-mlip\nverdi quicksetup # better to set up a new profile\nverdi plugin list aiida.calculations\n```\nThe last command should show a list of AiiDA pre-installed calculations and the aiida-mlip plugin calculations (janus.opt, janus.sp)\n```\nRegistered entry points for aiida.calculations:\n* core.arithmetic.add\n* core.templatereplacer\n* core.transfer\n* janus.opt\n* janus.sp\n* janus.md\n```\n\n\n## Usage\n\nA quick demo of how to submit a calculation using the provided example files:\n```shell\nverdi daemon start # make sure the daemon is running\ncd examples/calculations\nverdi run submit_singlepoint.py \"janus@localhost\" --struct \"path/to/structure\" --architecture mace --model \"/path/to/model\" # run singlepoint calculation\nverdi run submit_geomopt.py \"janus@localhost\" --struct \"path/to/structure\" --model \"path/to/model\" --steps 5 --fully_opt True # run geometry optimisation\nverdi 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\n\nverdi process list -a # check record of calculation\n```\n\n## Development\n\n1. Install [poetry](https://python-poetry.org/docs/#installation)\n2. (Optional) Create a virtual environment\n3. Install `aiida-mlip` with dependencies:\n\n```shell\ngit clone https://github.com/stfc/aiida-mlip\ncd aiida-mlip\npip install --upgrade pip\npoetry install --with pre-commit,dev,docs # install extra dependencies\npre-commit install # install pre-commit hooks\npytest -v # discover and run all tests\n```\n\nSee the [developer guide](https://stfc.github.io/aiida-mlip/developer_guide/index.html) for more information.\n\n## Repository contents\n\n* [`.github/`](.github/): [Github Actions](https://github.com/features/actions) configuration\n * [`ci.yml`](.github/workflows/ci.yml): runs tests, checks test coverage and builds documentation at every new commit\n * [`publish-on-pypi.yml`](.github/workflows/publish-on-pypi.yml): automatically deploy git tags to PyPI - just generate a [PyPI API token](https://pypi.org/help/#apitoken) for your PyPI account and add it to the `pypi_token` secret of your github repository\n * [`docs.yml`](.github/workflows/docs.yml): builds and deploys the documentation\n* [`aiida_mlip/`](aiida_mlip/): The main source code of the plugin package\n * [`data/`](aiida_mlip/data/): Plugin `Data` classes\n * [`model.py`](aiida_mlip/data/model.py) `ModelData` class to save mlip models as AiiDA data types\n * [`calculations/`](aiida_mlip/calculations/): Plugin `Calcjob` classes\n * [`base.py`](aiida_mlip/calculations/base.py): Base `Calcjob` class for other calculations\n * [`singlepoint.py`](aiida_mlip/calculations/singlepoint.py): `Calcjob` class to run single point calculations using mlips\n * [`geomopt.py`](aiida_mlip/calculations/geomopt.py): `Calcjob` class to perform geometry optimization using mlips\n * [`md.py`](aiida_mlip/calculations/md.py): `Calcjob` class to perform molecular dynamics using mlips\n * [`parsers/`](aiida_mlip/parsers/): `Parsers` for the calculations\n * [`base_parser.py`](aiida_mlip/parsers/base_parser.py): Base `Parser` for all calculations.\n * [`sp_parser.py`](aiida_mlip/parsers/sp_parser.py): `Parser` for `Singlepoint` calculation.\n * [`opt_parser.py`](aiida_mlip/parsers/opt_parser.py): `Parser` for `Geomopt` calculation.\n * [`md_parser.py`](aiida_mlip/parsers/md_parser.py): `Parser` for `MD` calculation.\n * [`helpers/`](aiida_mlip/helpers/): `Helpers` to run calculations.\n* [`docs/`](docs/source/): Code documentation\n * [`apidoc/`](docs/source/apidoc/): API documentation\n * [`developer_guide/`](docs/source/developer_guide/): Documentation for developers\n * [`user_guide/`](docs/source/user_guide/): Documentation for users\n * [`images/`](docs/source/images/): Logos etc used in the documentation\n* [`examples/`](examples/): Examples for submitting calculations using this plugin\n * [`calculations/`](examples/calculations/): Scripts for submitting calculations\n * [`submit_singlepoint.py`](examples/calculations/submit_singlepoint.py): Script for submitting a singlepoint calculation\n * [`submit_geomopt.py`](examples/calculations/submit_geomopt.py): Script for submitting a geometry optimisation calculation\n * [`submit_md.py`](examples/calculations/submit_md.py): Script for submitting a molecular dynamics calculation\n* [`tests/`](tests/): Basic regression tests using the [pytest](https://docs.pytest.org/en/latest/) framework (submitting a calculation, ...). Install `pip install -e .[testing]` and run `pytest`.\n * [`conftest.py`](tests/conftest.py): Configuration of fixtures for [pytest](https://docs.pytest.org/en/latest/)\n * [`calculations/`](tests/calculations): Calculations\n * [`test_singlepoint.py`](tests/calculations/test_singlepoint.py): Test `SinglePoint` calculation\n * [`test_geomopt.py`](tests/calculations/test_geomopt.py): Test `Geomopt` calculation\n * [`test_md.py`](tests/calculations/test_md.py): Test `MD` calculation\n * [`data/`](tests/data): `ModelData`\n * [`test_model.py`](tests/data/test_model.py): Test `ModelData` type\n* [`.gitignore`](.gitignore): Telling git which files to ignore\n* [`.pre-commit-config.yaml`](.pre-commit-config.yaml): Configuration of [pre-commit hooks](https://pre-commit.com/) that sanitize coding style and check for syntax errors. Enable via `pip install -e .[pre-commit] && pre-commit install`\n* [`LICENSE`](LICENSE): License for the plugin\n* [`README.md`](README.md): This file\n* [`tox.ini`](tox.ini): File to set up tox\n* [`pyproject.toml`](pyproject.toml): Python package metadata for registration on [PyPI](https://pypi.org/) and the [AiiDA plugin registry](https://aiidateam.github.io/aiida-registry/) (including entry points)\n\n\n## License\n\n[BSD 3-Clause License](LICENSE)\n\n## Funding\n\nContributors to this project were funded by\n\n[![PSDI](https://raw.githubusercontent.com/stfc/aiida-mlip/main/docs/source/images/psdi-100.webp)](https://www.psdi.ac.uk/)\n[![ALC](https://raw.githubusercontent.com/stfc/aiida-mlip/main/docs/source/images/alc-100.webp)](https://adalovelacecentre.ac.uk/)\n[![CoSeC](https://raw.githubusercontent.com/stfc/aiida-mlip/main/docs/source/images/cosec-100.webp)](https://www.scd.stfc.ac.uk/Pages/CoSeC.aspx)\n\n\n[ci-badge]: https://github.com/stfc/aiida-mlip/workflows/ci/badge.svg\n[ci-link]: https://github.com/stfc/aiida-mlip/actions\n[cov-badge]: https://coveralls.io/repos/github/stfc/aiida-mlip/badge.svg?branch=main\n[cov-link]: https://coveralls.io/github/stfc/aiida-mlip?branch=main\n[docs-badge]: https://github.com/stfc/aiida-mlip/actions/workflows/docs.yml/badge.svg\n[docs-link]: https://stfc.github.io/aiida-mlip/\n[pypi-badge]: https://badge.fury.io/py/aiida-mlip.svg\n[pypi-link]: https://badge.fury.io/py/aiida-mlip\n[license-badge]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg\n[license-link]: https://opensource.org/licenses/BSD-3-Clause\n[doi-link]: https://zenodo.org/badge/latestdoi/750834002\n[doi-badge]: https://zenodo.org/badge/750834002.svg\n[logo]: https://raw.githubusercontent.com/stfc/aiida-mlip/main/docs/source/images/aiida-mlip-100.png\n",
"bugtrack_url": null,
"license": null,
"summary": "machine learning interatomic potentials aiida plugin",
"version": "0.1.0b1",
"project_urls": {
"Documentation": "https://stfc.github.io/aiida-mlip/",
"Homepage": "https://github.com/stfc/aiida-mlip/",
"Repository": "https://github.com/stfc/aiida-mlip/",
"Source": "https://github.com/aiidateam/aiida-mlip"
},
"split_keywords": [
"aiida",
" plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "078393ba528bdc7eeab4d5fbd26afb5cad83a59506da3dcad478d16d3d6a91cd",
"md5": "24349049f8550eed52f0c6b867eb5fba",
"sha256": "efae7dc17845fe830c035db5701c33db56cf4016c13964c4e7fa2234ac8188a2"
},
"downloads": -1,
"filename": "aiida_mlip-0.1.0b1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "24349049f8550eed52f0c6b867eb5fba",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 23873,
"upload_time": "2024-05-02T17:22:07",
"upload_time_iso_8601": "2024-05-02T17:22:07.507220Z",
"url": "https://files.pythonhosted.org/packages/07/83/93ba528bdc7eeab4d5fbd26afb5cad83a59506da3dcad478d16d3d6a91cd/aiida_mlip-0.1.0b1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "18126ef187d2ad85e43320820373b8481a29e24ce7bd69e9fc7f53e0b4bb1a94",
"md5": "54c454d31699aedd51fa135237159cdf",
"sha256": "d8d80bad91a71339dba30cb68a0cf3751c773173bad7f0850bd188310738a728"
},
"downloads": -1,
"filename": "aiida_mlip-0.1.0b1.tar.gz",
"has_sig": false,
"md5_digest": "54c454d31699aedd51fa135237159cdf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 17853,
"upload_time": "2024-05-02T17:22:08",
"upload_time_iso_8601": "2024-05-02T17:22:08.822774Z",
"url": "https://files.pythonhosted.org/packages/18/12/6ef187d2ad85e43320820373b8481a29e24ce7bd69e9fc7f53e0b4bb1a94/aiida_mlip-0.1.0b1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-02 17:22:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "stfc",
"github_project": "aiida-mlip",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "aiida-mlip"
}