MTP更新了版本,所以之前的需要重新编译一下。
1 首先把需要的包都下载下来。
git clone https://gitlab.com/ivannovikov/interface-lammps-mlip-3.git
git clone https://gitlab.com/ashapeev/mlip-3.git
git clone -b stable https://github.com/lammps/lammps.git mylammps
clone不了的也可以去gitlab上手动下载,链接在文末。
把lammps和mlip的文件夹都移动到interface-lammps-mlip-3文件夹中。
mv mlip-3 mylammps interface-lammps-mlip-3
cd interface-lammps-mlip-3
2 编译接口
cd mlip-3
make libinterface
编译完之后把它复制到interface-lammps-mlip-3路径下。
cp lib_mlip_interface.a ../
3 编译lammps
在preinstall.sh的最后可以额外添加需要的包,比如:
make yes-manybody
make yes-kspace
make yes-molecule
执行install.sh脚本
cd ..
sh ./install.sh ../mylammps intel_cpu_intelmpi
当然也可以根据别的需求来编译。
MLIP and LAMMPS with default compiler (serial version) make serial
MLIP and LAMMPS with default compiler (parallel version) make mpi
MLIP with the GNU compiler and LAMMPS with make g++_serial
MLIP with the GNU compiler and mpich and LAMMPS with make g++_mpich
MLIP with Intel compiler and intel MPI and LAMMPS with make intel_cpu_intelmpi
If you'd like to build with Intel and no MPI then you need to find a way to link LAMMPS with MKL
4 编译mlip
cd mlip-3
./configure
make
参考:
https://gitlab.com/ashapeev/mlip-3
https://gitlab.com/ivannovikov/interface-lammps-mlip-3