Skip to content

shdchen/NEP_CPU

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEP_CPU

What does this repository contain?

The standalone C++ implementation of NEP

  • The NEP3 C++ class is defined in the following three files:

    • src/nep.h
    • src/nep.cpp
    • src/dftd3para.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 20 of src/nep.h:

// #define USE_TABLE_FOR_RADIAL_FUNCTIONS

The NEP-LAMMPS interface

Build the NEP-LAMMPS interface

  • step 1: Copy the files in src/ into interface/lammps/USER-NEP/ such that you have the following files in interface/lammps/USER-NEP/:

    • nep.h
    • nep.cpp
    • dftd3para.h
    • pair_NEP.h
    • pair_NEP.cpp
    • install.sh
  • Step 2: Now you can copy the USER-NEP/ folder into YOUR_LAMMPS_PATH/src/ and start to compile LAMMPS in your favorite way. Good luck!

Use the NEP-LAMMPS interface

  • atom_style can only be atomic

  • units must be metal

  • Specify the pair_style in the following way:

    pair_style nep YOUR_NEP_MODEL_FILE.txt  # YOUR_NEP_MODEL_FILE.txt is your NEP model file (with path)
    pair_coeff * *                          # This format is fixed
  • For multi-element system, the atom types must be carefully set. Take a NEP model NEP_PdCuNiP.txt as an example. In this NEP model file, the first line is nep3 4 Pd Cu Ni P. Then in your LAMMPS input file, you must set

    • Pd atoms to type 1
    • Cu atoms to type 2
    • Ni atoms to type 3
    • P atoms to type 4
  • Some atom types can be missing in the simulated system. For example you can use the above NEP model to simulate a CuNi binary alloy. It is important to make sure to still set Cu atoms to type 2 and Ni atoms to type 3. In this case, atom types 1 and 4 are missing.

  • One can hybrid NEP with other potentials in LAMMPS.

  • 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

Citation

  • If you directly or indirectly use the NEP3 class here, you are suggested to cite the following paper:

  • If you use the LAMMPS interface of the NEP3 class, a proper citation for LAMMPS is also suggested.

About

CPU version of NEP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.8%
  • Other 0.2%