<li>ID, group-ID are documented in <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> command</li>
<li>coord/atom = style name of this compute command</li>
<li>cutoff = distance within which to count coordination neighbors (distance units)</li>
<li>typeN = atom type for Nth coordination count (see asterisk form below)</li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples</h2>
<pre class="literal-block">
compute 1 all coord/atom 2.0
compute 1 all coord/atom 6.0 1 2
compute 1 all coord/atom 6.0 2*4 5*8 *
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>Define a computation that calculates one or more coordination numbers
for each atom in a group.</p>
<p>A coordination number is defined as the number of neighbor atoms with
specified atom type(s) that are within the specified cutoff distance
from the central atom. Atoms not in the group are included in a
coordination number of atoms in the group.</p>
<p>The <em>typeN</em> keywords allow you to specify which atom types contribute
to each coordination number. One coordination number is computed for
each of the <em>typeN</em> keywords listed. If no <em>typeN</em> keywords are
listed, a single coordination number is calculated, which includes
atoms of all types (same as the “*” format, see below).</p>
<p>The <em>typeN</em> keywords can be specified in one of two ways. An explicit
numeric value can be used, as in the 2nd example above. Or a
wild-card asterisk can be used to specify a range of atom types. This
takes the form “*” or “*n” or “n*” or “m*n”. If N = the number of
atom types, then an asterisk with no numeric values means all types
from 1 to N. A leading asterisk means all types from 1 to n
(inclusive). A trailing asterisk means all types from n to N
(inclusive). A middle asterisk means all types from m to n
(inclusive).</p>
<p>The value of all coordination numbers will be 0.0 for atoms not in the
specified compute group.</p>
<p>The neighbor list needed to compute this quantity is constructed each
time the calculation is performed (i.e. each time a snapshot of atoms
is dumped). Thus it can be inefficient to compute/dump this quantity
too frequently.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you have a bonded system, then the settings of
<a class="reference internal" href="special_bonds.html"><span class="doc">special_bonds</span></a> command can remove pairwise
interactions between atoms in the same bond, angle, or dihedral. This
is the default setting for the <a class="reference internal" href="special_bonds.html"><span class="doc">special_bonds</span></a>
command, and means those pairwise interactions do not appear in the
neighbor list. Because this fix uses the neighbor list, it also means
those pairs will not be included in the coordination count. One way
to get around this, is to write a dump file, and use the
<a class="reference internal" href="rerun.html"><span class="doc">rerun</span></a> command to compute the coordination for snapshots
in the dump file. The rerun script can use a
<a class="reference internal" href="special_bonds.html"><span class="doc">special_bonds</span></a> command that includes all pairs in
the neighbor list.</p>
</div>
<p><strong>Output info:</strong></p>
<p>If single <em>type1</em> keyword is specified (or if none are specified),
this compute calculates a per-atom vector. If multiple <em>typeN</em>
keywords are specified, this compute calculates a per-atom array, with
N columns. These values can be accessed by any command that uses
per-atom values from a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span class="std std-ref">Section_howto 15</span></a> for an overview of LAMMPS output
options.</p>
<p>The per-atom vector or array values will be a number >= 0.0, as
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.