2012-01-31 06:53:42 +08:00
|
|
|
<HTML>
|
|
|
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
|
|
|
</CENTER>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H3>pair_style kim command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
2012-08-08 23:32:02 +08:00
|
|
|
<PRE>pair_style kim virialmode model
|
2012-01-31 06:53:42 +08:00
|
|
|
</PRE>
|
2012-08-08 23:34:15 +08:00
|
|
|
<UL><LI>virialmode = KIMvirial or LAMMPSvirial
|
|
|
|
<LI>model = name of KIM model (potential)
|
|
|
|
</UL>
|
2012-01-31 06:53:42 +08:00
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
2012-08-08 23:32:02 +08:00
|
|
|
<PRE>pair_style kim KIMvirial model_Ar_P_Morse
|
2012-01-31 06:53:42 +08:00
|
|
|
pair_coeff * * Ar Ar
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
2012-02-01 06:36:03 +08:00
|
|
|
<P>This pair style is a wrapper on the <A HREF = "http://openkim.org">Knowledge Base for Interatomic
|
2012-08-08 23:34:15 +08:00
|
|
|
Models (KIM)</A> repository of interatomic potentials,
|
|
|
|
so that they can be used by LAMMPS scripts.
|
2012-01-31 06:53:42 +08:00
|
|
|
</P>
|
|
|
|
<P>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.
|
|
|
|
</P>
|
2012-08-08 23:34:15 +08:00
|
|
|
<P>The argument <I>virialmode</I> determines how the global virial is
|
|
|
|
calculated. If <I>KIMvirial</I> is specified, the KIM model performs the
|
|
|
|
global virial calculation. If <I>LAMMPSvirial</I> is specified, LAMMPS
|
|
|
|
computes the global virial using its fdotr mechanism.
|
2012-08-08 23:32:02 +08:00
|
|
|
</P>
|
2012-08-08 23:34:15 +08:00
|
|
|
<P>The argument <I>model</I> 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
|
|
|
</P>
|
|
|
|
<P>Only a single pair_coeff command is used with the <I>kim</I> 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:
|
|
|
|
</P>
|
|
|
|
<UL><LI>N element names = mapping of KIM elements to atom types
|
|
|
|
</UL>
|
|
|
|
<P>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:
|
|
|
|
</P>
|
|
|
|
<PRE>pair_coeff * * Si Si Si C
|
|
|
|
</PRE>
|
|
|
|
<P>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 <I>kim</I>
|
|
|
|
potential is used as part of the <I>hybrid</I> 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
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
2012-02-01 06:36:03 +08:00
|
|
|
<P>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
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
2012-02-01 06:36:03 +08:00
|
|
|
<P>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.
|
|
|
|
</P>
|
|
|
|
<P>Consult the KIM documentation for further details on KIM specifics.
|
2012-01-31 06:53:42 +08:00
|
|
|
</P>
|
2012-02-01 06:36:03 +08:00
|
|
|
<P>OpenKIM is available for download from <A HREF = "http://openkim.org">this site</A>,
|
|
|
|
namely http://openkim.org. The tarball you download is
|
|
|
|
"openkim-api-vX.X.X.tgz", which can be unpacked via
|
2012-01-31 06:53:42 +08:00
|
|
|
</P>
|
2012-02-01 06:36:03 +08:00
|
|
|
<PRE>tar xvfz openkim*tgz
|
|
|
|
</PRE>
|
|
|
|
<P>The openkim/DOCs directory has further documentation. For more
|
|
|
|
information on installing KIM and troubleshooting refer to
|
|
|
|
openkim/INSTALL.
|
2012-01-31 06:53:42 +08:00
|
|
|
</P>
|
2012-02-01 06:36:03 +08:00
|
|
|
<P>Here is a brief summary of how to build KIM:
|
2012-01-31 06:53:42 +08:00
|
|
|
</P>
|
2012-02-01 06:36:03 +08:00
|
|
|
<OL><LI>Set the following environment variables. It is recommended to place
|
|
|
|
the above environment variables definitions in your shell setup file
|
|
|
|
which is located in your home directory (e.g. ~/.bashrc).
|
|
|
|
|
|
|
|
<PRE> (a) Define the location of the openKIM API root directory. For example,
|
|
|
|
if you untarred the `openkim-api-vX.X.X.tgz' tarball in your home
|
|
|
|
directory, you would do:
|
|
|
|
</PRE>
|
|
|
|
<PRE> bash:
|
2012-08-08 23:32:02 +08:00
|
|
|
% export KIM_DIR=~/openkim-api-vX.X.X
|
2012-02-01 06:36:03 +08:00
|
|
|
</PRE>
|
|
|
|
<PRE> tcsh:
|
2012-08-08 23:32:02 +08:00
|
|
|
% setenv KIM_DIR ~/openkim-api-vX.X.X
|
2012-02-01 06:36:03 +08:00
|
|
|
</PRE>
|
2012-08-08 23:32:02 +08:00
|
|
|
<PRE> The `%' symbol represents the bash sell prompt and should not be
|
|
|
|
typed.
|
2012-02-01 06:36:03 +08:00
|
|
|
</PRE>
|
|
|
|
<PRE> (b) By default, all makefiles use the GNU compilers for 64 bit Linux.
|
|
|
|
In order to use the Intel compiler, define the environment variable
|
|
|
|
KIM_INTEL
|
|
|
|
</PRE>
|
|
|
|
<PRE> bash:
|
|
|
|
% export KIM_INTEL="yes"
|
|
|
|
</PRE>
|
|
|
|
<PRE> tcsh:
|
|
|
|
% setenv KIM_INTEL "yes"
|
|
|
|
</PRE>
|
2012-02-17 23:53:53 +08:00
|
|
|
<PRE> (c) For a 32 bit machine, define the environment variable KIM_SYSTEM32
|
2012-02-01 06:36:03 +08:00
|
|
|
</PRE>
|
|
|
|
<PRE> bash:
|
|
|
|
% export KIM_SYSTEM32="yes"
|
|
|
|
</PRE>
|
|
|
|
<PRE> tchs:
|
|
|
|
% setenv KIM_SYSTEM32 "yes"
|
|
|
|
</PRE>
|
2012-08-08 23:32:02 +08:00
|
|
|
<PRE> (d) Define variable for dynamic linking (recommended)
|
2012-02-01 06:36:03 +08:00
|
|
|
</PRE>
|
|
|
|
<PRE> bash:
|
|
|
|
export KIM_DYNAMIC=yes
|
|
|
|
</PRE>
|
|
|
|
<PRE> tcsh:
|
|
|
|
setenv KIM_DYNAMIC=yes
|
|
|
|
</PRE>
|
2012-08-08 23:32:02 +08:00
|
|
|
<PRE> If this environment variable is not set the default will be static
|
|
|
|
linking. In that case all KIM models will be linked, producing
|
|
|
|
potentially a very large executable file. It is also possible to build
|
|
|
|
KIM with only a subset of models or a single model you wish to use with
|
|
|
|
LAMMPS. Consult the KIM documentation for details.
|
2012-02-01 06:36:03 +08:00
|
|
|
</PRE>
|
|
|
|
<LI>To compile the package, go to the $KIM_DIR directory and execute
|
|
|
|
make.
|
|
|
|
|
|
|
|
<PRE> % cd $KIM_DIR
|
2012-02-17 23:53:53 +08:00
|
|
|
% make examples
|
2012-02-01 06:36:03 +08:00
|
|
|
% make
|
|
|
|
</PRE>
|
2012-02-17 23:53:53 +08:00
|
|
|
<PRE> This builds all Models, Tests, and the openKIM API service routine
|
|
|
|
library. The targets defined by the Makefile in this directory include:
|
2012-02-01 06:36:03 +08:00
|
|
|
</PRE>
|
2012-08-08 23:32:02 +08:00
|
|
|
<PRE> make -- compiles the API and all Models and Tests
|
|
|
|
make all -- same as `make'
|
|
|
|
make examples -- copy examples into the appropriate directories
|
|
|
|
(no overwrite)
|
|
|
|
make examples-force -- copy examples into the appropriate directories
|
|
|
|
(overwrite)
|
|
|
|
make openkim-api -- compiles only the API
|
|
|
|
make clean -- will remove .o, .mod, .a, .so and executable files
|
2012-02-17 23:53:53 +08:00
|
|
|
make examples-clean -- remove all examples from the MODEL_DRIVERs,
|
|
|
|
MODELs, and TESTs directories.
|
2012-02-01 06:36:03 +08:00
|
|
|
</PRE>
|
|
|
|
<LI>Verify that the compilation was successful by running a Test.
|
|
|
|
|
|
|
|
<PRE> 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>
|
|
|
|
<PRE> % cd $KIM_DIR/TESTs/test_Ar_free_cluster_CLUSTER_F90
|
|
|
|
% echo "model_Ar_P_MLJ_CLUSTER_C" | ./test_Ar_free_cluster_CLUSTER_F90
|
|
|
|
</PRE>
|
|
|
|
<PRE> (See the README files in the Test directories for an explanation of what
|
|
|
|
the Tests do.)
|
|
|
|
</PRE>
|
|
|
|
<LI>Each Test (and Model) has its own make file for compiling and linking.
|
2012-08-08 23:32:02 +08:00
|
|
|
If changes are made to the code, re-compile (from the $KIM_DIR directory).
|
2012-02-01 06:36:03 +08:00
|
|
|
|
2012-08-08 23:32:02 +08:00
|
|
|
<LI>In case of using a non-standard location for any of the directories KIM_API,
|
|
|
|
TESTs, MODEL_DRIVERS, or MODELs one or more of the following environment
|
2012-02-01 06:36:03 +08:00
|
|
|
variables must be set:
|
|
|
|
</OL>
|
2012-02-17 23:53:53 +08:00
|
|
|
<PRE> KIM_API_DIR
|
|
|
|
KIM_TESTS_DIR
|
2012-08-08 23:32:02 +08:00
|
|
|
KIM_MODEL_DRIVERS_DIR
|
|
|
|
KIM_MODELS_DIR
|
2012-02-01 06:36:03 +08:00
|
|
|
</PRE>
|
2012-01-31 06:53:42 +08:00
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P><B>Mixing, shift, table, tail correction, restart, rRESPA info</B>:
|
|
|
|
</P>
|
|
|
|
<P>This pair style does not support the <A HREF = "pair_modify.html">pair_modify</A>
|
|
|
|
mix, shift, table, and tail options.
|
|
|
|
</P>
|
|
|
|
<P>This pair style does not write its information to <A HREF = "restart.html">binary restart
|
2012-08-08 23:32:02 +08:00
|
|
|
files</A>, 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.
|
|
|
|
</P>
|
|
|
|
<P>This pair style can only be used via the <I>pair</I> keyword of the
|
|
|
|
<A HREF = "run_style.html">run_style respa</A> command. It does not support the
|
|
|
|
<I>inner</I>, <I>middle</I>, <I>outer</I> keywords.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>This pair style is part of the KIM package. It is only enabled if
|
|
|
|
LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
|
|
|
|
LAMMPS</A> section for more info.
|
|
|
|
</P>
|
2012-08-08 23:34:15 +08:00
|
|
|
<P>This current version of pair_style kim is compatible with the
|
|
|
|
openkim-api package version 1.1.0 and higher.
|
2012-01-31 06:53:42 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
2012-08-08 23:34:15 +08:00
|
|
|
<P><A HREF = "pair_coeff.html">pair_coeff</A>
|
2012-01-31 06:53:42 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Default:</B> none
|
|
|
|
</P>
|
|
|
|
</HTML>
|