Skip to the content.

LAMMPS implementation of rapid artificial neural network derived interatomic potentials

Authors

Doyl Dickel

Mashroor Nitol

Christopher Barrett

An implementation of a rapid artificial neural network (RANN) style potential in the LAMMPS molecular dynamics package is presented here which utilizes angular screening to reduce computational complexity without reducing accuracy. For the smallest neural network architectures, this formalism rivals the modified embedded atom method (MEAM) for speed and accuracy, while the networks approximately one third as fast as MEAM were capable of reproducing the training database with chemical accuracy. The numerical accuracy of the LAMMPS implementation is assessed by verifying conservation of energy and agreement between calculated forces and pressures and the observed derivatives of the energy as well as by assessing the stability of the potential in dynamic simulation. The potential style is tested using a force field for magnesium and the computational efficiency for a variety of architectures is compared to a traditional potential models as well as alternative ANN formalisms. The predictive accuracy is found to rival that of slower methods. While machine learning approaches have been successfully used to represent interatomic potentials, their speed has typically lagged behind conventional formalisms. This is often due to the complexity of the structural fingerprints used to describe the local atomic environment and the large cutoff radii and neighbor lists used in the calculation of these fingerprints. Even recent machine learned methods are at least 10 times slower than traditional formalisms. An implementation of a rapid artificial neural network (RANN) style potential in the LAMMPS molecular dynamics package is presented here which utilizes angular screening to reduce computational complexity without reducing accuracy. For the smallest neural network architectures, this formalism rivals the modified embedded atom method (MEAM) for speed and accuracy, while the networks approximately one third as fast as MEAM were capable of reproducing the training database with chemical accuracy. The numerical accuracy of the LAMMPS implementation is assessed by verifying conservation of energy and agreement between calculated forces and pressures and the observed derivatives of the energy as well as by assessing the stability of the potential in dynamic simulation.

#1589F0 Artificial Neural Network Architecture

The energy of a particular atom , determined by its environment, is the last of N layers of the neural network. The values for any particular layer, ,after the first is determined by the previous layer and the weight and bias matrices and :

Where is the number of neurons in layer and is a nonlinear activation function. The input layer, is given by the structural fingerprint of the local atomic environment. The ouput layer, , will always contain a single node, representing the energy, and so will always be a row vector and always a single number.

For the RANN style, we use the fingerprint style is motivated by the Modified Embedded Atom Method (MEAM) formalism with the addition of angular screening. In this style, two different kind of input fingerprints are considered. First, simple pair interactions are considered and summed over all the neighbors of a given atom. For a given atom labeled , we define a set of pair potentials interactions with the form:

Where labels all the neighbors atoms of within a cutoff radius , is an integer, different for each member of the pairwise contributions to the fingerprint, is the equilibrium nearest neighbor distance, is an angular screening term, and are metaparameters, which can be tuned to better optimize the potential. The second kind of fingerprint function considers three body terms, with a form similar to the partial electron densities used in MEAM:

where is the angle between and , is a non-negative interger and is a set of metaparameters which determine the length scale of the different terms.

A particular ANN potential will consist of a fixed structural fingerprint, number and length of each hidden layer, weight and bias matrices for each layer and activation functions for each layer. For the potentials considered here we have used the following activation functions:

The size of the weight and bias matrices will depend on the length of the fingerprint and the length of each hidden layer.

Angular screening, whereby the effective interaction between atoms is reduced or eliminated by the presence of an atom located between them can effectively limit the neighbor list in a similar way without the unphysical results. Such a method has been utilized by MEAM and the same screening method has been employed here. Briefly, the screening between two atoms is determined from the product of all the screening interactions by other atoms in the neighborhood:

where is calculated from a geometric construction considering the ellipse formed by the 3 atoms with one of the axes. The screening parameter, is then given by:

and then screening value is

where is the same cutoff function used for the radial cutoff and and are metaparameters which can be tuned to determine which neighbors can be excluded from calculations.

The effect of including angular screening can be demonstrating by considering the change of an individual fingerprint as the length scale is changed continuously. In the absence of angular screening, the value of the fingerprint will change rapidly at particular values of the lattice constant as new neighbors enter the radial screening distance. If angular screening is included with metaparameters such that, for example, only 3rd nearest neighbors are ever included regardless of lattice parameter, the change in the value is considerably smoother.

#1589F0 How to develop a RANN potential

1. DFT database A fairly large database is needed to ensure the wide range of atomic environments. A detail procedure can be found in our publications. Typically the user needs to have the following DFT simulations:

2. Quantum espresso to LAMMPS dump format

Once the user have the DFT database, the outputs are required to convert in LAMMPS dump format. A python code to convert Quantum espresso output to LAMMPS dump format is given in MISC repository.

3. Training

The calibration repository has c++ source code to train the data. Please go through the README file in that repository to compile the code, training input file and potential file description

#1589F0 LAMMPS Installation with RANN package

pair_style rann requires the USER-RANN package. It is only enabled if LAMMPS was built with that package. Additionally, if any spin fingerprint styles are used LAMMPS must be built with the SPIN package as well. Please go through the README file provided in USRE-RANN repository.

#1589F0 How to use the potentials

In your LAMMPS input script, specify

pair_style rann
pair_coeff file Type1_element Type2_element Type3_element...

Examples:

pair_style rann
pair_coeff ** Mg.rann Mg
pair_coeff ** MgAlalloy.rann Mg Mg Al Mg

#1589F0 Please contact for any inquiries:

- Dr. Doyl E. Dickel
Assistant Professor
Mechanical Engineering, Mississippi State University
- doyl@me.msstate.edu 

plot