<spanid="index-0"></span><h1>compute event/displace command<aclass="headerlink"href="#compute-event-displace-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 event/displace threshold
</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>event/displace = style name of this compute command</li>
<li>threshold = minimum distance anyparticle must move to trigger an event (distance units)</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 event/displace 0.5
</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 flags an “event” if any particle in the
group has moved a distance greater than the specified threshold
distance when compared to a previously stored reference state
(i.e. the previous event). This compute is typically used in
conjunction with the <aclass="reference internal"href="prd.html"><em>prd</em></a> and <aclass="reference internal"href="tad.html"><em>tad</em></a> commands,
to detect if a transition
to a new minimum energy basin has occurred.</p>
<p>This value calculated by the compute is equal to 0 if no particle has
moved far enough, and equal to 1 if one or more particles have moved
further than the threshold distance.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">If the system is undergoing significant center-of-mass motion,
due to thermal motion, an external force, or an initial net momentum,
then this compute will not be able to distinguish that motion from
local atom displacements and may generate “false postives.”</p>
</div>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global scalar (the flag). 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 “intensive”. The
scalar value will be a 0 or 1 as explained above.</p>
</div>
<divclass="section"id="restrictions">
<h2>Restrictions<aclass="headerlink"href="#restrictions"title="Permalink to this headline">¶</a></h2>
<p>This command can only be used if LAMMPS was built with the REPLICA
package. See the <aclass="reference internal"href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section
for more info on packages.</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>.