Commit 955fe583 authored by Ryan S. Elliott's avatar Ryan S. Elliott
Browse files

Updated docs for new pair_kim

parent cb21051e
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -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)
+2 −2
Original line number Diff line number Diff line
@@ -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})
+18 −19
Original line number Diff line number Diff line
@@ -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
+1 −8
Original line number Diff line number Diff line
@@ -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.

+5 −17
Original line number Diff line number Diff line
@@ -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:]

Loading