2012-01-31 06:53:42 +08:00
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
|
|
:link(ld,Manual.html)
|
|
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
pair_style kim command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2012-08-08 23:32:02 +08:00
|
|
|
pair_style kim virialmode model :pre
|
2012-01-31 06:53:42 +08:00
|
|
|
|
2012-08-08 23:32:02 +08:00
|
|
|
virialmode = KIMvirial or LAMMPSvirial
|
2012-08-08 23:34:15 +08:00
|
|
|
model = name of KIM model (potential) :ul
|
2012-01-31 06:53:42 +08:00
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
2012-08-08 23:32:02 +08:00
|
|
|
pair_style kim KIMvirial model_Ar_P_Morse
|
2012-01-31 06:53:42 +08:00
|
|
|
pair_coeff * * Ar Ar :pre
|
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2012-02-01 06:36:03 +08:00
|
|
|
This pair style is a wrapper on the "Knowledge Base for Interatomic
|
2012-08-08 23:34:15 +08:00
|
|
|
Models (KIM)"_http://openkim.org repository of interatomic potentials,
|
|
|
|
so that they can be used by LAMMPS scripts.
|
2012-01-31 06:53:42 +08:00
|
|
|
|
|
|
|
In KIM lingo, a potential is a "model" and a model contains both the
|
|
|
|
analytic formulas that define the potential as well as the parameters
|
|
|
|
needed to run it for one or more materials, including coefficients and
|
|
|
|
cutoffs.
|
|
|
|
|
2012-08-08 23:34:15 +08:00
|
|
|
The argument {virialmode} determines how the global virial is
|
|
|
|
calculated. If {KIMvirial} is specified, the KIM model performs the
|
|
|
|
global virial calculation. If {LAMMPSvirial} is specified, LAMMPS
|
|
|
|
computes the global virial using its fdotr mechanism.
|
2012-08-08 23:32:02 +08:00
|
|
|
|
2012-08-08 23:34:15 +08:00
|
|
|
The argument {model} is the name of the KIM model for a specific
|
|
|
|
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.
|
2012-01-31 06:53:42 +08:00
|
|
|
|
|
|
|
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
|
2012-08-08 23:34:15 +08:00
|
|
|
done by specifying N additional arguments after the * * in the
|
2012-01-31 06:53:42 +08:00
|
|
|
pair_coeff command, where N is the number of LAMMPS atom types:
|
|
|
|
|
|
|
|
N element names = mapping of KIM elements to atom types :ul
|
|
|
|
|
|
|
|
As an example, imagine the KIM model supports Si and C atoms. If your
|
2012-08-08 23:32:02 +08:00
|
|
|
LAMMPS simulation has 4 atom types and you want the 1st 3 to be Si,
|
2012-01-31 06:53:42 +08:00
|
|
|
and the 4th to be C, you would use the following pair_coeff command:
|
|
|
|
|
|
|
|
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
|
2012-08-08 23:34:15 +08:00
|
|
|
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.
|
2012-01-31 06:53:42 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
2012-02-01 06:36:03 +08:00
|
|
|
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
|
|
|
|
directory where LAMMPS is running.
|
2012-01-31 06:53:42 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
2012-02-01 06:36:03 +08:00
|
|
|
Here is information on how to build KIM for use with LAMMPS. There is
|
2012-08-08 23:32:02 +08:00
|
|
|
a directory src/KIM/ with an important file in it: Makefile.lammps.
|
2012-08-08 23:34:15 +08:00
|
|
|
When you do 'make yes-kim' LAMMPS will use the settings in
|
2012-08-08 23:32:02 +08:00
|
|
|
src/KIM/Makefile.lammps to find KIM header files and the KIM library
|
|
|
|
itself for linking purposes. Thus, you should ensure Makefile.lammps
|
2012-02-01 06:36:03 +08:00
|
|
|
has the correct settings for your system and your build of KIM.
|
|
|
|
|
|
|
|
Consult the KIM documentation for further details on KIM specifics.
|
|
|
|
|
|
|
|
OpenKIM is available for download from "this site"_http://openkim.org,
|
|
|
|
namely http://openkim.org. The tarball you download is
|
|
|
|
"openkim-api-vX.X.X.tgz", which can be unpacked via
|
|
|
|
|
|
|
|
tar xvfz openkim*tgz :pre
|
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
The openkim-api-vX.X.X/DOCS directory has further documentation. For
|
|
|
|
more information on installing KIM and troubleshooting refer to
|
2012-02-01 06:36:03 +08:00
|
|
|
openkim/INSTALL.
|
|
|
|
|
|
|
|
Here is a brief summary of how to build KIM:
|
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
If you have previously used the openkim-api package (versions 1.1.1 or
|
|
|
|
below), it is recommended that you remove all associated environment
|
|
|
|
variables from your environment. (These include, KIM_DIR, KIM_INTEL,
|
|
|
|
KIM_SYSTEM32, KIM_DYNAMIC, KIM_API_DIR, KIM_TESTS_DIR,
|
|
|
|
KIM_MODEL_DRIVERS_DIR, and KIM_MODELS_DIR.) All setting are now
|
|
|
|
specified in the Makefile.KIM_Config file. :olb,l
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
Set up the Makefile.KIM_Config file :l
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
(a) Copy the file Makefile.KIM_Config.example to Makefile.KIM_Config
|
|
|
|
For example, if you untarred the `openkim-api-vX.X.X.tgz' tarball in
|
|
|
|
your home directory, you would do: :pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
% cd $HOME/openkim-api-vX.X.X
|
|
|
|
% cp Makefile.KIM_Config.example Makefile.KIM_Config :pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
The `%' symbol represents the bash sell prompt and should not be typed.
|
|
|
|
:pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
(Above `vX.X.X' represents the current release number.) :pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
(b) Edit the file Makefile.KIM_Config and set the appropriate value for the
|
|
|
|
KIM_DIR variable. This must expand to an absolute path. Using the same
|
|
|
|
assumptions as above, this would be :pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
KIM_DIR = $(HOME)/openkim-api-vX.X.X :pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
(c) If appropriate, set explicit values for the remaining three
|
|
|
|
directories :pre
|
2012-01-31 06:53:42 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
KIM_MODEL_DRIVERS_DIR =
|
|
|
|
KIM_MODELS_DIR =
|
|
|
|
KIM_TESTS_DIR = :pre
|
2012-01-31 06:53:42 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
If these lines are commented out, defaults will be provided by the
|
|
|
|
openkim-api make system. :pre
|
2012-01-31 06:53:42 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
(d) Set the value of KIM_COMPILERSUITE. Possible values are `GCC' and
|
|
|
|
`INTEL'. :pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
KIM_COMPILERSUITE = GCC :pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
(e) Set the value of KIM_SYSTEMLINKER. Possible values are `linux',
|
|
|
|
`freebsd', and `darwin'. :pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
KIM_SYSTEMLINKER = linux :pre
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
(f) Set the value of KIM_SYSTEMARCH. Possible values are `32bit' and
|
|
|
|
`64bit'. :pre
|
|
|
|
|
|
|
|
KIM_SYSTEMARCH = 64bit :pre
|
|
|
|
|
|
|
|
(g) Set the value of KIM_LINK. Possible values are `dynamic-load',
|
|
|
|
`dynamic-link', and `static-link'. :pre
|
|
|
|
|
|
|
|
KIM_LINK = dynamic-load :pre
|
|
|
|
|
|
|
|
`dynamic-load' is the preferred option. (Unless performance or
|
|
|
|
other issues require it, you should use dynamic-load.)
|
|
|
|
`dynamic-link' is like `dynamic-load' but does not use the dl.h
|
|
|
|
library. This option requires a more complicated Makefile
|
|
|
|
process, but may improve computation time in some instances.
|
|
|
|
`static-link' only works with ONE Model and AT MOST ONE Model
|
|
|
|
Driver (in order to avoid the possibility of symbol
|
|
|
|
clashes). :pre
|
|
|
|
|
|
|
|
(h) Set override values for other variables, if necessary, by
|
|
|
|
adding the desired variable name (after the "# overwrite
|
|
|
|
default variable values here" line) and filling in appropriate
|
|
|
|
values. :pre
|
|
|
|
|
|
|
|
# overwrite default variable values here :pre
|
|
|
|
|
|
|
|
# overwrite default compiler options :pre
|
|
|
|
CC =
|
|
|
|
CXX =
|
|
|
|
FC = :pre
|
|
|
|
|
|
|
|
# overwrite default compiler option flag lists
|
|
|
|
FFLAGS =
|
|
|
|
CCFLAGS =
|
|
|
|
CXXFLAGS =
|
|
|
|
LDFLAGS = :pre
|
|
|
|
|
|
|
|
# overwrite default linker options
|
|
|
|
LDSHAREDFLAG =
|
|
|
|
LINKSONAME =
|
|
|
|
LDWHOLEARCHIVESTARTFLAG =
|
|
|
|
LDWHOLEARCHIVEENDFLAG = :pre
|
|
|
|
|
|
|
|
# overwrite default install directories
|
|
|
|
package_name =
|
|
|
|
prefix =
|
|
|
|
libdir = :pre
|
|
|
|
|
|
|
|
In the remainder of the documentation we will use the string $KD to
|
|
|
|
represent the location of the openkim-api source package (the value of
|
|
|
|
the KIM_DIR variable discussed above). If you wish to, type the below
|
|
|
|
commands exactly as written to set the shell variable KD to the
|
|
|
|
appropriate value: :l
|
|
|
|
|
|
|
|
bash:
|
|
|
|
% export KD=$HOME/openkim-api-vX.X.X :pre
|
|
|
|
|
|
|
|
To compile the package, including the provided examples, change to the
|
|
|
|
$KD directory and execute `make examples' and then `make': :l
|
|
|
|
|
|
|
|
% cd $KD
|
2012-02-17 23:53:53 +08:00
|
|
|
% make examples
|
2012-02-01 06:36:03 +08:00
|
|
|
% make :pre
|
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
This builds all Model Drivers, Models, Tests, and the openkim-api service
|
|
|
|
routine library. The targets defined by the Makefile in this directory
|
|
|
|
include: :pre
|
|
|
|
|
|
|
|
`make' -- compiles the API and all Models and Tests
|
|
|
|
`make all' -- same as `make'
|
|
|
|
`make clean' -- will remove appropriate .o, .mod, .a, .so and
|
|
|
|
executable files
|
|
|
|
`make install' -- install files to `/usr/local/lib' by default
|
|
|
|
`make uninstall' -- delete files installed by `make install'
|
|
|
|
`make openkim-api' -- compiles only the API
|
|
|
|
`make examples' -- copies examples into the appropriate
|
|
|
|
directories (no overwrite)
|
|
|
|
`make examples-force' -- copies examples into the appropriate
|
|
|
|
directories (overwrite)
|
|
|
|
`make examples-clean' -- remove all examples from the MODEL_DRIVERS,
|
|
|
|
MODELS, and TESTS directories. :pre
|
|
|
|
|
2012-02-01 06:36:03 +08:00
|
|
|
Verify that the compilation was successful by running a Test. :l
|
|
|
|
|
|
|
|
The provided example Tests read in the name of a Model (or Models)
|
|
|
|
which they use to perform their calculations. For most Tests the
|
|
|
|
name of the Model can be piped in using an `echo' command. For
|
|
|
|
example, the following Fortran 90 Test reads in one Model: :pre
|
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
% cd $KD/TESTs/test_Ar_free_cluster_CLUSTER_F90
|
2012-02-01 06:36:03 +08:00
|
|
|
% echo "model_Ar_P_MLJ_CLUSTER_C" | ./test_Ar_free_cluster_CLUSTER_F90 :pre
|
|
|
|
|
2013-07-26 07:16:06 +08:00
|
|
|
(See the README files in the Test directories for an explanation of what
|
2012-02-01 06:36:03 +08:00
|
|
|
the Tests do.) :pre
|
|
|
|
|
|
|
|
Each Test (and Model) has its own make file for compiling and linking.
|
2013-07-26 07:16:06 +08:00
|
|
|
If changes are made to the code, re-compile (from the $KD
|
|
|
|
directory). :l,ole
|
2012-01-31 06:53:42 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
[Mixing, shift, table, tail correction, restart, rRESPA info]:
|
|
|
|
|
|
|
|
This pair style does not support the "pair_modify"_pair_modify.html
|
|
|
|
mix, shift, table, and tail options.
|
|
|
|
|
|
|
|
This pair style does not write its information to "binary restart
|
2012-08-08 23:32:02 +08:00
|
|
|
files"_restart.html, since KIM stores the potential parameters.
|
2012-01-31 06:53:42 +08:00
|
|
|
Thus, you need to re-specify the pair_style and pair_coeff commands in
|
|
|
|
an input script that reads a restart file.
|
|
|
|
|
|
|
|
This pair style can only be used via the {pair} keyword of the
|
|
|
|
"run_style respa"_run_style.html command. It does not support the
|
|
|
|
{inner}, {middle}, {outer} keywords.
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
[Restrictions:]
|
|
|
|
|
|
|
|
This pair style is part of the KIM package. It is only enabled if
|
|
|
|
LAMMPS was built with that package. See the "Making
|
|
|
|
LAMMPS"_Section_start.html#start_3 section for more info.
|
|
|
|
|
2012-08-08 23:34:15 +08:00
|
|
|
This current version of pair_style kim is compatible with the
|
2013-07-26 07:16:06 +08:00
|
|
|
openkim-api package version 1.2.0 and higher.
|
2012-01-31 06:53:42 +08:00
|
|
|
|
|
|
|
[Related commands:]
|
|
|
|
|
2012-08-08 23:34:15 +08:00
|
|
|
"pair_coeff"_pair_coeff.html
|
2012-01-31 06:53:42 +08:00
|
|
|
|
|
|
|
[Default:] none
|