<p>This doc page is not about a LAMMPS input script command, but about
body particles, which are generalized finite-size particles.
Individual body particles can represent complex entities, such as
surface meshes of discrete points, collections of sub-particles,
deformable objects, etc. Note that other kinds of finite-size
spherical and aspherical particles are also supported by LAMMPS, such
as spheres, ellipsoids, line segments, and triangles, but they are
simpler entities that body particles. See <aclass="reference internal"href="Section_howto.html#howto-14"><spanclass="std std-ref">Section_howto 14</span></a> for a general overview of all these
particle types.</p>
<p>Body particles are used via the <aclass="reference internal"href="atom_style.html"><spanclass="doc">atom_style body</span></a>
command. It takes a body style as an argument. The current body
styles supported by LAMMPS are as follows. The name in the first
column is used as the <em>bstyle</em> argument for the <aclass="reference internal"href="atom_style.html"><spanclass="doc">atom_style body</span></a> command.</p>
<p>The body style determines what attributes are stored for each body and
thus how they can be used to compute pairwise body/body or
bond/non-body (point particle) interactions. More details of each
style are described below.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">The rounded/polygon style listed in the table above and
described below has not yet been relesed in LAMMPS. It will be soon.</p>
</div>
<p>We hope to add more styles in the future. See <aclass="reference internal"href="Section_modify.html#mod-12"><spanclass="std std-ref">Section_modify 12</span></a> for details on how to add a new body
style to the code.</p>
<hrclass="docutils"/>
<p><strong>When to use body particles:</strong></p>
<p>You should not use body particles to model a rigid body made of
simpler particles (e.g. point, sphere, ellipsoid, line segment,
triangular particles), if the interaction between pairs of rigid
bodies is just the summation of pairwise interactions between the
simpler particles. LAMMPS already supports this kind of model via the
<aclass="reference internal"href="fix_rigid.html"><spanclass="doc">fix rigid</span></a> command. Any of the numerous pair styles
that compute interactions between simpler particles can be used. The
<aclass="reference internal"href="fix_rigid.html"><spanclass="doc">fix rigid</span></a> command time integrates the motion of the
rigid bodies. All of the standard LAMMPS commands for thermostatting,
adding constraints, performing output, etc will operate as expected on
the simple particles.</p>
<p>By contrast, when body particles are used, LAMMPS treats an entire
body as a single particle for purposes of computing pairwise
interactions, building neighbor lists, migrating particles between
processors, outputting particles to a dump file, etc. This means that
interactions between pairs of bodies or between a body and non-body
(point) particle need to be encoded in an appropriate pair style. If
such a pair style were to mimic the <aclass="reference internal"href="fix_rigid.html"><spanclass="doc">fix rigid</span></a> model,
it would need to loop over the entire collection of interactions
between pairs of simple particles within the two bodies, each time a
single body/body interaction was computed.</p>
<p>Thus it only makes sense to use body particles and develop such a pair
style, when particle/particle interactions are more complex than what
the <aclass="reference internal"href="fix_rigid.html"><spanclass="doc">fix rigid</span></a> command can already calculate. For
example, if particles have one or more of the following attributes:</p>
<ulclass="simple">
<li>represented by a surface mesh</li>
<li>represented by a collection of geometric entities (e.g. planes + spheres)</li>
<li>deformable</li>
<li>internal stress that induces fragmentation</li>
</ul>
<p>then the interaction between pairs of particles is likely to be more
complex than the summation of simple sub-particle interactions. An
example is contact or frictional forces between particles with planar
sufaces that inter-penetrate.</p>
<p>These are additional LAMMPS commands that can be used with body
<p>N is the number of sub-particles in the body particle. M = 6 + 3*N.
The integer line has a single value N. The floating point line(s)
list 6 moments of inertia followed by the coordinates of the N
sub-particles (x1 to zN) as 3N values. These values can be listed on
as many lines as you wish; see the <aclass="reference internal"href="read_data.html"><spanclass="doc">read_data</span></a> command
for more details.</p>
<p>The 6 moments of inertia (ixx,iyy,izz,ixy,ixz,iyz) should be the
values consistent with the current orientation of the rigid body
around its center of mass. The values are with respect to the
simulation box XYZ axes, not with respect to the prinicpal axes of the
rigid body itself. LAMMPS performs the latter calculation internally.
The coordinates of each sub-particle are specified as its x,y,z
displacement from the center-of-mass of the body particle. The
center-of-mass position of the particle is specified by the x,y,z
values in the <em>Atoms</em> section of the data file, as is the total mass
of the body particle.</p>
<p>The <aclass="reference internal"href="pair_body.html"><spanclass="doc">pair_style body</span></a> command can be used with this
body style to compute body/body and body/non-body interactions.</p>
<p>For output purposes via the <aclass="reference internal"href="compute_body_local.html"><spanclass="doc">compute body/local</span></a> and <aclass="reference internal"href="dump.html"><spanclass="doc">dump local</span></a>
commands, this body style produces one datum for each of the N
sub-particles in a body particle. The datum has 3 values:</p>
command can be used with this body style to compute body/body
interactions.</p>
<p>For output purposes via the <aclass="reference internal"href="compute_body_local.html"><spanclass="doc">compute body/local</span></a> and <aclass="reference internal"href="dump.html"><spanclass="doc">dump local</span></a>
commands, this body style produces one datum for each of the N
sub-particles in a body particle. The datum has 3 values:</p>
<p>These values are the current position of the vertex within the
simulation domain, not a displacement from the center-of-mass (COM) of
the body particle itself. These values are calculated using the
current COM and orientation of the body particle.</p>
<p>For images created by the <aclass="reference internal"href="dump_image.html"><spanclass="doc">dump image</span></a> command, if the
<em>body</em> keyword is set, then each body particle is drawn as a convex
polygon consisting of N line segments. Note that the line segments
are drawn between the N vertices, which does not correspond exactly to
the physical extent of the body (because the <aclass="reference external"href="pair_body_rounded_polygon.cpp">pair_style rounded/polygon</a> defines finite-size
spheres at those point and the line segments between the spheres are
tangent to the spheres). The drawn diameter of each line segment is
determined by the <em>bflag1</em> parameter for the <em>body</em> keyword. The
<em>bflag2</em> argument is ignored.</p>
<hrclass="docutils"/>
<pid="fraige"><strong>(Fraige)</strong> F. Y. Fraige, P. A. Langston, A. J. Matchett, J. Dodds,
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>.