Skip to content

pnnl/Active-Sampling-for-Atomistic-Potentials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Active Sampling for Atomistic Potentials

This codebase introduces an active learning algorithm to dynamically compose a training set during training of a neural network potential (NNP) to prevent over-learning of a specific region of chemical space. The scheme facilitates the further use of data generated from computational studies, which tend to unevenly cover regions of chemical space and are not well-suited to use directly as training sets for NNPs.

Our active learning scheme is applied to the well-known SchNet NNP, with a specific focus on shear processes in materials systems containing several hundred atoms. To accomodate such large systems, several algorithmic enhancements were required, as detailed in the SchNetPack Expansion Features section.

We also demonstrate the use of the actively trained NNP to examine vacancy migration under shear in mixed metal systems. Code is provided for the implementation of the NNP into the ASE structure optimization module for geometry relaxation, along with the algorithm to simulate shear. We also provide code for the analysis of vacancy position based on GALAS and the generation and analysis of multiple evolutionary pathways the material can experience under shear.

Requirements:

  • python 3
  • ASE
  • numpy
  • PyTorch (>=2.5.2)
  • h5py
  • networkx
  • Optional: tensorboardX

Note: We recommend using a GPU for training neural network potentials.

SchNetPack Expansion Features

  • Active learning scheme to dynamically compose the training set during training
  • Automatic Mixed Precision (AMP) for faster and more memory efficient training on NVIDIA GPUs
  • Nearest neighbor preprocessing for improved computational efficiency
  • Neighbor distance computations for systems with periodic boundary conditions using the Minimum Image Convention in Non-Cubic MD Cells to improve speed and reduce memory requirements

Installation

All code was tested using python 3.9 and cuda 11.0 on a Linux operating system.

Create new conda environment with requirements

conda create --name active_schnet --file spec-file.txt

Activate conda environment

conda activate active_schnet

Install active sampling codebase and SchNetPack with expansion

python setup.py install

Install Ovito (for post-shear analysis)

conda install --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito

Documentation

For the original SchNetPack API reference, visit the documentation.

Nearest Neighbor Preprocessing

To save time in training, we recommend preprocessing nearest neighbor calculations. Use the parse_db.py file for this:

python ./preprocessing/parse_db.py --data_path [path to .db file] --preprocessing_path [path to preprocessing dir] --cutoff [atomic cutoff distance]

Use the --no_mic flag to toggle off the minimum image convention for peridic boundary conditions. When --no_mic is present, the mimimum image convention will not be used.

Citation

Sprueill, H. W., Bilbrey, J. A., Pang, Q., & Sushko, P. V. (2023). Active sampling for neural network potentials: Accelerated simulations of shear-induced deformation in Cu–Ni multilayers. The Journal of Chemical Physics, 158(11). https://doi.org/10.1063/5.0133023

About

Active sampling for neural network potentials: Accelerated simulations of shear-induced deformation in Cu–Ni multilayers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors