<h1>LAMMPS-ICMS Documentation<a class="headerlink" href="#lammps-documentation" title="Permalink to this headline">¶</a></h1>
-<div class="section" id="dec-2015-version">
-<h2>19 Dec 2015 version<a class="headerlink" href="#dec-2015-version" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="jan-2016-version">
+<h2>22 Jan 2016 version<a class="headerlink" href="#jan-2016-version" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="version-info">
<h2>Version info:<a class="headerlink" href="#version-info" title="Permalink to this headline">¶</a></h2>
<p>The LAMMPS “version” is the date when it was released, such as 1 May
2010. LAMMPS is updated continuously. Whenever we fix a bug or add a
feature, we release it immediately, and post a notice on <a class="reference external" href="http://lammps.sandia.gov/bug.html">this page of the WWW site</a>. Each dated copy of LAMMPS contains all the
features and bug-fixes up to and including that version date. The
version date is printed to the screen and logfile every time you run
LAMMPS. It is also in the file src/version.h and in the LAMMPS
directory name created when you unpack a tarball, and at the top of
the first page of the manual (this page).</p>
<p>LAMMPS-ICMS is an experimental variant of LAMMPS with additional
features made available for testing before they will be submitted
for inclusion into the official LAMMPS tree. The source code is
based on the official LAMMPS svn repository mirror at the Institute
for Computational Molecular Science at Temple University and generally
kept up-to-date as much as possible. Sometimes, e.g. when additional
development work is needed to adapt the upstream changes into
LAMMPS-ICMS it can take longer until synchronization; and occasionally,
e.g. in case of the rewrite of the multi-threading support, the
development will be halted except for important bugfixes until
all features of LAMMPS-ICMS fully compatible with the upstream
version or replaced by alternate implementations.</p>
<ul class="simple">
<li>If you browse the HTML doc pages on the LAMMPS WWW site, they always
describe the most current version of LAMMPS.</li>
<li>If you browse the HTML doc pages included in your tarball, they
describe the version you have, however, not all new features in
LAMMPS-ICMS are documented immediately.</li>
<li>The <a class="reference external" href="Manual.pdf">PDF file</a> on the WWW site or in the tarball is updated
about once per month. This is because it is large, and we don’t want
it to be part of every patch.</li>
<li>There is also a <a class="reference external" href="Developer.pdf">Developer.pdf</a> file in the doc
directory, which describes the internal structure and algorithms of
LAMMPS.</li>
</ul>
<p>LAMMPS stands for Large-scale Atomic/Molecular Massively Parallel
Simulator.</p>
<p>LAMMPS is a classical molecular dynamics simulation code designed to
run efficiently on parallel computers. It was developed at Sandia
National Laboratories, a US Department of Energy facility, with
funding from the DOE. It is an open-source code, distributed freely
under the terms of the GNU Public License (GPL).</p>
<p>The primary developers of LAMMPS are <a class="reference external" href="http://www.sandia.gov/~sjplimp">Steve Plimpton</a>, Aidan
Thompson, and Paul Crozier who can be contacted at
sjplimp,athomps,pscrozi at sandia.gov. The <a class="reference external" href="http://lammps.sandia.gov">LAMMPS WWW Site</a> at
<a class="reference external" href="http://lammps.sandia.gov">http://lammps.sandia.gov</a> has more information about the code and its
uses.</p>
<hr class="docutils" />
<p>The LAMMPS documentation is organized into the following sections. If
you find errors or omissions in this manual or have suggestions for
useful information to add, please send an email to the developers so
we can improve the LAMMPS documentation.</p>
<p>Once you are familiar with LAMMPS, you may want to bookmark <a class="reference internal" href="Section_commands.html#comm"><span>this page</span></a> at Section_commands.html#comm since
it gives quick access to documentation for all LAMMPS commands.</p>
<p><a class="reference external" href="Manual.pdf">PDF file</a> of the entire manual, generated by
<li class="toctree-l2"><a class="reference internal" href="Section_start.html#what-s-in-the-lammps-distribution">2.1. What’s in the LAMMPS distribution</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_start.html#making-lammps">2.2. Making LAMMPS</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_start.html#making-lammps-with-optional-packages">2.3. Making LAMMPS with optional packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_start.html#building-lammps-via-the-make-py-tool">2.4. Building LAMMPS via the Make.py tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_start.html#building-lammps-as-a-library">2.5. Building LAMMPS as a library</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#standard-packages">4.1. Standard packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-compress-package">4.2. Build instructions for COMPRESS package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-gpu-package">4.3. Build instructions for GPU package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-kim-package">4.4. Build instructions for KIM package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-kokkos-package">4.5. Build instructions for KOKKOS package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-kspace-package">4.6. Build instructions for KSPACE package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-meam-package">4.7. Build instructions for MEAM package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-poems-package">4.8. Build instructions for POEMS package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-python-package">4.9. Build instructions for PYTHON package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-reax-package">4.10. Build instructions for REAX package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-voronoi-package">4.11. Build instructions for VORONOI package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#build-instructions-for-xtc-package">4.12. Build instructions for XTC package</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-packages">4.13. User packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_accelerate.html#general-strategies">5.2. General strategies</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_accelerate.html#packages-with-optimized-styles">5.3. Packages with optimized styles</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_accelerate.html#comparison-of-various-accelerator-packages">5.4. Comparison of various accelerator packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#tip3p-water-model">6.7. TIP3P water model</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#tip4p-water-model">6.8. TIP4P water model</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#spc-water-model">6.9. SPC water model</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#coupling-lammps-to-other-codes">6.10. Coupling LAMMPS to other codes</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#calculating-a-diffusion-coefficient">6.22. Calculating a diffusion coefficient</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#using-chunks-to-calculate-system-properties">6.23. Using chunks to calculate system properties</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#setting-parameters-for-the-kspace-style-pppm-disp-command">6.24. Setting parameters for the <code class="docutils literal"><span class="pre">kspace_style</span> <span class="pre">pppm/disp</span></code> command</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#submitting-new-features-for-inclusion-in-lammps">10.15. Submitting new features for inclusion in LAMMPS</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Section_python.html#overview-of-running-lammps-from-python">11.1. Overview of running LAMMPS from Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_python.html#overview-of-using-python-from-a-lammps-script">11.2. Overview of using Python from a LAMMPS script</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_python.html#building-lammps-as-a-shared-library">11.3. Building LAMMPS as a shared library</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_python.html#installing-the-python-wrapper-into-python">11.4. Installing the Python wrapper into Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_python.html#extending-python-with-mpi-to-run-in-parallel">11.5. Extending Python with MPI to run in parallel</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_python.html#testing-the-python-lammps-interface">11.6. Testing the Python-LAMMPS interface</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_python.html#using-lammps-from-python">11.7. Using LAMMPS from Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="Section_python.html#example-python-scripts-that-use-lammps">11.8. Example Python scripts that use LAMMPS</a></li>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<a class="reference internal" href="if.html"><em>if</em></a>, and <a class="reference internal" href="python.html"><em>python</em></a> commands for examples.</p>
<p>A “#” or “$” character that is between quotes will not be treated as a
comment indicator in (2) or substituted for as a variable in (3).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If the argument is itself a command that requires a quoted
argument (e.g. using a <a class="reference internal" href="print.html"><em>print</em></a> command as part of an
<a class="reference internal" href="if.html"><em>if</em></a> or <a class="reference internal" href="run.html"><em>run every</em></a> command), then single, double, or
triple quotes can be nested in the usual manner. See the doc pages
for those commands for examples. Only one of level of nesting is
allowed, but that should be sufficient for most use cases.</p>
</div>
<hr class="docutils" />
</div>
<div class="section" id="input-script-structure">
<span id="cmd-3"></span><h2>3.3. Input script structure<a class="headerlink" href="#input-script-structure" title="Permalink to this headline">¶</a></h2>
<p>This section describes the structure of a typical LAMMPS input script.
The “examples” directory in the LAMMPS distribution contains many
sample input scripts; the corresponding problems are discussed in
<a class="reference internal" href="Section_example.html"><em>Section_example</em></a>, and animated on the <a class="reference external" href="http://lammps.sandia.gov">LAMMPS WWW Site</a>.</p>
<p>A LAMMPS input script typically has 4 parts:</p>
<ol class="arabic simple">
<li>Initialization</li>
<li>Atom definition</li>
<li>Settings</li>
<li>Run a simulation</li>
</ol>
<p>The last 2 parts can be repeated as many times as desired. I.e. run a
simulation, change some settings, run some more, etc. Each of the 4
parts is now described in more detail. Remember that almost all the
commands need only be used if a non-default value is desired.</p>
<ol class="arabic simple">
<li>Initialization</li>
</ol>
<p>Set parameters that need to be defined before atoms are created or
read-in from a file.</p>
<p>The relevant commands are <a class="reference internal" href="units.html"><em>units</em></a>,
<p>Fixes impose a variety of boundary conditions, time integration, and
diagnostic options. The <a class="reference internal" href="fix.html"><em>fix</em></a> command comes in many flavors.</p>
<p>Various computations can be specified for execution during a
simulation using the <a class="reference internal" href="compute.html"><em>compute</em></a>,
<a class="reference internal" href="compute_modify.html"><em>compute_modify</em></a>, and <a class="reference internal" href="variable.html"><em>variable</em></a>
commands.</p>
<p>Output options are set by the <a class="reference internal" href="thermo.html"><em>thermo</em></a>, <a class="reference internal" href="dump.html"><em>dump</em></a>,
and <a class="reference internal" href="restart.html"><em>restart</em></a> commands.</p>
<ol class="arabic simple" start="4">
<li>Run a simulation</li>
</ol>
<p>A molecular dynamics simulation is run using the <a class="reference internal" href="run.html"><em>run</em></a>
command. Energy minimization (molecular statics) is performed using
the <a class="reference internal" href="minimize.html"><em>minimize</em></a> command. A parallel tempering
(replica-exchange) simulation can be run using the
<span id="cmd-4"></span><h2>3.4. Commands listed by category<a class="headerlink" href="#commands-listed-by-category" title="Permalink to this headline">¶</a></h2>
<p>This section lists all LAMMPS commands, grouped by category. The
<a class="reference internal" href="#cmd-5"><span>next section</span></a> lists the same commands alphabetically. Note
that some style options for some commands are part of specific LAMMPS
packages, which means they cannot be used unless the package was
included when LAMMPS was built. Not all packages are included in a
default LAMMPS build. These dependencies are listed as Restrictions
<span id="comm"></span><span id="cmd-5"></span><h2>3.5. Individual commands<a class="headerlink" href="#individual-commands" title="Permalink to this headline">¶</a></h2>
<p>This section lists all LAMMPS commands alphabetically, with a separate
listing below of styles within certain commands. The <a class="reference internal" href="#cmd-4"><span>previous section</span></a> lists the same commands, grouped by category. Note
that some style options for some commands are part of specific LAMMPS
packages, which means they cannot be used unless the package was
included when LAMMPS was built. Not all packages are included in a
default LAMMPS build. These dependencies are listed as Restrictions
<h2>3.7. Compute styles<a class="headerlink" href="#compute-styles" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="compute.html"><em>compute</em></a> command for one-line descriptions of
each style or click on the style itself for a full description. Some
of the styles have accelerated versions, which can be used if LAMMPS
is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
<h2>3.8. Pair_style potentials<a class="headerlink" href="#pair-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> command for an overview of pair
potentials. Click on the style itself for a full description. Many
of the styles have accelerated versions, which can be used if LAMMPS
is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
<h2>3.9. Bond_style potentials<a class="headerlink" href="#bond-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="bond_style.html"><em>bond_style</em></a> command for an overview of bond
potentials. Click on the style itself for a full description. Some
of the styles have accelerated versions, which can be used if LAMMPS
is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
<h2>3.10. Angle_style potentials<a class="headerlink" href="#angle-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="angle_style.html"><em>angle_style</em></a> command for an overview of
angle potentials. Click on the style itself for a full description.
Some of the styles have accelerated versions, which can be used if
LAMMPS is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
<h2>3.11. Dihedral_style potentials<a class="headerlink" href="#dihedral-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="dihedral_style.html"><em>dihedral_style</em></a> command for an overview
of dihedral potentials. Click on the style itself for a full
description. Some of the styles have accelerated versions, which can
be used if LAMMPS is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
<h2>3.12. Improper_style potentials<a class="headerlink" href="#improper-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="improper_style.html"><em>improper_style</em></a> command for an overview
of improper potentials. Click on the style itself for a full
description. Some of the styles have accelerated versions, which can
be used if LAMMPS is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
<h2>3.13. Kspace solvers<a class="headerlink" href="#kspace-solvers" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="kspace_style.html"><em>kspace_style</em></a> command for an overview of
Kspace solvers. Click on the style itself for a full description.
Some of the styles have accelerated versions, which can be used if
LAMMPS is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<li>style = <em>angle</em> or <em>atomic</em> or <em>body</em> or <em>bond</em> or <em>charge</em> or <em>dipole</em> or <em>electron</em> or <em>ellipsoid</em> or <em>full</em> or <em>line</em> or <em>meso</em> or <em>molecular</em> or <em>peri</em> or <em>smd</em> or <em>sphere</em> or <em>tri</em> or <em>template</em> or <em>hybrid</em></li>
</ul>
<pre class="literal-block">
args = none for any style except <em>body</em> and <em>hybrid</em>
<em>body</em> args = bstyle bstyle-args
bstyle = style of body particles
bstyle-args = additional arguments specific to the bstyle
see the <a class="reference internal" href="body.html"><em>body</em></a> doc page for details
<em>template</em> args = template-ID
template-ID = ID of molecule template specified in a separate <a class="reference internal" href="molecule.html"><em>molecule</em></a> command
<em>hybrid</em> args = list of one or more sub-styles, each with their args
</pre>
<ul class="simple">
<li>accelerated styles (with same args) = <em>angle/cuda</em> or <em>angle/kk</em> or <em>atomic/cuda</em> or <em>atomic/kk</em> or <em>bond/kk</em> or <em>charge/cuda</em> or <em>charge/kk</em> or <em>full/cuda</em> or <em>full/kk</em> or <em>molecular/kk</em></li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<p class="last">It is possible to add some attributes, such as a molecule ID, to
atom styles that do not have them via the <a class="reference internal" href="fix_property_atom.html"><em>fix property/atom</em></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 class="reference internal" href="fix_property_atom.html"><em>fix property/atom</em></a> doc page for examples of cases
where this is useful and details on how to initialize, access, and
output the custom values.</p>
</div>
<p>All of the above styles define point particles, except the <em>sphere</em>,
<em>ellipsoid</em>, <em>electron</em>, <em>peri</em>, <em>wavepacket</em>, <em>line</em>, <em>tri</em>, and
<em>body</em> styles, which define finite-size particles. See <a class="reference internal" href="Section_howto.html#howto-14"><span>Section_howto 14</span></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 class="reference internal" href="mass.html"><em>mass</em></a> command, The finite-size
particle styles assign mass to individual particles on a per-particle
basis.</p>
<p>For the <em>sphere</em> 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 <em>ellipsoid</em> 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 <em>dipole</em> style, a point dipole is defined for each point
+particle. Note that if you wish the particles to be finite-size
+spheres as in a Stockmayer potential for a dipolar fluid, so that the
+particles can rotate due to dipole-dipole interactions, then you need
+to use atom_style hybrid sphere dipole, which will assign both a
+diameter and dipole moment to each particle.</p>
<p>For the <em>electron</em> 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 <em>peri</em> style, the particles are spherical and each stores a
per-particle mass and volume.</p>
<p>The <em>meso</em> style is for smoothed particle hydrodynamics (SPH)
particles which store a density (rho), energy (e), and heat capacity
(cv).</p>
<p>The <em>smd</em> 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 <em>wavepacket</em> style is similar to <em>electron</em>, 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 <em>etag</em> values.</p>
<p>For the <em>line</em> 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 <em>tri</em> 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 <em>template</em> style allows molecular topolgy (bonds,angles,etc) to be
defined via a molecule template using the <a class="reference external" 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
<em>template</em> style instead of the <em>bond</em>, <em>angle</em>, <em>molecular</em> 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 class="reference internal" href="#grime"><span>(Grime)</span></a>, for examples of how this
can be advantageous for large-scale coarse-grained systems.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When using the <em>template</em> style with a <a class="reference internal" href="molecule.html"><em>molecule template</em></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 class="reference internal" href="read_data.html"><em>read_data</em></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>
</div>
<p>For the <em>body</em> style, the particles are arbitrary bodies with internal
attributes defined by the “style” of the bodies, which is specified by
the <em>bstyle</em> 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 class="reference internal" href="body.html"><em>body</em></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
<em>bstyle</em> specification, in the atom_style body command. These
arguments are described in the <a class="reference internal" href="body.html"><em>body</em></a> doc page.</p>
<hr class="docutils" />
<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 <em>charge</em> style.
If some atoms have bonds, but others do not, use the <em>bond</em> style.</p>
<p>The only scenario where the <em>hybrid</em> 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>
+example, as mentioned above, if you want dipolar particles which will
+rotate due to torque, you 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 <em>hybrid</em> style, you cannot combine the <em>template</em> 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 class="reference internal" href="Section_modify.html"><em>this section</em></a>.</p>
<hr class="docutils" />
<p>Styles with a <em>cuda</em> or <em>kk</em> 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 class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></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 class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></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 class="reference internal" href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <a class="reference internal" href="suffix.html"><em>suffix</em></a> command in your input script.</p>
<p>See <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>This command cannot be used after the simulation box is defined by a
<a class="reference internal" href="read_data.html"><em>read_data</em></a> or <a class="reference internal" href="create_box.html"><em>create_box</em></a> command.</p>
<p>The <em>angle</em>, <em>bond</em>, <em>full</em>, <em>molecular</em>, and <em>template</em> styles are
part of the MOLECULE package. The <em>line</em> and <em>tri</em> styles are part
of the ASPHERE pacakge. The <em>body</em> style is part of the BODY package.
The <em>dipole</em> style is part of the DIPOLE package. The <em>peri</em> style is
part of the PERI package for Peridynamics. The <em>electron</em> style is
part of the USER-EFF package for <a class="reference internal" href="pair_eff.html"><em>electronic force fields</em></a>. The <em>meso</em> style is part of the USER-SPH
package for smoothed particle hydrodyanmics (SPH). See <a class="reference external" href="USER/sph/SPH_LAMMPS_userguide.pdf">this PDF guide</a> to using SPH in LAMMPS. The
<em>wavepacket</em> style is part of the USER-AWPMD package for the
<a class="reference internal" href="pair_awpmd.html"><em>antisymmetrized wave packet MD method</em></a>. They are
only enabled if LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
style = {angle} or {atomic} or {body} or {bond} or {charge} or {dipole} or \
{electron} or {ellipsoid} or {full} or {line} or {meso} or \
{molecular} or {peri} or {smd} or {sphere} or {tri} or \
{template} or {hybrid} :ulb,l
args = none for any style except {body} and {hybrid}
{body} args = bstyle bstyle-args
bstyle = style of body particles
bstyle-args = additional arguments specific to the bstyle
see the "body"_body.html doc page for details
{template} args = template-ID
template-ID = ID of molecule template specified in a separate "molecule"_molecule.html command
{hybrid} args = list of one or more sub-styles, each with their args :pre
accelerated styles (with same args) = {angle/cuda} or {angle/kk} or {atomic/cuda} or {atomic/kk} or {bond/kk} or {charge/cuda} or {charge/kk} or {full/cuda} or {full/kk} or {molecular/kk} :l
:ule
[Examples:]
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
[Description:]
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 "read_data"_read_data.html,
"read_restart"_read_restart.html, or "create_box"_create_box.html
command.
Once a style is assigned, it cannot be changed, so use a style general
enough to encompass all attributes. E.g. with style {bond}, 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.
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 "read_data"_read_data.html command.
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
"read_data"_read_data.html, "create_atoms"_create_atoms.html, and
"set"_set.html commands for info on how to set these various
quantities.
{angle} | bonds and angles | bead-spring polymers with stiffness |
{atomic} | only the default values | coarse-grain liquids, solids, metals |
<h1>Body particles<a class="headerlink" href="#body-particles" title="Permalink to this headline">¶</a></h1>
<p><strong>Overview:</strong></p>
<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 <a class="reference internal" href="Section_howto.html#howto-14"><span>Section_howto 14</span></a> for a general overview of all these
particle types.</p>
<p>Body particles are used via the <a class="reference internal" href="atom_style.html"><em>atom_style body</em></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 <a class="reference internal" href="atom_style.html"><em>atom_style body</em></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>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="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 <a class="reference internal" href="Section_modify.html#mod-12"><span>Section_modify 12</span></a> for details on how to add a new body
style to the code.</p>
<hr class="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
<a class="reference internal" href="fix_rigid.html"><em>fix rigid</em></a> command. Any of the numerous pair styles
that compute interactions between simpler particles can be used. The
<a class="reference internal" href="fix_rigid.html"><em>fix rigid</em></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 <a class="reference internal" href="fix_rigid.html"><em>fix rigid</em></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 <a class="reference internal" href="fix_rigid.html"><em>fix rigid</em></a> command can already calculate. For
example, if particles have one or more of the following attributes:</p>
<ul class="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
<td>output body particle attributes as an image</td>
</tr>
</tbody>
</table>
<p>The pair styles defined for use with specific body styles are listed
in the sections below.</p>
<hr class="docutils" />
<p><strong>Specifics of body style nparticle:</strong></p>
<p>The <em>nparticle</em> body style represents body particles as a rigid body
with a variable number N of sub-particles. It is provided as a
vanillia, prototypical example of a body particle, although as
mentioned above, the <a class="reference internal" href="fix_rigid.html"><em>fix rigid</em></a> command already
duplicates its functionality.</p>
<p>The atom_style body command for this body style takes two additional
arguments:</p>
<div class="highlight-python"><div class="highlight"><pre>atom_style body nparticle Nmin Nmax
Nmin = minimum # of sub-particles in any body in the system
Nmax = maximum # of sub-particles in any body in the system
</pre></div>
</div>
<p>The Nmin and Nmax arguments are used to bound the size of data
structures used internally by each particle.</p>
<p>When the <a class="reference internal" href="read_data.html"><em>read_data</em></a> command reads a data file for this
body style, the following information must be provided for each entry
in the <em>Bodies</em> section of the data file:</p>
<div class="highlight-python"><div class="highlight"><pre>atom-ID 1 M
N
ixx iyy izz ixy ixz iyz
x1 y1 z1
...
xN yN zN
</pre></div>
</div>
<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 <a class="reference internal" href="read_data.html"><em>read_data</em></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 <a class="reference internal" href="pair_body.html"><em>pair_style body</em></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 <a class="reference internal" href="compute_body_local.html"><em>compute body/local</em></a> and <a class="reference internal" href="dump.html"><em>dump local</em></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>
<div class="highlight-python"><div class="highlight"><pre>1 = x position of sub-particle
2 = y position of sub-particle
3 = z position of sub-particle
</pre></div>
</div>
<p>These values are the current position of the sub-particle 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 <a class="reference internal" href="dump_image.html"><em>dump image</em></a> command, if the
-<em>body</em> keyword is set to <em>yes</em>, then each body particle is drawn as a
+<em>body</em> keyword is set, then each body particle is drawn as a
collection of spheres, one for each sub-particle. The size of each
sphere is determined by the <em>bflag1</em> parameter for the <em>body</em> keyword.
The <em>bflag2</em> argument is ignored.</p>
<hr class="docutils" />
<p><strong>Specifics of body style rounded/polygon:</strong></p>
<p>The <em>rounded/polygon</em> body style represents body particles as a convex
polygon with a variable number N > 2 of vertices, which can only be
used for 2d models. One example use of this body style is for 2d
discrete element models, as described in <a class="reference internal" href="pair_body_rounded_polygon.html#fraige"><span>Fraige</span></a>. Similar to
body style <em>nparticle</em>, the atom_style body command for this body
style takes two additional arguments:</p>
<div class="highlight-python"><div class="highlight"><pre>atom_style body rounded/polygon Nmin Nmax
Nmin = minimum # of vertices in any body in the system
Nmax = maximum # of vertices in any body in the system
</pre></div>
</div>
<p>The Nmin and Nmax arguments are used to bound the size of data
structures used internally by each particle.</p>
<p>When the <a class="reference internal" href="read_data.html"><em>read_data</em></a> command reads a data file for this
body style, the following information must be provided for each entry
in the <em>Bodies</em> section of the data file:</p>
<div class="highlight-python"><div class="highlight"><pre>atom-ID 1 M
N
ixx iyy izz ixy ixz iyz
x1 y1 z1
...
xN yN zN
i j j k k ...
radius
</pre></div>
</div>
<p>N is the number of vertices in the body particle. M = 6 + 3*N + 2*N +
1. 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
vertices (x1 to zN) as 3N values, followed by 2N vertex indices
corresponding to the end points of the N edges, followed by a single
radius value = the smallest circle encompassing the polygon. That
last value is used to facilitate the body/body contact detection.
These floating-point values can be listed on as many lines as you
wish; see the <a class="reference internal" href="read_data.html"><em>read_data</em></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 vertex 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.</p>
<p>For example, the following information would specify a square
can be used with this body style to compute body/body interactions.</p>
<p>For output purposes via the <a class="reference internal" href="compute_body_local.html"><em>compute body/local</em></a> and <a class="reference internal" href="dump.html"><em>dump local</em></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>
<div class="highlight-python"><div class="highlight"><pre>1 = x position of vertex
2 = y position of vertex
3 = z position of vertex
</pre></div>
</div>
<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 <a class="reference internal" href="dump_image.html"><em>dump image</em></a> command, if the
-<em>body</em> keyword is set to <em>yes</em>, 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 <a class="reference external" href="pair_body_rounded_polygon.cpp">pair_style rounded/polygon</a> defines finite-size
+<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 <a class="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>
<hr class="docutils" />
<p id="fraige"><strong>(Fraige)</strong> F. Y. Fraige, P. A. Langston, A. J. Matchett, J. Dodds,
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>compute command<a class="headerlink" href="#compute-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute ID group-ID style args
</pre></div>
</div>
<ul class="simple">
<li>ID = user-assigned name for the computation</li>
<li>group-ID = ID of the group of atoms to perform the computation on</li>
<li>style = one of a list of possible style names (see below)</li>
<li>args = arguments used by a particular style</li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute 1 all temp
compute newtemp flow temp/partial 1 1 0
compute 3 all ke/atom
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Define a computation that will be performed on a group of atoms.
Quantities calculated by a compute are instantaneous values, meaning
they are calculated from information about atoms on the current
timestep or iteration, though a compute may internally store some
information about a previous state of the system. Defining a compute
does not perform a computation. Instead computes are invoked by other
LAMMPS commands as needed, e.g. to calculate a temperature needed for
a thermostat fix or to generate thermodynamic or dump file output.
See this <a class="reference internal" href="Section_howto.html#howto-15"><span>howto section</span></a> for a summary of
various LAMMPS output options, many of which involve computes.</p>
<p>The ID of a compute can only contain alphanumeric characters and
underscores.</p>
<hr class="docutils" />
<p>Computes calculate one of three styles of quantities: global,
per-atom, or local. A global quantity is one or more system-wide
values, e.g. the temperature of the system. A per-atom quantity is
one or more values per atom, e.g. the kinetic energy of each atom.
Per-atom values are set to 0.0 for atoms not in the specified compute
group. Local quantities are calculated by each processor based on the
atoms it owns, but there may be zero or more per atom, e.g. a list of
bond distances. Computes that produce per-atom quantities have the
word “atom” in their style, e.g. <em>ke/atom</em>. Computes that produce
local quantities have the word “local” in their style,
e.g. <em>bond/local</em>. Styles with neither “atom” or “local” in their
style produce global quantities.</p>
<p>Note that a single compute produces either global or per-atom or local
-quantities, but never more than one of these.</p>
+quantities, but never more than one of these (with only a few
+exceptions, as documented by individual compute commands).</p>
<p>Global, per-atom, and local quantities each come in three kinds: a
single scalar value, a vector of values, or a 2d array of values. The
doc page for each compute describes the style and kind of values it
produces, e.g. a per-atom vector. Some computes produce more than one
kind of a single style, e.g. a global scalar and a global vector.</p>
<p>When a compute quantity is accessed, as in many of the output commands
discussed below, it can be referenced via the following bracket
notation, where ID is the ID of the compute:</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>c_ID</td>
<td>entire scalar, vector, or array</td>
</tr>
<tr class="row-even"><td>c_ID[I]</td>
<td>one element of vector, one column of array</td>
</tr>
<tr class="row-odd"><td>c_ID[I][J]</td>
<td>one element of array</td>
</tr>
</tbody>
</table>
<p>In other words, using one bracket reduces the dimension of the
quantity once (vector -> scalar, array -> vector). Using two brackets
reduces the dimension twice (array -> scalar). Thus a command that
uses scalar compute values as input can also process elements of a
vector or array.</p>
<p>Note that commands and <a class="reference internal" href="variable.html"><em>variables</em></a> which use compute
quantities typically do not allow for all kinds, e.g. a command may
require a vector of values, not a scalar. This means there is no
ambiguity about referring to a compute quantity as c_ID even if it
produces, for example, both a scalar and vector. The doc pages for
various commands explain the details.</p>
<hr class="docutils" />
<p>In LAMMPS, the values generated by a compute can be used in several
ways:</p>
<ul class="simple">
<li>The results of computes that calculate a global temperature or
pressure can be used by fixes that do thermostatting or barostatting
or when atom velocities are created.</li>
<li>Global values can be output via the <a class="reference internal" href="thermo_style.html"><em>thermo_style custom</em></a> or <a class="reference internal" href="fix_ave_time.html"><em>fix ave/time</em></a> command.
Or the values can be referenced in a <a class="reference internal" href="variable.html"><em>variable equal</em></a> or
<li>Per-atom values can be output via the <a class="reference internal" href="dump.html"><em>dump custom</em></a> command
or the <a class="reference internal" href="fix_ave_spatial.html"><em>fix ave/spatial</em></a> command. Or they can be
time-averaged via the <a class="reference internal" href="fix_ave_atom.html"><em>fix ave/atom</em></a> command or
reduced by the <a class="reference internal" href="compute_reduce.html"><em>compute reduce</em></a> command. Or the
per-atom values can be referenced in an <a class="reference internal" href="variable.html"><em>atom-style variable</em></a>.</li>
<li>Local values can be reduced by the <a class="reference internal" href="compute_reduce.html"><em>compute reduce</em></a> command, or histogrammed by the <a class="reference internal" href="fix_ave_histo.html"><em>fix ave/histo</em></a> command, or output by the <a class="reference internal" href="dump.html"><em>dump local</em></a> command.</li>
</ul>
<p>The results of computes that calculate global quantities can be either
“intensive” or “extensive” values. Intensive means the value is
independent of the number of atoms in the simulation,
e.g. temperature. Extensive means the value scales with the number of
atoms in the simulation, e.g. total rotational kinetic energy.
<a class="reference internal" href="thermo_style.html"><em>Thermodynamic output</em></a> will normalize extensive
values by the number of atoms in the system, depending on the
“thermo_modify norm” setting. It will not normalize intensive values.
If a compute value is accessed in another way, e.g. by a
<a class="reference internal" href="variable.html"><em>variable</em></a>, you may want to know whether it is an
intensive or extensive value. See the doc page for individual
computes for further info.</p>
<hr class="docutils" />
<p>LAMMPS creates its own computes internally for thermodynamic output.
Three computes are always created, named “thermo_temp”,
“thermo_press”, and “thermo_pe”, as if these commands had been invoked
in the input script:</p>
<div class="highlight-python"><div class="highlight"><pre>compute thermo_temp all temp
compute thermo_press all pressure thermo_temp
compute thermo_pe all pe
</pre></div>
</div>
<p>Additional computes for other quantities are created if the thermo
<p>Fixes that calculate temperature or pressure, i.e. for thermostatting
or barostatting, may also create computes. These are discussed in the
documentation for specific <a class="reference internal" href="fix.html"><em>fix</em></a> commands.</p>
<p>In all these cases, the default computes LAMMPS creates can be
replaced by computes defined by the user in the input script, as
described by the <a class="reference internal" href="thermo_modify.html"><em>thermo_modify</em></a> and <a class="reference internal" href="fix_modify.html"><em>fix modify</em></a> commands.</p>
<p>Properties of either a default or user-defined compute can be modified
via the <a class="reference internal" href="compute_modify.html"><em>compute_modify</em></a> command.</p>
<p>Computes can be deleted with the <a class="reference internal" href="uncompute.html"><em>uncompute</em></a> command.</p>
<p>Code for new computes can be added to LAMMPS (see <a class="reference internal" href="Section_modify.html"><em>this section</em></a> of the manual) and the results of their
calculations accessed in the various ways described above.</p>
<hr class="docutils" />
<p>Each compute style has its own doc page which describes its arguments
and what it does. Here is an alphabetic list of compute styles
available in LAMMPS. They are also given in more compact form in the
Compute section of <a class="reference internal" href="Section_commands.html#cmd-5"><span>this page</span></a>.</p>
<p>There are also additional compute styles (not listed here) submitted
by users which are included in the LAMMPS distribution. The list of
these with links to the individual styles are given in the compute
section of <a class="reference internal" href="Section_commands.html#cmd-5"><span>this page</span></a>.</p>
<ul class="simple">
<li><a class="reference internal" href="compute_bond_local.html"><em>angle/local</em></a> - theta and energy of each angle</li>
<li><a class="reference internal" href="compute_angmom_chunk.html"><em>angmom/chunk</em></a> - angular momentum for each chunk</li>
<li><a class="reference internal" href="compute_body_local.html"><em>body/local</em></a> - attributes of body sub-particles</li>
<li><a class="reference internal" href="compute_bond_local.html"><em>bond/local</em></a> - distance and energy of each bond</li>
<li><a class="reference internal" href="compute_centro_atom.html"><em>centro/atom</em></a> - centro-symmetry parameter for each atom</li>
<li><a class="reference internal" href="compute_chunk_atom.html"><em>chunk/atom</em></a> - assign chunk IDs to each atom</li>
<li><a class="reference internal" href="compute_cluster_atom.html"><em>cluster/atom</em></a> - cluster ID for each atom</li>
<li><a class="reference internal" href="compute_cna_atom.html"><em>cna/atom</em></a> - common neighbor analysis (CNA) for each atom</li>
<li><a class="reference internal" href="compute_com.html"><em>com</em></a> - center-of-mass of group of atoms</li>
<li><a class="reference internal" href="compute_com_chunk.html"><em>com/chunk</em></a> - center-of-mass for each chunk</li>
<li><a class="reference internal" href="compute_contact_atom.html"><em>contact/atom</em></a> - contact count for each spherical particle</li>
<li><a class="reference internal" href="compute_coord_atom.html"><em>coord/atom</em></a> - coordination number for each atom</li>
<li><a class="reference internal" href="compute_damage_atom.html"><em>damage/atom</em></a> - Peridynamic damage for each atom</li>
<li><a class="reference internal" href="compute_dihedral_local.html"><em>dihedral/local</em></a> - angle of each dihedral</li>
<li><a class="reference internal" href="compute_dilatation_atom.html"><em>dilatation/atom</em></a> - Peridynamic dilatation for each atom</li>
<li><a class="reference internal" href="compute_displace_atom.html"><em>displace/atom</em></a> - displacement of each atom</li>
<li><a class="reference internal" href="compute_erotate_asphere.html"><em>erotate/asphere</em></a> - rotational energy of aspherical particles</li>
<li><a class="reference internal" href="compute_erotate_rigid.html"><em>erotate/rigid</em></a> - rotational energy of rigid bodies</li>
<li><a class="reference internal" href="compute_erotate_sphere.html"><em>erotate/sphere</em></a> - rotational energy of spherical particles</li>
<li><a class="reference internal" href="compute_erotate_sphere.html"><em>erotate/sphere/atom</em></a> - rotational energy for each spherical particle</li>
<li><a class="reference internal" href="compute_event_displace.html"><em>event/displace</em></a> - detect event on atom displacement</li>
<li><a class="reference internal" href="compute_group_group.html"><em>group/group</em></a> - energy/force between two groups of atoms</li>
<li><a class="reference internal" href="compute_gyration.html"><em>gyration</em></a> - radius of gyration of group of atoms</li>
<li><a class="reference internal" href="compute_gyration_chunk.html"><em>gyration/chunk</em></a> - radius of gyration for each chunk</li>
<li><a class="reference internal" href="compute_heat_flux.html"><em>heat/flux</em></a> - heat flux through a group of atoms</li>
<li><a class="reference internal" href="compute_hexorder_atom.html"><em>hexorder/atom</em></a> - bond orientational order parameter q6</li>
<li><a class="reference internal" href="compute_improper_local.html"><em>improper/local</em></a> - angle of each improper</li>
<li><a class="reference internal" href="compute_inertia_chunk.html"><em>inertia/chunk</em></a> - inertia tensor for each chunk</li>
<li><a class="reference internal" href="compute_pe_atom.html"><em>pe/atom</em></a> - potential energy for each atom</li>
<li><a class="reference internal" href="compute_plasticity_atom.html"><em>plasticity/atom</em></a> - Peridynamic plasticity for each atom</li>
<li><a class="reference internal" href="compute_pressure.html"><em>pressure</em></a> - total pressure and pressure tensor</li>
<li><a class="reference internal" href="compute_property_atom.html"><em>property/atom</em></a> - convert atom attributes to per-atom vectors/arrays</li>
<li><a class="reference internal" href="compute_property_local.html"><em>property/local</em></a> - convert local attributes to localvectors/arrays</li>
<li><a class="reference internal" href="compute_property_chunk.html"><em>property/chunk</em></a> - extract various per-chunk attributes</li>
<li><a class="reference internal" href="compute_rdf.html"><em>rdf</em></a> - radial distribution function g(r) histogram of group of atoms</li>
<li><a class="reference internal" href="compute_reduce.html"><em>reduce</em></a> - combine per-atom quantities into a single global value</li>
<li><a class="reference internal" href="compute_reduce.html"><em>reduce/region</em></a> - same as compute reduce, within a region</li>
<li><a class="reference internal" href="compute_slice.html"><em>slice</em></a> - extract values from global vector or array</li>
<li><a class="reference internal" href="compute_sna_atom.html"><em>sna/atom</em></a> - calculate bispectrum coefficients for each atom</li>
<li><a class="reference internal" href="compute_sna_atom.html"><em>snad/atom</em></a> - derivative of bispectrum coefficients for each atom</li>
<li><a class="reference internal" href="compute_sna_atom.html"><em>snav/atom</em></a> - virial contribution from bispectrum coefficients for each atom</li>
<li><a class="reference internal" href="compute_stress_atom.html"><em>stress/atom</em></a> - stress tensor for each atom</li>
<li><a class="reference internal" href="compute_temp.html"><em>temp</em></a> - temperature of group of atoms</li>
<li><a class="reference internal" href="compute_temp_asphere.html"><em>temp/asphere</em></a> - temperature of aspherical particles</li>
<li><a class="reference internal" href="compute_temp_chunk.html"><em>temp/chunk</em></a> - temperature of each chunk</li>
<li><a class="reference internal" href="compute_temp_com.html"><em>temp/com</em></a> - temperature after subtracting center-of-mass velocity</li>
<li><a class="reference internal" href="compute_temp_deform.html"><em>temp/deform</em></a> - temperature excluding box deformation velocity</li>
<li><a class="reference internal" href="compute_temp_partial.html"><em>temp/partial</em></a> - temperature excluding one or more dimensions of velocity</li>
<li><a class="reference internal" href="compute_temp_profile.html"><em>temp/profile</em></a> - temperature excluding a binned velocity profile</li>
<li><a class="reference internal" href="compute_temp_ramp.html"><em>temp/ramp</em></a> - temperature excluding ramped velocity component</li>
<li><a class="reference internal" href="compute_temp_region.html"><em>temp/region</em></a> - temperature of a region of atoms</li>
<li><a class="reference internal" href="compute_temp_sphere.html"><em>temp/sphere</em></a> - temperature of spherical particles</li>
<li><a class="reference internal" href="compute_ti.html"><em>ti</em></a> - thermodyanmic integration free energy values</li>
<li><a class="reference internal" href="compute_torque_chunk.html"><em>torque/chunk</em></a> - torque applied on each chunk</li>
<li><a class="reference internal" href="compute_vacf.html"><em>vacf</em></a> - velocity-autocorrelation function of group of atoms</li>
<li><a class="reference internal" href="compute_vcm_chunk.html"><em>vcm/chunk</em></a> - velocity of center-of-mass for each chunk</li>
<li><a class="reference internal" href="compute_voronoi_atom.html"><em>voronoi/atom</em></a> - Voronoi volume and neighbors for each atom</li>
</ul>
<p>There are also additional compute styles submitted by users which are
included in the LAMMPS distribution. The list of these with links to
the individual styles are given in the compute section of <a class="reference internal" href="Section_commands.html#cmd-5"><span>this page</span></a>.</p>
<p>There are also additional accelerated compute styles included in the
LAMMPS distribution for faster performance on CPUs and GPUs. The list
of these with links to the individual styles are given in the pair
section of <a class="reference internal" href="Section_commands.html#cmd-5"><span>this page</span></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>compute chunk/atom command<a class="headerlink" href="#compute-chunk-atom-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<li>ID, group-ID are documented in <a class="reference internal" href="compute.html"><em>compute</em></a> command</li>
<li>chunk/atom = style name of this compute command</li>
</ul>
<pre class="literal-block">
style = <em>bin/1d</em> or <em>bin/2d</em> or <em>bin/3d</em> or <em>bin/sphere</em> or <em>type</em> or <em>molecule</em> or <em>compute/fix/variable</em>
<em>bin/1d</em> args = dim origin delta
dim = <em>x</em> or <em>y</em> or <em>z</em>
origin = <em>lower</em> or <em>center</em> or <em>upper</em> or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
<em>bin/2d</em> args = dim origin delta dim origin delta
dim = <em>x</em> or <em>y</em> or <em>z</em>
origin = <em>lower</em> or <em>center</em> or <em>upper</em> or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
<em>bin/3d</em> args = dim origin delta dim origin delta dim origin delta
dim = <em>x</em> or <em>y</em> or <em>z</em>
origin = <em>lower</em> or <em>center</em> or <em>upper</em> or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
dim = <em>x</em> or <em>y</em> or <em>z</em> = axis of cylinder axis
origin = <em>lower</em> or <em>center</em> or <em>upper</em> or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
c1,c2 = coords of cylinder axis in other 2 dimensions (distance units)
crmin,crmax = bin from cylinder radius rmin to rmax (distance units)
ncbin = # of concentric circle bins between rmin and rmax
<em>type</em> args = none
<em>molecule</em> args = none
<em>compute/fix/variable</em> = c_ID, c_ID[I], f_ID, f_ID[I], v_name with no args
c_ID = per-atom vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID
f_ID = per-atom vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID
v_name = per-atom vector calculated by an atom-style variable with name
</pre>
<ul class="simple">
<li>zero or more keyword/values pairs may be appended</li>
-<li>keyword = <em>region</em> or <em>nchunk</em> or <em>static</em> or <em>compress</em> or <em>bound</em> or <em>discard</em> or <em>units</em></li>
+<li>keyword = <em>region</em> or <em>nchunk</em> or <em>static</em> or <em>compress</em> or <em>bound</em> or <em>discard</em> or <em>pbc</em> or <em>units</em></li>
</ul>
<pre class="literal-block">
<em>region</em> value = region-ID
region-ID = ID of region atoms must be in to be part of a chunk
<em>nchunk</em> value = <em>once</em> or <em>every</em>
once = only compute the number of chunks once
every = re-compute the number of chunks whenever invoked
<em>limit</em> values = 0 or Nc max or Nc exact
0 = no limit on the number of chunks
Nc max = limit number of chunks to be <= Nc
Nc exact = set number of chunks to exactly Nc
<em>ids</em> value = <em>once</em> or <em>nfreq</em> or <em>every</em>
once = assign chunk IDs to atoms only once, they persist thereafter
nfreq = assign chunk IDs to atoms only once every Nfreq steps (if invoked by <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> which sets Nfreq)
every = assign chunk IDs to atoms whenever invoked
<em>compress</em> value = <em>yes</em> or <em>no</em>
yes = compress chunk IDs to eliminate IDs with no atoms
no = do not compress chunk IDs even if some IDs have no atoms
<em>discard</em> value = <em>yes</em> or <em>no</em> or <em>mixed</em>
yes = discard atoms with out-of-range chunk IDs by assigning a chunk ID = 0
no = keep atoms with out-of-range chunk IDs by assigning a valid chunk ID
mixed = keep or discard such atoms according to spatial binning rule
<em>bound</em> values = x/y/z lo hi
x/y/z = <em>x</em> or <em>y</em> or <em>z</em> to bound sptial bins in this dimension
lo = <em>lower</em> or coordinate value (distance units)
hi = <em>upper</em> or coordinate value (distance units)
+<em>pbc</em> value = <em>no</em> or <em>yes</em>
+ yes = use periodic distance for bin/sphere and bin/cylinder styles
<em>units</em> value = <em>box</em> or <em>lattice</em> or <em>reduced</em>
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute 1 all chunk/atom type
compute 1 all chunk/atom bin/1d z lower 0.02 units reduced
compute 1 all chunk/atom bin/2d z lower 1.0 y 0.0 2.5
compute 1 all chunk/atom molecule region sphere nchunk once ids once compress yes
compute 1 all chunk/atom bin/cylinder z lower 2 10 10 2.0 5.0 3 discard yes
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Define a computation that calculates an integer chunk ID from 1 to
Nchunk for each atom in the group. Values of chunk IDs are determined
by the <em>style</em> of chunk, which can be based on atom type or molecule
ID or spatial binning or a per-atom property or value calculated by
another <a class="reference internal" href="compute.html"><em>compute</em></a>, <a class="reference internal" href="fix.html"><em>fix</em></a>, or <a class="reference internal" href="variable.html"><em>atom-style variable</em></a>. Per-atom chunk IDs can be used by other
computes with “chunk” in their style name, such as <a class="reference internal" href="compute_com_chunk.html"><em>compute com/chunk</em></a> or <a class="reference internal" href="compute_msd_chunk.html"><em>compute msd/chunk</em></a>. Or they can be used by the <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> command to sum and time average a
variety of per-atom properties over the atoms in each chunk. Or they
can simply be accessed by any command that uses per-atom values from a
compute as input, as discussed in <a class="reference internal" href="Section_howto.html#howto-15"><span>Section_howto 15</span></a>.</p>
<p>See <a class="reference internal" href="Section_howto.html#howto-23"><span>Section_howto 23</span></a> for an overview of
how this compute can be used with a variety of other commands to
tabulate properties of a simulation. The howto section gives several
examples of input script commands that can be used to calculate
interesting properties.</p>
<p>Conceptually it is important to realize that this compute does two
simple things. First, it sets the value of <em>Nchunk</em> = the number of
chunks, which can be a constant value or change over time. Second, it
assigns each atom to a chunk via a chunk ID. Chunk IDs range from 1
to <em>Nchunk</em> inclusive; some chunks may have no atoms assigned to them.
Atoms that do not belong to any chunk are assigned a value of 0. Note
that the two operations are not always performed together. For
example, spatial bins can be setup once (which sets <em>Nchunk</em>), and
atoms assigned to those bins many times thereafter (setting their
chunk IDs).</p>
<p>All other commands in LAMMPS that use chunk IDs assume there are
<em>Nchunk</em> number of chunks, and that every atom is assigned to one of
those chunks, or not assigned to any chunk.</p>
<p>There are many options for specifying for how and when <em>Nchunk</em> is
calculated, and how and when chunk IDs are assigned to atoms. The
details depend on the chunk <em>style</em> and its <em>args</em>, as well as
optional keyword settings. They can also depend on whether a <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> command is using this compute, since
that command requires <em>Nchunk</em> to remain static across windows of
timesteps it specifies, while it accumulates per-chunk averages.</p>
<p>The details are described below.</p>
<p>The different chunk styles operate as follows. For each style, how it
calculates <em>Nchunk</em> and assigns chunk IDs to atoms is explained. Note
that using the optional keywords can change both of those actions, as
described further below where the keywords are discussed.</p>
<hr class="docutils" />
<p>The <em>binning</em> styles perform a spatial binning of atoms, and assign an
atom the chunk ID corresponding to the bin number it is in. <em>Nchunk</em>
is set to the number of bins, which can change if the simulation box
size changes.</p>
<p>The <em>bin/1d</em>, <em>bin/2d</em>, and <em>bin/3d</em> styles define bins as 1d layers
(slabs), 2d pencils, or 3d boxes. The <em>dim</em>, <em>origin</em>, and <em>delta</em>
settings are specified 1, 2, or 3 times. For 2d or 3d bins, there is
no restriction on specifying dim = x before dim = y or z, or dim = y
before dim = z. Bins in a particular <em>dim</em> have a bin size in that
dimension given by <em>delta</em>. In each dimension, bins are defined
relative to a specified <em>origin</em>, which may be the lower/upper edge of
the simulation box (in that dimension), or its center point, or a
specified coordinate value. Starting at the origin, sufficient bins
are created in both directions to completely span the simulation box
or the bounds specified by the optional <em>bounds</em> keyword.</p>
<p>For orthogonal simulation boxes, the bins are layers, pencils, or
boxes aligned with the xyz coordinate axes. For triclinic
(non-orthogonal) simulation boxes, the bin faces are parallel to the
tilted faces of the simulation box. See <a class="reference internal" href="Section_howto.html#howto-12"><span>this section</span></a> of the manual for a discussion of
the geometry of triclinic boxes in LAMMPS. As described there, a
tilted simulation box has edge vectors a,b,c. In that nomenclature,
bins in the x dimension have faces with normals in the “b” cross “c”
direction. Bins in y have faces normal to the “a” cross “c”
direction. And bins in z have faces normal to the “a” cross “b”
direction. Note that in order to define the size and position of
these bins in an unambiguous fashion, the <em>units</em> option must be set
to <em>reduced</em> when using a triclinic simulation box, as noted below.</p>
<p>The meaning of <em>origin</em> and <em>delta</em> for triclinic boxes is as follows.
Consider a triclinic box with bins that are 1d layers or slabs in the
x dimension. No matter how the box is tilted, an <em>origin</em> of 0.0
means start layers at the lower “b” cross “c” plane of the simulation
box and an <em>origin</em> of 1.0 means to start layers at the upper “b”
cross “c” face of the box. A <em>delta</em> value of 0.1 in <em>reduced</em> units
means there will be 10 layers from 0.0 to 1.0, regardless of the
current size or shape of the simulation box.</p>
<p>The <em>bin/sphere</em> style defines a set of spherical shell bins around
the origin (<em>xorig</em>,*yorig*,*zorig*), using <em>nsbin</em> bins with radii
equally spaced between <em>srmin</em> and <em>srmax</em>. This is effectively a 1d
vector of bins. For example, if <em>srmin</em> = 1.0 and <em>srmax</em> = 10.0 and
<em>nsbin</em> = 9, then the first bin spans 1.0 < r < 2.0, and the last bin
spans 9.0 < r 10.0. The geometry of the bins is the same whether the
simulation box is orthogonal or triclinic; i.e. the spherical shells
are not tilted or scaled differently in different dimensions to
transform them into ellipsoidal shells.</p>
<p>The <em>bin/cylinder</em> style defines bins for a cylinder oriented along
the axis <em>dim</em> with the axis coordinates in the other two radial
dimensions at (<em>c1</em>,*c2*). For dim = x, c1/c2 = y/z; for dim = y,
c1/c2 = x/z; for dim = z, c1/c2 = x/y. This is effectively a 2d array
of bins. The first dimension is along the cylinder axis, the second
dimension is radially outward from the cylinder axis. The bin size
and positions along the cylinder axis are specified by the <em>origin</em>
and <em>delta</em> values, the same as for the <em>bin/1d</em>, <em>bin/2d</em>, and
<em>bin/3d</em> styles. There are <em>ncbin</em> concentric circle bins in the
radial direction from the cylinder axis with radii equally spaced
between <em>crmin</em> and <em>crmax</em>. For example, if <em>crmin</em> = 1.0 and
<em>crmax</em> = 10.0 and <em>ncbin</em> = 9, then the first bin spans 1.0 < r <
2.0, and the last bin spans 9.0 < r 10.0. The geometry of the bins in
the radial dimensions is the same whether the simulation box is
orthogonal or triclinic; i.e. the concetric circles are not tilted or
scaled differently in the two different dimensions to transform them
into ellipses.</p>
<p>The created bins (and hence the chunk IDs) are numbered consecutively
from 1 to the number of bins = <em>Nchunk</em>. For <em>bin2d</em> and <em>bin3d</em>, the
numbering varies most rapidly in the first dimension (which could be
x, y, or z), next rapidly in the 2nd dimension, and most slowly in the
3rd dimension. For <em>bin/sphere</em>, the bin with smallest radii is chunk
1 and the bni with largest radii is chunk Nchunk = <em>ncbin</em>. For
<em>bin/cylinder</em>, the numbering varies most rapidly in the dimension
along the cylinder axis and most slowly in the radial direction.</p>
<p>Each time this compute is invoked, each atom is mapped to a bin based
on its current position. Note that between reneighboring timesteps,
atoms can move outside the current simulation box. If the box is
periodic (in that dimension) the atom is remapping into the periodic
box for purposes of binning. If the box in not periodic, the atom may
have moved outside the bounds of all bins. If an atom is not inside
any bin, the <em>discard</em> keyword is used to determine how a chunk ID is
assigned to the atom.</p>
<hr class="docutils" />
<p>The <em>type</em> style uses the atom type as the chunk ID. <em>Nchunk</em> is set
to the number of atom types defined for the simulation, e.g. via the
<a class="reference internal" href="create_box.html"><em>create_box</em></a> or <a class="reference internal" href="read_data.html"><em>read_data</em></a> commands.</p>
<hr class="docutils" />
<p>The <em>molecule</em> style uses the molecule ID of each atom as its chunk
ID. <em>Nchunk</em> is set to the largest chunk ID. Note that this excludes
molecule IDs for atoms which are not in the specified group or
optional region.</p>
<p>There is no requirement that all atoms in a particular molecule are
assigned the same chunk ID (zero or non-zero), though you probably
want that to be the case, if you wish to compute a per-molecule
property. LAMMPS will issue a warning if that is not the case, but
only the first time that <em>Nchunk</em> is calculated.</p>
<p>Note that atoms with a molecule ID = 0, which may be non-molecular
solvent atoms, have an out-of-range chunk ID. These atoms are
discarded (not assigned to any chunk) or assigned to <em>Nchunk</em>,
depending on the value of the <em>discard</em> keyword.</p>
<hr class="docutils" />
<p>The <em>compute/fix/variable</em> styles set the chunk ID of each atom based
on a quantity calculated and stored by a compute, fix, or variable.
In each case, it must be a per-atom quantity. In each case the
referenced floating point values are converted to an integer chunk ID
as follows. The floating point value is truncated (rounded down) to
an integer value. If the integer value is <= 0, then a chunk ID of 0
is assigned to the atom. If the integer value is > 0, it becomes the
chunk ID to the atom. <em>Nchunk</em> is set to the largest chunk ID. Note
that this excludes atoms which are not in the specified group or
optional region.</p>
<p>If the style begins with “<a href="#id1"><span class="problematic" id="id2">c_</span></a>”, a compute ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the compute is used. Users can also write code for
their own compute styles and <a class="reference internal" href="Section_modify.html"><em>add them to LAMMPS</em></a>.</p>
<p>If the style begins with “<a href="#id3"><span class="problematic" id="id4">f_</span></a>”, a fix ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the fix is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the fix is used. Note that some fixes only produce
their values on certain timesteps, which must be compatible with the
timestep on which this compute accesses the fix, else an error
results. Users can also write code for their own fix styles and <a class="reference internal" href="Section_modify.html"><em>add them to LAMMPS</em></a>.</p>
<p>If a value begins with “<a href="#id5"><span class="problematic" id="id6">v_</span></a>”, a variable name for an <em>atom</em> or
<em>atomfile</em> style <a class="reference internal" href="variable.html"><em>variable</em></a> must follow which has been
previously defined in the input script. Variables of style <em>atom</em> can
reference thermodynamic keywords and various per-atom attributes, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of generating per-atom quantities to
treat as a chunk ID.</p>
<p>Normally, <em>Nchunk</em> = the number of chunks, is re-calculated every time
this fix is invoked, though the value may or may not change. As
explained below, the <em>nchunk</em> keyword can be set to <em>once</em> which means
<em>Nchunk</em> will never change.</p>
<p>If a <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> command uses this compute, it
can also turn off the re-calculation of <em>Nchunk</em> for one or more
windows of timesteps. The extent of the windows, during which Nchunk
is held constant, are determined by the <em>Nevery</em>, <em>Nrepeat</em>, <em>Nfreq</em>
values and the <em>ave</em> keyword setting that are used by the <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> command.</p>
<p>Specifically, if <em>ave</em> = <em>one</em>, then for each span of <em>Nfreq</em>
timesteps, <em>Nchunk</em> is held constant between the first timestep when
averaging is done (within the Nfreq-length window), and the last
timestep when averaging is done (multiple of Nfreq). If <em>ave</em> =
<em>running</em> or <em>window</em>, then <em>Nchunk</em> is held constant forever,
starting on the first timestep when the <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> command invokes this compute.</p>
<p>Note that multiple <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> commands can use
the same compute chunk/atom compute. However, the time windows they
induce for holding <em>Nchunk</em> constant must be identical, else an error
will be generated.</p>
<p>The various optional keywords operate as follows. Note that some of
them function differently or are ignored by different chunk styles.
Some of them also have different default values, depending on
the chunk style, as listed below.</p>
<p>The <em>region</em> keyword applies to all chunk styles. If used, an atom
must be in both the specified group and the specified geometric
<a class="reference internal" href="region.html"><em>region</em></a> to be assigned to a chunk.</p>
<hr class="docutils" />
<p>The <em>nchunk</em> keyword applies to all chunk styles. It specifies how
often <em>Nchunk</em> is recalculated, which in turn can affect the chunk IDs
assigned to individual atoms.</p>
<p>If <em>nchunk</em> is set to <em>once</em>, then <em>Nchunk</em> is only calculated once,
the first time this compute is invoked. If <em>nchunk</em> is set to
<em>every</em>, then <em>Nchunk</em> is re-calculated every time the compute is
invoked. Note that, as described above, the use of this compute
by the <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> command can override
the <em>every</em> setting.</p>
<p>The default values for <em>nchunk</em> are listed below and depend on the
chunk style and other system and keyword settings. They attempt to
represent typical use cases for the various chunk styles. The
<em>nchunk</em> value can always be set explicitly if desired.</p>
<hr class="docutils" />
<p>The <em>limit</em> keyword can be used to limit the calculated value of
<em>Nchunk</em> = the number of chunks. The limit is applied each time
<em>Nchunk</em> is calculated, which also limits the chunk IDs assigned to
any atom. The <em>limit</em> keyword is used by all chunk styles except the
<em>binning</em> styles, which ignore it. This is because the number of bins
can be tailored using the <em>bound</em> keyword (described below) which
effectively limits the size of <em>Nchunk</em>.</p>
<p>If <em>limit</em> is set to <em>Nc</em> = 0, then no limit is imposed on <em>Nchunk</em>,
though the <em>compress</em> keyword can still be used to reduce <em>Nchunk</em>, as
described below.</p>
<p>If <em>Nc</em> > 0, then the effect of the <em>limit</em> keyword depends on whether
the <em>compress</em> keyword is also used with a setting of <em>yes</em>, and
whether the <em>compress</em> keyword is specified before the <em>limit</em> keyword
or after.</p>
<p>In all cases, <em>Nchunk</em> is first calculated in the usual way for each
chunk style, as described above.</p>
<p>First, here is what occurs if <em>compress yes</em> is not set. If <em>limit</em>
is set to <em>Nc max</em>, then <em>Nchunk</em> is reset to the smaller of <em>Nchunk</em>
and <em>Nc</em>. If <em>limit</em> is set to <em>Nc exact</em>, then <em>Nchunk</em> is reset to
<em>Nc</em>, whether the original <em>Nchunk</em> was larger or smaller than <em>Nc</em>.
If <em>Nchunk</em> shrank due to the <em>limit</em> setting, then atom chunk IDs >
<em>Nchunk</em> will be reset to 0 or <em>Nchunk</em>, depending on the setting of
the <em>discard</em> keyword. If <em>Nchunk</em> grew, there will simply be some
chunks with no atoms assigned to them.</p>
<p>If <em>compress yes</em> is set, and the <em>compress</em> keyword comes before the
<em>limit</em> keyword, the compression operation is performed first, as
described below, which resets <em>Nchunk</em>. The <em>limit</em> keyword is then
applied to the new <em>Nchunk</em> value, exactly as described in the
preceeding paragraph. Note that in this case, all atoms will end up
with chunk IDs <= <em>Nc</em>, but their original values (e.g. molecule ID or
compute/fix/variable value) may have been > <em>Nc</em>, because of the
compression operation.</p>
<p>If <em>compress yes</em> is set, and the <em>compress</em> keyword comes after the
<em>limit</em> keyword, then the <em>limit</em> value of <em>Nc</em> is applied first to
the uncompressed value of <em>Nchunk</em>, but only if <em>Nc</em> < <em>Nchunk</em>
(whether <em>Nc max</em> or <em>Nc exact</em> is used). This effectively means all
atoms with chunk IDs > <em>Nc</em> have their chunk IDs reset to 0 or <em>Nc</em>,
depending on the setting of the <em>discard</em> keyword. The compression
operation is then performed, which may shrink <em>Nchunk</em> further. If
the new <em>Nchunk</em> < <em>Nc</em> and <em>limit</em> = <em>Nc exact</em> is specified, then
<em>Nchunk</em> is reset to <em>Nc</em>, which results in extra chunks with no atoms
assigned to them. Note that in this case, all atoms will end up with
chunk IDs <= <em>Nc</em>, and their original values (e.g. molecule ID or
compute/fix/variable value) will also have been <= <em>Nc</em>.</p>
<hr class="docutils" />
<p>The <em>ids</em> keyword applies to all chunk styles. If the setting is
<em>once</em> then the chunk IDs assigned to atoms the first time this
compute is invoked will be permanent, and never be re-computed.</p>
<p>If the setting is <em>nfreq</em> and if a <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a>
command is using this compute, then in each of the <em>Nchunk</em> = constant
time windows (discussed above), the chunk ID’s assigned to atoms on
the first step of the time window will persist until the end of the
time window.</p>
<p>If the setting is <em>every</em>, which is the default, then chunk IDs are
re-calculated on any timestep this compute is invoked.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you want the persistent chunk-IDs calculated by this compute
to be continuous when running from a <a class="reference internal" href="read_restart.html"><em>restart file</em></a>,
then you should use the same ID for this compute, as in the original
run. This is so that the fix this compute creates to store per-atom
quantities will also have the same ID, and thus be initialized
correctly with chunk IDs from the restart file.</p>
</div>
<hr class="docutils" />
<p>The <em>compress</em> keyword applies to all chunk styles and affects how
<em>Nchunk</em> is calculated, which in turn affects the chunk IDs assigned
to each atom. It is useful for converting a “sparse” set of chunk IDs
(with many IDs that have no atoms assigned to them), into a “dense”
set of IDs, where every chunk has one or more atoms assigned to it.</p>
<p>Two possible use cases are as follows. If a large simulation box is
mostly empty space, then the <em>binning</em> style may produce many bins
with no atoms. If <em>compress</em> is set to <em>yes</em>, only bins with atoms
will be contribute to <em>Nchunk</em>. Likewise, the <em>molecule</em> or
<em>compute/fix/variable</em> styles may produce large <em>Nchunk</em> values. For
example, the <a class="reference internal" href="compute_cluster_atom.html"><em>compute cluster/atom</em></a> command
assigns every atom an atom ID for one of the atoms it is clustered
with. For a million-atom system with 5 clusters, there would only be
5 unique chunk IDs, but the largest chunk ID might be 1 million,
resulting in <em>Nchunk</em> = 1 million. If <em>compress</em> is set to <em>yes</em>,
<em>Nchunk</em> will be reset to 5.</p>
<p>If <em>compress</em> is set to <em>no</em>, which is the default, no compression is
done. If it is set to <em>yes</em>, all chunk IDs with no atoms are removed
from the list of chunk IDs, and the list is sorted. The remaining
chunk IDs are renumbered from 1 to <em>Nchunk</em> where <em>Nchunk</em> is the new
length of the list. The chunk IDs assigned to each atom reflect
the new renumbering from 1 to <em>Nchunk</em>.</p>
<p>The original chunk IDs (before renumbering) can be accessed by the
<a class="reference internal" href="compute_property_chunk.html"><em>compute property/chunk</em></a> command and its
<em>id</em> keyword, or by the <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> command
which outputs the original IDs as one of the columns in its global
output array. For example, using the “compute cluster/atom” command
discussed above, the original 5 unique chunk IDs might be atom IDs
(27,4982,58374,857838,1000000). After compresion, these will be
renumbered to (1,2,3,4,5). The original values (27,...,1000000) can
be output to a file by the <a class="reference internal" href="fix_ave_chunk.html"><em>fix ave/chunk</em></a> command,
or by using the <a class="reference internal" href="fix_ave_time.html"><em>fix ave/time</em></a> command in
conjunction with the <a class="reference internal" href="compute_property_chunk.html"><em>compute property/chunk</em></a> command.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The compression operation requires global communication across
all processors to share their chunk ID values. It can require large
memory on every processor to store them, even after they are
compressed, if there are are a large number of unique chunk IDs with
atoms assigned to them. It uses a STL map to find unique chunk IDs
and store them in sorted order. Each time an atom is assigned a
compressed chunk ID, it must access the STL map. All of this means
that compression can be expensive, both in memory and CPU time. The
use of the <em>limit</em> keyword in conjunction with the <em>compress</em> keyword
can affect these costs, depending on which keyword is used first. So
use this option with care.</p>
</div>
<hr class="docutils" />
<p>The <em>discard</em> keyword applies to all chunk styles. It affects what
chunk IDs are assigned to atoms that do not match one of the valid
chunk IDs from 1 to <em>Nchunk</em>. Note that it does not apply to atoms
that are not in the specified group or optionally specified region.
Those atoms are always assigned a chunk ID = 0.</p>
<p>If the calculated chunk ID for an atom is not within the range 1 to
<em>Nchunk</em> then it is a “discard” atom. Note that <em>Nchunk</em> may have
been shrunk by the <em>limit</em> keyword. Or the <em>compress</em> keyword may
have eliminated chunk IDs that were valid before the compression took
place, and are now not in the compressed list. Also note that for the
<em>molecule</em> chunk style, if new molecules are added to the system,
their chunk IDs may exceed a previously calculated <em>Nchunk</em>.
Likewise, evaluation of a compute/fix/variable on a later timestep may
return chunk IDs that are invalid for the previously calculated
<em>Nchunk</em>.</p>
<p>All the chunk styles except the <em>binning</em> styles, must use <em>discard</em>
set to either <em>yes</em> or <em>no</em>. If <em>discard</em> is set to <em>yes</em>, which is
the default, then every “discard” atom has its chunk ID set to 0. If
<em>discard</em> is set to <em>no</em>, every “discard” atom has its chunk ID set to
<em>Nchunk</em>. I.e. it becomes part of the last chunk.</p>
<p>The <em>binning</em> styles use the <em>discard</em> keyword to decide whether to
discard atoms outside the spatial domain covered by bins, or to assign
them to the bin they are nearest to.</p>
<p>For the <em>bin/1d</em>, <em>bin/2d</em>, <em>bin/3d</em> styles the details are as
follows. If <em>discard</em> is set to <em>yes</em>, an out-of-domain atom will
have its chunk ID set to 0. If <em>discard</em> is set to <em>no</em>, the atom
will have its chunk ID set to the first or last bin in that dimension.
If <em>discard</em> is set to <em>mixed</em>, which is the default, it will only
have its chunk ID set to the first or last bin if bins extend to the
simulation box boundary in that dimension. This is the case if the
<em>bound</em> keyword settings are <em>lower</em> and <em>upper</em>, which is the
default. If the <em>bound</em> keyword settings are numeric values, then the
atom will have its chunk ID set to 0 if it is outside the bounds of
any bin. Note that in this case, it is possible that the first or
last bin extends beyond the numeric <em>bounds</em> settings, depending on
the specified <em>origin</em>. If this is the case, the chunk ID of the atom
is only set to 0 if it is outside the first or last bin, not if it is
simply outside the numeric <em>bounds</em> setting.</p>
<p>For the <em>bin/sphere</em> style the details are as follows. If <em>discard</em>
is set to <em>yes</em>, an out-of-domain atom will have its chunk ID set to
0. If <em>discard</em> is set to <em>no</em> or <em>mixed</em>, the atom will have its
chunk ID set to the first or last bin, i.e. the innermost or outermost
spherical shell. If the distance of the atom from the origin is less
than <em>rmin</em>, it will be assigned to the first bin. If the distance of
the atom from the origin is greater than <em>rmax</em>, it will be assigned
to the last bin.</p>
<p>For the <em>bin/cylinder</em> style the details are as follows. If <em>discard</em>
is set to <em>yes</em>, an out-of-domain atom will have its chunk ID set to
0. If <em>discard</em> is set to <em>no</em>, the atom will have its chunk ID set
to the first or last bin in both the radial and axis dimensions. If
<em>discard</em> is set to <em>mixed</em>, which is the default, the the radial
dimension is treated the same as for <em>discard</em> = no. But for the axis
dimensinon, it will only have its chunk ID set to the first or last
bin if bins extend to the simulation box boundary in the axis
dimension. This is the case if the <em>bound</em> keyword settings are
<em>lower</em> and <em>upper</em>, which is the default. If the <em>bound</em> keyword
settings are numeric values, then the atom will have its chunk ID set
to 0 if it is outside the bounds of any bin. Note that in this case,
it is possible that the first or last bin extends beyond the numeric
<em>bounds</em> settings, depending on the specified <em>origin</em>. If this is
the case, the chunk ID of the atom is only set to 0 if it is outside
the first or last bin, not if it is simply outside the numeric
<em>bounds</em> setting.</p>
<p>If <em>discard</em> is set to <em>no</em> or <em>mixed</em>, the atom will have its
chunk ID set to the first or last bin, i.e. the innermost or outermost
spherical shell. If the distance of the atom from the origin is less
than <em>rmin</em>, it will be assigned to the first bin. If the distance of
the atom from the origin is greater than <em>rmax</em>, it will be assigned
to the last bin.</p>
<hr class="docutils" />
<p>The <em>bound</em> keyword only applies to the <em>bin/1d</em>, <em>bin/2d</em>, <em>bin/3d</em>
styles and to the axis dimension of the <em>bin/cylinder</em> style;
otherwise it is ignored. It can be used one or more times to limit
the extent of bin coverage in a specified dimension, i.e. to only bin
a portion of the box. If the <em>lo</em> setting is <em>lower</em> or the <em>hi</em>
setting is <em>upper</em>, the bin extent in that direction extends to the
box boundary. If a numeric value is used for <em>lo</em> and/or <em>hi</em>, then
the bin extent in the <em>lo</em> or <em>hi</em> direction extends only to that
value, which is assumed to be inside (or at least near) the simulation
box boundaries, though LAMMPS does not check for this. Note that
using the <em>bound</em> keyword typically reduces the total number of bins
and thus the number of chunks <em>Nchunk</em>.</p>
+<p>The <em>pbc</em> keyword only applies to the <em>bin/sphere</em> and <em>bin/cylinder</em>
+styles. If set to <em>yes</em>, the distance an atom is from the sphere
+origin or cylinder axis is calculated in a minimum image sense with
+respect to periodic dimensions, when determining which bin the atom is
+in. I.e. if x is a periodic dimension and the distance between the
+atom and the sphere center in the x dimension is greater than 0.5 *
+simulation box length in x, then a box length is subtracted to give a
+distance < 0.5 * simulation box length. This allosws the sphere or
+cylinder center to be near a box edge, and atoms on the other side of
+the periodic box will still be close to the center point/axis. Note
+that with a setting of <em>yes</em>, the outer sphere or cylinder radius must
+also be <= 0.5 * simulation box length in any periodic dimension
+except for the cylinder axis dimension, or an error is generated.</p>
<p>The <em>units</em> keyword only applies to the <em>binning</em> styles; otherwise it
is ignored. For the <em>bin/1d</em>, <em>bin/2d</em>, <em>bin/3d</em> styles, it
determines the meaning of the distance units used for the bin sizes
<em>delta</em> and for <em>origin</em> and <em>bounds</em> values if they are coordinate
values. For the <em>bin/sphere</em> style it determines the meaning of the
distance units used for <em>xorig</em>,*yorig*,*zorig* and the radii <em>srmin</em>
and <em>srmax</em>. For the <em>bin/cylinder</em> style it determines the meaning
of the distance units used for <em>delta</em>,*c1*,*c2* and the radii <em>crmin</em>
and <em>crmax</em>.</p>
<p>For orthogonal simulation boxes, any of the 3 options may
be used. For non-orthogonal (triclinic) simulation boxes, only the
<em>reduced</em> option may be used.</p>
<p>A <em>box</em> value selects standard distance units as defined by the
<a class="reference internal" href="units.html"><em>units</em></a> command, e.g. Angstroms for units = real or metal.
A <em>lattice</em> value means the distance units are in lattice spacings.
The <a class="reference internal" href="lattice.html"><em>lattice</em></a> command must have been previously used to
define the lattice spacing. A <em>reduced</em> value means normalized
unitless values between 0 and 1, which represent the lower and upper
faces of the simulation box respectively. Thus an <em>origin</em> value of
0.5 means the center of the box in any dimension. A <em>delta</em> value of
0.1 means 10 bins span the box in that dimension.</p>
<p>Note that for the <em>bin/sphere</em> style, the radii <em>srmin</em> and <em>srmax</em> are
scaled by the lattice spacing or reduced value of the <em>x</em> dimension.</p>
<p>Note that for the <em>bin/cylinder</em> style, the radii <em>crmin</em> and <em>crmax</em>
are scaled by the lattice spacing or reduced value of the 1st
dimension perpendicular to the cylinder axis. E.g. y for an x-axis
cylinder, x for a y-axis cylinder, and x for a z-axis cylinder.</p>
<hr class="docutils" />
<p><strong>Output info:</strong></p>
<p>This compute calculates a per-atom vector, which can be accessed by
any command that uses per-atom values from a compute as input. See
<a class="reference internal" href="Section_howto.html#howto-15"><span>Section_howto 15</span></a> for an overview of
LAMMPS output options.</p>
<p>The per-atom vector values are unitless chunk IDs, ranging from 1 to
<em>Nchunk</em> (inclusive) for atoms assigned to chunks, and 0 for atoms not
belonging to a chunk.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>Even if the <em>nchunk</em> keyword is set to <em>once</em>, the chunk IDs assigned
to each atom are not stored in a restart files. This means you cannot
expect those assignments to persist in a restarted simulation.
Instead you must re-specify this command and assign atoms to chunks when
the restarted simulation begins.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>compute msd command<a class="headerlink" href="#compute-msd-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute ID group-ID msd keyword values ...
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="compute.html"><em>compute</em></a> command</li>
<li>msd = style name of this compute command</li>
<li>zero or more keyword/value pairs may be appended</li>
<li>keyword = <em>com</em> or <em>average</em></li>
</ul>
<pre class="literal-block">
<em>com</em> value = <em>yes</em> or <em>no</em>
<em>average</em> value = <em>yes</em> or <em>no</em>
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute 1 all msd
compute 1 upper msd com yes average yes
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Define a computation that calculates the mean-squared displacement
(MSD) of the group of atoms, including all effects due to atoms
passing thru periodic boundaries. For computation of the non-Gaussian
parameter of mean-squared displacement, see the <a class="reference internal" href="compute_msd_nongauss.html"><em>compute msd/nongauss</em></a> command.</p>
<p>A vector of four quantites is calculated by this compute. The first 3
elements of the vector are the squared dx,dy,dz displacements, summed
and averaged over atoms in the group. The 4th element is the total
squared displacement, i.e. (dx*dx + dy*dy + dz*dz), summed and
averaged over atoms in the group.</p>
<p>The slope of the mean-squared displacement (MSD) versus time is
proportional to the diffusion coefficient of the diffusing atoms.</p>
<p>The displacement of an atom is from its reference position. This is
normally the original position at the time
the compute command was issued, unless the <em>average</em> keyword is set to <em>yes</em>.
The value of the displacement will be
0.0 for atoms not in the specified compute group.</p>
<p>If the <em>com</em> option is set to <em>yes</em> then the effect of any drift in
the center-of-mass of the group of atoms is subtracted out before the
displacment of each atom is calculated.</p>
<p>If the <em>average</em> option is set to <em>yes</em> then the reference position of
-an atom is based on the average position of that atom,
-corrected for center-of-mass motion if requested.
-The average position
-is a running average over all previous calls to the compute, including the
-current call. So on the first call
-it is current position, on the second call it is the arithmetic average of the
-current position and the position on the first call, and so on.
-Note that when using this option, the precise value of the mean square
-displacement will depend on the number of times the compute is
-called. So, for example, changing the frequency of thermo output may
-change the computed displacement. Also, the precise values will be
-changed if a single simulation is broken up into two parts, using
-either multiple run commands or a restart file. It only makes
-sense to use this option if the atoms are not diffusing, so that
-their average positions relative to the center of mass of the system
-are stationary. The most common case is crystalline solids undergoing
-thermal motion.</p>
+an atom is based on the average position of that atom, corrected for
+center-of-mass motion if requested. The average position is a running
+average over all previous calls to the compute, including the current
+call. So on the first call it is current position, on the second call
+it is the arithmetic average of the current position and the position
+on the first call, and so on. Note that when using this option, the
+precise value of the mean square displacement will depend on the
+number of times the compute is called. So, for example, changing the
+frequency of thermo output may change the computed displacement. Also,
+the precise values will be changed if a single simulation is broken up
+into two parts, using either multiple run commands or a restart
+file. It only makes sense to use this option if the atoms are not
+diffusing, so that their average positions relative to the center of
+mass of the system are stationary. The most common case is crystalline
+solids undergoing thermal motion.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Initial coordinates are stored in “unwrapped” form, by using the
image flags associated with each atom. See the <a class="reference internal" href="dump.html"><em>dump custom</em></a> command for a discussion of “unwrapped” coordinates.
See the Atoms section of the <a class="reference internal" href="read_data.html"><em>read_data</em></a> command for a
discussion of image flags and how they are set for each atom. You can
reset the image flags (e.g. to 0) before invoking this compute by
using the <a class="reference internal" href="set.html"><em>set image</em></a> command.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you want the quantities calculated by this compute to be
continuous when running from a <a class="reference internal" href="read_restart.html"><em>restart file</em></a>, then
you should use the same ID for this compute, as in the original run.
This is so that the fix this compute creates to store per-atom
quantities will also have the same ID, and thus be initialized
correctly with atom reference positions from the restart file. When
<em>average</em> is set to yes, then the atom reference positions are
restored correctly, but not the number of samples used obtain them. As
a result, the reference positions from the restart file are combined
with subsequent positions as if they were from a single sample,
instead of many, which will change the values of msd somewhat.</p>
</div>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global vector of length 4, which can be
accessed by indices 1-4 by any command that uses global vector values
from a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span>this section</span></a> for an overview of LAMMPS output
options.</p>
<p>The vector values are “intensive”. The vector values will be in
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>compute msd/chunk command<a class="headerlink" href="#compute-msd-chunk-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute ID group-ID msd/chunk chunkID
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="compute.html"><em>compute</em></a> command</li>
<li>msd/chunk = style name of this compute command</li>
<li>chunkID = ID of <a class="reference internal" href="compute_chunk_atom.html"><em>compute chunk/atom</em></a> command</li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute 1 all msd/chunk molchunk
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Define a computation that calculates the mean-squared displacement
(MSD) for multiple chunks of atoms.</p>
<p>In LAMMPS, chunks are collections of atoms defined by a <a class="reference internal" href="compute_chunk_atom.html"><em>compute chunk/atom</em></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 class="reference internal" href="compute_chunk_atom.html"><em>compute chunk/atom</em></a> doc page and “<a class="reference internal" href="Section_howto.html#howto-23"><span>Section_howto 23</span></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>Four quantites are calculated by this compute for each chunk. The
first 3 quantities are the squared dx,dy,dz displacements of the
center-of-mass. The 4th component is the total squared displacement,
i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass. These
calculations include all effects due to atoms passing thru periodic
boundaries.</p>
<p>Note that only atoms in the specified group contribute to the
calculation. The <a class="reference internal" href="compute_chunk_atom.html"><em>compute chunk/atom</em></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 slope of the mean-squared displacement (MSD) versus time is
proportional to the diffusion coefficient of the diffusing chunks.</p>
<p>The displacement of the center-of-mass of the chunk is from its
original center-of-mass position, calculated on the timestep this
compute command was first invoked.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The number of chunks <em>Nchunk</em> calculated by the <a class="reference internal" href="compute_chunk_atom.html"><em>compute chunk/atom</em></a> command must remain constant each
time this compute is invoked, so that the displacement for each chunk
from its original position can be computed consistently. If <em>Nchunk</em>
does not remain constant, an error will be generated. If needed, you
can enforce a constant <em>Nchunk</em> by using the <em>nchunk once</em> or <em>ids
once</em> options when specifying the <a class="reference internal" href="compute_chunk_atom.html"><em>compute chunk/atom</em></a> command.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This compute stores the original position (of the
center-of-mass) of each chunk. When a displacement is calculated on a
later timestep, it is assumed that the same atoms are assigned to the
same chunk ID. However LAMMPS has no simple way to insure this is the
case, though you can use the <em>ids once</em> option when specifying the
<a class="reference internal" href="compute_chunk_atom.html"><em>compute chunk/atom</em></a> command. Note that if
this is not the case, the MSD calculation does not have a sensible
meaning.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The initial coordinates of the atoms in each chunk are stored in
“unwrapped” form, by using the image flags associated with each atom.
See the <a class="reference internal" href="dump.html"><em>dump custom</em></a> command for a discussion of
“unwrapped” coordinates. See the Atoms section of the
<a class="reference internal" href="read_data.html"><em>read_data</em></a> command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the <a class="reference internal" href="set.html"><em>set image</em></a> command.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
-<p class="last">Unlike the <a class="reference internal" href="compute_msd.html"><em>compute msd</em></a> command, this compute
-does not store the initial center-of-mass coorindates of its molecules
-in a restart file. Thus you cannot continue the MSD per chunk
-calculation of this compute when running from a <a class="reference internal" href="read_restart.html"><em>restart file</em></a>.</p>
+<p class="last">If you want the quantities calculated by this compute to be
+continuous when running from a <a class="reference internal" href="read_restart.html"><em>restart file</em></a>, then
+you should use the same ID for this compute, as in the original run.
+This is so that the fix this compute creates to store per-chunk
+quantities will also have the same ID, and thus be initialized
+correctly with chunk reference positions from the restart file.</p>
</div>
<p>The simplest way to output the results of the compute com/msd
calculation to a file is to use the <a class="reference internal" href="fix_ave_time.html"><em>fix ave/time</em></a>
command, for example:</p>
<div class="highlight-python"><div class="highlight"><pre>compute cc1 all chunk/atom molecule
<p>This compute calculates a global array where the number of rows = the
number of chunks <em>Nchunk</em> as calculated by the specified <a class="reference internal" href="compute_chunk_atom.html"><em>compute chunk/atom</em></a> command. The number of columns =
4 for dx,dy,dz and the total displacement. These values can be
accessed by any command that uses global array values from a compute
as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span>this section</span></a> for an
overview of LAMMPS output options.</p>
<p>The array values are “intensive”. The array values will be in
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<p>Coefficients parameterized by <a class="reference internal" href="#fox"><span>(Fox)</span></a> are assigned for each
atom type designating the chemical symbol and charge of each atom
type. Valid chemical symbols for compute saed are:</p>
<dl class="docutils">
<dt>H: He: Li: Be: B:</dt>
<dd><blockquote class="first">
<div>C: N: O: F: Ne:</div></blockquote>
<dl class="docutils">
<dt>Na: Mg: Al: Si: P:</dt>
<dd>S: Cl: Ar: K: Ca:</dd>
</dl>
<p class="last">Sc: Ti: V: Cr: Mn:
Fe: Co: Ni: Cu: Zn:
Ga: Ge: As: Se: Br:
Kr: Rb: Sr: Y: Zr:
Nb: Mo: Tc: Ru: Rh:
Pd: Ag: Cd: In: Sn:
Sb: Te: I: Xe: Cs:
Ba: La: Ce: Pr: Nd:
Pm: Sm: Eu: Gd: Tb:
Dy: Ho: Er: Tm: Yb:
Lu: Hf: Ta: W: Re:
Os: Ir: Pt: Au: Hg:
Tl: Pb: Bi: Po: At:
Rn: Fr: Ra: Ac: Th:
Pa: U: Np: Pu: Am:
Cm: Bk: Cf:tb(c=5,s=:)</p>
</dd>
</dl>
<p>If the <em>echo</em> keyword is specified, compute saed will provide extra
reporting information to the screen.</p>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global vector. The length of the vector is
the number of reciprocal lattice nodes that are explored by the mesh.
The entries of the global vector are the computed diffraction
intensities as described above.</p>
<p>The vector can be accessed by any command that uses global values
from a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span>this section</span></a> for an overview of LAMMPS output
options.</p>
<p>All array values calculated by this compute are “intensive”.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
+<p>This compute is part of the USER-DIFFRACTION package. It is only
+enabled if LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The compute_saed command does not work for triclinic cells.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>compute voronoi/atom command<a class="headerlink" href="#compute-voronoi-atom-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute ID group-ID voronoi/atom keyword arg ...
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="compute.html"><em>compute</em></a> command</li>
<li>voronoi/atom = style name of this compute command</li>
<li>zero or more keyword/value pairs may be appended</li>
-<li>keyword = <em>only_group</em> or <em>surface</em> or <em>radius</em> or <em>edge_histo</em> or <em>edge_threshold</em> or <em>face_threshold</em></li>
+<li>keyword = <em>only_group</em> or <em>surface</em> or <em>radius</em> or <em>edge_histo</em> or <em>edge_threshold</em>
+or <em>face_threshold</em> or <em>neighbors</em> or <em>peratom</em></li>
</ul>
<pre class="literal-block">
<em>only_group</em> = no arg
<em>occupation</em> = no arg
<em>surface</em> arg = sgroup-ID
sgroup-ID = compute the dividing surface between group-ID and sgroup-ID
this keyword adds a third column to the compute output
<em>radius</em> arg = v_r
v_r = radius atom style variable for a poly-disperse Voronoi tessellation
<em>edge_histo</em> arg = maxedge
maxedge = maximum number of Voronoi cell edges to be accounted in the histogram
<em>edge_threshold</em> arg = minlength
minlength = minimum length for an edge to be counted
<em>face_threshold</em> arg = minarea
minarea = minimum area for a face to be counted
+<em>neighbors</em> value = <em>yes</em> or <em>no</em> = store list of all neighbors or no
+<em>peratom</em> value = <em>yes</em> or <em>no</em> = per-atom quantities accessible or no
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>compute 1 all voronoi/atom
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Define a computation that calculates the Voronoi tessellation of the
atoms in the simulation box. The tessellation is calculated using all
atoms in the simulation, but non-zero values are only stored for atoms
in the group.</p>
-<p>By default two quantities per atom are calculated by this compute.
+<p>By default two per-atom quantities are calculated by this compute.
The first is the volume of the Voronoi cell around each atom. Any
point in an atom’s Voronoi cell is closer to that atom than any other.
-The second is the number of faces of the Voronoi cell, which is also
-the number of nearest neighbors of the atom in the middle of the cell.</p>
+The second is the number of faces of the Voronoi cell. This is
+equal to the number of nearest neighbors of the central atom,
+plus any exterior faces (see note below). If the <em>peratom</em> keyword
+is set to “no”, the per-atom quantities are still calculated,
+but they are not accessible.</p>
<hr class="docutils" />
<p>If the <em>only_group</em> keyword is specified the tessellation is performed
only with respect to the atoms contained in the compute group. This is
equivalent to deleting all atoms not contained in the group prior to
evaluating the tessellation.</p>
<p>If the <em>surface</em> keyword is specified a third quantity per atom is
computed: the Voronoi cell surface of the given atom. <em>surface</em> takes
a group ID as an argument. If a group other than <em>all</em> is specified,
only the Voronoi cell facets facing a neighbor atom from the specified
group are counted towards the surface area.</p>
<p>In the example above, a precipitate embedded in a matrix, only atoms
at the surface of the precipitate will have non-zero surface area, and
only the outward facing facets of the Voronoi cells are counted (the
hull of the precipitate). The total surface area of the precipitate
can be obtained by running a “reduce sum” compute on c_2[3]</p>
<p>If the <em>radius</em> keyword is specified with an atom style variable as
the argument, a poly-disperse Voronoi tessellation is
performed. Examples for radius variables are</p>
<div class="highlight-python"><div class="highlight"><pre>variable r1 atom (type==1)*0.1+(type==2)*0.4
compute radius all property/atom radius
variable r2 atom c_radius
</pre></div>
</div>
<p>Here v_r1 specifies a per-type radius of 0.1 units for type 1 atoms
and 0.4 units for type 2 atoms, and v_r2 accesses the radius property
present in atom_style sphere for granular models.</p>
<p>The <em>edge_histo</em> keyword activates the compilation of a histogram of
number of edges on the faces of the Voronoi cells in the compute
-group. The argument maxedge of the this keyword is the largest number
+group. The argument <em>maxedge</em> of the this keyword is the largest number
of edges on a single Voronoi cell face expected to occur in the
sample. This keyword adds the generation of a global vector with
-maxedge+1 entries. The last entry in the vector contains the number of
-faces with with more than maxedge edges. Since the polygon with the
+<em>maxedge*+1 entries. The last entry in the vector contains the number of
+faces with with more than *maxedge</em> edges. Since the polygon with the
smallest amount of edges is a triangle, entries 1 and 2 of the vector
will always be zero.</p>
<p>The <em>edge_threshold</em> and <em>face_threshold</em> keywords allow the
suppression of edges below a given minimum length and faces below a
given minimum area. Ultra short edges and ultra small faces can occur
as artifacts of the Voronoi tessellation. These keywords will affect
the neighbor count and edge histogram outputs.</p>
<p>If the <em>occupation</em> keyword is specified the tessellation is only
performed for the first invocation of the compute and then stored.
For all following invocations of the compute the number of atoms in
each Voronoi cell in the stored tessellation is counted. In this mode
the compute returns a per-atom array with 2 columns. The first column
is the number of atoms currently in the Voronoi volume defined by this
atom at the time of the first invocation of the compute (note that the
atom may have moved significantly). The second column contains the
total number of atoms sharing the Voronoi cell of the stored
tessellation at the location of the current atom. Numbers in column
one can be any positive integer including zero, while column two
values will always be greater than zero. Column one data can be used
to locate vacancies (the coordinates are given by the atom coordinates
at the time step when the compute was first invoked), while column two
data can be used to identify interstitial atoms.</p>
+<p>If the <em>neighbors</em> value is set to yes, then
+this compute creates a local array with 3 columns. There
+is one row for each face of each Voronoi cell. The
+3 columns are the atom ID of the atom that owns the cell,
+the atom ID of the atom in the neighboring cell
+(or zero if the face is external), and the area of the face.
+The array can be accessed by any command that
+uses local values from a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span>this section</span></a> for an overview of LAMMPS output
+options. More specifically, the array can be accessed by a
+<a class="reference internal" href="dump.html"><em>dump local</em></a> command to write a file containing
+all the Voronoi neighbors in a system:</p>
+<div class="highlight-python"><div class="highlight"><pre>compute 6 all voronoi/atom neighbors yes
+dump d2 all local 1 dump.neighbors index c_6[1] c_6[2] c_6[3]
+</pre></div>
+</div>
+<p>If the <em>face_threshold</em> keyword is used, then only faces
+with areas greater than the threshold are stored.</p>
<hr class="docutils" />
<p>The Voronoi calculation is performed by the freely available <a class="reference external" href="http://math.lbl.gov/voro++">Voro++ package</a>, written by Chris Rycroft at UC Berkeley and LBL,
which must be installed on your system when building LAMMPS for use
with this compute. See instructions on obtaining and installing the
Voro++ software in the src/VORONOI/README file.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The calculation of Voronoi volumes is performed by each
processor for the atoms it owns, and includes the effect of ghost
atoms stored by the processor. This assumes that the Voronoi cells of
owned atoms are not affected by atoms beyond the ghost atom cut-off
distance. This is usually a good assumption for liquid and solid
systems, but may lead to underestimation of Voronoi volumes in low
density systems. By default, the set of ghost atoms stored by each
processor is determined by the cutoff used for
<a class="reference internal" href="pair_style.html"><em>pair_style</em></a> interactions. The cutoff can be set
-explicitly via the <a class="reference internal" href="comm_modify.html"><em>comm_modify cutoff</em></a> command.</p>
+explicitly via the <a class="reference internal" href="comm_modify.html"><em>comm_modify cutoff</em></a> command. The
+Voronoi cells for atoms adjacent to empty regions will extend into
+those regions up to the communication cutoff in x, y, or z. In that
+situation, an exterior face is created at the cutoff distance normal
+to the x, y, or z direction. For triclinic systems, the exterior face
+is parallel to the corresponding reciprocal lattice vector.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
-<p class="last">The Voro++ package performs its calculation in 3d. This should
-still work for a 2d LAMMPS simulation, to effectively compute Voronoi
-“areas”, so long as the z-dimension of the box is roughly the same (or
-smaller) compared to the separation of the atoms. Typical values for
-the z box dimensions in a 2d LAMMPS model are -0.5 to 0.5, which
-satisfies the criterion for most <a class="reference internal" href="units.html"><em>units</em></a> systems. Note
-that you define the z extent of the simulation box for 2d simulations
-when using the <a class="reference internal" href="create_box.html"><em>create_box</em></a> or
+<p class="last">The Voro++ package performs its calculation in 3d. This will
+still work for a 2d LAMMPS simulation, provided all the atoms have the
+same z coordinate. The Voronoi cell of each atom will be a columnar
+polyhedron with constant cross-sectional area along the z direction
+and two exterior faces at the top and bottom of the simulation box. If
+the atoms do not all have the same z coordinate, then the columnar
+cells will be accordingly distorted. The cross-sectional area of each
+Voronoi cell can be obtained by dividing its volume by the z extent of
+the simulation box. Note that you define the z extent of the
+simulation box for 2d simulations when using the
+<a class="reference internal" href="create_box.html"><em>create_box</em></a> or <a class="reference internal" href="read_data.html"><em>read_data</em></a> commands.</p>
</div>
<p><strong>Output info:</strong></p>
-<p>This compute calculates a per-atom array with 2 columns. In regular
-dynamic tessellation mode the first column is the Voronoi volume, the
-second is the neighbor count, as described above (read above for the
-output data in case the <em>occupation</em> keyword is specified).
-These values can be accessed by any command that
-uses per-atom values from a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span>Section_howto 15</span></a> for an overview of LAMMPS output
-options.</p>
-<p>The Voronoi cell volume will be in distance <a class="reference internal" href="units.html"><em>units</em></a> cubed.</p>
+<p>By default, this compute calculates a per-atom array with 2
+columns. In regular dynamic tessellation mode the first column is the
+Voronoi volume, the second is the neighbor count, as described above
+(read above for the output data in case the <em>occupation</em> keyword is
+specified). These values can be accessed by any command that uses
+per-atom values from a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span>Section_howto 15</span></a> for an overview of LAMMPS output
+options. If the <em>peratom</em> keyword is set to “no”, the per-atom array
+is still created, but it is not accessible.</p>
+<p>If the <em>edge_histo</em> keyword is used, then this compute generates a
+global vector of length <a href="#id1"><span class="problematic" id="id2">*</span></a>maxedge*+1, containing a histogram of the
+number of edges per face.</p>
+<p>If the <em>neighbors</em> value is set to yes, then this compute calculates a
+local array with 3 columns. There is one row for each face of each
+Voronoi cell.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">Some LAMMPS commands such as the <a class="reference internal" href="compute_reduce.html"><em>compute reduce</em></a> command can accept either a per-atom or
+local quantity. If this compute produces both quantities, the command
+may access the per-atom quantity, even if you want to access the local
+quantity. This effect can be eliminated by using the <em>peratom</em>
+keyword to turn off the production of the per-atom quantities. For
+the default value <em>yes</em> both quantities are produced. For the value
+<em>no</em>, only the local array is produced.</p>
+</div>
+<p>The Voronoi cell volume will be in distance <a class="reference internal" href="units.html"><em>units</em></a> cubed.
+The Voronoi face area will be in distance <a class="reference internal" href="units.html"><em>units</em></a> squared.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>This compute is part of the VORONOI package. It is only enabled if
LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<p>Coefficients parameterized by <a class="reference internal" href="#peng"><span>(Peng)</span></a> are assigned for each
atom type designating the chemical symbol and charge of each atom
type. Valid chemical symbols for compute xrd are:</p>
<dl class="docutils">
<dt>H: He1-: He: Li: Li1+:</dt>
<dd><blockquote class="first">
<div><blockquote>
<div><dl class="docutils">
<dt>Be: Be2+: B: C: Cval:</dt>
<dd>N: O: O1-: F: F1-:</dd>
</dl>
<p>Ne: Na: Na1+: Mg: Mg2+:
Al: Al3+: Si: Sival: Si4+:</p>
<blockquote>
<div>P: S: Cl: Cl1-: Ar:
K: Ca: Ca2+: Sc: Sc3+:</div></blockquote>
<p>Ti: Ti2+: Ti3+: Ti4+: V:</p>
</div></blockquote>
<p>V2+: V3+: V5+: Cr: Cr2+:</p>
</div></blockquote>
<dl class="docutils">
<dt>Cr3+: Mn: Mn2+: Mn3+: Mn4+:</dt>
<dd>Fe: Fe2+: Fe3+: Co: Co2+:
Co: Ni: Ni2+: Ni3+: Cu:</dd>
</dl>
<p>Cu1+: Cu2+: Zn: Zn2+: Ga:
Ga3+: Ge: Ge4+: As: Se:</p>
<blockquote>
<div>Br: Br1-: Kr: Rb: Rb1+:
Sr: Sr2+: Y: Y3+: Zr:</div></blockquote>
<p>Zr4+: Nb: Nb3+: Nb5+: Mo:
Mo3+: Mo5+: Mo6+: Tc: Ru:
Ru3+: Ru4+: Rh: Rh3+: Rh4+:</p>
<blockquote>
<div>Pd: Pd2+: Pd4+: Ag: Ag1+:</div></blockquote>
<dl class="docutils">
<dt>Ag2+: Cd: Cd2+: In: In3+:</dt>
<dd>Sn: Sn2+: Sn4+: Sb: Sb3+:</dd>
<dt>Sb5+: Te: I: I1-: Xe:</dt>
<dd>Cs: Cs1+: Ba: Ba2+: La:</dd>
</dl>
<p>La3+: Ce: Ce3+: Ce4+: Pr:
Pr3+: Pr4+: Nd: Nd3+: Pm:
Pm3+: Sm: Sm3+: Eu: Eu2+:
Eu3+: Gd: Gd3+: Tb: Tb3+:</p>
<blockquote>
<div>Dy: Dy3+: Ho: Ho3+: Er:</div></blockquote>
<p>Er3+: Tm: Tm3+: Yb: Yb2+:
Yb3+: Lu: Lu3+: Hf: Hf4+:</p>
<blockquote>
<div>Ta: Ta5+: W: W6+: Re:
Os: Os4+: Ir: Ir3+: Ir4+:
Pt: Pt2+: Pt4+: Au: Au1+:</div></blockquote>
<p>Au3+: Hg: Hg1+: Hg2+: Tl:
Tl1+: Tl3+: Pb: Pb2+: Pb4+:</p>
<blockquote>
<div>Bi: Bi3+: Bi5+: Po: At:
Rn: Fr: Ra: Ra2+: Ac:</div></blockquote>
<dl class="docutils">
<dt>Ac3+: Th: Th4+: Pa: U:</dt>
<dd>U3+: U4+: U6+: Np: Np3+:</dd>
</dl>
<p class="last">Np4+: Np6+: Pu: Pu3+: Pu4+:
Pu6+: Am: Cm: Bk: Cf:tb(c=5,s=:)</p>
</dd>
</dl>
<p>If the <em>echo</em> keyword is specified, compute xrd will provide extra
reporting information to the screen.</p>
<p><strong>Output info:</strong></p>
<p>This compute calculates a global array. The number of rows in the
array is the number of reciprocal lattice nodes that are explored
which by the mesh. The global array has 2 columns.</p>
<p>The first column contains the diffraction angle in the units (radians
or degrees) provided with the <em>2Theta</em> values. The second column contains
the computed diffraction intensities as described above.</p>
-<p>The array can be accessed by any command that uses global values
-from a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span>this section</span></a> for an overview of LAMMPS output
-options.</p>
+<p>The array can be accessed by any command that uses global values from
+a compute as input. See <a class="reference internal" href="Section_howto.html#howto-15"><span>this section</span></a>
+for an overview of LAMMPS output options.</p>
<p>All array values calculated by this compute are “intensive”.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
+<p>This compute is part of the USER-DIFFRACTION package. It is only
+enabled if LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The compute_xrd command does not work for triclinic cells.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<dt>style = <em>multi</em> or <em>atom</em> or <em>bond</em> or <em>angle</em> or <em>dihedral</em> or</dt>
<dd><p class="first last"><em>improper</em> or <em>stats</em></p>
</dd>
</dl>
</li>
</ul>
<pre class="literal-block">
<em>multi</em> arg = none
<em>atom</em> arg = an atom type or range of types (see below)
<em>bond</em> arg = a bond type or range of types (see below)
<em>angle</em> arg = an angle type or range of types (see below)
<em>dihedral</em> arg = a dihedral type or range of types (see below)
<em>improper</em> arg = an improper type or range of types (see below)
<em>stats</em> arg = none
</pre>
<ul class="simple">
<li>zero or more keywords may be appended</li>
<li>keyword = <em>any</em> or <em>undo</em> or <em>remove</em> or <em>special</em></li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>delete_bonds frozen multi remove
delete_bonds all atom 4 special
delete_bonds all bond 0*3 special
delete_bonds all stats
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Turn off (or on) molecular topology interactions, i.e. bonds, angles,
dihedrals, impropers. This command is useful for deleting
interactions that have been previously turned off by bond-breaking
potentials. It is also useful for turning off topology interactions
between frozen or rigid atoms. Pairwise interactions can be turned
off via the <a class="reference internal" href="neigh_modify.html"><em>neigh_modify exclude</em></a> command. The
<a class="reference internal" href="fix_shake.html"><em>fix shake</em></a> command also effectively turns off certain
bond and angle interactions.</p>
<p>For all styles, by default, an interaction is only turned off (or on)
if all the atoms involved are in the specified group. See the <em>any</em>
keyword to change the behavior.</p>
<p>Several of the styles (<em>atom</em>, <em>bond</em>, <em>angle</em>, <em>dihedral</em>,
<em>improper</em>) take a <em>type</em> as an argument. The specified <em>type</em> should
be an integer from 0 to N, where N is the number of relevant types
(atom types, bond types, etc). A value of 0 is only relevant for
style <em>bond</em>; see details below. In all cases, a wildcard asterisk
can be used in place of or in conjunction with the <em>type</em> argument to
specify a range of types. This takes the form “*” or “<em>n” or “n</em>” or
“m*n”. If N = the number of types, then an asterisk with no numeric
values means all types from 0 to N. A leading asterisk means all
types from 0 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). Note that it is fine to include a type of 0 for
non-bond styles; it will simply be ignored.</p>
<p>For style <em>multi</em> all bond, angle, dihedral, and improper interactions
of any type, involving atoms in the group, are turned off.</p>
<p>Style <em>atom</em> is the same as style <em>multi</em> except that in addition, one
or more of the atoms involved in the bond, angle, dihedral, or
improper interaction must also be of the specified atom type.</p>
<p>For style <em>bond</em>, only bonds are candidates for turn-off, and the bond
must also be of the specified type. Styles <em>angle</em>, <em>dihedral</em>, and
<em>improper</em> are treated similarly.</p>
<p>For style <em>bond</em>, you can set the type to 0 to delete bonds that have
been previously broken by a bond-breaking potential (which sets the
bond type to 0 when a bond is broken); e.g. see the <a class="reference internal" href="bond_style.html"><em>bond_style quartic</em></a> command.</p>
<p>For style <em>stats</em> no interactions are turned off (or on); the status
of all interactions in the specified group is simply reported. This
is useful for diagnostic purposes if bonds have been turned off by a
bond-breaking potential during a previous run.</p>
<p>The default behavior of the delete_bonds command is to turn off
interactions by toggling their type to a negative value, but not to
permanently remove the interaction. E.g. a bond_type of 2 is set to
-2. The neighbor list creation routines will not include such an
interaction in their interaction lists. The default is also to not
alter the list of 1-2, 1-3, 1-4 neighbors computed by the
<a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a> command and used to weight pairwise
force and energy calculations. This means that pairwise computations
will proceed as if the bond (or angle, etc) were still turned on.</p>
<p>Several keywords can be appended to the argument list to alter the
default behaviors.</p>
<p>The <em>any</em> keyword changes the requirement that all atoms in the bond
(angle, etc) must be in the specified group in order to turn-off the
interaction. Instead, if any of the atoms in the interaction are in
the specified group, it will be turned off (or on if the <em>undo</em>
keyword is used).</p>
<p>The <em>undo</em> keyword inverts the delete_bonds command so that the
specified bonds, angles, etc are turned on if they are currently
turned off. This means a negative value is toggled to positive. For
example, for style <em>angle</em>, if <em>type</em> is specified as 2, then all
angles with current type = -2, are reset to type = 2. Note that the
<a class="reference internal" href="fix_shake.html"><em>fix shake</em></a> command also sets bond and angle types
negative, so this option should not be used on those interactions.</p>
<p>The <em>remove</em> keyword is invoked at the end of the delete_bonds
operation. It causes turned-off bonds (angles, etc) to be removed
from each atom’s data structure and then adjusts the global bond
(angle, etc) counts accordingly. Removal is a permanent change;
removed bonds cannot be turned back on via the <em>undo</em> keyword.
Removal does not alter the pairwise 1-2, 1-3, 1-4 weighting list.</p>
<p>The <em>special</em> keyword is invoked at the end of the delete_bonds
operation, after (optional) removal. It re-computes the pairwise 1-2,
1-3, 1-4 weighting list. The weighting list computation treats
turned-off bonds the same as turned-on. Thus, turned-off bonds must
be removed if you wish to change the weighting list.</p>
<p>Note that the choice of <em>remove</em> and <em>special</em> options affects how
1-2, 1-3, 1-4 pairwise interactions will be computed across bonds that
have been modified by the delete_bonds command.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
-<p>This command requires inter-processor communication to coordinate the
-deleting of bonds. This means that your system must be ready to
-perform a simulation before using this command (force fields setup,
-atom masses set, etc).</p>
+<p>This command requires inter-processor communication to acquire ghost
+atoms, to coordinate the deleting of bonds, angles, etc between atoms
+shared by multiple processors. This means that your system must be
+ready to perform a simulation before using this command (force fields
+setup, atom masses set, etc). Just as would be needed to run
+dynamics, the force field you define should define a cutoff
+(e.g. through a <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> command) which is long
+enough for a processor to acquire the ghost atoms its needs to compute
+bond, angle, etc interactions.</p>
<p>If deleted bonds (angles, etc) are removed but the 1-2, 1-3, 1-4
weighting list is not recomputed, this can cause a later <a class="reference internal" href="fix_shake.html"><em>fix shake</em></a> command to fail due to an atom’s bonds being
inconsistent with the weighting list. This should only happen if the
group used in the fix command includes both atoms in the bond, in
which case you probably should be recomputing the weighting list.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>displace_atoms command<a class="headerlink" href="#displace-atoms-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>displace_atoms group-ID style args keyword value ...
</pre></div>
</div>
<ul class="simple">
<li>group-ID = ID of group of atoms to displace</li>
<li>style = <em>move</em> or <em>ramp</em> or <em>random</em> or <em>rotate</em></li>
</ul>
<pre class="literal-block">
<em>move</em> args = delx dely delz
delx,dely,delz = distance to displace in each dimension (distance units)
any of delx,dely,delz can be a variable (see below)
<em>ramp</em> args = ddim dlo dhi dim clo chi
ddim = <em>x</em> or <em>y</em> or <em>z</em>
dlo,dhi = displacement distance between dlo and dhi (distance units)
dim = <em>x</em> or <em>y</em> or <em>z</em>
clo,chi = lower and upper bound of domain to displace (distance units)
<em>random</em> args = dx dy dz seed
dx,dy,dz = random displacement magnitude in each dimension (distance units)
seed = random # seed (positive integer)
<em>rotate</em> args = Px Py Pz Rx Ry Rz theta
Px,Py,Pz = origin point of axis of rotation (distance units)
Rx,Ry,Rz = axis of rotation vector
theta = angle of rotation (degrees)
</pre>
<ul class="simple">
<li>zero or more keyword/value pairs may be appended</li>
</ul>
<pre class="literal-block">
keyword = <em>units</em>
value = <em>box</em> or <em>lattice</em>
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>displace_atoms top move 0 -5 0 units box
displace_atoms flow ramp x 0.0 5.0 y 2.0 20.5
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Displace a group of atoms. This can be used to move atoms a large
distance before beginning a simulation or to randomize atoms initially
on a lattice. For example, in a shear simulation, an initial strain
can be imposed on the system. Or two groups of atoms can be brought
into closer proximity.</p>
<p>The <em>move</em> style displaces the group of atoms by the specified 3d
displacement vector. Any of the 3 quantities defining the vector
components can be specified as an equal-style or atom-style
<a class="reference internal" href="variable.html"><em>variable</em></a>. If the value is a variable, it should be
specified as v_name, where name is the variable name. In this case,
the variable will be evaluated, and its value(s) used for the
displacement(s). The scale factor implied by the <em>units</em> keyword will
also be applied to the variable result.</p>
<p>Equal-style variables can specify formulas with various mathematical
functions, and include <a class="reference internal" href="thermo_style.html"><em>thermo_style</em></a> command
keywords for the simulation box parameters and timestep and elapsed
time. Atom-style variables can specify the same formulas as
equal-style variables but can also include per-atom values, such as
atom coordinates or per-atom values read from a file. Note that if
the variable references other <a class="reference internal" href="compute.html"><em>compute</em></a> or <a class="reference internal" href="fix.html"><em>fix</em></a>
commands, those values must be up-to-date for the current timestep.
See the “Variable Accuracy” section of the <a class="reference internal" href="variable.html"><em>variable</em></a>
doc page for more details.</p>
<p>The <em>ramp</em> style displaces atoms a variable amount in one dimension
depending on the atom’s coordinate in a (possibly) different
dimension. For example, the second example command displaces atoms in
the x-direction an amount between 0.0 and 5.0 distance units. Each
atom’s displacement depends on the fractional distance its y
coordinate is between 2.0 and 20.5. Atoms with y-coordinates outside
those bounds will be moved the minimum (0.0) or maximum (5.0) amount.</p>
<p>The <em>random</em> style independently moves each atom in the group by a
random displacement, uniformly sampled from a value between -dx and
+dx in the x dimension, and similarly for y and z. Random numbers are
used in such a way that the displacement of a particular atom is the
same, regardless of how many processors are being used.</p>
<p>The <em>rotate</em> style rotates each atom in the group by the angle <em>theta</em>
around a rotation axis <em>R</em> = (Rx,Ry,Rz) that goes thru a point <em>P</em> =
(Px,Py,Pz). The direction of rotation for the atoms around the
rotation axis is consistent with the right-hand rule: if your
-right-hand’s thumb points along <em>R</em>, then your fingers wrap around the
+right-hand thumb points along <em>R</em>, then your fingers wrap around the
axis in the direction of positive theta.</p>
+<p>If the defined <a class="reference internal" href="atom_style.html"><em>atom_style</em></a> assigns an orientation to
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>dump image command<a class="headerlink" href="#dump-image-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="dump-movie-command">
<h1>dump movie command<a class="headerlink" href="#dump-movie-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>dump ID group-ID style N file color diameter keyword value ...
</pre></div>
</div>
<ul class="simple">
<li>ID = user-assigned name for the dump</li>
<li>group-ID = ID of the group of atoms to be imaged</li>
<li>style = <em>image</em> or <em>movie</em> = style of dump command (other styles <em>atom</em> or <em>cfg</em> or <em>dcd</em> or <em>xtc</em> or <em>xyz</em> or <em>local</em> or <em>custom</em> are discussed on the <a class="reference internal" href="dump.html"><em>dump</em></a> doc page)</li>
<li>N = dump every this many timesteps</li>
<li>file = name of file to write image to</li>
<li>color = atom attribute that determines color of each atom</li>
<li>diameter = atom attribute that determines size of each atom</li>
<li>zero or more keyword/value pairs may be appended</li>
-<li>keyword = <em>adiam</em> or <em>atom</em> or <em>body</em> or <em>bond</em> or <em>size</em> or <em>view</em> or <em>center</em> or <em>up</em> or <em>zoom</em> or <em>persp</em> or <em>box</em> or <em>axes</em> or <em>subbox</em> or <em>shiny</em> or <em>ssao</em></li>
+<li>keyword = <em>atom</em> or <em>adiam</em> or <em>bond</em> or <em>line</em> or <em>tri</em> or <em>body</em> or <em>size</em> or <em>view</em> or <em>center</em> or <em>up</em> or <em>zoom</em> or <em>persp</em> or <em>box</em> or <em>axes</em> or <em>subbox</em> or <em>shiny</em> or <em>ssao</em></li>
</ul>
<pre class="literal-block">
-<em>adiam</em> value = number = numeric value for atom diameter (distance units)
<em>atom</em> = yes/no = do or do not draw atoms
-<em>body</em> = yes/no bflag1 bflag2
- yes/no = do or do not draw atoms as bodies
- bflag1,bflag2 = 2 numeric flags to affect how bodies are drawn
+<em>adiam</em> size = numeric value for atom diameter (distance units)
<em>bond</em> values = color width = color and width of bonds
color = <em>atom</em> or <em>type</em> or <em>none</em>
width = number or <em>atom</em> or <em>type</em> or <em>none</em>
number = numeric value for bond width (distance units)
+<em>line</em> = color width
+ color = <em>type</em>
+ width = numeric value for line width (distance units)
+<em>tri</em> = color
+ color = <em>type</em>
+<em>body</em> = color bflag1 bflag2
+ color = <em>type</em>
+ bflag1,bflag2 = 2 numeric flags to affect how bodies are drawn
<em>size</em> values = width height = size of images
width = width of image in # of pixels
height = height of image in # of pixels
<em>view</em> values = theta phi = view of simulation box
theta = view angle from +z axis (degrees)
phi = azimuthal view angle (degrees)
theta or phi can be a variable (see below)
<em>center</em> values = flag Cx Cy Cz = center point of image
flag = "s" for static, "d" for dynamic
Cx,Cy,Cz = center point of image as fraction of box dimension (0.5 = center of box)
Cx,Cy,Cz can be variables (see below)
<em>up</em> values = Ux Uy Uz = direction that is "up" in image
Ux,Uy,Uz = components of up vector
Ux,Uy,Uz can be variables (see below)
<em>zoom</em> value = zfactor = size that simulation box appears in image
zfactor = scale image size by factor > 1 to enlarge, factor < 1 to shrink
zfactor can be a variable (see below)
<em>persp</em> value = pfactor = amount of "perspective" in image
which are prefixed by “<a href="#id9"><span class="problematic" id="id10">c_</span></a>”, “<a href="#id11"><span class="problematic" id="id12">f_</span></a>”, or “<a href="#id13"><span class="problematic" id="id14">v_</span></a>” respectively. Note that the
<em>diameter</em> setting can be overridden with a numeric value applied to
all atoms by the optional <em>adiam</em> keyword.</p>
<p>If <em>type</em> is specified for the <em>color</em> setting, then the color of each
atom is determined by its atom type. By default the mapping of types
to colors is as follows:</p>
<ul class="simple">
<li>type 1 = red</li>
<li>type 2 = green</li>
<li>type 3 = blue</li>
<li>type 4 = yellow</li>
<li>type 5 = aqua</li>
<li>type 6 = cyan</li>
</ul>
<p>and repeats itself for types > 6. This mapping can be changed by the
<p>If <em>type</em> is specified for the <em>diameter</em> setting then the diameter of
each atom is determined by its atom type. By default all types have
diameter 1.0. This mapping can be changed by the <a class="reference internal" href="dump_modify.html"><em>dump_modify adiam</em></a> command.</p>
<p>If <em>element</em> is specified for the <em>color</em> and/or <em>diameter</em> setting,
then the color and/or diameter of each atom is determined by which
element it is, which in turn is specified by the element-to-type
mapping specified by the “dump_modify element” command. By default
every atom type is C (carbon). Every element has a color and diameter
associated with it, which is the same as the colors and sizes used by
the <a class="reference external" href="http://mt.seas.upenn.edu/Archive/Graphics/A">AtomEye</a> visualization package.</p>
<p>If other atom attributes are used for the <em>color</em> or <em>diameter</em>
settings, they are interpreted in the following way.</p>
<p>If “vx”, for example, is used as the <em>color</em> setting, then the color
of the atom will depend on the x-component of its velocity. The
association of a per-atom value with a specific color is determined by
a “color map”, which can be specified via the
<a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command. The basic idea is that the
atom-attribute will be within a range of values, and every value
within the range is mapped to a specific color. Depending on how the
color map is defined, that mapping can take place via interpolation so
that a value of -3.2 is halfway between “red” and “blue”, or
discretely so that the value of -3.2 is “orange”.</p>
<p>If “vx”, for example, is used as the <em>diameter</em> setting, then the atom
will be rendered using the x-component of its velocity as the
diameter. If the per-atom value <= 0.0, them the atom will not be
drawn. Note that finite-size spherical particles, as defined by
<a class="reference internal" href="atom_style.html"><em>atom_style sphere</em></a> define a per-particle radius or
diameter, which can be used as the <em>diameter</em> setting.</p>
<hr class="docutils" />
<p>The various kewords listed above control how the image is rendered.
As listed below, all of the keywords have defaults, most of which you
will likely not need to change. The <a class="reference internal" href="dump_modify.html"><em>dump modify</em></a>
also has options specific to the dump image style, particularly for
assigning colors to atoms, bonds, and other image features.</p>
<hr class="docutils" />
-<p>The <em>adiam</em> keyword allows you to override the <em>diameter</em> setting to a
-per-atom attribute with a specified numeric value. All atoms will be
-drawn with that diameter, e.g. 1.5, which is in whatever distance
-<a class="reference internal" href="units.html"><em>units</em></a> the input script defines, e.g. Angstroms.</p>
-<p>The <em>atom</em> keyword allow you to turn off the drawing of all atoms,
-if the specified value is <em>no</em>.</p>
-<p>The <em>body</em> keyword can be used when <a class="reference internal" href="atom_style.html"><em>atom_style body</em></a>
-is used to define body particles with internal state
-(e.g. sub-particles). The <a class="reference internal" href="body.html"><em>body</em></a> doc page descibes the body
-styles LAMMPS currently supports, and provides more details as to the
-kind of body particles they represent and how they are drawn by this
-dump image command. For all the body styles, individual atoms can be
-either a body particle or a usual point (non-body) particle. If the
-<em>body</em> keyword is set to <em>yes</em>, then atoms which are body particles
-are drawn by the method defined by the body style. Non-body particles
-the same way they would be if the <em>body</em> keyword is <em>no</em>, i.e. as
-spheres. The <em>bflag1</em> and <em>bflag2</em> settings are numerical values
-which are passed to the body style to affect how the drawing of a body
-particle is done. See the <a class="reference internal" href="body.html"><em>body</em></a> doc page for a description
-of what these parameters mean for each body style.</p>
+<p>The <em>atom</em> keyword allow you to turn off the drawing of all atoms, if
+the specified value is <em>no</em>. Note that this will not turn off the
+drawing of particles that are represented as lines, triangles, or
+bodies, as discussed below. These particles can be drawn separately
+if the <em>line</em>, <em>tri</em>, or <em>body</em> keywords are used.</p>
+<p>The <em>adiam</em> keyword allows you to override the <em>diameter</em> setting to
+set a single numeric <em>size</em>. All atoms will be drawn with that
+diameter, e.g. 1.5, which is in whatever distance <a class="reference internal" href="units.html"><em>units</em></a>
+the input script defines, e.g. Angstroms.</p>
<p>The <em>bond</em> keyword allows to you to alter how bonds are drawn. A bond
is only drawn if both atoms in the bond are being drawn due to being
in the specified group and due to other selection criteria
(e.g. region, threshhold settings of the
<a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command). By default, bonds are drawn
if they are defined in the input data file as read by the
<a class="reference internal" href="read_data.html"><em>read_data</em></a> command. Using <em>none</em> for both the bond
<em>color</em> and <em>width</em> value will turn off the drawing of all bonds.</p>
<p>If <em>atom</em> is specified for the bond <em>color</em> value, then each bond is
drawn in 2 halves, with the color of each half being the color of the
atom at that end of the bond.</p>
<p>If <em>type</em> is specified for the <em>color</em> value, then the color of each
bond is determined by its bond type. By default the mapping of bond
types to colors is as follows:</p>
<ul class="simple">
<li>type 1 = red</li>
<li>type 2 = green</li>
<li>type 3 = blue</li>
<li>type 4 = yellow</li>
<li>type 5 = aqua</li>
<li>type 6 = cyan</li>
</ul>
<p>and repeats itself for bond types > 6. This mapping can be changed by
the <a class="reference internal" href="dump_modify.html"><em>dump_modify bcolor</em></a> command.</p>
<p>The bond <em>width</em> value can be a numeric value or <em>atom</em> or <em>type</em> (or
<em>none</em> as indicated above).</p>
<p>If a numeric value is specified, then all bonds will be drawn as
cylinders with that diameter, e.g. 1.0, which is in whatever distance
<a class="reference internal" href="units.html"><em>units</em></a> the input script defines, e.g. Angstroms.</p>
<p>If <em>atom</em> is specified for the <em>width</em> value, then each bond
will be drawn with a width corresponding to the minimum diameter
of the 2 atoms in the bond.</p>
<p>If <em>type</em> is specified for the <em>width</em> value then the diameter of each
bond is determined by its bond type. By default all types have
diameter 0.5. This mapping can be changed by the <a class="reference internal" href="dump_modify.html"><em>dump_modify bdiam</em></a> command.</p>
+<p>The <em>line</em> keyword can be used when <a class="reference internal" href="atom_style.html"><em>atom_style line</em></a>
+is used to define particles as line segments, and will draw them as
+lines. If this keyword is not used, such particles will be drawn as
+spheres, the same as if they were regular atoms. The only setting
+currently allowed for the <em>color</em> value is <em>type</em>, which will color
+the lines according to the atom type of the particle. By default the
+mapping of types to colors is as follows:</p>
+<ul class="simple">
+<li>type 1 = red</li>
+<li>type 2 = green</li>
+<li>type 3 = blue</li>
+<li>type 4 = yellow</li>
+<li>type 5 = aqua</li>
+<li>type 6 = cyan</li>
+</ul>
+<p>and repeats itself for types > 6. There is not yet an option to
+change this via the <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command.</p>
+<p>The line <em>width</em> can only be a numeric value, which specifies that all
+lines will be drawn as cylinders with that diameter, e.g. 1.0, which
+is in whatever distance <a class="reference internal" href="units.html"><em>units</em></a> the input script defines,
+e.g. Angstroms.</p>
+<p>The <em>tri</em> keyword can be used when <a class="reference internal" href="atom_style.html"><em>atom_style tri</em></a> is
+used to define particles as triangles, and will draw them as
+triangles. If this keyword is not used, such particles will be drawn
+as spheres, the same as if they were regular atoms. The only setting
+currently allowed for the <em>color</em> value is <em>type</em>, which will color
+the triangles according to the atom type of the particle. By default
+the mapping of types to colors is as follows:</p>
+<ul class="simple">
+<li>type 1 = red</li>
+<li>type 2 = green</li>
+<li>type 3 = blue</li>
+<li>type 4 = yellow</li>
+<li>type 5 = aqua</li>
+<li>type 6 = cyan</li>
+</ul>
+<p>and repeats itself for types > 6. There is not yet an option to
+change this via the <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command.</p>
+<p>The <em>body</em> keyword can be used when <a class="reference internal" href="atom_style.html"><em>atom_style body</em></a>
+is used to define body particles with internal state
+(e.g. sub-particles), and will drawn them in a manner specific to the
+body style. If this keyword is not used, such particles will be drawn
+as spheres, the same as if they were regular atoms.</p>
+<p>The <a class="reference internal" href="body.html"><em>body</em></a> doc page descibes the body styles LAMMPS
+currently supports, and provides more details as to the kind of body
+particles they represent and how they are drawn by this dump image
+command. For all the body styles, individual atoms can be either a
+body particle or a usual point (non-body) particle. Non-body
+particles will be drawn the same way they would be as a regular atom.
+The <em>bflag1</em> and <em>bflag2</em> settings are numerical values which are
+passed to the body style to affect how the drawing of a body particle
+is done. See the <a class="reference internal" href="body.html"><em>body</em></a> doc page for a description of what
+these parameters mean for each body style.</p>
<hr class="docutils" />
<p>The <em>size</em> keyword sets the width and height of the created images,
i.e. the number of pixels in each direction.</p>
<hr class="docutils" />
<p>The <em>view</em>, <em>center</em>, <em>up</em>, <em>zoom</em>, and <em>persp</em> values determine how
3d simulation space is mapped to the 2d plane of the image. Basically
they control how the simulation box appears in the image.</p>
<p>All of the <em>view</em>, <em>center</em>, <em>up</em>, <em>zoom</em>, and <em>persp</em> values can be
specified as numeric quantities, whose meaning is explained below.
Any of them can also be specified as an <a class="reference internal" href="variable.html"><em>equal-style variable</em></a>, by using v_name as the value, where “name” is
the variable name. In this case the variable will be evaluated on the
timestep each image is created to create a new value. If the
equal-style variable is time-dependent, this is a means of changing
the way the simulation box appears from image to image, effectively
doing a pan or fly-by view of your simulation.</p>
<p>The <em>view</em> keyword determines the viewpoint from which the simulation
box is viewed, looking towards the <em>center</em> point. The <em>theta</em> value
is the vertical angle from the +z axis, and must be an angle from 0 to
180 degrees. The <em>phi</em> value is an azimuthal angle around the z axis
and can be positive or negative. A value of 0.0 is a view along the
+x axis, towards the <em>center</em> point. If <em>theta</em> or <em>phi</em> are
specified via variables, then the variable values should be in
degrees.</p>
<p>The <em>center</em> keyword determines the point in simulation space that
will be at the center of the image. <em>Cx</em>, <em>Cy</em>, and <em>Cz</em> are
speficied as fractions of the box dimensions, so that (0.5,0.5,0.5) is
the center of the simulation box. These values do not have to be
between 0.0 and 1.0, if you want the simulation box to be offset from
the center of the image. Note, however, that if you choose strange
values for <em>Cx</em>, <em>Cy</em>, or <em>Cz</em> you may get a blank image. Internally,
<em>Cx</em>, <em>Cy</em>, and <em>Cz</em> are converted into a point in simulation space.
If <em>flag</em> is set to “s” for static, then this conversion is done once,
at the time the dump command is issued. If <em>flag</em> is set to “d” for
dynamic then the conversion is performed every time a new image is
created. If the box size or shape is changing, this will adjust the
center point in simulation space.</p>
<p>The <em>up</em> keyword determines what direction in simulation space will be
“up” in the image. Internally it is stored as a vector that is in the
plane perpendicular to the view vector implied by the <em>theta</em> and
<em>pni</em> values, and which is also in the plane defined by the view
vector and user-specified up vector. Thus this internal vector is
computed from the user-specified <em>up</em> vector as</p>
<p>This means the only restriction on the specified <em>up</em> vector is that
it cannot be parallel to the <em>view</em> vector, implied by the <em>theta</em> and
<em>phi</em> values.</p>
<p>The <em>zoom</em> keyword scales the size of the simulation box as it appears
in the image. The default <em>zfactor</em> value of 1 should display an
image mostly filled by the atoms in the simulation box. A <em>zfactor</em> >
1 will make the simulation box larger; a <em>zfactor</em> < 1 will make it
smaller. <em>Zfactor</em> must be a value > 0.0.</p>
<p>The <em>persp</em> keyword determines how much depth perspective is present
in the image. Depth perspective makes lines that are parallel in
simulation space appear non-parallel in the image. A <em>pfactor</em> value
of 0.0 means that parallel lines will meet at infininty (1.0/pfactor),
which is an orthographic rendering with no persepctive. A <em>pfactor</em>
value between 0.0 and 1.0 will introduce more perspective. A <em>pfactor</em>
value > 1 will create a highly skewed image with a large amount of
perspective.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The <em>persp</em> keyword is not yet supported as an option.</p>
</div>
<hr class="docutils" />
<p>The <em>box</em> keyword determines if and how the simulation box boundaries
are rendered as thin cylinders in the image. If <em>no</em> is set, then the
box boundaries are not drawn and the <em>diam</em> setting is ignored. If
<em>yes</em> is set, the 12 edges of the box are drawn, with a diameter that
is a fraction of the shortest box length in x,y,z (for 3d) or x,y (for
2d). The color of the box boundaries can be set with the <a class="reference internal" href="dump_modify.html"><em>dump_modify boxcolor</em></a> command.</p>
<p>The <em>axes</em> keyword determines if and how the coordinate axes are
rendered as thin cylinders in the image. If <em>no</em> is set, then the
axes are not drawn and the <em>length</em> and <em>diam</em> settings are ignored.
If <em>yes</em> is set, 3 thin cylinders are drawn to represent the x,y,z
axes in colors red,green,blue. The origin of these cylinders will be
offset from the lower left corner of the box by 10%. The <em>length</em>
setting determines how long the cylinders will be as a fraction of the
respective box lengths. The <em>diam</em> setting determines their thickness
as a fraction of the shortest box length in x,y,z (for 3d) or x,y (for
2d).</p>
<p>The <em>subbox</em> keyword determines if and how processor sub-domain
boundaries are rendered as thin cylinders in the image. If <em>no</em> is
set (default), then the sub-domain boundaries are not drawn and the
<em>diam</em> setting is ignored. If <em>yes</em> is set, the 12 edges of each
processor sub-domain are drawn, with a diameter that is a fraction of
the shortest box length in x,y,z (for 3d) or x,y (for 2d). The color
of the sub-domain boundaries can be set with the <a class="reference internal" href="dump_modify.html"><em>dump_modify boxcolor</em></a> command.</p>
<hr class="docutils" />
<p>The <em>shiny</em> keyword determines how shiny the objects rendered in the
image will appear. The <em>sfactor</em> value must be a value 0.0 <=
<em>sfactor</em> <= 1.0, where <em>sfactor</em> = 1 is a highly reflective surface
and <em>sfactor</em> = 0 is a rough non-shiny surface.</p>
<p>The <em>ssao</em> keyword turns on/off a screen space ambient occlusion
(SSAO) model for depth shading. If <em>yes</em> is set, then atoms further
away from the viewer are darkened via a randomized process, which is
perceived as depth. The calculation of this effect can increase the
cost of computing the image by roughly 2x. The strength of the effect
can be scaled by the <em>dfactor</em> parameter. If <em>no</em> is set, no depth
shading is performed.</p>
<hr class="docutils" />
<p>A series of JPEG, PNG, or PPM images can be converted into a movie
file and then played as a movie using commonly available tools. Using
dump style <em>movie</em> automates this step and avoids the intermediate
step of writing (many) image snapshot file. But LAMMPS has to be
compiled with -DLAMMPS_FFMPEG and an FFmpeg executable have to be
installed.</p>
<p>To manually convert JPEG, PNG or PPM files into an animated GIF or
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
dump ID group-ID style N file color diameter keyword value ... :pre
ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be imaged :l
style = {image} or {movie} = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l
N = dump every this many timesteps :l
file = name of file to write image to :l
color = atom attribute that determines color of each atom :l
diameter = atom attribute that determines size of each atom :l
zero or more keyword/value pairs may be appended :l
-keyword = {adiam} or {atom} or {body} or {bond} or {size} or {view} or {center} or {up} or {zoom} or {persp} or {box} or {axes} or {subbox} or {shiny} or {ssao} :l
- {adiam} value = number = numeric value for atom diameter (distance units)
+keyword = {atom} or {adiam} or {bond} or {line} or {tri} or {body} or {size} or {view} or {center} or {up} or {zoom} or {persp} or {box} or {axes} or {subbox} or {shiny} or {ssao} :l
{atom} = yes/no = do or do not draw atoms
- {body} = yes/no bflag1 bflag2
- yes/no = do or do not draw atoms as bodies
- bflag1,bflag2 = 2 numeric flags to affect how bodies are drawn
+ {adiam} size = numeric value for atom diameter (distance units)
{bond} values = color width = color and width of bonds
color = {atom} or {type} or {none}
width = number or {atom} or {type} or {none}
number = numeric value for bond width (distance units)
+ {line} = color width
+ color = {type}
+ width = numeric value for line width (distance units)
+ {tri} = color
+ color = {type}
+ {body} = color bflag1 bflag2
+ color = {type}
+ bflag1,bflag2 = 2 numeric flags to affect how bodies are drawn
{size} values = width height = size of images
width = width of image in # of pixels
height = height of image in # of pixels
{view} values = theta phi = view of simulation box
theta = view angle from +z axis (degrees)
phi = azimuthal view angle (degrees)
theta or phi can be a variable (see below)
{center} values = flag Cx Cy Cz = center point of image
flag = "s" for static, "d" for dynamic
Cx,Cy,Cz = center point of image as fraction of box dimension (0.5 = center of box)
Cx,Cy,Cz can be variables (see below)
{up} values = Ux Uy Uz = direction that is "up" in image
Ux,Uy,Uz = components of up vector
Ux,Uy,Uz can be variables (see below)
{zoom} value = zfactor = size that simulation box appears in image
zfactor = scale image size by factor > 1 to enlarge, factor < 1 to shrink
zfactor can be a variable (see below)
{persp} value = pfactor = amount of "perspective" in image
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Perform updates of position and velocity for atoms in the group each
timestep using the specified settings or formulas, without regard to
forces on the atoms. This can be useful for boundary or other atoms,
whose movement can influence nearby atoms.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The atoms affected by this fix should not normally be time
integrated by other fixes (e.g. <a class="reference internal" href="fix_nve.html"><em>fix nve</em></a>, <a class="reference internal" href="fix_nh.html"><em>fix nvt</em></a>), since that will change their positions and
velocities twice.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">As atoms move due to this fix, they will pass thru periodic
boundaries and be remapped to the other side of the simulation box,
just as they would during normal time integration (e.g. via the <a class="reference internal" href="fix_nve.html"><em>fix nve</em></a> command). It is up to you to decide whether
periodic boundaries are appropriate with the kind of atom motion you
are prescribing with this fix.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">As dicsussed below, atoms are moved relative to their initial
position at the time the fix is specified. These initial coordinates
are stored by the fix in “unwrapped” form, by using the image flags
associated with each atom. See the <a class="reference internal" href="dump.html"><em>dump custom</em></a> command
for a discussion of “unwrapped” coordinates. See the Atoms section of
the <a class="reference internal" href="read_data.html"><em>read_data</em></a> command for a discussion of image flags
and how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this fix by using the <a class="reference internal" href="set.html"><em>set image</em></a>
command.</p>
</div>
<hr class="docutils" />
<p>The <em>linear</em> style moves atoms at a constant velocity, so that their
position <em>X</em> = (x,y,z) as a function of time is given in vector
<p>The <em>rotate</em> style rotates atoms around a rotation axis <em>R</em> =
(Rx,Ry,Rz) that goes thru a point <em>P</em> = (Px,Py,Pz). The <em>period</em> of
-the rotation is also specified. This style also sets the velocity of
-each atom to (omega cross Rperp) where omega is its angular velocity
-around the rotation axis and Rperp is a perpendicular vector from the
-rotation axis to the atom. If the defined
-<a class="reference internal" href="atom_style.html"><em>atom_style</em></a> assigns an angular velocity to each atom,
-then each atom’s angular velocity is also set to omega. Note that the
-direction of rotation for the atoms around the rotation axis is
-consistent with the right-hand rule: if your right-hand’s thumb points
-along <em>R</em>, then your fingers wrap around the axis in the direction of
-rotation.</p>
+the rotation is also specified. The direction of rotation for the
+atoms around the rotation axis is consistent with the right-hand rule:
+if your right-hand thumb points along <em>R</em>, then your fingers wrap
+around the axis in the direction of rotation.</p>
+<p>This style also sets the velocity of each atom to (omega cross Rperp)
+where omega is its angular velocity around the rotation axis and Rperp
+is a perpendicular vector from the rotation axis to the atom. If the
+defined <a class="reference internal" href="atom_style.html"><em>atom_style</em></a> assigns an angular velocity or
+angular moementum or orientation to each atom (<a class="reference internal" href="atom_style.html"><em>atom styles</em></a> sphere, ellipsoid, line, tri, body), then
+those properties are also updated appropriately to correspond to the
+atom’s motion and rotation over time.</p>
<p>The <em>variable</em> style allows the position and velocity components of
each atom to be set by formulas specified via the
<a class="reference internal" href="variable.html"><em>variable</em></a> command. Each of the 6 variables is
specified as an argument to the fix as v_name, where name is the
variable name that is defined elsewhere in the input script.</p>
<p>Each variable must be of either the <em>equal</em> or <em>atom</em> style.
<em>Equal</em>-style variables compute a single numeric quantity, that can be
a function of the timestep as well as of other simulation values.
<em>Atom</em>-style variables compute a numeric quantity for each atom, that
can be a function per-atom quantities, such as the atom’s position, as
well as of the timestep and other simulation values. Note that this
fix stores the original coordinates of each atom (see note below) so
that per-atom quantity can be used in an atom-style variable formula.
See the <a class="reference internal" href="variable.html"><em>variable</em></a> command for details.</p>
<p>The first 3 variables (v_dx,v_dy,v_dz) specified for the <em>variable</em>
style are used to calculate a displacement from the atom’s original
position at the time the fix was specified. The second 3 variables
(v_vx,v_vy,v_vz) specified are used to compute a velocity for each
atom.</p>
<p>Any of the 6 variables can be specified as NULL. If both the
displacement and velocity variables for a particular x,y,z component
are specified as NULL, then the position and velocity of that
component is time integrated the same as the <a class="reference internal" href="fix_nve.html"><em>fix nve</em></a>
command would perform, using the corresponding force component on the
atom. If only the velocity variable for a component is specified as
NULL, then the displacement variable will be used to set the position
of the atom, and its velocity component will not be changed. If only
the displacement variable for a component is specified as NULL, then
the velocity variable will be used to set the velocity of the atom,
and the position of the atom will be time integrated using that
velocity.</p>
<p>The <em>units</em> keyword determines the meaning of the distance units used
to define the <em>linear</em> velocity and <em>wiggle</em> amplitude and <em>rotate</em>
origin. This setting is ignored for the <em>variable</em> style. A <em>box</em>
value selects standard units as defined by the <a class="reference internal" href="units.html"><em>units</em></a>
command, e.g. velocity in Angstroms/fmsec and amplitude and position
in Angstroms for units = real. A <em>lattice</em> value means the velocity
units are in lattice spacings per time and the amplitude and position
are in lattice spacings. The <a class="reference internal" href="lattice.html"><em>lattice</em></a> command must have
been previously used to define the lattice spacing. Each of these 3
quantities may be dependent on the x,y,z dimension, since the lattice
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>This fix writes the original coordinates of moving atoms to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>, as well as the initial timestep, so that
the motion can be continuous in a restarted simulation. See the
<a class="reference internal" href="read_restart.html"><em>read_restart</em></a> command for info on how to re-specify
a fix in an input script that reads a restart file, so that the
operation of the fix continues in an uninterrupted fashion.</p>
-<p>IMPORTANNT NOTE: Because the move positions are a function of the
-current timestep and the initial timestep, you cannot reset the
-timestep to a different value after reading a restart file, if you
-expect a fix move command to work in an uninterrupted fashion.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">Because the move positions are a function of the current
+timestep and the initial timestep, you cannot reset the timestep to a
+different value after reading a restart file, if you expect a fix move
+command to work in an uninterrupted fashion.</p>
+</div>
<p>None of the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> options are relevant to this
fix.</p>
<p>This fix produces a per-atom array which can be accessed by various
<a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a>. The number of columns
for each atom is 3, and the columns store the original unwrapped x,y,z
coords of each atom. The per-atom values can be accessed on any
timestep.</p>
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
the <a class="reference internal" href="run.html"><em>run</em></a> command. This fix is not invoked during <a class="reference internal" href="minimize.html"><em>energy minimization</em></a>.</p>
<p>For <a class="reference internal" href="run_style.html"><em>rRESPA time integration</em></a>, this fix adjusts the
position and velocity of atoms on the outermost rRESPA level.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>fix nvt command<a class="headerlink" href="#fix-nvt-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-nvt-cuda-command">
<h1>fix nvt/cuda command<a class="headerlink" href="#fix-nvt-cuda-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-nvt-kk-command">
<h1>fix nvt/kk command<a class="headerlink" href="#fix-nvt-kk-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-nvt-omp-command">
<h1>fix nvt/omp command<a class="headerlink" href="#fix-nvt-omp-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-npt-command">
<h1>fix npt command<a class="headerlink" href="#fix-npt-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-npt-cuda-command">
<h1>fix npt/cuda command<a class="headerlink" href="#fix-npt-cuda-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-npt-intel-command">
<h1>fix npt/intel command<a class="headerlink" href="#fix-npt-intel-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-npt-kk-command">
<h1>fix npt/kk command<a class="headerlink" href="#fix-npt-kk-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-npt-omp-command">
<h1>fix npt/omp command<a class="headerlink" href="#fix-npt-omp-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-nph-command">
<h1>fix nph command<a class="headerlink" href="#fix-nph-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-nph-kk-command">
<h1>fix nph/kk command<a class="headerlink" href="#fix-nph-kk-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="fix-nph-omp-command">
<h1>fix nph/omp command<a class="headerlink" href="#fix-nph-omp-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>fix ID group-ID style_name keyword value ...
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="fix.html"><em>fix</em></a> command</li>
<li>style_name = <em>nvt</em> or <em>npt</em> or <em>nph</em></li>
<li>one or more keyword/value pairs may be appended</li>
</ul>
<pre class="literal-block">
-keyword = <em>temp</em> or <em>iso</em> or <em>aniso</em> or <em>tri</em> or <em>x</em> or <em>y</em> or <em>z</em> or <em>xy</em> or <em>yz</em> or <em>xz</em> or <em>couple</em> or <em>tchain</em> or <em>pchain</em> or <em>mtk</em> or <em>tloop</em> or <em>ploop</em> or <em>nreset</em> or <em>drag</em> or <em>dilate</em> or <em>scalexy</em> or <em>scaleyz</em> or <em>scalexz</em> or <em>flip</em> or <em>fixedpoint</em>
+keyword = <em>temp</em> or <em>iso</em> or <em>aniso</em> or <em>tri</em> or <em>x</em> or <em>y</em> or <em>z</em> or <em>xy</em> or <em>yz</em> or <em>xz</em> or <em>couple</em> or <em>tchain</em> or <em>pchain</em> or <em>mtk</em> or <em>tloop</em> or <em>ploop</em> or <em>nreset</em> or <em>drag</em> or <em>dilate</em> or <em>scalexy</em> or <em>scaleyz</em> or <em>scalexz</em> or <em>flip</em> or <em>fixedpoint</em> or <em>update</em>
<em>temp</em> values = Tstart Tstop Tdamp
Tstart,Tstop = external temperature at start/end of run
Tdamp = temperature damping parameter (time units)
<em>iso</em> or <em>aniso</em> or <em>tri</em> values = Pstart Pstop Pdamp
Pstart,Pstop = scalar external pressure at start/end of run (pressure units)
Pdamp = pressure damping parameter (time units)
<em>x</em> or <em>y</em> or <em>z</em> or <em>xy</em> or <em>yz</em> or <em>xz</em> values = Pstart Pstop Pdamp
Pstart,Pstop = external stress tensor component at start/end of run (pressure units)
Pdamp = stress damping parameter (time units)
<em>couple</em> = <em>none</em> or <em>xyz</em> or <em>xy</em> or <em>yz</em> or <em>xz</em>
<em>tchain</em> value = N
N = length of thermostat chain (1 = single thermostat)
<em>pchain</em> values = N
N length of thermostat chain on barostat (0 = no thermostat)
<em>mtk</em> value = <em>yes</em> or <em>no</em> = add in MTK adjustment term or not
<em>tloop</em> value = M
M = number of sub-cycles to perform on thermostat
<em>ploop</em> value = M
M = number of sub-cycles to perform on barostat thermostat
<em>nreset</em> value = reset reference cell every this many timesteps
<em>drag</em> value = Df
Df = drag factor added to barostat/thermostat (0.0 = no drag)
<em>dilate</em> value = dilate-group-ID
dilate-group-ID = only dilate atoms in this group due to barostat volume changes
<em>scalexy</em> value = <em>yes</em> or <em>no</em> = scale xy with ly
<em>scaleyz</em> value = <em>yes</em> or <em>no</em> = scale yz with lz
<em>scalexz</em> value = <em>yes</em> or <em>no</em> = scale xz with lz
<em>flip</em> value = <em>yes</em> or <em>no</em> = allow or disallow box flips when it becomes highly skewed
<em>fixedpoint</em> values = x y z
x,y,z = perform barostat dilation/contraction around this point (distance units)
+ <em>update</em> value = <em>dipole</em> update dipole orientation (only for sphere variants)
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>fix 1 all nvt temp 300.0 300.0 100.0
fix 1 water npt temp 300.0 300.0 100.0 iso 0.0 0.0 1000.0
<p>In some cases (e.g. for solids) the pressure (volume) and/or
temperature of the system can oscillate undesirably when a Nose/Hoover
barostat and thermostat is applied. The optional <em>drag</em> keyword will
damp these oscillations, although it alters the Nose/Hoover equations.
A value of 0.0 (no drag) leaves the Nose/Hoover formalism unchanged.
A non-zero value adds a drag term; the larger the value specified, the
greater the damping effect. Performing a short run and monitoring the
pressure and temperature is the best way to determine if the drag term
is working. Typically a value between 0.2 to 2.0 is sufficient to
damp oscillations after a few periods. Note that use of the drag
keyword will interfere with energy conservation and will also change
the distribution of positions and velocities so that they do not
correspond to the nominal NVT, NPT, or NPH ensembles.</p>
<p>An alternative way to control initial oscillations is to use chain
thermostats. The keyword <em>tchain</em> determines the number of thermostats
in the particle thermostat. A value of 1 corresponds to the original
Nose-Hoover thermostat. The keyword <em>pchain</em> specifies the number of
thermostats in the chain thermostatting the barostat degrees of
freedom. A value of 0 corresponds to no thermostatting of the
barostat variables.</p>
<p>The <em>mtk</em> keyword controls whether or not the correction terms due to
Martyna, Tuckerman, and Klein are included in the equations of motion
<a class="reference internal" href="fix_rigid.html#martyna"><span>(Martyna)</span></a>. Specifying <em>no</em> reproduces the original
Hoover barostat, whose volume probability distribution function
differs from the true NPT and NPH ensembles by a factor of 1/V. Hence
using <em>yes</em> is more correct, but in many cases the difference is
negligible.</p>
<p>The keyword <em>tloop</em> can be used to improve the accuracy of integration
scheme at little extra cost. The initial and final updates of the
thermostat variables are broken up into <em>tloop</em> substeps, each of
length <em>dt</em>/<em>tloop</em>. This corresponds to using a first-order
Suzuki-Yoshida scheme <a class="reference internal" href="run_style.html#tuckerman"><span>(Tuckerman)</span></a>. The keyword <em>ploop</em>
does the same thing for the barostat thermostat.</p>
<p>The keyword <em>nreset</em> controls how often the reference dimensions used
to define the strain energy are reset. If this keyword is not used,
or is given a value of zero, then the reference dimensions are set to
those of the initial simulation domain and are never changed. If the
simulation domain changes significantly during the simulation, then
the final average pressure tensor will differ significantly from the
specified values of the external stress tensor. A value of <em>nstep</em>
means that every <em>nstep</em> timesteps, the reference dimensions are set
to those of the current simulation domain.</p>
<p>The <em>scaleyz</em>, <em>scalexz</em>, and <em>scalexy</em> keywords control whether or
not the corresponding tilt factors are scaled with the associated box
dimensions when barostatting triclinic periodic cells. The default
values <em>yes</em> will turn on scaling, which corresponds to adjusting the
linear dimensions of the cell while preserving its shape. Choosing
<em>no</em> ensures that the tilt factors are not scaled with the box
dimensions. See below for restrictions and default values in different
situations. In older versions of LAMMPS, scaling of tilt factors was
not performed. The old behavior can be recovered by setting all three
scale keywords to <em>no</em>.</p>
<p>The <em>flip</em> keyword allows the tilt factors for a triclinic box to
exceed half the distance of the parallel box length, as discussed
below. If the <em>flip</em> value is set to <em>yes</em>, the bound is enforced by
flipping the box when it is exceeded. If the <em>flip</em> value is set to
<em>no</em>, the tilt will continue to change without flipping. Note that if
applied stress induces large deformations (e.g. in a liquid), this
means the box shape can tilt dramatically and LAMMPS will run less
efficiently, due to the large volume of communication needed to
acquire ghost atoms around a processor’s irregular-shaped sub-domain.
For extreme values of tilt, LAMMPS may also lose atoms and generate an
error.</p>
<p>The <em>fixedpoint</em> keyword specifies the fixed point for barostat volume
changes. By default, it is the center of the box. Whatever point is
chosen will not move during the simulation. For example, if the lower
periodic boundaries pass through (0,0,0), and this point is provided
to <em>fixedpoint</em>, then the lower periodic boundaries will remain at
(0,0,0), while the upper periodic boundaries will move twice as
far. In all cases, the particle trajectories are unaffected by the
chosen value, except for a time-dependent constant translation of
positions.</p>
+<p>If the <em>update</em> keyword is used with the <em>dipole</em> value, then the
+orientation of the dipole moment of each particle is also updated
+during the time integration. This option should be used for models
+where a dipole moment is assigned to finite-size particles,
+e.g. spheroids via use of the <a class="reference internal" href="atom_style.html"><em>atom_style hybrid sphere dipole</em></a> command.</p>
<hr class="docutils" />
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Using a barostat coupled to tilt dimensions <em>xy</em>, <em>xz</em>, <em>yz</em> can
sometimes result in arbitrarily large values of the tilt dimensions,
i.e. a dramatically deformed simulation box. LAMMPS allows the tilt
factors to grow a small amount beyond the normal limit of half the box
length (0.6 times the box length), and then performs a box “flip” to
an equivalent periodic cell. See the discussion of the <em>flip</em> keyword
above, to allow this bound to be exceeded, if desired.</p>
</div>
<p>The flip operation is described in more detail in the doc page for
<a class="reference internal" href="fix_deform.html"><em>fix deform</em></a>. Both the barostat dynamics and the atom
trajectories are unaffected by this operation. However, if a tilt
factor is incremented by a large amount (1.5 times the box length) on
a single timestep, LAMMPS can not accomodate this event and will
terminate the simulation with an error. This error typically indicates
that there is something badly wrong with how the simulation was
constructed, such as specifying values of <em>Pstart</em> that are too far
from the current stress value, or specifying a timestep that is too
large. Triclinic barostatting should be used with care. This also is
true for other barostat styles, although they tend to be more
forgiving of insults. In particular, it is important to recognize that
equilibrium liquids can not support a shear stress and that
equilibrium solids can not support shear stresses that exceed the
yield stress.</p>
<p>One exception to this rule is if the 1st dimension in the tilt factor
(x for xy) is non-periodic. In that case, the limits on the tilt
factor are not enforced, since flipping the box in that dimension does
not change the atom positions due to non-periodicity. In this mode,
if you tilt the system to extreme angles, the simulation will simply
become inefficient due to the highly skewed simulation box.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Unlike the <a class="reference internal" href="fix_temp_berendsen.html"><em>fix temp/berendsen</em></a> command
which performs thermostatting but NO time integration, these fixes
perform thermostatting/barostatting AND time integration. Thus you
should not use any other time integration fix, such as <a class="reference internal" href="fix_nve.html"><em>fix nve</em></a> on atoms to which this fix is applied. Likewise,
fix nvt and fix npt should not normally be used on atoms that also
have their temperature controlled by another fix - e.g. by <a class="reference internal" href=""><em>fix langevin</em></a> or <a class="reference internal" href="fix_temp_rescale.html"><em>fix temp/rescale</em></a>
commands.</p>
</div>
<p>See <a class="reference internal" href="Section_howto.html#howto-16"><span>this howto section</span></a> of the manual for
a discussion of different ways to compute temperature and perform
thermostatting and barostatting.</p>
<hr class="docutils" />
<p>These fixes compute a temperature and pressure each timestep. To do
this, the fix creates its own computes of style “temp” and “pressure”,
as if one of these two sets of commands had been issued:</p>
<div class="highlight-python"><div class="highlight"><pre>compute fix-ID_temp all temp
compute fix-ID_press all pressure fix-ID_temp
</pre></div>
</div>
<p>See the <a class="reference internal" href="compute_temp.html"><em>compute temp</em></a> and <a class="reference internal" href="compute_pressure.html"><em>compute pressure</em></a> commands for details. Note that the
IDs of the new computes are the fix-ID + underscore + “temp” or fix_ID
+ underscore + “press”. For fix nvt, the group for the new computes
is the same as the fix group. For fix nph and fix npt, the group for
the new computes is “all” since pressure is computed for the entire
system.</p>
<p>Note that these are NOT the computes used by thermodynamic output (see
the <a class="reference internal" href="thermo_style.html"><em>thermo_style</em></a> command) with ID = <em>thermo_temp</em>
and <em>thermo_press</em>. This means you can change the attributes of this
fix’s temperature or pressure via the
<a class="reference internal" href="compute_modify.html"><em>compute_modify</em></a> command or print this temperature
or pressure during thermodynamic output via the <a class="reference internal" href="thermo_style.html"><em>thermo_style custom</em></a> command using the appropriate compute-ID.
It also means that changing attributes of <em>thermo_temp</em> or
<em>thermo_press</em> will have no effect on this fix.</p>
<p>Like other fixes that perform thermostatting, fix nvt and fix npt can
be used with <a class="reference internal" href="compute.html"><em>compute commands</em></a> that calculate a
temperature after removing a “bias” from the atom velocities.
E.g. removing the center-of-mass velocity from a group of atoms or
only calculating temperature on the x-component of velocity or only
calculating temperature for atoms in a geometric region. This is not
done by default, but only if the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> command
is used to assign a temperature compute to this fix that includes such
a bias term. See the doc pages for individual <a class="reference internal" href="compute.html"><em>compute commands</em></a> to determine which ones include a bias. In
this case, the thermostat works in the following manner: the current
temperature is calculated taking the bias into account, bias is
removed from each atom, thermostatting is performed on the remaining
thermal degrees of freedom, and the bias is added back in.</p>
<hr class="docutils" />
<p>These fixes can be used with either the <em>verlet</em> or <em>respa</em>
<a class="reference internal" href="run_style.html"><em>integrators</em></a>. When using one of the barostat fixes
with <em>respa</em>, LAMMPS uses an integrator constructed
according to the following factorization of the Liouville propagator
<p>The fix npt and fix nph commands can be used with rigid bodies or
mixtures of rigid bodies and non-rigid particles (e.g. solvent). But
there are also <a class="reference internal" href="fix_rigid.html"><em>fix rigid/npt</em></a> and <a class="reference internal" href="fix_rigid.html"><em>fix rigid/nph</em></a> commands, which are typically a more natural
choice. See the doc page for those commands for more discussion of
the various ways to do this.</p>
<hr class="docutils" />
<p>Styles with a <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> 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 class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></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>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></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 class="reference internal" href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <a class="reference internal" href="suffix.html"><em>suffix</em></a> command in your input script.</p>
<p>See <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>These fixes writes the state of all the thermostat and barostat
variables to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>. See the
<a class="reference internal" href="read_restart.html"><em>read_restart</em></a> command for info on how to re-specify
a fix in an input script that reads a restart file, so that the
operation of the fix continues in an uninterrupted fashion.</p>
<p>The <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> <em>temp</em> and <em>press</em> options are
supported by these fixes. You can use them to assign a
<a class="reference internal" href="compute.html"><em>compute</em></a> you have defined to this fix which will be used
in its thermostatting or barostatting procedure, as described above.
If you do this, note that the kinetic energy derived from the compute
temperature should be consistent with the virial term computed using
all atoms for the pressure. LAMMPS will warn you if you choose to
compute temperature on a subset of atoms.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If both the <em>temp</em> and <em>press</em> keywords are used in a single
thermo_modify command (or in two separate commands), then the order in
which the keywords are specified is important. Note that a <a class="reference internal" href="compute_pressure.html"><em>pressure compute</em></a> defines its own temperature compute as
an argument when it is specified. The <em>temp</em> keyword will override
this (for the pressure compute being used by fix npt), but only if the
<em>temp</em> keyword comes after the <em>press</em> keyword. If the <em>temp</em> keyword
comes before the <em>press</em> keyword, then the new pressure compute
specified by the <em>press</em> keyword will be unaffected by the <em>temp</em>
setting.</p>
</div>
<p>The <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> <em>energy</em> option is supported by these
fixes to add the energy change induced by Nose/Hoover thermostatting
and barostatting to the system’s potential energy as part of
<p>These fixes compute a global scalar and a global vector of quantities,
which can be accessed by various <a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a>. The scalar value calculated by
these fixes is “extensive”; the vector values are “intensive”.</p>
<p>The scalar is the cumulative energy change due to the fix.</p>
<p>The vector stores internal Nose/Hoover thermostat and barostat
variables. The number and meaning of the vector values depends on
which fix is used and the settings for keywords <em>tchain</em> and <em>pchain</em>,
which specify the number of Nose/Hoover chains for the thermostat and
barostat. If no thermostatting is done, then <em>tchain</em> is 0. If no
barostatting is done, then <em>pchain</em> is 0. In the following list,
“ndof” is 0, 1, 3, or 6, and is the number of degrees of freedom in
the barostat. Its value is 0 if no barostat is used, else its value
is 6 if any off-diagonal stress tensor component is barostatted, else
its value is 1 if <em>couple xyz</em> is used or <em>couple xy</em> for a 2d
simulation, otherwise its value is 3.</p>
<p>The order of values in the global vector and their meaning is as
follows. The notation means there are tchain values for eta, followed
by tchain for eta_dot, followed by ndof for omega, etc:</p>
<li>PE_eta[tchain] = potential energy of each particle thermostat displacement (energy units)</li>
<li>KE_eta_dot[tchain] = kinetic energy of each particle thermostat velocity (energy units)</li>
<li>PE_omega[ndof] = potential energy of each barostat displacement (energy units)</li>
<li>KE_omega_dot[ndof] = kinetic energy of each barostat velocity (energy units)</li>
<li>PE_etap[pchain] = potential energy of each barostat thermostat displacement (energy units)</li>
<li>KE_etap_dot[pchain] = kinetic energy of each barostat thermostat velocity (energy units)</li>
<li>PE_strain[1] = scalar strain energy (energy units)</li>
</ul>
<p>These fixes can ramp their external temperature and pressure over
multiple runs, using the <em>start</em> and <em>stop</em> keywords of the
<a class="reference internal" href="run.html"><em>run</em></a> command. See the <a class="reference internal" href="run.html"><em>run</em></a> command for details of
how to do this.</p>
<p>These fixes are not invoked during <a class="reference internal" href="minimize.html"><em>energy minimization</em></a>.</p>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p><em>X</em>, <em>y</em>, <em>z</em> cannot be barostatted if the associated dimension is not
periodic. <em>Xy</em>, <em>xz</em>, and <em>yz</em> can only be barostatted if the
simulation domain is triclinic and the 2nd dimension in the keyword
(<em>y</em> dimension in <em>xy</em>) is periodic. <em>Z</em>, <em>xz</em>, and <em>yz</em>, cannot be
barostatted for 2D simulations. The <a class="reference internal" href="create_box.html"><em>create_box</em></a>,
<a class="reference internal" href="read_data.html"><em>read data</em></a>, and <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>
commands specify whether the simulation box is orthogonal or
non-orthogonal (triclinic) and explain the meaning of the xy,xz,yz
tilt factors.</p>
<p>For the <em>temp</em> keyword, the final Tstop cannot be 0.0 since it would
make the external T = 0.0 at some timestep during the simulation which
is not allowed in the Nose/Hoover formulation.</p>
<p>The <em>scaleyz yes</em> and <em>scalexz yes</em> keyword/value pairs can not be used
for 2D simulations. <em>scaleyz yes</em>, <em>scalexz yes</em>, and <em>scalexy yes</em> options
can only be used if the 2nd dimension in the keyword is periodic,
and if the tilt factor is not coupled to the barostat via keywords
<em>tri</em>, <em>yz</em>, <em>xz</em>, and <em>xy</em>.</p>
<p>These fixes can be used with dynamic groups as defined by the
<a class="reference internal" href="group.html"><em>group</em></a> command. Likewise they can be used with groups to
which atoms are added or deleted over time, e.g. a deposition
simulation. However, the conservation properties of the thermostat
and barostat are defined for systems with a static set of atoms. You
may observe odd behavior if the atoms in a group vary dramatically
over time or the atom count becomes very small.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
ID, group-ID are documented in "fix"_fix.html command :ulb,l
style_name = {nvt} or {npt} or {nph} :l
one or more keyword/value pairs may be appended :l
-keyword = {temp} or {iso} or {aniso} or {tri} or {x} or {y} or {z} or {xy} or {yz} or {xz} or {couple} or {tchain} or {pchain} or {mtk} or {tloop} or {ploop} or {nreset} or {drag} or {dilate} or {scalexy} or {scaleyz} or {scalexz} or {flip} or {fixedpoint}
+keyword = {temp} or {iso} or {aniso} or {tri} or {x} or {y} or {z} or {xy} or {yz} or {xz} or {couple} or {tchain} or {pchain} or {mtk} or {tloop} or {ploop} or {nreset} or {drag} or {dilate} or {scalexy} or {scaleyz} or {scalexz} or {flip} or {fixedpoint} or {update}
{temp} values = Tstart Tstop Tdamp
Tstart,Tstop = external temperature at start/end of run
Tdamp = temperature damping parameter (time units)
{iso} or {aniso} or {tri} values = Pstart Pstop Pdamp
Pstart,Pstop = scalar external pressure at start/end of run (pressure units)
Pdamp = pressure damping parameter (time units)
{x} or {y} or {z} or {xy} or {yz} or {xz} values = Pstart Pstop Pdamp
Pstart,Pstop = external stress tensor component at start/end of run (pressure units)
Pdamp = stress damping parameter (time units)
{couple} = {none} or {xyz} or {xy} or {yz} or {xz}
{tchain} value = N
N = length of thermostat chain (1 = single thermostat)
{pchain} values = N
N length of thermostat chain on barostat (0 = no thermostat)
{mtk} value = {yes} or {no} = add in MTK adjustment term or not
{tloop} value = M
M = number of sub-cycles to perform on thermostat
{ploop} value = M
M = number of sub-cycles to perform on barostat thermostat
{nreset} value = reset reference cell every this many timesteps
{drag} value = Df
Df = drag factor added to barostat/thermostat (0.0 = no drag)
{dilate} value = dilate-group-ID
dilate-group-ID = only dilate atoms in this group due to barostat volume changes
{scalexy} value = {yes} or {no} = scale xy with ly
{scaleyz} value = {yes} or {no} = scale yz with lz
{scalexz} value = {yes} or {no} = scale xz with lz
{flip} value = {yes} or {no} = allow or disallow box flips when it becomes highly skewed
{fixedpoint} values = x y z
- x,y,z = perform barostat dilation/contraction around this point (distance units) :pre
-
+ x,y,z = perform barostat dilation/contraction around this point (distance units)
+ {update} value = {dipole} update dipole orientation (only for sphere variants) :pre
+
:ule
[Examples:]
fix 1 all nvt temp 300.0 300.0 100.0
fix 1 water npt temp 300.0 300.0 100.0 iso 0.0 0.0 1000.0
<span id="index-0"></span><h1>fix nve/sphere command<a class="headerlink" href="#fix-nve-sphere-command" title="Permalink to this headline">¶</a></h1>
+where a dipole moment is assigned to finite-size particles,
+e.g. spheroids via use of the <a class="reference internal" href="atom_style.html"><em>atom_style hybrid sphere dipole</em></a> command.</p>
<hr class="docutils" />
<p>Styles with a <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> 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 class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></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>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></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 class="reference internal" href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <a class="reference internal" href="suffix.html"><em>suffix</em></a> command in your input script.</p>
<p>See <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>. None of the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various <a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a>. No parameter of this fix can
be used with the <em>start/stop</em> keywords of the <a class="reference internal" href="run.html"><em>run</em></a> command.
This fix is not invoked during <a class="reference internal" href="minimize.html"><em>energy minimization</em></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>This fix requires that atoms store torque and angular velocity (omega)
and a radius as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style sphere</em></a>
command. If the <em>dipole</em> keyword is used, then they must also store a
dipole moment as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style dipole</em></a>
command.</p>
<p>All particles in the group must be finite-size spheres. They cannot
be point particles.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Perform the charge equilibration (QEq) method as described in <a class="reference internal" href="fix_qeq_reax.html#rappe"><span>(Rappe and Goddard)</span></a> and formulated in <a class="reference internal" href="neb.html#nakano"><span>(Nakano)</span></a> (also known
as the matrix inversion method) and in <a class="reference internal" href="pair_smtbq.html#rick"><span>(Rick and Stuart)</span></a> (also
known as the extended Lagrangian method) based on the
electronegativity equilization principle.</p>
<p>These fixes can be used with any <a class="reference internal" href="pair_style.html"><em>pair style</em></a> in
LAMMPS, so long as per-atom charges are defined. The most typical
use-case is in conjunction with a <a class="reference internal" href="pair_style.html"><em>pair style</em></a> that
performs charge equilibration periodically (e.g. every timestep), such
-as the ReaxFF or Streitz-Mintmire potential (the latter is not yet
-implemented in LAMMPS). But these fixes can also be used with
+as the ReaxFF or Streitz-Mintmire potential.
+But these fixes can also be used with
potentials that normally assume per-atom charges are fixed, e.g. a
<a class="reference internal" href="pair_buck.html"><em>Buckingham</em></a> or <a class="reference internal" href="pair_lj.html"><em>LJ/Coulombic</em></a> potential.</p>
<p>Because the charge equilibration calculation is effectively
independent of the pair style, these fixes can also be used to perform
a one-time assignment of charges to atoms. For example, you could
define the QEq fix, perform a zero-timestep run via the <a class="reference internal" href="run.html"><em>run</em></a>
command without any pair style defined which would set per-atom
charges (based on the current atom configuration), then remove the fix
via the <a class="reference internal" href="unfix.html"><em>unfix</em></a> command before performing further dynamics.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Computing and using charge values different from published
values defined for a fixed-charge potential like Buckingham or CHARMM
or AMBER, can have a strong effect on energies and forces, and
produces a different model than the published versions.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The <a class="reference internal" href="fix_qeq_comb.html"><em>fix qeq/comb</em></a> command must still be used
to perform charge equliibration with the <a class="reference internal" href="pair_comb.html"><em>COMB potential</em></a>. The <a class="reference internal" href="fix_qeq_reax.html"><em>fix qeq/reax</em></a>
command can be used to perform charge equilibration with the <a class="reference internal" href="pair_reax_c.html"><em>ReaxFF force field</em></a>, although fix qeq/shielded yields the
same results as fix qeq/reax if <em>Nevery</em>, <em>cutoff</em>, and <em>tolerance</em>
are the same. Eventually the fix qeq/reax command will be deprecated.</p>
</div>
<p>The QEq method minimizes the electrostatic energy of the system (or
equalizes the derivative of energy with respect to charge of all the
atoms) by adjusting the partial charge on individual atoms based on
interactions with their neighbors within <em>cutoff</em>. It reqires a few
parameters, in <em>metal</em> units, for each atom type which provided in a
file specified by <em>qfile</em>. The file has the following format</p>
<div class="highlight-python"><div class="highlight"><pre>1 chi eta gamma zeta qcore
2 chi eta gamma zeta qcore
...
Ntype chi eta gamma zeta qcore
</pre></div>
</div>
<p>There is one line per atom type with the following parameters.
Only a subset of the parameters is used by each QEq style as descibed
below, thus the others can be set to 0.0 if desired.</p>
<ul class="simple">
<li><em>chi</em> = electronegativity in energy units</li>
<li><em>eta</em> = self-Coulomb potential in energy units</li>
<li><em>gamma</em> = shielded Coulomb constant defined by <a class="reference internal" href="#vanduin"><span>ReaxFF force field</span></a> in distance units</li>
<li><em>zeta</em> = Slater type orbital exponent defined by the <a class="reference internal" href="pair_coul.html#streitz"><span>Streitz-Mintmire</span></a> potential in reverse distance units</li>
<li><em>qcore</em> = charge of the nucleus defined by the <a class="reference internal" href="pair_coul.html#streitz"><span>Streitz-Mintmire potential</span></a> potential in charge units</li>
</ul>
<p>The <em>qeq/point</em> style describes partial charges on atoms as point
charges. Interaction between a pair of charged particles is 1/r,
which is the simplest description of the interaction between charges.
Only the <em>chi</em> and <em>eta</em> parameters from the <em>qfile</em> file are used.
Note that Coulomb catastrophe can occur if repulsion between the pair
of charged particles is too weak. This style solves partial charges
on atoms via the matrix inversion method. A tolerance of 1.0e-6 is
usually a good number.</p>
<p>The <em>qeq/shielded</em> style describes partial charges on atoms also as
point charges, but uses a shielded Coulomb potential to describe the
interaction between a pair of charged particles. Interaction through
the shielded Coulomb is given by equation (13) of the <a class="reference internal" href="#vanduin"><span>ReaxFF force field</span></a> paper. The shielding accounts for charge overlap
between charged particles at small separation. This style is the same
as <a class="reference internal" href="fix_qeq_reax.html"><em>fix qeq/reax</em></a>, and can be used with <a class="reference internal" href="pair_reax_c.html"><em>pair_style reax/c</em></a>. Only the <em>chi</em>, <em>eta</em>, and <em>gamma</em>
parameters from the <em>qfile</em> file are used. This style solves partial
charges on atoms via the matrix inversion method. A tolerance of
1.0e-6 is usually a good number.</p>
<p>The <em>qeq/slater</em> style describes partial charges on atoms as spherical
charge densities centered around atoms via the Slater 1*s* orbital, so
that the interaction between a pair of charged particles is the
product of two Slater 1*s* orbitals. The expression for the Slater
1*s* orbital is given under equation (6) of the
<a class="reference internal" href="pair_coul.html#streitz"><span>Streitz-Mintmire</span></a> paper. Only the <em>chi</em>, <em>eta</em>, <em>zeta</em>, and
<em>qcore</em> parameters from the <em>qfile</em> file are used. This style solves
partial charges on atoms via the matrix inversion method. A tolerance
-of 1.0e-6 is usually a good number.</p>
+of 1.0e-6 is usually a good number. Keyword <em>alpha</em> can be used to
+change the Slater type orbital exponent.</p>
<p>The <em>qeq/dynamic</em> style describes partial charges on atoms as point
charges that interact through 1/r, but the extended Lagrangian method
is used to solve partial charges on atoms. Only the <em>chi</em> and <em>eta</em>
parameters from the <em>qfile</em> file are used. Note that Coulomb
catastrophe can occur if repulsion between the pair of charged
particles is too weak. A tolerance of 1.0e-3 is usually a good
-number.</p>
+number. Keyword <em>qdamp</em> can be used to change the damping factor, while
+keyword <em>qstep</em> can be used to change the time step size.</p>
+<p>The <a class="reference internal" href="#shan"><span>*qeq/fire*</span></a> style describes the same charge model and charge
+solver as the <em>qeq/dynamic</em> style, but employs a FIRE minimization
+algorithm to solve for equilibrium charges.
+Keyword <em>qdamp</em> can be used to change the damping factor, while
+keyword <em>qstep</em> can be used to change the time step size.</p>
<p>Note that <em>qeq/point</em>, <em>qeq/shielded</em>, and <em>qeq/slater</em> describe
different charge models, whereas the matrix inversion method and the
-extended Lagrangian method (<em>qeq/dynamic</em>) are different solvers.</p>
-<p>Note that the <em>qeq/point</em> and the <em>qeq/dynamic</em> styles both describe
+extended Lagrangian method (<em>qeq/dynamic</em> and <em>qeq/fire</em>) are
+different solvers.</p>
+<p>Note that <em>qeq/point</em>, <em>qeq/dynamic</em> and <em>qeq/fire</em> styles all describe
charges as point charges that interact through 1/r relationship, but
-solve partial charges on atoms using different solvers. Styles
-<em>qeq/point</em> and the <em>qeq/dynamic</em> should yield comparable results if
+solve partial charges on atoms using different solvers. These three
+styles should yield comparable results if
the QEq parameters and <em>Nevery</em>, <em>cutoff</em>, and <em>tolerance</em> are the
-same. Style <em>qeq/point</em> is typically faster, but <em>qeq/dynamic</em> scales
-better on larger sizes.</p>
+same. Style <em>qeq/point</em> is typically faster, <em>qeq/dynamic</em> scales
+better on larger sizes, and <em>qeq/fire</em> is faster than <em>qeq/dynamic</em>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To avoid the evaluation of the derivative of charge with respect
to position, which is typically ill-defined, the system should have a
zero net charge.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Developing QEq parameters (chi, eta, gamma, zeta, and qcore) is
-an “art”. Charges on atoms are not guaranteed to equilibrate with
+non-trivial. Charges on atoms are not guaranteed to equilibrate with
arbitrary choices of these parameters. We do not develop these QEq
paramters. See the examples/qeq directory for some examples.</p>
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>No information about these fixes is written to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>. No global scalar or vector or per-atom
quantities are stored by these fixes for access by various <a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a>. No parameter of these fixes
can be used with the <em>start/stop</em> keywords of the <a class="reference internal" href="run.html"><em>run</em></a>
command.</p>
<p>Thexe fixes are invoked during <a class="reference internal" href="minimize.html"><em>energy minimization</em></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>These fixes are part of the QEQ package. They are only enabled if
LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>fix store/state command<a class="headerlink" href="#fix-store-state-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>fix ID group-ID store/state N input1 input2 ... keyword value ...
</pre></div>
</div>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="fix.html"><em>fix</em></a> command</li>
<li>store/state = style name of this fix command</li>
<li>N = store atom attributes every N steps, N = 0 for initial store only</li>
<p>If <em>N</em> is not zero, then the attributes will be updated every <em>N</em>
steps.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Actually, only atom attributes specified by keywords like <em>xu</em>
-or <em>vy</em> are initially stored immediately at the point in your input
-script when the fix is defined. Attributes specified by a compute,
-fix, or variable are not initially stored until the first run
+or <em>vy</em> or <em>radius</em> are initially stored immediately at the point in
+your input script when the fix is defined. Attributes specified by a
+compute, fix, or variable are not initially stored until the first run
following the fix definition begins. This is because calculating
those attributes may require quantities that are not defined in
between runs.</p>
</div>
<p>The list of possible attributes is the same as that used by the <a class="reference internal" href="dump.html"><em>dump custom</em></a> command, which describes their meaning.</p>
<p>If the <em>com</em> keyword is set to <em>yes</em> then the <em>xu</em>, <em>yu</em>, and <em>zu</em>
inputs store the position of each atom relative to the center-of-mass
-of the group of atoms, instead of storing the absolute position. This
-option is used by the <a class="reference internal" href="compute_msd.html"><em>compute msd</em></a> command.</p>
+of the group of atoms, instead of storing the absolute position.</p>
<p>The requested values are stored in a per-atom vector or array as
discussed below. Zeroes are stored for atoms not in the specified
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>This fix writes the per-atom values it stores to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>, so that the values can be restored when a
simulation is restarted. See the <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.</p>
<p>None of the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> options are relevant to this
fix.</p>
<p>If a single input is specified, this fix produces a per-atom vector.
If multiple inputs are specified, a per-atom array is produced where
the number of columns for each atom is the number of inputs. These
can be accessed by various <a class="reference internal" href="Section_howto.html#howto-15"><span>output commands</span></a>. The per-atom values be
accessed on any timestep.</p>
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
the <a class="reference internal" href="run.html"><em>run</em></a> command. This fix is not invoked during <a class="reference internal" href="minimize.html"><em>energy minimization</em></a>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>pair_style beck command<a class="headerlink" href="#pair-style-beck-command" title="Permalink to this headline">¶</a></h1>
<p>The following coefficients must be defined for each pair of atoms
types via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command as in the examples
above, or in the data file or restart files read by the
<a class="reference internal" href="read_data.html"><em>read_data</em></a> or <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>
commands.</p>
<ul class="simple">
<li>A (energy units)</li>
<li>B (energy-distance^6 units)</li>
<li>a (distance units)</li>
<li>alpha (1/distance units)</li>
<li>beta (1/distance^6 units)</li>
<li>cutoff (distance units)</li>
</ul>
<p>The last coefficient is optional. If not specified, the global cutoff
Rc is used.</p>
<hr class="docutils" />
<p>Styles with a <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> 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 class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></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>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></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 class="reference internal" href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <a class="reference internal" href="suffix.html"><em>suffix</em></a> command in your input script.</p>
<p>See <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
<p>For atom type pairs I,J and I != J, coeffiecients must be specified.
-No default miture rules are used.</p>
+No default mixing rules are used.</p>
<p>This pair style does not support the <a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a> shift
option for the energy of the pair interaction.</p>
<p>The <a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a> table option is not relevant
for this pair style.</p>
<p>This pair style does not support the <a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a>
tail option for adding long-range tail corrections.</p>
<p>This pair style writes its information to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>, so pair_style and pair_coeff commands do not need
to be specified in an input script that reads a restart file.</p>
<p>This pair style can only be used via the <em>pair</em> keyword of the
<a class="reference internal" href="run_style.html"><em>run_style respa</em></a> command. It does not support the
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>pair_style line/lj command<a class="headerlink" href="#pair-style-line-lj-command" title="Permalink to this headline">¶</a></h1>
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Style <em>line/lj</em> treats particles which are line segments as a set of
small spherical particles that tile the line segment length as
explained below. Interactions between two line segments, each with N1
and N2 spherical particles, are calculated as the pairwise sum of
N1*N2 Lennard-Jones interactions. Interactions between a line segment
with N spherical particles and a point particle are treated as the
pairwise sum of N Lennard-Jones interactions. See the <a class="reference internal" href="pair_lj.html"><em>pair_style lj/cut</em></a> doc page for the definition of Lennard-Jones
interactions.</p>
-<p>The cutoff distance for an interaction between 2 line segments, or
-between a line segment and a point particle, is calculated from the
-position of the line segment (its center), not between pairs of
-individual spheres comprising the line segment. Thus an interaction
-is either calculated in its entirety or not at all.</p>
-<p>The set of non-overlapping spherical particles that represent a line
-segment, for purposes of this pair style, are generated in the
-following manner. Their size is a function of the line segment length
-and the specified sigma for that particle type. If a line segment has
-a length L and is of type I, then the number of spheres N that
-represent the segment is calculated as N = L/sigma_II, rounded up to
-an integer value. Thus if L is not evenly divisibly by sigam_II, N is
-incremented to include one extra sphere. In this case, the spheres
-must be slightly smaller than sigma_II so as not to overlap, so a new
-sigma-prime is chosen as the sphere diameter, such that L/N =
-sigma-prime. Thus the line segment interacts with other segments or
-point particles as a collection of N spheres of diameter sigma-prime,
-evenly spaced along the line segment, so as to exactly cover its
-length.</p>
-<p>The LJ interaction between 2 spheres on different line segments of
-types I,J is computed with an arithmetic mixing of the sigma values of
-the 2 spheres and using the specified epsilon value for I,J atom
-types. Note that because the sigma values for line segment spheres is
-computed using only sigma_II values, specific to the line segment’s
-type, this means that any specified sigma_IJ values (for I != J) are
-effectively ignored.</p>
+<p>The set of non-overlapping spherical sub-particles that represent a
+line segment are generated in the following manner. Their size is a
+function of the line segment length and the specified sub-particle
+size for that particle type. If a line segment has a length L and is
+of type I, then the number of spheres N that represent the segment is
+calculated as N = L/sizeI, rounded up to an integer value. Thus if L
+is not evenly divisibly by sizeI, N is incremented to include one
+extra sphere. The centers of the spheres are spaced equally along the
+line segment. Imagine N+1 equally-space points, which include the 2
+end points of the segment. The sphere centers are halfway between
+each pair of points.</p>
+<p>The LJ interaction between 2 spheres on different line segments (or a
+sphere on a line segment and a point particles) is computed with
+sub-particle epsilon, sigma, and cutoff values that are set by the
+pair_coeff command, as described below. If the distance bewteen the 2
+spheres is greater than the sub-particle cutoff, there is no
+interaction. This means that some pairs of sub-particles on 2 line
+segments may interact, but others may not.</p>
+<p>For purposes of creating the neighbor list for pairs of interacting
+line segments or lines/point particles, a regular particle-particle
+cutoff is used, as defined by the <em>cutoff</em> setting above in the
+pair_style command or overridden with an optional argument in the
+pair_coeff command for a type pair as discussed below. The distance
+between the centers of 2 line segments, or the center of a line
+segment and a point particle, must be less than this distance (plus
+the neighbor skin; see the <a class="reference external" href="neighbor">neighbor</a> command), for the pair
+of particles to be included in the neighbor list.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">This means that a too-short value for the <em>cutoff</em> setting can
+exclude a pair of particles from the neighbor list even if pairs of
+their sub-particle spheres would interact, based on the sub-particle
+cutoff specified in the pair_coeff command. E.g. sub-particles at the
+ends of the line segments that are close to each other. Which may not
+be what you want, since it means the ends of 2 line segments could
+pass through each other. It is up to you to specify a <em>cutoff</em>
+setting that is consistent with the length of the line segments you
+are using and the sub-particle cutoff settings.</p>
+</div>
<p>For style <em>line/lj</em>, the following coefficients must be defined for
-each pair of atoms types via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command
+each pair of atom types via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command
as in the examples above, or in the data file or restart files read by
the <a class="reference internal" href="read_data.html"><em>read_data</em></a> or <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>
commands:</p>
<ul class="simple">
+<li>sizeI (distance units)</li>
+<li>sizeJ (distance units)</li>
<li>epsilon (energy units)</li>
<li>sigma (distance units)</li>
+<li>subcutoff (distance units)</li>
<li>cutoff (distance units)</li>
</ul>
-<p>The last coefficient is optional. If not specified, the global cutoff
-is used.</p>
-<hr class="docutils" />
-<p>Styles with a <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> 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 class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></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>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
-KOKKOS, USER-OMP and OPT packages, respectively. They are only
-enabled if LAMMPS was built with those packages. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></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 class="reference internal" href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
-use the <a class="reference internal" href="suffix.html"><em>suffix</em></a> command in your input script.</p>
-<p>See <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
-more instructions on how to use the accelerated styles effectively.</p>
+<p>The <em>sizeI</em> and <em>sizeJ</em> coefficients are the sub-particle sizes for
+line particles of type I and type J. They are used to define the N
+sub-particles per segment as described above. These coefficients are
+actually stored on a per-type basis. Thus if there are multiple
+pair_coeff commmands that involve type I, as either the first or
+second atom type, you should use consistent values for sizeI or sizeJ
+in all of them. If you do not do this, the last value specified for
+sizeI will apply to all segments of type I. If typeI or typeJ refers
+to point particles, the corresponding sizeI or sizeJ is ignored; it
+can be set to 0.0.</p>
+<p>The <em>epsilon</em>, <em>sigma</em>, and <em>subcutoff</em> coefficients are used to
+compute an LJ interactions between a pair of sub-particles on 2 line
+segments (of type I and J), or between a sub particle/point particle
+pair. As discussed above, the <em>subcutoff</em> and <em>cutoff</em> params are
+different. The latter is only used for building the neighbor list
+when the distance between centers of two line segments or one segment
+and a point particle is calculated.</p>
+<p>The <em>cutoff</em> coefficient is optional. If not specified, the global
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>pair_style tri/lj command<a class="headerlink" href="#pair-style-tri-lj-command" title="Permalink to this headline">¶</a></h1>
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Style <em>tri/lj</em> treats particles which are triangles as a set of small
spherical particles that tile the triangle surface as explained below.
Interactions between two triangles, each with N1 and N2 spherical
particles, are calculated as the pairwise sum of N1*N2 Lennard-Jones
interactions. Interactions between a triangle with N spherical
particles and a point particle are treated as the pairwise sum of N
Lennard-Jones interactions. See the <a class="reference internal" href="pair_lj.html"><em>pair_style lj/cut</em></a>
doc page for the definition of Lennard-Jones interactions.</p>
<p>The cutoff distance for an interaction between 2 triangles, or between
a triangle and a point particle, is calculated from the position of
the triangle (its centroid), not between pairs of individual spheres
comprising the triangle. Thus an interaction is either calculated in
its entirety or not at all.</p>
<p>The set of non-overlapping spherical particles that represent a
triangle, for purposes of this pair style, are generated in the
following manner. Assume the triangle is of type I, and sigma_II has
been specified. We want a set of spheres with centers in the plane of
the triangle, none of them larger in diameter than sigma_II, which
completely cover the triangle’s area, but with minimial overlap and a
minimal total number of spheres. This is done in a recursive manner.
Place a sphere at the centroid of the original triangle. Calculate
what diameter it must have to just cover all 3 corner points of the
triangle. If that diameter is equal to or smaller than sigma_II, then
include a sphere of the calculated diameter in the set of covering
spheres. It the diameter is larger than sigma_II, then split the
triangle into 2 triangles by bisecting its longest side. Repeat the
process on each sub-triangle, recursing as far as needed to generate a
set of covering spheres. When finished, the original criteria are
met, and the set of covering spheres shoule be near minimal in number
and overlap, at least for input triangles with a reasonable
aspect-ratio.</p>
<p>The LJ interaction between 2 spheres on different triangles of types
I,J is computed with an arithmetic mixing of the sigma values of the 2
spheres and using the specified epsilon value for I,J atom types.
Note that because the sigma values for triangles spheres is computed
using only sigma_II values, specific to the triangles’s type, this
means that any specified sigma_IJ values (for I != J) are effectively
ignored.</p>
<p>For style <em>tri/lj</em>, the following coefficients must be defined for
each pair of atoms types via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command
as in the examples above, or in the data file or restart files read by
the <a class="reference internal" href="read_data.html"><em>read_data</em></a> or <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>
commands:</p>
<ul class="simple">
<li>epsilon (energy units)</li>
<li>sigma (distance units)</li>
<li>cutoff (distance units)</li>
</ul>
<p>The last coefficient is optional. If not specified, the global cutoff
is used.</p>
<hr class="docutils" />
-<p>Styles with a <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> 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 class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></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>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
-KOKKOS, USER-OMP and OPT packages, respectively. They are only
-enabled if LAMMPS was built with those packages. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></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 class="reference internal" href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
-use the <a class="reference internal" href="suffix.html"><em>suffix</em></a> command in your input script.</p>
-<p>See <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
-more instructions on how to use the accelerated styles effectively.</p>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
<span id="index-0"></span><h1>set command<a class="headerlink" href="#set-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>set style ID keyword values ...
</pre></div>
</div>
-<ul>
-<li><p class="first">style = <em>atom</em> or <em>type</em> or <em>mol</em> or <em>group</em> or <em>region</em></p>
-</li>
-<li><p class="first">ID = atom ID range or type range or mol ID range or group ID or region ID</p>
-</li>
-<li><p class="first">one or more keyword/value pairs may be appended</p>
-</li>
-<li><dl class="first docutils">
-<dt>keyword = <em>type</em> or <em>type/fraction</em> or <em>mol</em> or <em>x</em> or <em>y</em> or <em>z</em> or <em>charge</em> or <em>dipole</em> or <em>dipole/random</em> or <em>quat</em> or <em>quat/random</em> or <em>diameter</em> or <em>shape</em> or <em>length</em> or <em>tri</em> or <em>theta</em> or <em>angmom</em> or <em>omega</em> or <em>mass</em> or <em>density</em> or <em>volume</em> or <em>image</em> or</dt>
-<dd><p class="first last"><em>bond</em> or <em>angle</em> or <em>dihedral</em> or <em>improper</em> or
-<em>meso_e</em> or <em>meso_cv</em> or <em>meso_rho</em> or <em>smd_contact_radius</em> or <em>smd_mass_density</em> or <em>i_name</em> or <em>d_name</em></p>
-</dd>
-</dl>
-</li>
+<ul class="simple">
+<li>style = <em>atom</em> or <em>type</em> or <em>mol</em> or <em>group</em> or <em>region</em></li>
+<li>ID = atom ID range or type range or mol ID range or group ID or region ID</li>
+<li>one or more keyword/value pairs may be appended</li>
+<li>keyword = <em>type</em> or <em>type/fraction</em> or <em>mol</em> or <em>x</em> or <em>y</em> or <em>z</em> or <em>charge</em> or <em>dipole</em> or <em>dipole/random</em> or <em>quat</em> or <em>quat/random</em> or <em>diameter</em> or <em>shape</em> or <em>length</em> or <em>tri</em> or <em>theta</em> or <em>theta/random</em> or <em>angmom</em> or <em>omega</em> or <em>mass</em> or <em>density</em> or <em>volume</em> or <em>image</em> or <em>bond</em> or <em>angle</em> or <em>dihedral</em> or <em>improper</em> or <em>meso_e</em> or <em>meso_cv</em> or <em>meso_rho</em> or <em>smd_contact_radius</em> or <em>smd_mass_density</em> or <em>i_name</em> or <em>d_name</em></li>
</ul>
<pre class="literal-block">
<em>type</em> value = atom type
value can be an atom-style variable (see below)
<em>type/fraction</em> values = type fraction seed
type = new atom type
fraction = fraction of selected atoms to set to new atom type
seed = random # seed (positive integer)
<em>mol</em> value = molecule ID
value can be an atom-style variable (see below)
<em>x</em>,*y*,*z* value = atom coordinate (distance units)
value can be an atom-style variable (see below)
<em>charge</em> value = atomic charge (charge units)
value can be an atom-style variable (see below)
<em>dipole</em> values = x y z
x,y,z = orientation of dipole moment vector
any of x,y,z can be an atom-style variable (see below)
<em>dipole/random</em> value = seed Dlen
seed = random # seed (positive integer) for dipole moment orientations
Dlen = magnitude of dipole moment (dipole units)
<em>quat</em> values = a b c theta
a,b,c = unit vector to rotate particle around via right-hand rule
theta = rotation angle (degrees)
any of a,b,c,theta can be an atom-style variable (see below)
<em>quat/random</em> value = seed
seed = random # seed (positive integer) for quaternion orientations
<em>diameter</em> value = diameter of spherical particle (distance units)
value can be an atom-style variable (see below)
<em>shape</em> value = Sx Sy Sz
Sx,Sy,Sz = 3 diameters of ellipsoid (distance units)
<em>length</em> value = len
len = length of line segment (distance units)
len can be an atom-style variable (see below)
<em>tri</em> value = side
side = side length of equilateral triangle (distance units)
side can be an atom-style variable (see below)
<em>theta</em> value = angle (degrees)
angle = orientation of line segment with respect to x-axis
angle can be an atom-style variable (see below)
+<em>theta/random</em> value = seed
+ seed = random # seed (positive integer) for line segment orienations
<em>angmom</em> values = Lx Ly Lz
Lx,Ly,Lz = components of angular momentum vector (distance-mass-velocity units)
any of Lx,Ly,Lz can be an atom-style variable (see below)
<em>omega</em> values = Wx Wy Wz
Wx,Wy,Wz = components of angular velocity vector (radians/time units)
any of wx,wy,wz can be an atom-style variable (see below)
<em>mass</em> value = per-atom mass (mass units)
value can be an atom-style variable (see below)
<em>density</em> value = particle density for sphere or ellipsoid (mass/distance^3 or mass/distance^2 or mass/distance units, depending on dimensionality of particle)
value can be an atom-style variable (see below)
<em>volume</em> value = particle volume for Peridynamic particle (distance^3 units)
value can be an atom-style variable (see below)
<em>image</em> nx ny nz
nx,ny,nz = which periodic image of the simulation box the atom is in
<em>bond</em> value = bond type for all bonds between selected atoms
<em>angle</em> value = angle type for all angles between selected atoms
<em>dihedral</em> value = dihedral type for all dihedrals between selected atoms
<em>improper</em> value = improper type for all impropers between selected atoms
<em>meso_e</em> value = energy of SPH particles (need units)
value can be an atom-style variable (see below)
<em>meso_cv</em> value = heat capacity of SPH particles (need units)
value can be an atom-style variable (see below)
<em>meso_rho</em> value = density of SPH particles (need units)
value can be an atom-style variable (see below)
<em>smd_contact_radius</em> = radius for short range interactions, i.e. contact and friction
value can be an atom-style variable (see below)
<em>smd_mass_density</em> = set particle mass based on volume by providing a mass density
value can be an atom-style variable (see below)
<em>i_name</em> value = value for custom integer vector with name
<em>d_name</em> value = value for custom floating-point vector with name
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>set group solvent type 2
set group solvent type/fraction 2 0.5 12393
set group edge bond 4
set region half charge 0.5
set type 3 charge 0.5
set type 1*3 charge 0.5
set atom * charge v_atomfile
set atom 100*200 x 0.5 y 1.0
set atom 1492 type 3
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Set one or more properties of one or more atoms. Since atom
properties are initially assigned by the <a class="reference internal" href="read_data.html"><em>read_data</em></a>,
<a class="reference internal" href="read_restart.html"><em>read_restart</em></a> or <a class="reference internal" href="create_atoms.html"><em>create_atoms</em></a>
commands, this command changes those assignments. This can be useful
for overriding the default values assigned by the
<a class="reference internal" href="create_atoms.html"><em>create_atoms</em></a> command (e.g. charge = 0.0). It can
be useful for altering pairwise and molecular force interactions,
since force-field coefficients are defined in terms of types. It can
be used to change the labeling of atoms by atom type or molecule ID
when they are output in <a class="reference internal" href="dump.html"><em>dump</em></a> files. It can also be useful
for debugging purposes; i.e. positioning an atom at a precise location
to compute subsequent forces or energy.</p>
<p>Note that the <em>style</em> and <em>ID</em> arguments determine which atoms have
their properties reset. The remaining keywords specify which
properties to reset and what the new values are. Some strings like
<em>type</em> or <em>mol</em> can be used as a style and/or a keyword.</p>
<hr class="docutils" />
<p>This section describes how to select which atoms to change
the properties of, via the <em>style</em> and <em>ID</em> arguments.</p>
<p>The style <em>atom</em> selects all the atoms in a range of atom IDs. The
style <em>type</em> selects all the atoms in a range of types. The style
<em>mol</em> selects all the atoms in a range of molecule IDs.</p>
<p>In each of the range cases, the range can be specified as a single
numeric value, or a wildcard asterisk can be used to specify a range
of values. This takes the form “*” or “<em>n” or “n</em>” or “m*n”. For
example, for the style <em>type</em>, 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). For all the styles except
<em>mol</em>, the lowest value for the wildcard is 1; for <em>mol</em> it is 0.</p>
<p>The style <em>group</em> selects all the atoms in the specified group. The
style <em>region</em> selects all the atoms in the specified geometric
region. See the <a class="reference internal" href="group.html"><em>group</em></a> and <a class="reference internal" href="region.html"><em>region</em></a> commands
for details of how to specify a group or region.</p>
<hr class="docutils" />
<p>This section describes the keyword options for which properties to
change, for the selected atoms.</p>
<p>Note that except where explicitly prohibited below, all of the
keywords allow an <a class="reference internal" href="variable.html"><em>atom-style or atomfile-style variable</em></a> to be used as the specified value(s). If the
value is a variable, it should be specified as v_name, where name is
the variable name. In this case, the variable will be evaluated, and
its resulting per-atom value used to determine the value assigned to
each selected atom. Note that the per-atom value from the variable
will be ignored for atoms that are not selected via the <em>style</em> and
<em>ID</em> settings explained above. A simple way to use per-atom values
from the variable to reset a property for all atoms is to use style
<em>atom</em> with <em>ID</em> = “*”; this selects all atom IDs.</p>
<p>Atom-style variables can specify formulas with various mathematical
functions, and include <a class="reference internal" href="thermo_style.html"><em>thermo_style</em></a> command
keywords for the simulation box parameters and timestep and elapsed
time. They can also include per-atom values, such as atom
coordinates. Thus it is easy to specify a time-dependent or
spatially-dependent set of per-atom values. As explained on the
<a class="reference internal" href="variable.html"><em>variable</em></a> doc page, atomfile-style variables can be
used in place of atom-style variables, and thus as arguments to the
set command. Atomfile-style variables read their per-atoms values
from a file.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Atom-style and atomfile-style variables return floating point
per-atom values. If the values are assigned to an integer variable,
such as the molecule ID, then the floating point value is truncated to
its integer portion, e.g. a value of 2.6 would become 2.</p>
</div>
<p>Keyword <em>type</em> sets the atom type for all selected atoms. The
specified value must be from 1 to ntypes, where ntypes was set by the
<a class="reference internal" href="create_box.html"><em>create_box</em></a> command or the <em>atom types</em> field in the
header of the data file read by the <a class="reference internal" href="read_data.html"><em>read_data</em></a>
command.</p>
<p>Keyword <em>type/fraction</em> sets the atom type for a fraction of the
selected atoms. The actual number of atoms changed is not guaranteed
to be exactly the requested fraction, but should be statistically
close. Random numbers are used in such a way that a particular atom
is changed or not changed, regardless of how many processors are being
used. This keyword does not allow use of an atom-style variable.</p>
<p>Keyword <em>mol</em> sets the molecule ID for all selected atoms. The <a class="reference internal" href="atom_style.html"><em>atom style</em></a> being used must support the use of molecule
IDs.</p>
<p>Keywords <em>x</em>, <em>y</em>, <em>z</em>, and <em>charge</em> set the coordinates or charge of
all selected atoms. For <em>charge</em>, the <a class="reference internal" href="atom_style.html"><em>atom style</em></a>
being used must support the use of atomic charge.</p>
<p>Keyword <em>dipole</em> uses the specified x,y,z values as components of a
vector to set as the orientation of the dipole moment vectors of the
selected atoms. The magnitude of the dipole moment is set
by the length of this orientation vector.</p>
<p>Keyword <em>dipole/random</em> randomizes the orientation of the dipole
-moment vectors of the selected atoms and sets the magnitude of each to
-the specified <em>Dlen</em> value. For 2d systems, the z component of the
+moment vectors for the selected atoms and sets the magnitude of each
+to the specified <em>Dlen</em> value. For 2d systems, the z component of the
orientation is set to 0.0. Random numbers are used in such a way that
the orientation of a particular atom is the same, regardless of how
many processors are being used. This keyword does not allow use of an
atom-style variable.</p>
<p>Keyword <em>quat</em> uses the specified values to create a quaternion
(4-vector) that represents the orientation of the selected atoms. The
-particles must be ellipsoids as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style ellipsoid</em></a> command or triangles as defined by the
-<a class="reference internal" href="atom_style.html"><em>atom_style tri</em></a> command. Note that particles defined
-by <a class="reference internal" href="atom_style.html"><em>atom_style ellipsoid</em></a> have 3 shape parameters.
-The 3 values must be non-zero for each particle set by this command.
-They are used to specify the aspect ratios of an ellipsoidal particle,
+particles must define a quaternion for their orientation
+(e.g. ellipsoids, triangles, body particles) as defined by the
+<a class="reference internal" href="atom_style.html"><em>atom_style</em></a> command. Note that particles defined by
+<a class="reference internal" href="atom_style.html"><em>atom_style ellipsoid</em></a> have 3 shape parameters. The 3
+values must be non-zero for each particle set by this command. They
+are used to specify the aspect ratios of an ellipsoidal particle,
which is oriented by default with its x-axis along the simulation
box’s x-axis, and similarly for y and z. If this body is rotated (via
the right-hand rule) by an angle theta around a unit rotation vector
(a,b,c), then the quaternion that represents its new orientation is
given by (cos(theta/2), a*sin(theta/2), b*sin(theta/2),
c*sin(theta/2)). The theta and a,b,c values are the arguments to the
<em>quat</em> keyword. LAMMPS normalizes the quaternion in case (a,b,c) was
not specified as a unit vector. For 2d systems, the a,b,c values are
ignored, since a rotation vector of (0,0,1) is the only valid choice.</p>
-<p>Keyword <em>quat/random</em> randomizes the orientation of the quaternion of
-the selected atoms. The particles must be ellipsoids as defined by
-the <a class="reference internal" href="atom_style.html"><em>atom_style ellipsoid</em></a> command or triangles as
-defined by the <a class="reference internal" href="atom_style.html"><em>atom_style tri</em></a> command. Random
-numbers are used in such a way that the orientation of a particular
-atom is the same, regardless of how many processors are being used.
-For 2d systems, only orientations in the xy plane are generated. As
-with keyword <em>quat</em>, for ellipsoidal particles, the 3 shape values
-must be non-zero for each particle set by this command. This keyword
-does not allow use of an atom-style variable.</p>
+<p>Keyword <em>quat/random</em> randomizes the orientation of the quaternion for
+the selected atoms. The particles must define a quaternion for their
+orientation (e.g. ellipsoids, triangles, body particles) as defined by
+the <a class="reference internal" href="atom_style.html"><em>atom_style</em></a> command. Random numbers are used in
+such a way that the orientation of a particular atom is the same,
+regardless of how many processors are being used. For 2d systems,
+only orientations in the xy plane are generated. As with keyword
+<em>quat</em>, for ellipsoidal particles, the 3 shape values must be non-zero
+for each particle set by this command. This keyword does not allow
+use of an atom-style variable.</p>
<p>Keyword <em>diameter</em> sets the size of the selected atoms. The particles
must be finite-size spheres as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style sphere</em></a> command. The diameter of a particle can be
set to 0.0, which means they will be treated as point particles. Note
that this command does not adjust the particle mass, even if it was
defined with a density, e.g. via the <a class="reference internal" href="read_data.html"><em>read_data</em></a>
command.</p>
<p>Keyword <em>shape</em> sets the size and shape of the selected atoms. The
particles must be ellipsoids as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style ellipsoid</em></a> command. The <em>Sx</em>, <em>Sy</em>, <em>Sz</em> settings are
the 3 diameters of the ellipsoid in each direction. All 3 can be set
to the same value, which means the ellipsoid is effectively a sphere.
They can also all be set to 0.0 which means the particle will be
treated as a point particle. Note that this command does not adjust
the particle mass, even if it was defined with a density, e.g. via the
<p>Keyword <em>length</em> sets the length of selected atoms. The particles
must be line segments as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style line</em></a> command. If the specified value is non-zero the
line segment is (re)set to a length = the specified value, centered
around the particle position, with an orientation along the x-axis.
If the specified value is 0.0, the particle will become a point
particle. Note that this command does not adjust the particle mass,
even if it was defined with a density, e.g. via the
<p>Keyword <em>tri</em> sets the size of selected atoms. The particles must be
triangles as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style tri</em></a> command.
If the specified value is non-zero the triangle is (re)set to be an
equilateral triangle in the xy plane with side length = the specified
value, with a centroid at the particle position, with its base
parallel to the x axis, and the y-axis running from the center of the
base to the top point of the triangle. If the specified value is 0.0,
the particle will become a point particle. Note that this command
does not adjust the particle mass, even if it was defined with a
density, e.g. via the <a class="reference internal" href="read_data.html"><em>read_data</em></a> command.</p>
<p>Keyword <em>theta</em> sets the orientation of selected atoms. The particles
must be line segments as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style line</em></a> command. The specified value is used to set the
orientation angle of the line segments with respect to the x axis.</p>
+<p>Keyword <em>theta/random</em> randomizes the orientation of theta for the
+selected atoms. The particles must be line segments as defined by the
+<a class="reference internal" href="atom_style.html"><em>atom_style line</em></a> command. Random numbers are used in
+such a way that the orientation of a particular atom is the same,
+regardless of how many processors are being used. This keyword does
+not allow use of an atom-style variable.</p>
<p>Keyword <em>angmom</em> sets the angular momentum of selected atoms. The
particles must be ellipsoids as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style ellipsoid</em></a> command or triangles as defined by the
<a class="reference internal" href="atom_style.html"><em>atom_style tri</em></a> command. The angular momentum vector
of the particles is set to the 3 specified components.</p>
<p>Keyword <em>omega</em> sets the angular velocity of selected atoms. The
particles must be spheres as defined by the “atom_style sphere”_
atom_style.html command. The angular velocity vector of the particles
is set to the 3 specified components.</p>
<p>Keyword <em>mass</em> sets the mass of all selected particles. The particles
must have a per-atom mass attribute, as defined by the
<a class="reference internal" href="atom_style.html"><em>atom_style</em></a> command. See the “mass” command for how
to set mass values on a per-type basis.</p>
<p>Keyword <em>density</em> also sets the mass of all selected particles, but in
a different way. The particles must have a per-atom mass attribute,
as defined by the <a class="reference internal" href="atom_style.html"><em>atom_style</em></a> command. If the atom
has a radius attribute (see <a class="reference internal" href="atom_style.html"><em>atom_style sphere</em></a>) and
its radius is non-zero, its mass is set from the density and particle
volume. If the atom has a shape attribute (see <a class="reference internal" href="atom_style.html"><em>atom_style ellipsoid</em></a>) and its 3 shape parameters are non-zero,
then its mass is set from the density and particle volume. If the
atom has a length attribute (see <a class="reference internal" href="atom_style.html"><em>atom_style line</em></a>)
and its length is non-zero, then its mass is set from the density and
line segment length (the input density is assumed to be in
mass/distance units). If the atom has an area attribute (see
<a class="reference internal" href="atom_style.html"><em>atom_style tri</em></a>) and its area is non-zero, then its
mass is set from the density and triangle area (the input density is
assumed to be in mass/distance^2 units). If none of these cases are
valid, then the mass is set to the density value directly (the input
density is assumed to be in mass units).</p>
<p>Keyword <em>smd_mass_density</em> also sets the mass of all selected
particles, but it is only applicable to the Smooth Mach Dynamics
package USER-SMD. This command assumes that the particle volume has
already been correctly set and calculates particle mass from the
provided mass density value.</p>
<p>Keyword <em>smd_contact_radius</em> only applies to simulations with the
Smooth Mach Dynamics package USER-SMD. This command sets an
interaction radius for computing short-range interactions,
e.g. repulsive forces to prevent different individual physical bodies
from penetrating each other. Note that the SPH smoothing kernel
diameter used for computing long range, nonlocal interactions, is set
using the <em>diameter</em> keyword.</p>
<p>Keyword <em>volume</em> sets the volume of all selected particles.
Currently, only the <a class="reference internal" href="atom_style.html"><em>atom_style peri</em></a> command defines
particles with a volume attribute. Note that this command does not
adjust the particle mass.</p>
<p>Keyword <em>image</em> sets which image of the simulation box the atom is
considered to be in. An image of 0 means it is inside the box as
defined. A value of 2 means add 2 box lengths to get the true value.
A value of -1 means subtract 1 box length to get the true value.
LAMMPS updates these flags as atoms cross periodic boundaries during
the simulation. The flags can be output with atom snapshots via the
<a class="reference internal" href="dump.html"><em>dump</em></a> command. If a value of NULL is specified for any of
nx,ny,nz, then the current image value for that dimension is
unchanged. For non-periodic dimensions only a value of 0 can be
specified. This keyword does not allow use of atom-style variables.
This command can be useful after a system has been equilibrated and
atoms have diffused one or more box lengths in various directions.
This command can then reset the image values for atoms so that they
are effectively inside the simulation box, e.g if a diffusion
coefficient is about to be measured via the <a class="reference internal" href="compute_msd.html"><em>compute msd</em></a> command. Care should be taken not to reset the
image flags of two atoms in a bond to the same value if the bond
straddles a periodic boundary (rather they should be different by +/-
1). This will not affect the dynamics of a simulation, but may mess
up analysis of the trajectories if a LAMMPS diagnostic or your own
analysis relies on the image flags to unwrap a molecule which
straddles the periodic box.</p>
<p>Keywords <em>bond</em>, <em>angle</em>, <em>dihedral</em>, and <em>improper</em>, set the bond
type (angle type, etc) of all bonds (angles, etc) of selected atoms to
the specified value from 1 to nbondtypes (nangletypes, etc). All
atoms in a particular bond (angle, etc) must be selected atoms in
order for the change to be made. The value of nbondtype (nangletypes,
etc) was set by the <em>bond types</em> (<em>angle types</em>, etc) field in the
header of the data file read by the <a class="reference internal" href="read_data.html"><em>read_data</em></a>
command. These keywords do not allow use of an atom-style variable.</p>
<p>Keywords <em>meso_e</em>, <em>meso_cv</em>, and <em>meso_rho</em> set the energy, heat
capacity, and density of smmothed particle hydrodynamics (SPH)
particles. See <a class="reference external" href="USER/sph/SPH_LAMMPS_userguide.pdf">this PDF guide</a> to
using SPH in LAMMPS.</p>
<p>Keywords <em>i_name</em> and <em>d_name</em> refer to custom integer and
floating-point properties that have been added to each atom via the
<a class="reference internal" href="fix_property_atom.html"><em>fix property/atom</em></a> command. When that command
is used specific names are given to each attribute which are what is
specified as the “name” portion of <em>i_name</em> or <em>d_name</em>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>You cannot set an atom attribute (e.g. <em>mol</em> or <em>q</em> or <em>volume</em>) if
the <a class="reference internal" href="atom_style.html"><em>atom_style</em></a> does not have that attribute.</p>
<p>This command requires inter-processor communication to coordinate the
setting of bond types (angle types, etc). This means that your system
must be ready to perform a simulation before using one of these
keywords (force fields set, atom mass set, etc). This is not
necessary for other keywords.</p>
<p>Using the <em>region</em> style with the bond (angle, etc) keywords can give
unpredictable results if there are bonds (angles, etc) that straddle
periodic boundaries. This is because the region may only extend up to
the boundary and partner atoms in the bond (angle, etc) may have
coordinates outside the simulation box if they are ghost atoms.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
style = {atom} or {type} or {mol} or {group} or {region} :ulb,l
ID = atom ID range or type range or mol ID range or group ID or region ID :l
one or more keyword/value pairs may be appended :l
keyword = {type} or {type/fraction} or {mol} or {x} or {y} or {z} or \
{charge} or {dipole} or {dipole/random} or {quat} or \
{quat/random} or {diameter} or {shape} or \
- {length} or {tri} or {theta} or {angmom} or {omega} or \
- {mass} or {density} or {volume} or {image} or
- {bond} or {angle} or {dihedral} or {improper} or
+ {length} or {tri} or {theta} or {theta/random} or \
+ {angmom} or {omega} or \
+ {mass} or {density} or {volume} or {image} or \
+ {bond} or {angle} or {dihedral} or {improper} or \
{meso_e} or {meso_cv} or {meso_rho} or \
{smd_contact_radius} or {smd_mass_density} or \
{i_name} or {d_name} :l
{type} value = atom type
value can be an atom-style variable (see below)
{type/fraction} values = type fraction seed
type = new atom type
fraction = fraction of selected atoms to set to new atom type
seed = random # seed (positive integer)
{mol} value = molecule ID
value can be an atom-style variable (see below)
{x},{y},{z} value = atom coordinate (distance units)
value can be an atom-style variable (see below)
{charge} value = atomic charge (charge units)
value can be an atom-style variable (see below)
{dipole} values = x y z
x,y,z = orientation of dipole moment vector
any of x,y,z can be an atom-style variable (see below)
{dipole/random} value = seed Dlen
seed = random # seed (positive integer) for dipole moment orientations
Dlen = magnitude of dipole moment (dipole units)
{quat} values = a b c theta
a,b,c = unit vector to rotate particle around via right-hand rule
theta = rotation angle (degrees)
any of a,b,c,theta can be an atom-style variable (see below)
{quat/random} value = seed
seed = random # seed (positive integer) for quaternion orientations
{diameter} value = diameter of spherical particle (distance units)
value can be an atom-style variable (see below)
{shape} value = Sx Sy Sz
Sx,Sy,Sz = 3 diameters of ellipsoid (distance units)
{length} value = len
len = length of line segment (distance units)
len can be an atom-style variable (see below)
{tri} value = side
side = side length of equilateral triangle (distance units)
side can be an atom-style variable (see below)
{theta} value = angle (degrees)
angle = orientation of line segment with respect to x-axis
angle can be an atom-style variable (see below)
+ {theta/random} value = seed
+ seed = random # seed (positive integer) for line segment orienations
{angmom} values = Lx Ly Lz
Lx,Ly,Lz = components of angular momentum vector (distance-mass-velocity units)
any of Lx,Ly,Lz can be an atom-style variable (see below)
{omega} values = Wx Wy Wz
Wx,Wy,Wz = components of angular velocity vector (radians/time units)
any of wx,wy,wz can be an atom-style variable (see below)
{mass} value = per-atom mass (mass units)
value can be an atom-style variable (see below)
{density} value = particle density for sphere or ellipsoid (mass/distance^3 or mass/distance^2 or mass/distance units, depending on dimensionality of particle)
value can be an atom-style variable (see below)
{volume} value = particle volume for Peridynamic particle (distance^3 units)
value can be an atom-style variable (see below)
{image} nx ny nz
nx,ny,nz = which periodic image of the simulation box the atom is in
{bond} value = bond type for all bonds between selected atoms
{angle} value = angle type for all angles between selected atoms
{dihedral} value = dihedral type for all dihedrals between selected atoms
{improper} value = improper type for all impropers between selected atoms
{meso_e} value = energy of SPH particles (need units)
value can be an atom-style variable (see below)
{meso_cv} value = heat capacity of SPH particles (need units)
value can be an atom-style variable (see below)
{meso_rho} value = density of SPH particles (need units)
value can be an atom-style variable (see below)
{smd_contact_radius} = radius for short range interactions, i.e. contact and friction
value can be an atom-style variable (see below)
{smd_mass_density} = set particle mass based on volume by providing a mass density
value can be an atom-style variable (see below)
{i_name} value = value for custom integer vector with name
{d_name} value = value for custom floating-point vector with name :pre
:ule
[Examples:]
set group solvent type 2
set group solvent type/fraction 2 0.5 12393
set group edge bond 4
set region half charge 0.5
set type 3 charge 0.5
set type 1*3 charge 0.5
set atom * charge v_atomfile
set atom 100*200 x 0.5 y 1.0
set atom 1492 type 3 :pre
[Description:]
Set one or more properties of one or more atoms. Since atom
properties are initially assigned by the "read_data"_read_data.html,
"read_restart"_read_restart.html or "create_atoms"_create_atoms.html
commands, this command changes those assignments. This can be useful
for overriding the default values assigned by the
"create_atoms"_create_atoms.html command (e.g. charge = 0.0). It can
be useful for altering pairwise and molecular force interactions,
since force-field coefficients are defined in terms of types. It can
be used to change the labeling of atoms by atom type or molecule ID
when they are output in "dump"_dump.html files. It can also be useful
for debugging purposes; i.e. positioning an atom at a precise location
to compute subsequent forces or energy.
Note that the {style} and {ID} arguments determine which atoms have
their properties reset. The remaining keywords specify which
properties to reset and what the new values are. Some strings like
{type} or {mol} can be used as a style and/or a keyword.
:line
This section describes how to select which atoms to change
the properties of, via the {style} and {ID} arguments.
The style {atom} selects all the atoms in a range of atom IDs. The
style {type} selects all the atoms in a range of types. The style
{mol} selects all the atoms in a range of molecule IDs.
In each of the range cases, the range can be specified as a single
numeric value, or a wildcard asterisk can be used to specify a range
of values. This takes the form "*" or "*n" or "n*" or "m*n". For
example, for the style {type}, 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). For all the styles except
{mol}, the lowest value for the wildcard is 1; for {mol} it is 0.
The style {group} selects all the atoms in the specified group. The
style {region} selects all the atoms in the specified geometric
region. See the "group"_group.html and "region"_region.html commands
for details of how to specify a group or region.
:line
This section describes the keyword options for which properties to
change, for the selected atoms.
Note that except where explicitly prohibited below, all of the
keywords allow an "atom-style or atomfile-style
variable"_variable.html to be used as the specified value(s). If the
value is a variable, it should be specified as v_name, where name is
the variable name. In this case, the variable will be evaluated, and
its resulting per-atom value used to determine the value assigned to
each selected atom. Note that the per-atom value from the variable
will be ignored for atoms that are not selected via the {style} and
{ID} settings explained above. A simple way to use per-atom values
from the variable to reset a property for all atoms is to use style
{atom} with {ID} = "*"; this selects all atom IDs.
Atom-style variables can specify formulas with various mathematical
functions, and include "thermo_style"_thermo_style.html command
keywords for the simulation box parameters and timestep and elapsed
time. They can also include per-atom values, such as atom
coordinates. Thus it is easy to specify a time-dependent or
spatially-dependent set of per-atom values. As explained on the
"variable"_variable.html doc page, atomfile-style variables can be
used in place of atom-style variables, and thus as arguments to the
set command. Atomfile-style variables read their per-atoms values
from a file.
NOTE: Atom-style and atomfile-style variables return floating point
per-atom values. If the values are assigned to an integer variable,
such as the molecule ID, then the floating point value is truncated to
its integer portion, e.g. a value of 2.6 would become 2.
Keyword {type} sets the atom type for all selected atoms. The
specified value must be from 1 to ntypes, where ntypes was set by the
"create_box"_create_box.html command or the {atom types} field in the
header of the data file read by the "read_data"_read_data.html
command.
Keyword {type/fraction} sets the atom type for a fraction of the
selected atoms. The actual number of atoms changed is not guaranteed
to be exactly the requested fraction, but should be statistically
close. Random numbers are used in such a way that a particular atom
is changed or not changed, regardless of how many processors are being
used. This keyword does not allow use of an atom-style variable.
Keyword {mol} sets the molecule ID for all selected atoms. The "atom
style"_atom_style.html being used must support the use of molecule
IDs.
Keywords {x}, {y}, {z}, and {charge} set the coordinates or charge of
all selected atoms. For {charge}, the "atom style"_atom_style.html
being used must support the use of atomic charge.
Keyword {dipole} uses the specified x,y,z values as components of a
vector to set as the orientation of the dipole moment vectors of the
selected atoms. The magnitude of the dipole moment is set
by the length of this orientation vector.
Keyword {dipole/random} randomizes the orientation of the dipole
-moment vectors of the selected atoms and sets the magnitude of each to
-the specified {Dlen} value. For 2d systems, the z component of the
+moment vectors for the selected atoms and sets the magnitude of each
+to the specified {Dlen} value. For 2d systems, the z component of the
orientation is set to 0.0. Random numbers are used in such a way that
the orientation of a particular atom is the same, regardless of how
many processors are being used. This keyword does not allow use of an
atom-style variable.
Keyword {quat} uses the specified values to create a quaternion
(4-vector) that represents the orientation of the selected atoms. The
-particles must be ellipsoids as defined by the "atom_style
-ellipsoid"_atom_style.html command or triangles as defined by the
-"atom_style tri"_atom_style.html command. Note that particles defined
-by "atom_style ellipsoid"_atom_style.html have 3 shape parameters.
-The 3 values must be non-zero for each particle set by this command.
-They are used to specify the aspect ratios of an ellipsoidal particle,
+particles must define a quaternion for their orientation
+(e.g. ellipsoids, triangles, body particles) as defined by the
+"atom_style"_atom_style.html command. Note that particles defined by
+"atom_style ellipsoid"_atom_style.html have 3 shape parameters. The 3
+values must be non-zero for each particle set by this command. They
+are used to specify the aspect ratios of an ellipsoidal particle,
which is oriented by default with its x-axis along the simulation
box's x-axis, and similarly for y and z. If this body is rotated (via
the right-hand rule) by an angle theta around a unit rotation vector
(a,b,c), then the quaternion that represents its new orientation is
given by (cos(theta/2), a*sin(theta/2), b*sin(theta/2),
c*sin(theta/2)). The theta and a,b,c values are the arguments to the
{quat} keyword. LAMMPS normalizes the quaternion in case (a,b,c) was
not specified as a unit vector. For 2d systems, the a,b,c values are
ignored, since a rotation vector of (0,0,1) is the only valid choice.
-Keyword {quat/random} randomizes the orientation of the quaternion of
-the selected atoms. The particles must be ellipsoids as defined by
-the "atom_style ellipsoid"_atom_style.html command or triangles as
-defined by the "atom_style tri"_atom_style.html command. Random
-numbers are used in such a way that the orientation of a particular
-atom is the same, regardless of how many processors are being used.
-For 2d systems, only orientations in the xy plane are generated. As
-with keyword {quat}, for ellipsoidal particles, the 3 shape values
-must be non-zero for each particle set by this command. This keyword
-does not allow use of an atom-style variable.
+Keyword {quat/random} randomizes the orientation of the quaternion for
+the selected atoms. The particles must define a quaternion for their
+orientation (e.g. ellipsoids, triangles, body particles) as defined by
+the "atom_style"_atom_style.html command. Random numbers are used in
+such a way that the orientation of a particular atom is the same,
+regardless of how many processors are being used. For 2d systems,
+only orientations in the xy plane are generated. As with keyword
+{quat}, for ellipsoidal particles, the 3 shape values must be non-zero
+for each particle set by this command. This keyword does not allow
+use of an atom-style variable.
Keyword {diameter} sets the size of the selected atoms. The particles
must be finite-size spheres as defined by the "atom_style
sphere"_atom_style.html command. The diameter of a particle can be
set to 0.0, which means they will be treated as point particles. Note
that this command does not adjust the particle mass, even if it was
defined with a density, e.g. via the "read_data"_read_data.html
command.
Keyword {shape} sets the size and shape of the selected atoms. The
particles must be ellipsoids as defined by the "atom_style
ellipsoid"_atom_style.html command. The {Sx}, {Sy}, {Sz} settings are
the 3 diameters of the ellipsoid in each direction. All 3 can be set
to the same value, which means the ellipsoid is effectively a sphere.
They can also all be set to 0.0 which means the particle will be
treated as a point particle. Note that this command does not adjust
the particle mass, even if it was defined with a density, e.g. via the
"read_data"_read_data.html command.
Keyword {length} sets the length of selected atoms. The particles
must be line segments as defined by the "atom_style
line"_atom_style.html command. If the specified value is non-zero the
line segment is (re)set to a length = the specified value, centered
around the particle position, with an orientation along the x-axis.
If the specified value is 0.0, the particle will become a point
particle. Note that this command does not adjust the particle mass,
even if it was defined with a density, e.g. via the
"read_data"_read_data.html command.
Keyword {tri} sets the size of selected atoms. The particles must be
triangles as defined by the "atom_style tri"_atom_style.html command.
If the specified value is non-zero the triangle is (re)set to be an
equilateral triangle in the xy plane with side length = the specified
value, with a centroid at the particle position, with its base
parallel to the x axis, and the y-axis running from the center of the
base to the top point of the triangle. If the specified value is 0.0,
the particle will become a point particle. Note that this command
does not adjust the particle mass, even if it was defined with a
density, e.g. via the "read_data"_read_data.html command.
Keyword {theta} sets the orientation of selected atoms. The particles
must be line segments as defined by the "atom_style
line"_atom_style.html command. The specified value is used to set the
orientation angle of the line segments with respect to the x axis.
+
+Keyword {theta/random} randomizes the orientation of theta for the
+selected atoms. The particles must be line segments as defined by the
+"atom_style line"_atom_style.html command. Random numbers are used in
+such a way that the orientation of a particular atom is the same,
+regardless of how many processors are being used. This keyword does
+not allow use of an atom-style variable.
Keyword {angmom} sets the angular momentum of selected atoms. The
particles must be ellipsoids as defined by the "atom_style
ellipsoid"_atom_style.html command or triangles as defined by the
"atom_style tri"_atom_style.html command. The angular momentum vector
of the particles is set to the 3 specified components.
Keyword {omega} sets the angular velocity of selected atoms. The
particles must be spheres as defined by the "atom_style sphere"_
atom_style.html command. The angular velocity vector of the particles
is set to the 3 specified components.
Keyword {mass} sets the mass of all selected particles. The particles
must have a per-atom mass attribute, as defined by the
"atom_style"_atom_style.html command. See the "mass" command for how
to set mass values on a per-type basis.
Keyword {density} also sets the mass of all selected particles, but in
a different way. The particles must have a per-atom mass attribute,
as defined by the "atom_style"_atom_style.html command. If the atom
has a radius attribute (see "atom_style sphere"_atom_style.html) and
its radius is non-zero, its mass is set from the density and particle
volume. If the atom has a shape attribute (see "atom_style
ellipsoid"_atom_style.html) and its 3 shape parameters are non-zero,
then its mass is set from the density and particle volume. If the
atom has a length attribute (see "atom_style line"_atom_style.html)
and its length is non-zero, then its mass is set from the density and
line segment length (the input density is assumed to be in
mass/distance units). If the atom has an area attribute (see
"atom_style tri"_atom_style.html) and its area is non-zero, then its
mass is set from the density and triangle area (the input density is
assumed to be in mass/distance^2 units). If none of these cases are
valid, then the mass is set to the density value directly (the input
density is assumed to be in mass units).
Keyword {smd_mass_density} also sets the mass of all selected
particles, but it is only applicable to the Smooth Mach Dynamics
package USER-SMD. This command assumes that the particle volume has
already been correctly set and calculates particle mass from the
provided mass density value.
Keyword {smd_contact_radius} only applies to simulations with the
Smooth Mach Dynamics package USER-SMD. This command sets an
interaction radius for computing short-range interactions,
e.g. repulsive forces to prevent different individual physical bodies
from penetrating each other. Note that the SPH smoothing kernel
diameter used for computing long range, nonlocal interactions, is set
using the {diameter} keyword.
Keyword {volume} sets the volume of all selected particles.
Currently, only the "atom_style peri"_atom_style.html command defines
particles with a volume attribute. Note that this command does not
adjust the particle mass.
Keyword {image} sets which image of the simulation box the atom is
considered to be in. An image of 0 means it is inside the box as
defined. A value of 2 means add 2 box lengths to get the true value.
A value of -1 means subtract 1 box length to get the true value.
LAMMPS updates these flags as atoms cross periodic boundaries during
the simulation. The flags can be output with atom snapshots via the
"dump"_dump.html command. If a value of NULL is specified for any of
nx,ny,nz, then the current image value for that dimension is
unchanged. For non-periodic dimensions only a value of 0 can be
specified. This keyword does not allow use of atom-style variables.
This command can be useful after a system has been equilibrated and
atoms have diffused one or more box lengths in various directions.
This command can then reset the image values for atoms so that they
are effectively inside the simulation box, e.g if a diffusion
coefficient is about to be measured via the "compute
msd"_compute_msd.html command. Care should be taken not to reset the
image flags of two atoms in a bond to the same value if the bond
straddles a periodic boundary (rather they should be different by +/-
1). This will not affect the dynamics of a simulation, but may mess
up analysis of the trajectories if a LAMMPS diagnostic or your own
analysis relies on the image flags to unwrap a molecule which
straddles the periodic box.
Keywords {bond}, {angle}, {dihedral}, and {improper}, set the bond
type (angle type, etc) of all bonds (angles, etc) of selected atoms to
the specified value from 1 to nbondtypes (nangletypes, etc). All
atoms in a particular bond (angle, etc) must be selected atoms in
order for the change to be made. The value of nbondtype (nangletypes,
etc) was set by the {bond types} ({angle types}, etc) field in the
header of the data file read by the "read_data"_read_data.html
command. These keywords do not allow use of an atom-style variable.
Keywords {meso_e}, {meso_cv}, and {meso_rho} set the energy, heat
capacity, and density of smmothed particle hydrodynamics (SPH)
particles. See "this PDF guide"_USER/sph/SPH_LAMMPS_userguide.pdf to
using SPH in LAMMPS.
Keywords {i_name} and {d_name} refer to custom integer and
floating-point properties that have been added to each atom via the
"fix property/atom"_fix_property_atom.html command. When that command
is used specific names are given to each attribute which are what is
specified as the "name" portion of {i_name} or {d_name}.
[Restrictions:]
You cannot set an atom attribute (e.g. {mol} or {q} or {volume}) if
the "atom_style"_atom_style.html does not have that attribute.
This command requires inter-processor communication to coordinate the
setting of bond types (angle types, etc). This means that your system
must be ready to perform a simulation before using one of these
keywords (force fields set, atom mass set, etc). This is not
necessary for other keywords.
Using the {region} style with the bond (angle, etc) keywords can give
unpredictable results if there are bonds (angles, etc) that straddle
periodic boundaries. This is because the region may only extend up to
the boundary and partner atoms in the bond (angle, etc) may have
coordinates outside the simulation box if they are ghost atoms.
int AtomVecAtomicKokkos::pack_exchange_kokkos(const int &nsend,DAT::tdual_xfloat_2d &k_buf, DAT::tdual_int_1d k_sendlist,DAT::tdual_int_1d k_copylist,ExecutionSpace space,int dim,X_FLOAT lo,X_FLOAT hi )