Page MenuHomec4science

atom_style.html
No OneTemporary

File Metadata

Created
Thu, Dec 26, 04:50

atom_style.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>atom_style command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>atom_style style args
</PRE>
<UL><LI>style = <I>angle</I> or <I>atomic</I> or <I>body</I> or <I>bond</I> or <I>charge</I> or <I>dipole</I> or <I>electron</I> or <I>ellipsoid</I> or <I>full</I> or <I>line</I> or <I>meso</I> or <I>molecular</I> or <I>peri</I> or <I>smd</I> or <I>sphere</I> or <I>tri</I> or <I>template</I> or <I>hybrid</I>
<PRE> args = none for any style except <I>body</I> and <I>hybrid</I>
<I>body</I> args = bstyle bstyle-args
bstyle = style of body particles
bstyle-args = additional arguments specific to the bstyle
see the <A HREF = "body.html">body</A> doc page for details
<I>template</I> args = template-ID
template-ID = ID of molecule template specified in a separate <A HREF = "molecule.html">molecule</A> command
<I>hybrid</I> args = list of one or more sub-styles, each with their args
</PRE>
<LI>accelerated styles (with same args) = <I>angle/cuda</I> or <I>angle/kk</I> or <I>atomic/cuda</I> or <I>atomic/kk</I> or <I>bond/kk</I> or <I>charge/cuda</I> or <I>charge/kk</I> or <I>full/cuda</I> or <I>full/kk</I> or <I>molecular/kk</I>
</UL>
<P><B>Examples:</B>
</P>
<PRE>atom_style atomic
atom_style bond
atom_style full
atom_style full/cuda
atom_style body nparticle 2 10
atom_style hybrid charge bond
atom_style hybrid charge body nparticle 2 5
atom_style template myMols
</PRE>
<P><B>Description:</B>
</P>
<P>Define what style of atoms to use in a simulation. This determines
what attributes are associated with the atoms. This command must be
used before a simulation is setup via 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>Once a style is assigned, it cannot be changed, so use a style general
enough to encompass all attributes. E.g. with style <I>bond</I>, angular
terms cannot be used or added later to the model. It is OK to use a
style more general than needed, though it may be slightly inefficient.
</P>
<P>The choice of style affects what quantities are stored by each atom,
what quantities are communicated between processors to enable forces
to be computed, and what quantities are listed in the data file read
by the <A HREF = "read_data.html">read_data</A> command.
</P>
<P>These are the additional attributes of each style and the typical
kinds of physical systems they are used to model. All styles store
coordinates, velocities, atom IDs and types. See the
<A HREF = "read_data.html">read_data</A>, <A HREF = "create_atoms.html">create_atoms</A>, and
<A HREF = "set.html">set</A> commands for info on how to set these various
quantities.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR><TD ><I>angle</I> </TD><TD > bonds and angles </TD><TD > bead-spring polymers with stiffness </TD></TR>
<TR><TD ><I>atomic</I> </TD><TD > only the default values </TD><TD > coarse-grain liquids, solids, metals </TD></TR>
<TR><TD ><I>body</I> </TD><TD > mass, inertia moments, quaternion, angular momentum </TD><TD > arbitrary bodies </TD></TR>
<TR><TD ><I>bond</I> </TD><TD > bonds </TD><TD > bead-spring polymers </TD></TR>
<TR><TD ><I>charge</I> </TD><TD > charge </TD><TD > atomic system with charges </TD></TR>
<TR><TD ><I>dipole</I> </TD><TD > charge and dipole moment </TD><TD > system with dipolar particles </TD></TR>
<TR><TD ><I>electron</I> </TD><TD > charge and spin and eradius </TD><TD > electronic force field </TD></TR>
<TR><TD ><I>ellipsoid</I> </TD><TD > shape, quaternion, angular momentum </TD><TD > aspherical particles </TD></TR>
<TR><TD ><I>full</I> </TD><TD > molecular + charge </TD><TD > bio-molecules </TD></TR>
<TR><TD ><I>line</I> </TD><TD > end points, angular velocity </TD><TD > rigid bodies </TD></TR>
<TR><TD ><I>meso</I> </TD><TD > rho, e, cv </TD><TD > SPH particles </TD></TR>
<TR><TD ><I>molecular</I> </TD><TD > bonds, angles, dihedrals, impropers </TD><TD > uncharged molecules </TD></TR>
<TR><TD ><I>peri</I> </TD><TD > mass, volume </TD><TD > mesocopic Peridynamic models </TD></TR>
<TR><TD ><I>smd</I> </TD><TD > volume, kernel diameter, contact radius, mass </TD><TD > solid and fluid SPH particles </TD></TR>
<TR><TD ><I>sphere</I> </TD><TD > diameter, mass, angular velocity </TD><TD > granular models </TD></TR>
<TR><TD ><I>template</I> </TD><TD > template index, template atom </TD><TD > small molecules with fixed topology </TD></TR>
<TR><TD ><I>tri</I> </TD><TD > corner points, angular momentum </TD><TD > rigid bodies </TD></TR>
<TR><TD ><I>wavepacket</I> </TD><TD > charge, spin, eradius, etag, cs_re, cs_im </TD><TD > AWPMD
</TD></TR></TABLE></DIV>
<P>IMPORTANT NOTE: It is possible to add some attributes, such as a
molecule ID, to atom styles that do not have them via the <A HREF = "fix_property_atom.html">fix
property/atom</A> command. This command also
allows new custom attributes consisting of extra integer or
floating-point values to be added to atoms. See the <A HREF = "fix_property_atom.html">fix
property/atom</A> doc page for examples of cases
where this is useful and details on how to initialize, access, and
output the custom values.
</P>
<P>All of the above styles define point particles, except the <I>sphere</I>,
<I>ellipsoid</I>, <I>electron</I>, <I>peri</I>, <I>wavepacket</I>, <I>line</I>, <I>tri</I>, and
<I>body</I> styles, which define finite-size particles. See <A HREF = "Section_howto.html#howto_14">Section_howto
14</A> for an overview of using finite-size
particle models with LAMMPS.
</P>
<P>All of the point-particle styles assign mass to particles on a
per-type basis, using the <A HREF = "mass.html">mass</A> command, The finite-size
particle styles assign mass to individual particles on a per-particle
basis.
</P>
<P>For the <I>sphere</I> style, the particles are spheres and each stores a
per-particle diameter and mass. If the diameter > 0.0, the particle
is a finite-size sphere. If the diameter = 0.0, it is a point
particle.
</P>
<P>For the <I>ellipsoid</I> style, the particles are ellipsoids and each
stores a flag which indicates whether it is a finite-size ellipsoid or
a point particle. If it is an ellipsoid, it also stores a shape
vector with the 3 diamters of the ellipsoid and a quaternion 4-vector
with its orientation.
</P>
<P>For the <I>electron</I> style, the particles representing electrons are 3d
Gaussians with a specified position and bandwidth or uncertainty in
position, which is represented by the eradius = electron size.
</P>
<P>For the <I>peri</I> style, the particles are spherical and each stores a
per-particle mass and volume.
</P>
<P>The <I>meso</I> style is for smoothed particle hydrodynamics (SPH)
particles which store a density (rho), energy (e), and heat capacity
(cv).
</P>
<P>The <I>smd</I> style is for a general formulation of Smooth Particle
Hydrodynamics. Both fluids and solids can be modeled. Particles
store the mass and volume of an integration point, a kernel diameter
used for calculating the field variables (e.g. stress and deformation)
and a contact radius for calculating repulsive forces which prevent
individual physical bodies from penetretating each other.
</P>
<P>The <I>wavepacket</I> style is similar to <I>electron</I>, but the electrons may
consist of several Gaussian wave packets, summed up with coefficients
cs= (cs_re,cs_im). Each of the wave packets is treated as a separate
particle in LAMMPS, wave packets belonging to the same electron must
have identical <I>etag</I> values.
</P>
<P>For the <I>line</I> style, the particles are idealized line segments and
each stores a per-particle mass and length and orientation (i.e. the
end points of the line segment).
</P>
<P>For the <I>tri</I> style, the particles are planar triangles and each
stores a per-particle mass and size and orientation (i.e. the corner
points of the triangle).
</P>
<P>The <I>template</I> style allows molecular topolgy (bonds,angles,etc) to be
defined via a molecule template using the <A HREF = "molecule.txt">molecule</A>
command. The template stores one or more molecules with a single copy
of the topology info (bonds,angles,etc) of each. Individual atoms
only store a template index and template atom to identify which
molecule and which atom-within-the-molecule they represent. Using the
<I>template</I> style instead of the <I>bond</I>, <I>angle</I>, <I>molecular</I> styles
can save memory for systems comprised of a large number of small
molecules, all of a single type (or small number of types). See the
paper by Grime and Voth, in <A HREF = "#Grime">(Grime)</A>, for examples of how this
can be advantageous for large-scale coarse-grained systems.
</P>
<P>IMPORTANT NOTE: When using the <I>template</I> style with a <A HREF = "molecule.html">molecule
template</A> that contains multiple molecules, you should
insure the atom types, bond types, angle_types, etc in all the
molecules are consistent. E.g. if one molecule represents H2O and
another CO2, then you probably do not want each molecule file to
define 2 atom types and a single bond type, because they will conflict
with each other when a mixture system of H2O and CO2 molecules is
defined, e.g. by the <A HREF = "read_data.html">read_data</A> command. Rather the
H2O molecule should define atom types 1 and 2, and bond type 1. And
the CO2 molecule should define atom types 3 and 4 (or atom types 3 and
2 if a single oxygen type is desired), and bond type 2.
</P>
<P>For the <I>body</I> style, the particles are arbitrary bodies with internal
attributes defined by the "style" of the bodies, which is specified by
the <I>bstyle</I> argument. Body particles can represent complex entities,
such as surface meshes of discrete points, collections of
sub-particles, deformable objects, etc.
</P>
<P>The <A HREF = "body.html">body</A> doc page descibes the body styles LAMMPS
currently supports, and provides more details as to the kind of body
particles they represent. For all styles, each body particle stores
moments of inertia and a quaternion 4-vector, so that its orientation
and position can be time integrated due to forces and torques.
</P>
<P>Note that there may be additional arguments required along with the
<I>bstyle</I> specification, in the atom_style body command. These
arguments are described in the <A HREF = "body.html">body</A> doc page.
</P>
<HR>
<P>Typically, simulations require only a single (non-hybrid) atom style.
If some atoms in the simulation do not have all the properties defined
by a particular style, use the simplest style that defines all the
needed properties by any atom. For example, if some atoms in a
simulation are charged, but others are not, use the <I>charge</I> style.
If some atoms have bonds, but others do not, use the <I>bond</I> style.
</P>
<P>The only scenario where the <I>hybrid</I> style is needed is if there is no
single style which defines all needed properties of all atoms. For
example, if you want dipolar particles which will rotate due to
torque, you would need to use "atom_style hybrid sphere dipole". When
a hybrid style is used, atoms store and communicate the union of all
quantities implied by the individual styles.
</P>
<P>When using the <I>hybrid</I> style, you cannot combine the <I>template</I> style
with another molecular style that stores bond,angle,etc info on a
per-atom basis.
</P>
<P>LAMMPS can be extended with new atom styles as well as new body
styles; see <A HREF = "Section_modify.html">this section</A>.
</P>
<HR>
<P>Styles with a <I>cuda</I> or <I>kk</I> suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in
<A HREF = "Section_accelerate.html">Section_accelerate</A> of the manual. The
accelerated styles take the same arguments and should produce the same
results, except for round-off and precision issues.
</P>
<P>Note that other acceleration packages in LAMMPS, specifically the GPU,
USER-INTEL, USER-OMP, and OPT packages do not use accelerated atom
styles.
</P>
<P>The accelerated styles are part of the USER-CUDA and KOKKOS packages
respectively. They are only enabled if LAMMPS was built with those
packages. See the <A HREF = "Section_start.html#start_3">Making LAMMPS</A> section
for more info.
</P>
<P>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <A HREF = "Section_start.html#start_7">-suffix command-line
switch</A> when you invoke LAMMPS, or you can
use the <A HREF = "suffix.html">suffix</A> command in your input script.
</P>
<P>See <A HREF = "Section_accelerate.html">Section_accelerate</A> of the manual for
more instructions on how to use the accelerated styles effectively.
</P>
<P><B>Restrictions:</B>
</P>
<P>This command cannot be used after the simulation box is defined by a
<A HREF = "read_data.html">read_data</A> or <A HREF = "create_box.html">create_box</A> command.
</P>
<P>The <I>angle</I>, <I>bond</I>, <I>full</I>, <I>molecular</I>, and <I>template</I> styles are
part of the MOLECULE package. The <I>line</I> and <I>tri</I> styles are part
of the ASPHERE pacakge. The <I>body</I> style is part of the BODY package.
The <I>dipole</I> style is part of the DIPOLE package. The <I>peri</I> style is
part of the PERI package for Peridynamics. The <I>electron</I> style is
part of the USER-EFF package for <A HREF = "pair_eff.html">electronic force
fields</A>. The <I>meso</I> style is part of the USER-SPH
package for smoothed particle hydrodyanmics (SPH). See <A HREF = "USER/sph/SPH_LAMMPS_userguide.pdf">this PDF
guide</A> to using SPH in LAMMPS. The
<I>wavepacket</I> style is part of the USER-AWPMD package for the
<A HREF = "pair_awpmd.html">antisymmetrized wave packet MD method</A>. They are
only enabled if LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "read_data.html">read_data</A>, <A HREF = "pair_style.html">pair_style</A>
</P>
<P><B>Default:</B>
</P>
<P>atom_style atomic
</P>
<HR>
<A NAME = "Grime"></A>
<P><B>(Grime)</B> Grime and Voth, to appear in J Chem Theory & Computation
(2014).
</P>
</HTML>

Event Timeline