Updated docs for new pair_kim
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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})
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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_*:i,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.
|
||||
|
||||
|
||||
@ -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:]
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
-----------------
|
||||
|
||||
@ -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).
|
||||
|
||||
Reference in New Issue
Block a user