lammps/doc/shape.html

106 lines
4.4 KiB
HTML
Raw Normal View History

<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>shape command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>shape I x y z
</PRE>
<UL><LI>I = atom type (see asterisk form below)
<LI>x = x diameter (distance units)
<LI>y = y diameter (distance units)
<LI>z = z diameter (distance units)
</UL>
<P><B>Examples:</B>
</P>
<PRE>shape 1 1.0 1.0 1.0
shape * 3.0 1.0 1.0
shape 2* 3.0 1.0 1.0
</PRE>
<P><B>Description:</B>
</P>
<P>Set the shape for all atoms of one or more atom types. In LAMMPS,
particles that have a finite size are said to have a "shape", as
opposed to being a point mass. The shape can be spherical or
aspherical, depending on whether the 3 shape values are the same or
different. Shape values can also be set in the
<A HREF = "read_data.html">read_data</A> data file using the "Shapes" keyword. See
the <A HREF = "units.html">units</A> command for what distance units to use.
</P>
<P>The I index can be specified in one of two ways. An explicit numeric
value can be used, as in the 1st example above. Or a wild-card
asterisk can be used to set the shape for multiple atom types. This
takes the form "*" or "*n" or "n*" or "m*n". If N = the number of
atom types, then an asterisk with no numeric values means all types
from 1 to N. A leading asterisk means all types from 1 to n
(inclusive). A trailing asterisk means all types from n to N
(inclusive). A middle asterisk means all types from m to n
(inclusive).
</P>
<P>A line in a <A HREF = "read_data.html">data file</A> that follows the "Shapes"
keyword specifies shape using the same format as the arguments of the
shape command in an input script, except that no wild-card asterisk
can be used. For example, under the "Shapes" section of a data file,
the line that corresponds to the 1st example above would be listed as
</P>
<PRE>1 1.0 1.0 1.0
</PRE>
<P>The shape values can be set to all 0.0, which means that atoms of that
type are point particles and not finite-size particles. Some pair
styles and fixes and computes that operate on finite-size particles
allow for a mixture of finite-size and point particles. See the doc
pages of individual commands for details.
</P>
<P>Note that the shape command can only be used if the <A HREF = "atom_style.html">atom
style</A> requires per-type atom shape to be set.
Currently, only the <I>dipole</I> and <I>ellipsoid</I> styles do. The
<I>granular</I> and <I>peri</I> styles require the shape to be set for indivual
particles, not types. For these styles, the only option currently
allowed is for spherical particles, so a single diameter value
suffices to determine the shape. Per-atom diameters are defined in
the data file read by the <A HREF = "read_data.html">read_data</A> command, or set
to default values by the <A HREF = "create_atoms.html">create_atoms</A> command, or
set to new values by the <A HREF = "set.html">set diamter</A> command.
</P>
<P>Dipoles use the atom shape to compute a moment of inertia for
rotational energy. See the <A HREF = "pair_dipole.html">pair_style dipole</A>
command. Only the 1st component of the shape is used since the
particles are assumed to be spherical.
</P>
<P>Ellipsoids use the atom shape to compute a generalized inertia tensor.
For example, a shape setting of 3.0 1.0 1.0 defines a particle 3x
longer in x than in y or z and with a circular cross-section in yz.
Degenerate ellipsoids which are spherical can be defined by setting
all 3 shape components the same.
</P>
<P>If you define a <A HREF = "atom_style.html">hybrid atom style</A> which includes one
(or more) sub-styles which require per-type shape and one (or more)
sub-styles which require per-atom diameter, then you must define both.
In this case the per-type shape will be ignored; only the per-atom
diameter will be used by LAMMPS. Note that this means you can not
currently mix aspherical particles with per-atom diameter particles.
</P>
<P><B>Restrictions:</B>
</P>
<P>This command must come after the simulation box is defined by a
<A HREF = "read_data.html">read_data</A>, <A HREF = "read_restart.html">read_restart</A>, or
<A HREF = "create_box.html">create_box</A> command.
</P>
<P>All shapes must be defined before a simulation is run (if the atom
style requires shapes be set).
</P>
<P><B>Related commands:</B> none
</P>
<P><B>Default:</B> none
</P>
</HTML>