Skip to main content

Machine Learning Interatomic Potentials Training Suite

Project description

Machine Learned Interatomic Potentials - Training Suite (MLIPTS).

PyPI

MLIPTS is a python package for training/fine-tuning machine learned interatomic potentials.

The key idea is to perform the following active learning workflow [1] with as little user input as possible:

[!NOTE] The scope of a fully-fledged python package to perform seemless MLIP training is significant, with many availible MD and DFT/Quantum Chemistry codes and ways to quantify data quality. Contributors are welcome to help make this goal a reality.

Version 0.1.0

Installation

MLIPTS can be installed via pip

pip install mlipts

Capability

0.1.0 is built to address the creation of an inital data set (Part 1 of the workflow above), however, note part of the current functionality is applicable across the main workflow, ultimately arriving at the following reduced workflow to address:

The MD code supported is LAMMPS and DFT code supported is VASP, where the earth movers distance (EMD) has been implemented to filter configurations. The details of this method are found at [2] and average-minimum-distance (Copyright (C) 2025 Daniel Widdowson).

Usage

It is highly recommended to follow the availible example at PuO2_example.

The working directory is set up in the following way:

collect_data/
├─ MD_base/
├─ QM_base/
└─ workflow.ipynb

Where MD_base and QM_base include the input files for molecular dynamics and quantum mechanical simulations respectively. Since the current version only supports lammps and vasp, these directories will have the following format:

├─ lammps_base/
    ├─ in.test
    └─ test.dat
├─ vasp_base/
    ├─ INCAR
    ├─ KPOINTS
    └─ POTCAR

Noting POSCAR is intentially missing as this is to be generated.

[!TIP] The key to a successful data collection workflow is ensuring all files in the above are formatted correctly, so it is recommend to test each base directory. Collection of the full datase will be calling each calculation many times.

With a directory set up, mlipts allows simply following of the flow chart above:

  1. Run many MD calculations:
workflow.build_MD_calculations('./lammps_base',variables,outdir='./MD_calculations')
workflow.write_MD_submission_scripts(MD_cmd_line,submit=True)
  1. Filter new configurations from MD:
workflow.filter_active_MD(tol=0.1)

where tol defines a tolerence to keep or remove a configuration, i.e. if the earth movers distance (emd) between two configurations is less than tol one of the configurations is dropped.

[!NOTE] The emd is calculated between each pair of configurations and therefore can be costly.

  1. Run DFT calculations on new configurations
workflow.write_QM_submission_scripts(QM_cmd_line,save_and_remove=True,submit=True)

where save_and_remove is an option to save the data from each QM calculation while running. Its default is True.

[!NOTE] save and remove uses a python enviroment with mlipts installed and utlizes py4vasp (requiring VASP version>6.2).

The final workflow will then appear as,

collect_data/
├─ MD_base/
├─ MD_calculations/
├─ MD_scripts/
├─ QM_base/
├─ QM_calculations/
├─ QM_scripts/
├─ workflow.ipynb
└─ training_data.xyz

and training_data_xyz can be passed into MACE [2] or reformatted for other MLIP architechtures.

References

[1] Jacobs, Ryan, et al. "A practical guide to machine learning interatomic potentials–Status and future." Current Opinion in Solid State and Materials Science 35 (2025): 101214.

[2] Widdowson, Daniel, and Vitaliy Kurlin. "Pointwise distance distributions for detecting near-duplicates in large materials databases." arXiv preprint arXiv:2108.04798 (2021).

[3] Batatia, Ilyes, et al. "MACE: Higher order equivariant message passing neural networks for fast and accurate force fields." Advances in neural information processing systems 35 (2022): 11423-11436.

Contact

William Davie, willdavie2002@gmail.com.

Department of Material Science and Metallurgy, University of Cambridge.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlipts-0.1.1.tar.gz (296.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlipts-0.1.1-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file mlipts-0.1.1.tar.gz.

File metadata

  • Download URL: mlipts-0.1.1.tar.gz
  • Upload date:
  • Size: 296.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mlipts-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c311c4ea980f41f2ef1207fd1d0a24476cbfa6f6d4835e47f114c1bd846f072f
MD5 5730e1a8e1e174fe7d79bb35728efcd2
BLAKE2b-256 4ab0d375d9b3f14daea25499394ed6e6a77e0e22be54baf7a1cef7145363f2ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlipts-0.1.1.tar.gz:

Publisher: python-publish.yml on williamdavie/mlipts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mlipts-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mlipts-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mlipts-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 512fa6a34cdfcc1ee2768880cf5426c761744e57f5c34facbe96a51efd09a83d
MD5 25aa50e27e494433bf0a81c402e55bd7
BLAKE2b-256 354ba2827500b10a3b742f4a599c1053793d3da31a5a5a9b15a0736c4a7cebfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlipts-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on williamdavie/mlipts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page