git clone -b stable https://github.com/lammps/lammps.git mylammps (2022 version needed for MLIP2)
git clone https://gitlab.com/ashapeev/mlip-2.git
git clone https://gitlab.com/ashapeev/interface-lammps-mlip-2.git .
### OR
git clone https://gitlab.com/ashapeev/mlip-3.git
git clone https://gitlab.com/ivannovikov/interface-lammps-mlip-3.git
## load environment variables for intel oneapi
cd mlip-2
./configure
make mlp
mv mlp mlp_mpi
make libinterface
## you will get bin/mlp and lib/lib_mlip_interface.a
cp lib_mlip_interface.a [root of interface-lammps-mlip]
## serial version for some commands
./configure --no-mpi
make mlp
mv mlp mlp_ser
## load environment variables for gcc7+OpenMPI3+Openblas
cd mlip-2
./configure --blas=openblas --blas-root=/home/ywmu/backup/Src/blas/openblas/openblas.lib.gnu
make mlp
make libinterface
## you will get bin/mlp and lib/lib_mlip_interface.a
cp lib_mlip_interface.a [interface-lammps-mlip]
cd [root_of_lammps]/src
make yes-most && make no-lib && make no-ext
make package-status| grep YES
### building some libs
### load python 3
cd [root_of_lammps]/lib
cd plumed/
python Install.py -b
### change the path of github in ../lib/plumed/Install.py if needed (e.g., hub.nuaa.cf)
cd ../voronoi
python Install.py -b
cd ..
##################
make yes-PLUMED yes-VORONOI
make package-status | grep YES
### Optional
#### Add NEP-CPU
#### https://gtihub.com/brucefan1983/NEP_CPU
git clone https://gtihub.com/brucefan1983/NEP_CPU.git
cd NEP_CPU-main
cp -r src/* interface/lammps/USER-NEP/
cp -r interface/lammps/USER-NEP [root_of_lammps]/src/
cd [root_of_lammps]/src/
make yes-USER-NEP
##################
## for intel openmpi , failed for intel 2015
cp MAKE/OPTIONS/Makefile.oneapi MAKE/Makefile.mpi
### modify MAKE/Makefile.mpi for intel compiler including oneapi
replace -xHost with -march=core-avx2
## OR for ompi
cp MAKE/OPTIONS/Makefile.g++_openmpi MAKE/Makefile.mpi
cd [interface-lammps-mlip]
./install.sh [root_of_lammps] mpi
# you will get lmp_mpi
in.BulkNi
,variable A string bulkNi
boundary p p p
units metal
timestep 0.001
lattice fcc 3.52
region box block 0 20 0 20 0 20
create_box 1 box
create_atoms 1 box
pair_style none
mass * 58.71
atom_modify sort 0 0
compute XRD all xrd 1.541838 Ni 2Theta 40 80 c 2 2 2 LP 1 echo
compute SAED all saed 0.0251 Ni Kmax 0.85 &
Zone 0 0 0 c 0.025 0.025 0.025 &
dR_Ewald 0.01 echo manual
fix 1 all ave/histo/weight 1 1 1 40 80 200 c_XRD[1] c_XRD[2] &
mode vector file $A.hist.xrd
fix 2 all saed/vtk 1 1 1 c_SAED file $A_001.saed
#dump 1 all custom 1 $A.dump id x y z
run 0
unfix 1
unfix 2
uncompute XRD
uncompute SAED
lmp_serial -pk omp 4 -sf omp -in in.BulkNi
In addition to the LAMMPS output, a simple visualizaiton of the electron diffraction data is included. The visualization was created using the VisIt Open Source visualiztion software develeoped at Larrence Livermore National Laboraatory (https://wci.llnl.gov/simulation/computer-codes/visit/).
Below is a step by step guide to produce similar images:
add
->pseudocolor
->intensity
;Draw
;intensity
plot;Operators
->Selection
->Isovolume
;isovolume
(under intensity plot);Apply
;Dismiss
;Draw
;intensity
plotPseudocolor
;Apply
;Dismiss
;intensity
plot;Operators
->Slicing
>Spherical Slice
;Spherical Slice
;(i.e. 39.84063 0 0) and radius (i.e. 39.84063) for lambda = 0.251
Apply
;Dismiss
;Draw
;menu bar
->select Controls
->View
;Apply
;Dismiss
;menu bar
->select Control
->Annotation
;I typically turn most all the display information off
.File
-> Set save options
Save