详细内容

LAMMPS讲解69-GARFfield安装

GARFfield是由加州理工学院Andres Jaramillo-Botero所开发的针对ReaxFF力场的拟合软件,全称是Genetic Algorithm based Reactive Force field optimizer method。它是基于遗传算法,爬山法和共轭梯度最小化法开发的多目标参数优化软件,可以实现Pareto-optimal参数优化。目前GARFfield支持ReaxFF力场,eFF-ECP力场,Morse力场,COMB力场,Tersoff力场和EAM合金力场的开发。其开发流程和商业的SCM软件类似,包括输入文件等。

GARFfield下载地址加微信baolu_yao

NOTE: GARFfield is currently available for non-profit academic and research activities. Its use for commercial purposes requires a commercial license that can be requested via email to ajaramil@caltech.edu.

If you want to try GARFfield, please read and accept the terms of the LICENSE. 

本教程为该软件在Linux下的安装过程。安装需要确保你系统中已安装有gccg++gfortran

 

首先下载软件,将软件放在合适的目录下,比如就放在了如下目录中

/home/bly/software

输入解压缩命令

tar -xvzf GARFfield.tar.gz

然后下载mpich3.4.3FFTW

下载链接分别为

https://www.mpich.org/static/downloads/3.4.3/mpich-3.4.3.tar.gz

http://www.fftw.org/fftw-3.3.10.tar.gz

下载好后放在和GARFfield一样的目录下,如

/home/bly/software

分别输入解压缩命令解压mpichfftw的安装包

tar -xvzf mpich-3.4.3.tar.gz

tar -xvzf fftw-3.3.10.tar.gz

进入mpich解压缩出的目录,依次执行以下命令

./configure --prefix=/home/bly/software/mpich --enable-shared --disable-fortran

make

make install

进入fftw解压缩出的目录,依次执行以下命令

./configure --prefix=/home/bly/software/fftw --enable-shared

make

make install

mpichfftw安装完成后打开.bashrc,在末尾添加如下两行

export PATH=/home/bly/software/mpich/bin:$PATH

export LD_LIBRARY_PATH=/home/bly/software/mpich/lib:$LD_LIBRARY_PATH

保存文件,然后执行

source ~/.bashrc

进入GARFfield下的这个目录

/home/bly/software/GarFfield/lib/lammps/lib/reax

执行以下命令

make -f Makefile.gfortran

打开如下目录中的Makefile.ion文件

/home/bly/software/GarFfield/lib/lammps/src/MAKE

在打开的Makefile.ion文件,在文件头部位置处修改MPICHFFTW两个变量的值为

MPICH = /home/bly/software/mpich

FFTW = /home/bly/software/fftw

保存文件,进入lammpssrc目录

/home/bly/software/GarFfield/lib/lammps/src

执行以下命令

make ion

make makeshlib

make -f Makefile.shlib ion

进入以下目录

/home/bly/software/GarFfield/lib/optlist

执行

make

进入以下目录

/home/bly/software/GarFfield/lib/pgapack/source

打开该目录下的Makefile文件,在该文件的头部修改MPI_HOME变量的值为

MPI_HOME = /home/bly/software/mpich

保存文件,执行以下命令

make

进入以下目录

/home/bly/software/GarFfield/src

打开该目录下的Makefile文件修改变量MPI_HOMELAMMPSFFTW的值为

MPI_HOME = /home/bly/software/mpich

LAMMPS = /home/bly/software/GarFfield/lib/lammps

FFTW = /home/bly/software/fftw

删掉该Makefile文件中LAMMPS_LIB变量的-ljpeg,保存文件

执行以下命令

make

编译完成后会在以下目录中找到garffield_ion文件

/home/bly/software/GarFfield/bin

打开.bashrc文件在文件末尾添加以下内容

export PATH=/home/bly/software/GarFfield/bin:$PATH

export LD_LIBRARY_PATH=/home/bly/software/GarFfield/lib/lammps/src:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/home/bly/software/GarFfield/lib/optlist:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/home/bly/software/GarFfield/lib/pgapack/lib/ion:$LD_LIBRARY_PAT

执行

source ~/.bashrc

运行

mpirun -np 2 garffield_ion

输入以下内容则软件安装成功

GARFfield force field parameter optimization framework, version 1.0

Author: Andres Jaramillo-Botero (ajaramil@caltech.edu, Caltech (c) 2010-2014)

 

Usage:

garffield_ion <geo> <ffield> <trainset> <params> [<restraints>] [GA options] [other options] ... or

mpirun -np NumProcs garffield_ion <geo> <ffield> <trainset> <params> [<restraints>] [GA options] [other options]

 

GA options are:

  -i ['range' or 'percent'] {parameter interval}

  -g ['GRGA' or 'SSGA'] {replacement strategy: generational or steady-state}

  -m [float between 0-1] {mutation rate}

  -o [float between 0-1] {crossover rate}

  -p [int] {population size}

  -s ['maxiter' or 'nochange'] {convergence criteria}

  -t [int] {stop after int iterations}

  -z [int] {set SSGA population replacement percent}

  -x {perform mutation and crossover}

Other options are:

  -c [int] {Hillclimb every int iterations}

  -C [int] {mincap array size in reax/c allocations}

  -d ['full_debug', 'lammps_debug'] debug mode

  -e ['MPE' or 'SIWE' or 'RMSE' or 'NRMSE' or 'MSE'] {error function}

  -f {check forces on unit cells, instead of performing minimization}

  -F ['reax']

  -G [int] {switch to Conjugate Gradient after int iterations}

  -I [int] {Number of molecular mechanics energy minimization steps}

  -l <filename> {write log to filename, instead of console}

  -M ['fire' or 'sd'] {switch structure minimization algorithm - default is 'cg'}

  -q <filename> {Use pQeq for ReaxFF charges}

  -r [int] {print report every int iterations}

  -R [int] {Restart every int interations}

 

  -S [float] {safezone factor in reax/c memory allocation}

  -u ['real'] {Force units to be real, i.e. lengths in Angstroms, energies in kcal/mol and forces in kcal/mol-Angstrom}

  -v {Use low-gradient van der Waals for reax/c}

  -w <filename> {write best force field file at same print report report_frequency}

  -W {randomize section weights in training file}

Abort(1) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

 

 

感谢鲍路瑶老师的分享,内容来自于鲍老师分享出来的资料

如有需要添加微信:lmp_zhushou  进入微信群,帮助他人,共建社区

获取完整版lammps讲义可以加微信lmp_zhushou或加入QQ群994359511


最新评论
请先登录才能进行回复登录
技术支持: CLOUD | 管理登录
seo seo