<span id="index-0"></span><h1>compute basal/atom command<a class="headerlink" href="#compute-basal-atom-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute ID group-ID basal/atom
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="compute.html"><em>compute</em></a> command</li>
<li>basal/atom = style name of this compute command</li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute 1 all basal/atom
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Defines a computation that calculates the hexagonal close-packed “c”
lattice vector for each atom in the group. It does this by
calculating the normal unit vector to the basal plane for each atom.
The results enable efficient identification and characterization of
twins and grains in hexagonal close-packed structures.</p>
<p>The output of the compute is thus the 3 components of a unit vector
associdate with each atom. The components are set to 0.0 for
atoms not in the group.</p>
<p>Details of the calculation are given in <a class="reference internal" href="#barrett"><span>(Barrett)</span></a>.</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 or to have multiple compute/dump commands, each of
which computes this quantity.</p>
<p>An example input script that uses this compute is provided
in examples/USER/misc/basal.</p>
<p><strong>Output info:</strong></p>
<p>This compute calculates a per-atom array with 3 columns, which can be
accessed by indices 1-3 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>Section_howto 15</span></a> for an overview of LAMMPS output
options.</p>
<p>The per-atom vector values are unitless since the 3 columns represent
components of a unit vector.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>This compute is part of the USER-MISC package. It is only enabled if
LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The output of this compute will be meaningless unless the atoms are on
(or near) hcp lattice sites, since the calculation assumes a
well-defined basal plane.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
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>.