<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 <aclass="reference internal"href="dump.html"><spanclass="doc">dump</span></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>atom</em> or <em>adiam</em> or <em>bond</em> or <em>line</em> or <em>tri</em> or <em>body</em> or <em>fix</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>
Additional settings of the movie compression like bitrate and
framerate can be set using the <aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump_modify</span></a> command.</p>
<p>To write out JPEG and PNG format files, you must build LAMMPS with
support for the corresponding JPEG or PNG library. To convert images
into movies, LAMMPS has to be compiled with the -DLAMMPS_FFMPEG
flag. See <aclass="reference internal"href="Section_start.html#start-2-4"><spanclass="std std-ref">this section</span></a> of the manual
for instructions on how to do this.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">Because periodic boundary conditions are enforced only on
timesteps when neighbor lists are rebuilt, the coordinates of an atom
in the image may be slightly outside the simulation box.</p>
</div>
<hrclass="docutils"/>
<p>Dumps are performed on timesteps that are a multiple of N (including
timestep 0) and on the last timestep of a minimization if the
minimization converges. Note that this means a dump will not be
performed on the initial timestep after the dump command is invoked,
if the current timestep is not a multiple of N. This behavior can be
changed via the <aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump_modify first</span></a> command, which
can be useful if the dump command is invoked after a minimization
ended on an arbitrary timestep. N can be changed between runs by
using the <aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump_modify every</span></a> command.</p>
<p>Dump <em>image</em> filenames must contain a wildcard character “*”, so that
one image file per snapshot is written. The “*” character is replaced
with the timestep value. For example, tmp.dump.*.jpg becomes
tmp.dump.0.jpg, tmp.dump.10000.jpg, tmp.dump.20000.jpg, etc. Note
that the <aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump_modify pad</span></a> command can be used to
insure all timestep numbers are the same length (e.g. 00010), which
can make it easier to convert a series of images into a movie in the
correct ordering.</p>
<p>Dump <em>movie</em> filenames on the other hand, must not have any wildcard
character since only one file combining all images into a single
movie will be written by the movie encoder.</p>
<hrclass="docutils"/>
<p>The <em>color</em> and <em>diameter</em> settings determine the color and size of
atoms rendered in the image. They can be any atom attribute defined
for the <aclass="reference internal"href="dump.html"><spanclass="doc">dump custom</span></a> command, including <em>type</em> and
<em>element</em>. This includes per-atom quantities calculated by a
<aclass="reference internal"href="compute.html"><spanclass="doc">compute</span></a>, <aclass="reference internal"href="fix.html"><spanclass="doc">fix</span></a>, or <aclass="reference internal"href="variable.html"><spanclass="doc">variable</span></a>,
which are prefixed by “<ahref="#id9"><spanclass="problematic"id="id10">c_</span></a>”, “<ahref="#id11"><spanclass="problematic"id="id12">f_</span></a>”, or “<ahref="#id13"><spanclass="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>
<ulclass="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 <aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump_modify adiam</span></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 <aclass="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
<aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump_modify</span></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
<aclass="reference internal"href="atom_style.html"><spanclass="doc">atom_style sphere</span></a> define a per-particle radius or
diameter, which can be used as the <em>diameter</em> setting.</p>
<hrclass="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 <aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump modify</span></a>
also has options specific to the dump image style, particularly for
assigning colors to atoms, bonds, and other image features.</p>
<hrclass="docutils"/>
<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
<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 <aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump_modify bdiam</span></a> command.</p>
<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>
<hrclass="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 <aclass="reference internal"href="variable.html"><spanclass="doc">equal-style variable</span></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>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">The <em>persp</em> keyword is not yet supported as an option.</p>
</div>
<hrclass="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 <aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump_modify boxcolor</span></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 <aclass="reference internal"href="dump_modify.html"><spanclass="doc">dump_modify boxcolor</span></a> command.</p>
<hrclass="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>
<hrclass="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 <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.