-
A standalone C++ implementation (a class called
NEP) of the neuroevolution potential (NEP) as introduced in the GPUMD package (https://github.com/brucefan1983/GPUMD). We stress that there is no external dependence. The implementation works for all versions of NEP. -
An interface of the
NEPclass to the CPU version of LAMMPS (https://github.com/lammps/lammps). It can be run with MPI.
-
The
NEPC++ class and the interfaces are defined insrc/nep.h. -
There is an option to use tables to speed up the calculations for the radial functions in NEP. To enable it, one can change line 21 of
src/nep.h:
// #define USE_TABLE_FOR_RADIAL_FUNCTIONS
-
The following folders contain some testing code and results:
test/lammps/test_nep/test_qnep/test_dftd3/
-
The
NEPC++ class is used as an engine powering the following Python packages:calorine: https://gitlab.com/materials-modeling/calorinePyNEP: https://github.com/bigd4/PyNEPsomd: https://github.com/initqp/somdNepTrainKit: https://github.com/aboys-cb/NepTrainKit
- step 1: Copy the files in
src/intointerface/lammps/USER-NEP/.
Command:
cd ${software}/NEP_CPU
cp src/* interface/lammps/USER-NEP
-
Step 2: Now you can copy the
USER-NEP/folder intoYOUR_LAMMPS_PATH/src/and start to compile LAMMPS in your favorite way.If you are compiling LAMMPS using
make, ensure that you run "make yes-USER-NEP" before the final compilation.
cd ${software}/NEP_CPU
cp -r interface/lammps/USER-NEP ${software}/lammps/src
cd ${software}/lammps/src
make yes-USER-NEP
make machine
If you are using cmake, you need to copy /interface/lammps/USER-NEP.cmake to LAMMPS cmake package directory and add USER-NEP to CMakeLists.txt. Then enable NEP by add "PKG_NEP=on", along with your other -D flags during the configuration step.
cd ${software}/NEP_CPU
cp -r interface/lammps/USER-NEP ${software}/lammps/src
cp interface/lammps/USER-NEP.cmake ${software}/lammps/cmake/Modules/Packages/
cd ${software}/lammps/cmake
sed -i '/foreach(PKG_WITH_INCL / s/)/ USER-NEP)/' CMakeLists.txt
sed -i '/set(STANDARD_PACKAGES/,/)/ s/)/ \n USER-NEP)/' CMakeLists.txt
cd ..; mkdir build; cd build
cmake -D PKG_USER-NEP=on ../cmake
cmake --build .
make install
-
atom_stylecan beatomicandfull -
unitsmust bemetal -
Specify the
pair_stylein the same way as other potentials in LAMMPS (the first 2 arguments must be * * so as to span all atom types). For example, if you have a NEP modelNEP_HBCN.txt, and your data file just have element carbon, you can setpair_style nep pair_coeff * * NEP_HBCN.txt C
Firstly, we should set
pair_styletonep, showed in the first line. Then we need set the NEP potential file and atom types by the commandpair_coeff. Two asterisks* *mean every atom type will be set an element type orNULL.NULLmeans this potential doesn't consider the atom type. In this example, we set atom type1in LAMMPS data file to elementCin NEP potential file. -
The interface also supports multi-element system and hybrid potentials. Take a NEP model
NEP_PdCuNiP.txtas an example. In this NEP model file, the first line isnep3 4 Pd Cu Ni P. Then in your LAMMPS input file, the next setting is allowed:pair_style hybrid/overlay nep nep lj/cut 1.0 pair_coeff * * nep 1 NEP_PdCuNiP.txt Cu Ni NULL pair_coeff * * nep 2 NEP_PdCuNiP.txt NULL NULL Pd pair_ceoff 1*2 3 lj/cut 1.0 1.0
The
pair_styleshould be sethybrid/overlyor other hybrid methods in LAMMPS. The hybrid potentials should be set after hybrid method. Then, in commandpair_coeffwe need set potential name again to identify which potential is setting for and the number of the potential if more than one. Here, we set two NEP potentials. The first one just computes the NEP potential between atom type1Cuand2Ni, and of themselves. The second computes NEP potential of atom type3Pditself. -
If you want to calculate the heat current correctly, use the following command to get the 9-component per-atom virial:
compute 1 all centroid/stress/atom NULL
-
If you directly or indirectly use the
NEPclass here, you are suggested to cite the following paper:- Ke Xu, Hekai Bu, Shuning Pan, Eric Lindgren, Yongchao Wu, Yong Wang, Jiahui Liu, Keke Song, Bin Xu, Yifan Li, Tobias Hainer, Lucas Svensson, Julia Wiktor, Rui Zhao, Hongfu Huang, Cheng Qian, Shuo Zhang, Zezhu Zeng, Bohan Zhang, Benrui Tang, Yang Xiao, Zihan Yan, Jiuyang Shi, Zhixin Liang, Junjie Wang, Ting Liang, Shuo Cao, Yanzhou Wang, Penghua Ying, Nan Xu, Chengbing Chen, Yuwen Zhang, Zherui Chen, Xin Wu, Wenwu Jiang, Esme Berger, Yanlong Li, Shunda Chen, Alexander J. Gabourie, Haikuan Dong, Shiyun Xiong, Ning Wei, Yue Chen, Jianbin Xu, Feng Ding, Zhimei Sun, Tapio Ala-Nissila, Ari Harju, Jincheng Zheng, Pengfei Guan, Paul Erhart, Jian Sun, Wengen Ouyang, Yanjing Su, Zheyong Fan, GPUMD 4.0: A high-performance molecular dynamics package for versatile materials simulations with machine-learned potentials, MGE Advances 3, e70028 (2025).
-
If you use the LAMMPS interface of the
NEPclass, a proper citation for LAMMPS is also suggested.