Skip to content

wenlingren/Active-learning-workflow

Repository files navigation

Active Learning Workflow for MLIP

This repository contains an example active-learning workflow for building and improving a machine-learning interatomic potential (MLIP) from VASP, AIMD, MLIP, and LAMMPS calculations.

The workflow starts from a relaxed structure, generates AIMD trajectories, selects representative configurations, labels them with single-point DFT calculations, trains an initial moment tensor potential (MTP), and then iteratively improves the potential with active learning.

Active-learning workflow

Repository Contents

active-learning-workflow.ipynb  Main notebook describing the workflow and commands
data_AL_workflow.png            Workflow diagram
1opt/                           Initial VASP structure relaxation
2AIMD/                          AIMD calculations at different temperatures
3single/                        Single-point DFT labeling calculations
4train/                         Initial MLIP/MTP training data and potential
5AL/                            Active-learning iterations with LAMMPS, VASP, and retraining

Workflow Summary

  1. Relax the initial structure in 1opt/ with VASP.
  2. Copy the optimized CONTCAR to the AIMD setup as POSCAR.
  3. Run AIMD simulations in 2AIMD/ over the target temperature range.
  4. Convert VASP OUTCAR trajectories to MLIP cfg format.
  5. Trim and subsample equilibrated AIMD configurations.
  6. Run single-point DFT calculations in 3single/ for selected configurations.
  7. Combine labeled configurations into training and test sets.
  8. Train an initial MTP in 4train/.
  9. Run active-learning MD in 5AL/Lammps_select_iter_*.
  10. Select extrapolative configurations, label them with VASP, and retrain the potential.
  11. Repeat until the selected configurations and model errors satisfy the stopping criterion.

The detailed, copy-ready commands are documented in active-learning-workflow.ipynb.

Requirements

This workflow assumes access to the following external software:

  • VASP for structure relaxation, AIMD, and single-point DFT labeling
  • MLIP for cfg conversion, MTP training, and active selection
  • LAMMPS with MLIP support for active-learning molecular dynamics
  • Python with Jupyter Notebook or JupyterLab for running the workflow notebook

The exact module names, executable paths, and scheduler commands depend on the local HPC environment and should be adapted before running the workflow.

Data and File-Size Notes

The full working directory contains large VASP and LAMMPS output files. Before pushing to GitHub, check the repository size and decide whether to:

  • keep only the notebook, input files, representative small outputs, and workflow diagram;
  • move large raw outputs such as OUTCAR, vasprun.xml, trajectories, and logs to external storage;
  • or use Git LFS for large files that must remain versioned.

GitHub blocks individual files larger than 100 MB and normal repositories are not intended for multi-GB simulation archives.

Suggested GitHub Upload

After removing or externalizing large files as needed:

git init
git branch -M main
git remote add origin https://github.com/wenlingren/Active-learning-workflow.git
git add README.md active-learning-workflow.ipynb data_AL_workflow.png 1opt 2AIMD 3single 4train 5AL
git commit -m "Add active learning workflow"
git push -u origin main

If the remote repository already contains files, pull or clone it first, then copy this project into the cloned repository before committing.

Citation and Acknowledgment

If you use this workflow in a publication or shared project, cite the relevant software packages and methods used in your calculations, including VASP, MLIP/MTP, LAMMPS, and any exchange-correlation functional or simulation settings required by your study.

About

The workflow shows how to do active learning using MTP, LAMMPS, VASP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors