<spanid="index-0"></span><h1>pair_style kim command<aclass="headerlink"href="#pair-style-kim-command"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="syntax">
<h2>Syntax<aclass="headerlink"href="#syntax"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>pair_style kim virialmode model printflag
</pre></div>
</div>
<ulclass="simple">
<li>virialmode = KIMvirial or LAMMPSvirial</li>
<li>model = name of KIM model (potential)</li>
<li>printflag = 1/0 do or do not print KIM descriptor file, optional</li>
</ul>
</div>
<divclass="section"id="examples">
<h2>Examples<aclass="headerlink"href="#examples"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>pair_style kim KIMvirial model_Ar_P_Morse
pair_coeff * * Ar Ar
</pre></div>
</div>
<divclass="highlight-python"><divclass="highlight"><pre>pair_style kim KIMvirial model_Ar_P_Morse 1
pair_coeff * * Ar Ar
</pre></div>
</div>
</div>
<divclass="section"id="description">
<h2>Description<aclass="headerlink"href="#description"title="Permalink to this headline">¶</a></h2>
<p>This pair style is a wrapper on the <aclass="reference external"href="https://openkim.org">Knowledge Base for Interatomic Models (KIM)</a> repository of interatomic potentials,
so that they can be used by LAMMPS scripts.</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>
<p>The argument <em>virialmode</em> determines how the global virial is
calculated. If <em>KIMvirial</em> is specified, the KIM model performs the
global virial calculation (if it knows how). If <em>LAMMPSvirial</em> is
specified, LAMMPS computes the global virial using its fdotr mechanism.</p>
<p>The argument <em>model</em> 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.</p>
<p>The argument <em>printflag</em> is optional. If it is set to a non-zero
value then a KIM dsecriptor file is printed when KIM is invoked. This
can be useful for debugging. The default is to not print this file.</p>
<p>Only a single pair_coeff command is used with the <em>kim</em> style which
specifies the mapping of LAMMPS atom types to KIM elements. This is
done by specifying N additional arguments after the * * in the
pair_coeff command, where N is the number of LAMMPS atom types:</p>
<ulclass="simple">
<li>N element names = mapping of KIM elements to atom types</li>
</ul>
<p>As an example, imagine the KIM model supports Si and C atoms. If your
LAMMPS simulation has 4 atom types and you want the 1st 3 to be Si,
and the 4th to be C, you would use the following pair_coeff command:</p>
<divclass="highlight-python"><divclass="highlight"><pre>pair_coeff * * Si Si Si C
</pre></div>
</div>
<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
mapping is not performed. This can only be used when a <em>kim</em>
potential is used as part of the <em>hybrid</em> pair style. The NULL values
are placeholders for atom types that will be used with other
potentials.</p>
<hrclass="docutils"/>
<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.</p>
<p>To download, build, and install the KIM library on your system, see
the lib/kim/README file. Once you have done this and built LAMMPS
with the KIM package installed you can run the example input scripts
<p>This pair style does not support the <aclass="reference internal"href="pair_modify.html"><em>pair_modify</em></a>
mix, shift, table, and tail options.</p>
<p>This pair style does not write its information to <aclass="reference internal"href="restart.html"><em>binary restart files</em></a>, since KIM stores the potential parameters.
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 <em>pair</em> keyword of the
<aclass="reference internal"href="run_style.html"><em>run_style respa</em></a> command. It does not support the
<h2>Restrictions<aclass="headerlink"href="#restrictions"title="Permalink to this headline">¶</a></h2>
<p>This pair style is part of the KIM package. It is only enabled if
LAMMPS was built with that package. See the <aclass="reference internal"href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>This current version of pair_style kim is compatible with the
kim-api package version 1.6.0 and higher.</p>
</div>
<divclass="section"id="related-commands">
<h2>Related commands<aclass="headerlink"href="#related-commands"title="Permalink to this headline">¶</a></h2>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.