<p>where <em>B_k^i</em> is the <em>k</em>-th bispectrum component of atom <em>i</em>,
and <em>beta_k^alpha_i</em> is the corresponding linear coefficient
that depends on <em>alpha_i</em>, the SNAP element of atom <em>i</em>. The
number of bispectrum components used and their definitions
depend on the values of <em>twojmax</em> and <em>diagonalstyle</em>
defined in the SNAP parameter file described below.
The bispectrum calculation is described in more detail
in <aclass="reference internal"href="compute_sna_atom.html"><spanclass="doc">compute sna/atom</span></a>.</p>
<p>Note that unlike for other potentials, cutoffs for SNAP potentials are
not set in the pair_style or pair_coeff command; they are specified in
the SNAP potential files themselves.</p>
<p>Only a single pair_coeff command is used with the <em>snap</em> style which
specifies two SNAP files and the list SNAP element(s) to be
extracted.
The SNAP elements are mapped to LAMMPS atom types by specifying
N additional arguments after the 2nd filename in the pair_coeff
command, where N is the number of LAMMPS atom types:</p>
<ulclass="simple">
<li>SNAP element file</li>
<li>Elem1, Elem2, ...</li>
<li>SNAP parameter file</li>
<li>N element names = mapping of SNAP elements to atom types</li>
</ul>
<p>As an example, if a LAMMPS indium phosphide simulation has 4 atoms
types, with the first two being indium and the 3rd and 4th being
phophorous, the pair_coeff command would look like this:</p>
<preclass="literal-block">
pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P
</pre>
<p>The 1st 2 arguments must be * * so as to span all LAMMPS atom types.
The two filenames are for the element and parameter files, respectively.
The ‘In’ and ‘P’ arguments (between the file names) are the two elements
which will be extracted from the element file. The
two trailing ‘In’ arguments map LAMMPS atom types 1 and 2 to the
SNAP ‘In’ element. The two trailing ‘P’ arguments map LAMMPS atom types
3 and 4 to the SNAP ‘P’ element.</p>
<p>If a SNAP mapping value is
specified as NULL, the mapping is not performed.
This can be used when a <em>snap</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>
<p>The name of the SNAP element file usually ends in the
”.snapcoeff” extension. It may contain coefficients
for many SNAP elements.
Only those elements listed in the pair_coeff command are extracted.
The name of the SNAP parameter file usually ends in the ”.snapparam”
extension. It contains a small number
of parameters that define the overall form of the SNAP potential.
See the <aclass="reference internal"href="pair_coeff.html"><spanclass="doc">pair_coeff</span></a> doc page for alternate ways
to specify the path for these files.</p>
<p>Quite commonly,
SNAP potentials are combined with one or more other LAMMPS pair styles
using the <em>hybrid/overlay</em> pair style. As an example, the SNAP
tantalum potential provided in the LAMMPS potentials directory
combines the <em>snap</em> and <em>zbl</em> pair styles. It is invoked
by the following commands:</p>
<preclass="literal-block">
variable zblcutinner equal 4
variable zblcutouter equal 4.8
variable zblz equal 73
pair_style hybrid/overlay &
zbl ${zblcutinner}${zblcutouter} snap
pair_coeff * * zbl 0.0
pair_coeff 1 1 zbl ${zblz}
pair_coeff * * snap ../potentials/Ta06A.snapcoeff Ta &
../potentials/Ta06A.snapparam Ta
</pre>
<p>It is convenient to keep these commands in a separate file that can
be inserted in any LAMMPS input script using the <aclass="reference internal"href="include.html"><spanclass="doc">include</span></a>
command.</p>
<p>The top of the SNAP element file can contain any number of blank and comment
lines (start with #), but follows a strict
format after that. The first non-blank non-comment
line must contain two integers:</p>
<ulclass="simple">
<li>nelem = Number of elements</li>
<li>ncoeff = Number of coefficients</li>
</ul>
<p>This is followed by one block for each of the <em>nelem</em> elements.
The first line of each block contains three entries:</p>
<ulclass="simple">
<li>Element symbol (text string)</li>
<li>R = Element radius (distance units)</li>
<li>w = Element weight (dimensionless)</li>
</ul>
<p>This line is followed by <em>ncoeff</em> coefficients, one per line.</p>
<p>The SNAP parameter file can contain blank and comment lines (start
with #) anywhere. Each non-blank non-comment line must contain one
keyword/value pair. The required keywords are <em>rcutfac</em> and
<em>twojmax</em>. Optional keywords are <em>rfac0</em>, <em>rmin0</em>, <em>diagonalstyle</em>,
and <em>switchflag</em>.</p>
<p>The default values for these keywords are</p>
<ulclass="simple">
<li><em>rfac0</em> = 0.99363</li>
<li><em>rmin0</em> = 0.0</li>
<li><em>diagonalstyle</em> = 3</li>
<li><em>switchflag</em> = 0</li>
</ul>
<p>Detailed definitions of these keywords are given on the <aclass="reference internal"href="compute_sna_atom.html"><spanclass="doc">compute sna/atom</span></a> doc page.</p>
<p>For atom type pairs I,J and I != J, where types I and J correspond to
two different element types, mixing is performed by LAMMPS with
user-specifiable parameters as described above. You never need to
specify a pair_coeff command with I != J arguments for this style.</p>
<p>This pair style does not support the <aclass="reference internal"href="pair_modify.html"><spanclass="doc">pair_modify</span></a>
shift, table, and tail options.</p>
<p>This pair style does not write its information to <aclass="reference internal"href="restart.html"><spanclass="doc">binary restart files</span></a>, since it is stored in potential files. 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"><spanclass="doc">run_style respa</span></a> command. It does not support the
<p>This style is part of the SNAP package. It is only enabled if
LAMMPS was built with that package. See the <aclass="reference internal"href="Section_start.html#start-3"><spanclass="std std-ref">Making LAMMPS</span></a> section for more info.</p>
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>.