Updated docs for new pair_kim

This commit is contained in:
Ryan S. Elliott 2018-06-29 10:53:19 -05:00
parent cb21051eb8
commit 955fe583d8
10 changed files with 53 additions and 74 deletions

View File

@ -309,7 +309,7 @@ if(PKG_VORONOI)
ExternalProject_Add(voro_build
URL http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz
URL_MD5 2338b824c3b7b25590e18e8df5d68af9
CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
)
ExternalProject_get_property(voro_build SOURCE_DIR)
set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a)
@ -367,7 +367,7 @@ if(PKG_USER-SMD)
if(DOWNLOAD_Eigen3)
include(ExternalProject)
ExternalProject_Add(Eigen3_build
URL http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz
URL http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz
URL_MD5 1a47e78efe365a97de0c022d127607c3
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
)
@ -407,14 +407,14 @@ if(PKG_KIM)
if(DOWNLOAD_KIM)
include(ExternalProject)
ExternalProject_Add(kim_build
URL https://github.com/openkim/kim-api/archive/v1.9.5.tar.gz
URL_MD5 9f66efc128da33039e30659f36fc6d00
URL https://github.com/openkim/kim-api/archive/v2.0.0-beta.0.tar.gz
URL_MD5 2c099fe2603fda9a6904fc50d626f71b
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
)
ExternalProject_get_property(kim_build INSTALL_DIR)
set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v1)
set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v1.so)
set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v2)
set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v2.so)
list(APPEND LAMMPS_DEPS kim_build)
else()
find_package(KIM)
@ -706,7 +706,7 @@ if(PKG_USER-INTEL)
endif()
if(PKG_GPU)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_VERSION VERSION_LESS "3.1")
message(FATAL_ERROR "For the GPU package you need at least cmake-3.1")
endif()
set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
@ -892,7 +892,7 @@ if(BUILD_EXE)
add_dependencies(lmp ${LAMMPS_DEPS})
endif()
endif()
set_target_properties(lmp PROPERTIES OUTPUT_NAME lmp${LAMMPS_MACHINE})
install(TARGETS lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
if(ENABLE_TESTING)
@ -954,14 +954,14 @@ message(STATUS "<<< Build configuration >>>
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
list (FIND LANGUAGES "Fortran" _index)
if (${_index} GREATER -1)
message(STATUS "Fortran Compiler ${CMAKE_Fortran_COMPILER}
message(STATUS "Fortran Compiler ${CMAKE_Fortran_COMPILER}
Type ${CMAKE_Fortran_COMPILER_ID}
Version ${CMAKE_Fortran_COMPILER_VERSION}
Fortran Flags ${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_${BTYPE}}")
endif()
list (FIND LANGUAGES "C" _index)
if (${_index} GREATER -1)
message(STATUS "C Compiler ${CMAKE_C_COMPILER}
message(STATUS "C Compiler ${CMAKE_C_COMPILER}
Type ${CMAKE_C_COMPILER_ID}
Version ${CMAKE_C_COMPILER_VERSION}
C Flags ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}")

View File

@ -6,9 +6,9 @@
# KIM_FOUND - True if kim found.
#
find_path(KIM_INCLUDE_DIR KIM_API.h PATH_SUFFIXES kim-api-v1)
find_path(KIM_INCLUDE_DIR KIM_SimulatorHeaders.hpp PATH_SUFFIXES kim-api-v2)
find_library(KIM_LIBRARY NAMES kim-api-v1)
find_library(KIM_LIBRARY NAMES kim-api-v2)
set(KIM_LIBRARIES ${KIM_LIBRARY})
set(KIM_INCLUDE_DIRS ${KIM_INCLUDE_DIR})

View File

@ -516,8 +516,7 @@ Elliott (U Minnesota) and James Sethna (Cornell U).
[Authors:] Ryan Elliott (U Minnesota) is the main developer for the KIM
API which the "pair_style kim"_pair_kim.html command uses. He
developed the pair style in collaboration with Valeriu Smirichinski (U
Minnesota).
developed the pair style.
[Install or un-install:]
@ -530,11 +529,11 @@ lib/kim/Install.py script with the specified args.
make lib-kim # print help message
make lib-kim args="-b " # (re-)install KIM API lib with only example models
make lib-kim args="-b -a Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model
make lib-kim args="-b -a Glue_Ercolessi_Adams_Al__MO_324507536345_002" # ditto plus one model
make lib-kim args="-b -a everything" # install KIM API lib with all models
make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver
make lib-kim args="-p /usr/local/kim-api" # use an existing KIM API installation at the provided location
make lib-kim args="-p /usr/local/kim-api -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # ditto but add one model or driver :pre
make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_003" # add one model or model driver
make lib-kim args="-p /usr/local/lib/kim-api-v2" # use an existing KIM API installation at the provided location
make lib-kim args="-p /usr/local/lib/kim-api-v2 -a EAM_Dynamo_Ackland_W__MO_141627196590_003" # ditto but add one model or driver :pre
Note that in LAMMPS lingo, a KIM model driver is a pair style
(e.g. EAM or Tersoff). A KIM model is a pair style for a particular
@ -730,13 +729,13 @@ args:
make lib-latte # print help message
make lib-latte args="-b" # download and build in lib/latte/LATTE-master
make lib-latte args="-p $HOME/latte" # use existing LATTE installation in $HOME/latte
make lib-latte args="-b -m gfortran" # download and build in lib/latte and
make lib-latte args="-b -m gfortran" # download and build in lib/latte and
# copy Makefile.lammps.gfortran to Makefile.lammps
:pre
Note that 3 symbolic (soft) links, "includelink" and "liblink" and
"filelink.o", are created in lib/latte to point into the LATTE home dir.
When LAMMPS builds in src it will use these links. You should
When LAMMPS builds in src it will use these links. You should
also check that the Makefile.lammps file you create is appropriate
for the compiler you use on your system to build LATTE.
@ -1667,7 +1666,7 @@ This package provides "fix bocs"_fix_bocs.html, a modified version
of "fix npt"_fix_nh.html which includes the pressure correction to
the barostat as outlined in:
N. J. H. Dunn and W. G. Noid, "Bottom-up coarse-grained models that
N. J. H. Dunn and W. G. Noid, "Bottom-up coarse-grained models that
accurately describe the structure, pressure, and compressibility of
molecular liquids," J. Chem. Phys. 143, 243148 (2015).
@ -2279,13 +2278,13 @@ based on the Fortran version of Greg Wagner (Northwestern U) while at
Sandia.
[Install or un-install:]
make yes-user-meamc
make machine :pre
make no-user-meamc
make machine :pre
[Supporting info:]
src/USER-MEAMC: filenames -> commands
@ -2310,13 +2309,13 @@ algorithm.
[Author:] Zhen Li (Division of Applied Mathematics, Brown University)
[Install or un-install:]
make yes-user-meso
make machine :pre
make no-user-meso
make machine :pre
[Supporting info:]
src/USER-MESO: filenames -> commands
@ -2336,17 +2335,17 @@ USER-MOFFF package :link(USER-MOFFF),h4
[Contents:]
Pair, angle and improper styles needed to employ the MOF-FF
force field by Schmid and coworkers with LAMMPS.
force field by Schmid and coworkers with LAMMPS.
MOF-FF is a first principles derived force field with the primary aim
to simulate MOFs and related porous framework materials, using spherical
to simulate MOFs and related porous framework materials, using spherical
Gaussian charges. It is described in S. Bureekaew et al., Phys. Stat. Sol. B
2013, 250, 1128-1141.
For the usage of MOF-FF see the example in the example directory as
For the usage of MOF-FF see the example in the example directory as
well as the "MOF+"_MOFplus website.
:link(MOFplus,https://www.mofplus.org/content/show/MOF-FF)
[Author:] Hendrik Heenen (Technical U of Munich),
[Author:] Hendrik Heenen (Technical U of Munich),
Rochus Schmid (Ruhr-University Bochum).
[Install or un-install:]

View File

@ -123,8 +123,7 @@ meaning of these parameters:
"lubricate"_pair_lubricate.html: mu: global:
"gauss"_pair_gauss.html: a: type pairs:
"morse"_pair_morse.html: d0,r0,alpha: type pairs:
"soft"_pair_soft.html: a: type pairs:
"kim"_pair_kim.html: PARAM_FREE_*&#58i,j,...: global :tb(c=3,s=:)
"soft"_pair_soft.html: a: type pairs: :tb(c=3,s=:)
NOTE: It is easy to add new pairwise potentials and their parameters
to this list. All it typically takes is adding an extract() method to
@ -132,12 +131,6 @@ the pair_*.cpp file associated with the potential.
Some parameters are global settings for the pair style, e.g. the
viscosity setting "mu" for "pair_style lubricate"_pair_lubricate.html.
For "pair_kim"_pair_kim.html, all free parameters supported by the
KIM Model are available (e.g., PARAM_FREE_sigmas provided by the
LennardJones612_Universal__MO_826355984548_001 Model). If the free
parameter corresponds to an array, then the particular array element
to be adapted must be specified (e.g., "PARAM_FREE_sigmas:10", to
adapt the tenth entry of the sigmas array).
Other parameters apply to atom type pairs within the pair style,
e.g. the prefactor "a" for "pair_style soft"_pair_soft.html.

View File

@ -10,18 +10,14 @@ pair_style kim command :h3
[Syntax:]
pair_style kim virialmode model printflag :pre
pair_style kim virialmode model :pre
virialmode = KIMvirial or LAMMPSvirial
model = name of KIM model (potential)
printflag = 1/0 do or do not print KIM descriptor file, optional :ul
[Examples:]
pair_style kim KIMvirial model_Ar_P_Morse
pair_coeff * * Ar Ar :pre
pair_style kim KIMvirial model_Ar_P_Morse 1
pair_style kim KIMvirial ex_model_Ar_P_LJ
pair_coeff * * Ar Ar :pre
[Description:]
@ -66,10 +62,6 @@ potential as KIM defines it. In principle, LAMMPS can invoke any KIM
model. You should get an error or warning message from either LAMMPS
or KIM if there is an incompatibility.
The argument {printflag} is optional. If it is set to a non-zero
value then a KIM descriptor file is printed when KIM is invoked. This
can be useful for debugging. The default is to not print this file.
Only a single pair_coeff command is used with the {kim} style which
specifies the mapping of LAMMPS atom types to KIM elements. This is
done by specifying N additional arguments after the * * in the
@ -86,18 +78,14 @@ pair_coeff * * Si Si Si C :pre
The 1st 2 arguments must be * * so as to span all LAMMPS atom types.
The first three Si arguments map LAMMPS atom types 1,2,3 to Si as
defined within KIM. The final C argument maps LAMMPS atom type 4 to C
as defined within KIM. If a mapping value is specified as NULL, the
mapping is not performed. This can only be used when a {kim}
potential is used as part of the {hybrid} pair style. The NULL values
are placeholders for atom types that will be used with other
potentials.
as defined within KIM.
:line
In addition to the usual LAMMPS error messages, the KIM library itself
may generate errors, which should be printed to the screen. In this
case it is also useful to check the kim.log file for additional error
information. This file kim.log should be generated in the same
information. The file kim.log should be generated in the same
directory where LAMMPS is running.
To download, build, and install the KIM library on your system, see
@ -130,7 +118,7 @@ LAMMPS was built with that package. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.
This current version of pair_style kim is compatible with the
kim-api package version 1.6.0 and higher.
kim-api package version 2.0.0-beta.0 and higher.
[Related commands:]

View File

@ -16,14 +16,14 @@ region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
#pair_style lj/cut 8.1500
#pair_coeff 1 1 0.0031 2.7400
#pair_style lj/cut 7.5548200
#pair_coeff 1 1 0.0123529 1.8887100
#pair_modify shift yes
pair_style kim KIMvirial ex_model_Ne_P_fastLJ
pair_coeff * * Ne
pair_style kim KIMvirial LennardJones612_Ar
pair_coeff * * Ar
mass 1 20.18
mass 1 39.95
velocity all create 200.0 232345 loop geom
neighbor 0.3 bin

View File

@ -16,14 +16,14 @@ region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
pair_style lj/cut 8.1500
pair_coeff 1 1 0.0031 2.7400
pair_style lj/cut 7.5548200
pair_coeff 1 1 0.0123529 1.8887100
pair_modify shift yes
#pair_style kim KIMvirial ex_model_Ne_P_fastLJ
#pair_coeff * * Ne
#pair_style kim KIMvirial LennardJones612_Ar
#pair_coeff * * Ar
mass 1 20.18
mass 1 39.95
velocity all create 200.0 232345 loop geom
neighbor 0.3 bin

View File

@ -12,11 +12,11 @@ help = """
Syntax from src dir: make lib-kim args="-b -v version -a kim-name"
or: make lib-kim args="-b -a everything"
or: make lib-kim args="-n -a kim-name"
or: make lib-kim args="-p /usr/local/open-kim -a kim-name"
or: make lib-kim args="-p /usr/local/lib/kim-api-v2 -a kim-name"
Syntax from lib dir: python Install.py -b -v version -a kim-name
or: python Install.py -b -a everything
or: python Install.py -n -a kim-name
or: python Install.py -p /usr/local/open-kim -a kim-name
or: python Install.py -p /usr/local/lib/kim-api-v2 -a kim-name
specify one or more options, order does not matter
@ -36,9 +36,9 @@ specify one or more options, order does not matter
Examples:
make lib-kim args="-b" # install KIM API lib with only example models
make lib-kim args="-a Glue_Ercolessi_Adams_Al__MO_324507536345_001" # Ditto plus one model
make lib-kim args="-a Glue_Ercolessi_Adams_Al__MO_324507536345_002" # Ditto plus one model
make lib-kim args="-b -a everything" # install KIM API lib with all models
make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # only add one model or model driver
make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_003" # only add one model or model driver
See the list of KIM model drivers here:
https://openkim.org/kim-items/model-drivers/alphabetical

View File

@ -46,8 +46,8 @@ $ rm -rf kim-api-vX.Y.Z.txz
5. To add items do the following (replace the kim item name with your
desired value)
$ source ${PWD}/kim-api-vX.Y.Z/bin/kim-api-v1-activate
$ kim-api-v1-collections-management install system Pair_Johnson_Fe__MO_857282754307_002
$ source ${PWD}/kim-api-vX.Y.Z/bin/kim-api-vX-activate
$ kim-api-vX-collections-management install system Pair_Johnson_Fe__MO_857282754307_002
-----------------

View File

@ -26,5 +26,4 @@ library you can test it using an input file from the examples dir:
./lmp_serial < lammps/examples/kim/in.kim.lj
This pair_style was written by Valeriu Smirichinski and Ryan
S. Elliott (U Minn).
This pair_style was written by Ryan S. Elliott (U Minn).