Page MenuHomec4science

compute_property_chunk.html
No OneTemporary

File Metadata

Created
Sat, Dec 28, 10:40

compute_property_chunk.html

<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute property/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID property/chunk chunkID input1 input2 ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>property/chunk = style name of this compute command
<LI>input = one or more attributes
<PRE> attributes = count, id, coord1, coord2, coord3
count = # of atoms in chunk
id = original chunk IDs before compression by <A HREF = "compute_chunk_atom.html">compute chunk/atom</A>
coord123 = coordinates for spatial bins calculated by <A HREF = "compute_chunk_atom.html">compute chunk/atom</A>
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 all property/chunk count
compute 1 all property/chunk ID coord1
</PRE>
<P><B>Description:</B>
</P>
<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 <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>This compute calculates and stores the specified attributes of chunks
as global data so they can be accessed by other <A HREF = "Section_howto.html#howto_15">output
commands</A> and used in conjunction with
other commands that generate per-chunk data, such as <A HREF = "compute_com_chunk.html">compute
com/chunk</A> or <A HREF = "compute_msd_chunk.html">compute
msd/chunk</A>.
</P>
<P>Note that only atoms in the specified group contribute to the
calculation of the <I>count</I> attribute. The <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command defines its own group;
atoms will have a chunk ID = 0 if they are not in that group,
signifying they are not assigned to a chunk, and will thus also not
contribute to this calculation. You can specify the "all" group for
this command if you simply want to include atoms with non-zero chunk
IDs.
</P>
<P>The <I>count</I> attribute is the number of atoms in the chunk.
</P>
<P>The <I>id</I> attribute stores the original chunk ID for each chunk. It
can only be used if the <I>compress</I> keyword was set to <I>yes</I> for the
<A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command referenced by
chunkID. This means that the original chunk IDs (e.g. molecule IDs)
will have been compressed to remove chunk IDs with no atoms assigned
to them. Thus a compresed chunk ID of 3 may correspond to an original
chunk ID (molecule ID in this case) of 415. The <I>id</I> attribute will
then be 415 for the 3rd chunk.
</P>
<P>The <I>coordN</I> attributes can only be used if a <I>binning</I> style was used
in the <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command referenced
by chunkID. For <I>bin/1d</I>, <I>bin/2d</I>, and <I>bin/3d</I> styles the attribute
is the center point of the bin in the corresponding dimension. Style
<I>bin/1d</I> only defines a <I>coord1</I> attribute. Style <I>bin/2d</I> adds a
<I>coord2</I> attribute. Style <I>bin/3d</I> adds a <I>coord3</I> attribute.
</P>
<P>Note that if the value of the <I>units</I> keyword used in the <A HREF = "compute_chunk_atom.html">compute
chunk/atom command</A> is <I>box</I> or <I>lattice</I>, the
<I>coordN</I> attributes will be in distance <A HREF = "units.html">units</A>. If the
value of the <I>units</I> keyword is <I>reduced</I>, the <I>coordN</I> 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 <A HREF = "fix_ave_time.html">fix ave/time</A>
command, for example:
</P>
<PRE>compute cc1 all chunk/atom molecule
compute myChunk1 all property/chunk cc1
compute myChunk2 all com/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk1 c_myChunk2 file tmp.out mode vector
</PRE>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global vector or global array depending on
the number of input values. The length of the vector or number of
rows in the array is the number of chunks.
</P>
<P>This compute calculates a global vector or global array where the
number of rows = the number of chunks <I>Nchunk</I> as calculated by the
specified <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command. If a
single input is specified, a global vector is produced. If two or
more inputs are specified, a global array is produced where the number
of columns = the number of inputs. The vector or array can be
accessed by any command that uses global values from a compute as
input. See <A HREF = "Section_howto.html#howto_15">this section</A> for an overview
of LAMMPS output options.
</P>
<P>The vector or array values are "intensive". The values will be
unitless or in the units discussed above.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_ave_chunk.html">fix ave/chunk</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

Event Timeline