<spanid="index-0"></span><h1>compute property/chunk command<aclass="headerlink"href="#compute-property-chunk-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 property/chunk chunkID input1 input2 ...
</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>property/chunk = style name of this compute command</li>
<h2>Examples<aclass="headerlink"href="#examples"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>compute 1 all property/chunk count
compute 1 all property/chunk ID coord1
</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 stores the specified attributes of chunks of
atoms.</p>
<p>In LAMMPS, chunks are collections of atoms defined by a <aclass="reference internal"href="compute_chunk_atom.html"><em>compute chunk/atom</em></a> command, which assigns each atom
molecule or atoms in a spatial bin. See the <aclass="reference internal"href="compute_chunk_atom.html"><em>compute chunk/atom</em></a> doc page and “<aclass="reference internal"href="Section_howto.html#howto-23"><span>Section_howto 23</span></a> for details of how chunks can be
<p>This compute calculates and stores the specified attributes of chunks
as global data so they can be accessed by other <aclass="reference internal"href="Section_howto.html#howto-15"><span>output commands</span></a> and used in conjunction with
other commands that generate per-chunk data, such as <aclass="reference internal"href="compute_com_chunk.html"><em>compute com/chunk</em></a> or <aclass="reference internal"href="compute_msd_chunk.html"><em>compute msd/chunk</em></a>.</p>
<p>Note that only atoms in the specified group contribute to the
calculation of the <em>count</em> attribute. The <aclass="reference internal"href="compute_chunk_atom.html"><em>compute chunk/atom</em></a> command defines its own group;
<em>bin/1d</em> only defines a <em>coord1</em> attribute. Style <em>bin/2d</em> adds a
<em>coord2</em> attribute. Style <em>bin/3d</em> adds a <em>coord3</em> attribute.</p>
<p>Note that if the value of the <em>units</em> keyword used in the <aclass="reference internal"href="compute_chunk_atom.html"><em>compute chunk/atom command</em></a> is <em>box</em> or <em>lattice</em>, the
<em>coordN</em> attributes will be in distance <aclass="reference internal"href="units.html"><em>units</em></a>. If the
value of the <em>units</em> keyword is <em>reduced</em>, the <em>coordN</em> attributes
will be in unitless reduced units (0-1).</p>
<p>The simplest way to output the results of the compute property/chunk
calculation to a file is to use the <aclass="reference internal"href="fix_ave_time.html"><em>fix ave/time</em></a>
command, for example:</p>
<divclass="highlight-python"><divclass="highlight"><pre>compute cc1 all chunk/atom molecule
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>.