<spanid="index-0"></span><h1>compute force/tally command<aclass="headerlink"href="#compute-force-tally-command"title="Permalink to this headline">¶</a></h1>
<h2>Description<aclass="headerlink"href="#description"title="Permalink to this headline">¶</a></h2>
<p>Define a computation that calculates properties between two groups of
atoms by accumulating them from pairwise non-bonded computations. The
two groups can be the same. This is similar to <aclass="reference internal"href="compute_group_group.html"><em>compute group/group</em></a> only that the data is
accumulated directly during the non-bonded force computation. The
computes <em>force/tally</em>, <em>pe/tally</em>, <em>stress/tally</em>, and
<em>heat/flux/tally</em> are primarily provided as example how to program
additional, more sophisticated computes using the tally mechanism.</p>
<hrclass="docutils"/>
<p>The pairwise contributions are computing via a callback that the
compute registers with the non-bonded pairwise force computation.
This limits the use to systems that have no bonds, no Kspace, and no
manybody interactions. On the other hand, the computation does not
have to compute forces or energies a second time and thus can be much
more efficient. The callback mechanism allows to write more complex
pairwise property computations.</p>
<hrclass="docutils"/>
<p><strong>Output info:</strong></p>
<p>Compute <em>pe/tally</em> calculates a global scalar (the energy) and a per
atom scalar (the contributions of the single atom to the global
scalar). Compute <em>force/tally</em> calculates a global scalar (the force
magnitude) and a per atom 3-element vector (force contribution from
each atom). Compute <em>stress/tally</em> calculates a global scalar
(average of the diagonal elements of the stress tensor) and a per atom
vector (the 6 elements of stress tensor contributions from the
individual atom).</p>
<p>Both the scalar and vector values calculated by this compute are
“extensive”.</p>
</div>
<divclass="section"id="restrictions">
<h2>Restrictions<aclass="headerlink"href="#restrictions"title="Permalink to this headline">¶</a></h2>
<p>This compute is part of the USER-TALLY 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>Not all pair styles can be evaluated in a pairwise mode as required by
this compute. For example, 3-body and other many-body potentials,
such as <aclass="reference internal"href="pair_tersoff.html"><em>Tersoff</em></a> and
<aclass="reference internal"href="pair_sw.html"><em>Stillinger-Weber</em></a> cannot be used. <aclass="reference internal"href="pair_eam.html"><em>EAM</em></a>
potentials only include the pair potential portion of the EAM
interaction when used by this compute, not the embedding term. Also
bonded or Kspace interactions do not contribute to this compute.</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>.