<spanid="index-0"></span><h1>compute pair command<aclass="headerlink"href="#compute-pair-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>compute ID group-ID pair pstyle evalue
</pre></div>
</div>
<ulclass="simple">
<li>ID, group-ID are documented in <aclass="reference internal"href="compute.html"><em>compute</em></a> command</li>
<li>pair = style name of this compute command</li>
<li>pstyle = style name of a pair style that calculates additional values</li>
<li>evalue = <em>epair</em> or <em>evdwl</em> or <em>ecoul</em> or blank (optional setting)</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>compute 1 all pair gauss
compute 1 all pair lj/cut/coul/cut ecoul
compute 1 all pair reax
</pre></div>
</div>
</div>
<divclass="section"id="description">
<h2>Description<aclass="headerlink"href="#description"title="Permalink to this headline">¶</a></h2>
<p>Define a computation that extracts additional values calculated by a
pair style, sums them across processors, and makes them accessible for
output or further processing by other commands. The group specified
for this command is ignored.</p>
<p>The specified <em>pstyle</em> must be a pair style used in your simulation
either by itself or as a sub-style in a <aclass="reference internal"href="pair_hybrid.html"><em>pair_style hybrid or hybrid/overlay</em></a> command.</p>
<p>The <em>evalue</em> setting is optional; it may be left off the command. All
pair styles tally a potential energy <em>epair</em> which may be broken into
two parts: <em>evdwl</em> and <em>ecoul</em> such that <em>epair</em> = <em>evdwl</em> + <em>ecoul</em>.
If the pair style calculates Coulombic interactions, their energy will
be tallied in <em>ecoul</em>. Everything else (whether it is a Lennard-Jones
style van der Waals interaction or not) is tallied in <em>evdwl</em>. If
<em>evalue</em> is specified as <em>epair</em> or left out, then <em>epair</em> is stored
as a global scalar by this compute. This is useful when using
<aclass="reference internal"href="pair_hybrid.html"><em>pair_style hybrid</em></a> if you want to know the portion
of the total energy contributed by one sub-style. If <em>evalue</em> is
specfied as <em>evdwl</em> or <em>ecoul</em>, then just that portion of the energy
is stored as a global scalar.</p>
<p>Some pair styles tally additional quantities, e.g. a breakdown of
potential energy into a dozen or so components is tallied by the
<aclass="reference internal"href="pair_reax.html"><em>pair_style reax</em></a> commmand. These values (1 or more)
are stored as a global vector by this compute. See the doc page for
<aclass="reference internal"href="pair_style.html"><em>individual pair styles</em></a> for info on these values.</p>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global scalar which is <em>epair</em> or <em>evdwl</em> or
<em>ecoul</em>. If the pair style supports it, it also calculates a global
vector of length >= 1, as determined by the pair style. These values
can be used by any command that uses global scalar or vector values
from a compute as input. See <aclass="reference internal"href="Section_howto.html#howto-15"><span>this section</span></a> for an overview of LAMMPS output
options.</p>
<p>The scalar and vector values calculated by this compute are
“extensive”.</p>
<p>The scalar value will be in energy <aclass="reference internal"href="units.html"><em>units</em></a>. The vector
values will typically also be in energy <aclass="reference internal"href="units.html"><em>units</em></a>, but
see the doc page for the pair style for details.</p>
</div>
<divclass="section"id="restrictions">
<h2>Restrictions<aclass="headerlink"href="#restrictions"title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</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>.