<spanid="index-0"></span><h1>compute pe command<aclass="headerlink"href="#compute-pe-command"title="Permalink to this headline">¶</a></h1>
</div>
<divclass="section"id="compute-pe-cuda-command">
<h1>compute pe/cuda command<aclass="headerlink"href="#compute-pe-cuda-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 pe keyword ...
</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>pe = style name of this compute command</li>
<li>zero or more keywords may be appended</li>
<li>keyword = <em>pair</em> or <em>bond</em> or <em>angle</em> or <em>dihedral</em> or <em>improper</em> or <em>kspace</em></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 pe
compute molPE all pe bond angle dihedral improper
</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 calculates the potential energy of the
entire system of atoms. The specified group must be “all”. See the
<aclass="reference internal"href="compute_pe_atom.html"><em>compute pe/atom</em></a> command if you want per-atom
energies. These per-atom values could be summed for a group of atoms
via the <aclass="reference internal"href="compute_reduce.html"><em>compute reduce</em></a> command.</p>
<p>The energy is calculated by the various pair, bond, etc potentials
defined for the simulation. If no extra keywords are listed, then the
potential energy is the sum of pair, bond, angle, dihedral, improper,
and kspace (long-range) energy. If any extra keywords are listed,
then only those components are summed to compute the potential energy.</p>
<p>The Kspace contribution requires 1 extra FFT each timestep the energy
is calculated, if using the PPPM solver via the <aclass="reference internal"href="kspace_style.html"><em>kspace_style pppm</em></a> command. Thus it can increase the cost of the
PPPM calculation if it is needed on a large fraction of the simulation
timesteps.</p>
<p>Various fixes can contribute to the total potential energy of the
system. See the doc pages for <aclass="reference internal"href="fix.html"><em>individual fixes</em></a> for
details. The <em>thermo</em> option of the
<aclass="reference internal"href="compute_modify.html"><em>compute_modify</em></a> command determines whether these
contributions are added into the computed potential energy. If no
keywords are specified the default is <em>yes</em>. If any keywords are
specified, the default is <em>no</em>.</p>
<p>A compute of this style with the ID of “thermo_pe” is created when
LAMMPS starts up, as if this command were in the input script:</p>
<divclass="highlight-python"><divclass="highlight"><pre>compute thermo_pe all pe
</pre></div>
</div>
<p>See the “thermo_style” command for more details.</p>
<hrclass="docutils"/>
<p>Styles with a <em>cuda</em> suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in
<aclass="reference internal"href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual. The
accelerated styles take the same arguments and should produce the same
results, except for round-off and precision issues.</p>
<p>These accelerated styles are part of the USER-CUDA package. They are
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>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <aclass="reference internal"href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <aclass="reference internal"href="suffix.html"><em>suffix</em></a> command in your input script.</p>
<p>See <aclass="reference internal"href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
<hrclass="docutils"/>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global scalar (the potential energy). This
value can be used by any command that uses a global scalar value from
a compute as input. See <aclass="reference internal"href="Section_howto.html#howto-15"><span>Section_howto 15</span></a> for an overview of LAMMPS output
options.</p>
<p>The scalar value calculated by this compute is “extensive”. The
scalar value will be in energy <aclass="reference internal"href="units.html"><em>units</em></a>.</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>.