/aenet-lammps

This package provides the interface module between aenet [1] and LAMMPS [2], patch of aenet for the LAMMPS library, and Artificial Neural network (ANN) potential parameter file of BCC iron.

Primary LanguageJupyter Notebook

Update

2022/07/15: Update pair_aenet.cpp to suport compute stress/atom command of LAMMPS.
2022/07/05: Update pair_aenet.cpp for latest version of LAMMPS(stable_23Jun2022)
note: Please use 2022Jul05.tar.gz in release for old version of LAMMPS
2022/01/26: Update the patch file and the README.md to fix minor bug.
2021/10/21: Update the patch file and modify the README.md for latest version of LAMMPS and aenet.
note: Parameter files generated by aenet-2.0.3 work properly by changing the option in pair_style.
2021/06/21: Add the new Fe parameter file and example file for LAMMPS input in Fe_v03.
2020/11/29: Add the TiO2 directory which contains example potential files and LAMMPS input file for binary system.
2020/11/26: Slightly modify the pair_aenet.cpp to output detail error message.
2020/11/12: Bug fix of pair_aenet.cpp for binary system.
2020/11/12: Update the LAMMPS version in README (this file).
2020/11/05: Add the patch file for aenet-2.0.4 and slightly modify the pair_aenet.cpp.

About this package

This package provides an interface module between aenet [1] and LAMMPS [2], patch of aenet for the LAMMPS library, and Artificial Neural network (ANN) potential parameter file of BCC iron. This package is distributed under the GNU General Public License, and there is no warranty. However, if you have any troubles and questions, feel free to contact package author.

Installation

  1. This manual explains only clean install case using gnu g++, gfortran, and openmpi under linux OS.

  2. Clone this package to your appropriate directory.

git clone https://github.com/HidekiMori-CIT/aenet-lammps.git
  1. Download and unpack LAMMPS package (currently stable_23Jun2022.tar.gz) from Github to same directory of aenet-lammps:
wget https://github.com/lammps/lammps/archive/refs/tags/stable_23Jun2022.tar.gz
tar -xvzf stable_23Jun2022.tar.gz
  1. Copy USER-AENET/ and aenet/ in aenet-lammps/ to lammps-stable_23Jun2022/src and /lib, respectively.
cp -r ./aenet-lammps/USER-AENET/ ./lammps-stable_23Jun2022/src/
cp -r ./aenet-lammps/aenet/ ./lammps-stable_23Jun2022/lib/
  1. Clone, patch and compile aenet(-2.0.4) as library for LAMMPS at lammps-stable_23Jun2022/lib/aenet.
cd lammps-stable_23Jun2022/lib/aenet/
git clone https://github.com/atomisticnet/aenet.git
patch -u -p1 -d aenet/ < aenet_lammps.patch
cd aenet/src/
make -f makefiles/Makefile.gfortran_serial lib
cd ../../

note: If you use intel compiler, replace gfortran to ifort.
note: If you fail to compile LAMMPS on MacOS or compile LAMMPS as shared library, add compile option "-fPIC" in Makefile.gfortran_serial as follow:

FCFLAGS  = -O3 -pedantic $(DEBUG)
->
FCFLAGS  = -O3 -pedantic -fPIC $(DEBUG)

(Thanks for comments from D.R. :-D)

  1. Check the below two files are created:
    (a) libaenet.a: library of aenet
    (b) Makefile.lammps: linker of aenet and lammps

  2. Compile LAMMPS with aenet module.

cd ../../src/
make yes-user-aenet
make mpi

note: If you use intel compiler, replace mpi to icc_openmpi. Other compile option of LAMMPS, please see LAMMPS manual.

How to run LAMMPS with ANN potential

In ANN/Fe/ directory parameter file and example input file for LAMMPS
(a) Fe.10tw-10tw.ann: parameter file of ANN potential for BCC iron
(b) in.aenet_mm: example input file for LAMMPS, lattice optimization of BCC iron
(c) in.aenet_nve: example input file for LAMMPS, run nve MD of BCC iron

To check the LAMMPS work properly, for example, in ANN/Fe/ directory

../../../lammps-stable_23Jun2022/src/lmp_mpi -i in.aenet_mm

After job done, please check lattice constant (lx) in log.lammps and log.lammps.g++_mm

In in.aenet_mm(nve) the following two lines activate the ANN potential:

pair_style      aenet
pair_coeff      * * v01 Fe 10tw-10tw.ann Fe

The pair_style line might be always same. In pair_coeff line, v01 means to use our modified version. If you chose v00, you can use parameter file from original aenet-2.0.4 package. The Fe between v01 and 10tw-10tw.ann set element(s). The term:10tw-10tw.ann is file mask for name of parameter file, in this case, file name is set as Fe.10tw-10tw.ann. The final Fe assign elements to atom type. If you have multi atom type such as atom type 1:Fe(free), 2:Fe(fix), set pair_style line as follow:

pair_coeff      * * v01 Fe 10tw-10tw.ann Fe Fe 

note: Please see TiO2 directory for binary system.
note: v03 is for new parameter file (see example file in Fe_v03).
note: v-1 is for original aenet-2.0.3 parameter files (see example file in TiO2).

Citing of this package and ANN potential

[1] H. Mori and T. Ozaki, Phys. Rev. Mater. 4, 040601 (2020).
Or please use this bibtex,
@article{mori2020neural,
title={Neural network atomic potential to investigate the dislocation dynamics in bcc iron},
author={Mori, Hideki and Ozaki, Taisuke},
journal={Physical Review Materials},
volume={4},
number={4},
pages={040601},
year={2020},
publisher={APS}
}

Reference

[1] N. Artrith and A. Urban, Comput. Mater. Sci. 114, 135 (2016).
[2] S. Plimpton, J. Comput. Phys. 117, 1 (1995).

Author & contact information

Author: Hideki Mori, College of Industrial Technology, Japan
E-mail: morih@cit.sangitan.ac.jp or morih.cit.01@gmail.com