forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14634 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
53b3a4aec0
commit
9b32dcb314
|
@ -3,6 +3,9 @@
|
|||
dump command
|
||||
============
|
||||
|
||||
:doc:`dump custom/vtk <dump_custom_vtk>` command
|
||||
================================================
|
||||
|
||||
:doc:`dump h5md <dump_h5md>` command
|
||||
====================================
|
||||
|
||||
|
@ -48,6 +51,10 @@ Syntax
|
|||
|
||||
*xyz/mpiio* args = none
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*custom/vtk* args = similar to custom args below, discussed on :doc:`dump custom/vtk <dump_custom_vtk>` doc page
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*h5md* args = discussed on :doc:`dump h5md <dump_h5md>` doc page
|
||||
|
|
|
@ -0,0 +1,358 @@
|
|||
.. index:: dump custom/vtk
|
||||
|
||||
dump custom/vtk command
|
||||
=======================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
dump ID group-ID style N file args
|
||||
|
||||
* ID = user-assigned name for the dump
|
||||
* group-ID = ID of the group of atoms to be dumped
|
||||
* style = *custom/vtk*
|
||||
* N = dump every this many timesteps
|
||||
* file = name of file to write dump info to
|
||||
* args = list of arguments for a particular style
|
||||
.. parsed-literal::
|
||||
|
||||
*custom/vtk* args = list of atom attributes
|
||||
possible attributes = id, mol, proc, procp1, type, element, mass,
|
||||
x, y, z, xs, ys, zs, xu, yu, zu,
|
||||
xsu, ysu, zsu, ix, iy, iz,
|
||||
vx, vy, vz, fx, fy, fz,
|
||||
q, mux, muy, muz, mu,
|
||||
radius, diameter, omegax, omegay, omegaz,
|
||||
angmomx, angmomy, angmomz, tqx, tqy, tqz,
|
||||
spin, eradius, ervel, erforce,
|
||||
c_ID, c_ID[N], f_ID, f_ID[N], v_name
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
id = atom ID
|
||||
mol = molecule ID
|
||||
proc = ID of processor that owns atom
|
||||
procp1 = ID+1 of processor that owns atom
|
||||
type = atom type
|
||||
element = name of atom element, as defined by :doc:`dump_modify <dump_modify_vtk>` command
|
||||
mass = atom mass
|
||||
x,y,z = unscaled atom coordinates
|
||||
xs,ys,zs = scaled atom coordinates
|
||||
xu,yu,zu = unwrapped atom coordinates
|
||||
xsu,ysu,zsu = scaled unwrapped atom coordinates
|
||||
ix,iy,iz = box image that the atom is in
|
||||
vx,vy,vz = atom velocities
|
||||
fx,fy,fz = forces on atoms
|
||||
q = atom charge
|
||||
mux,muy,muz = orientation of dipole moment of atom
|
||||
mu = magnitude of dipole moment of atom
|
||||
radius,diameter = radius,diameter of spherical particle
|
||||
omegax,omegay,omegaz = angular velocity of spherical particle
|
||||
angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
||||
tqx,tqy,tqz = torque on finite-size particles
|
||||
c_ID = per-atom vector calculated by a compute with ID
|
||||
c_ID[N] = Nth column of per-atom array calculated by a compute with ID
|
||||
f_ID = per-atom vector calculated by a fix with ID
|
||||
f_ID[N] = Nth column of per-atom array calculated by a fix with ID
|
||||
v_name = per-atom vector calculated by an atom-style variable with name
|
||||
|
||||
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
dump dmpvtk all custom/vtk 100 dump*.myforce.vtk id type vx fx
|
||||
dump dmpvtp flow custom/vtk 100 dump*.%.displace.vtp id type c_myD[1] c_myD[2] c_myD[3] v_ke
|
||||
dump e_data all custom/vtk 100 dump*.vtu id type spin eradius fx fy fz eforce
|
||||
|
||||
The style *custom/vtk* is similar to the :doc:`custom <dump>` style but
|
||||
uses the VTK library to write data to VTK simple legacy or XML format
|
||||
depending on the filename extension specified. This can be either
|
||||
**.vtk* for the legacy format or **.vtp* and **.vtu*, respectively,
|
||||
for the XML format; see the `VTK homepage <http://www.vtk.org/VTK/img/file-formats.pdf>`_ for a detailed
|
||||
description of these formats. Since this naming convention conflicts
|
||||
with the way binary output is usually specified (see below),
|
||||
:doc:`dump_modify binary <dump_modify_vtk>` allows to set the binary
|
||||
flag for this dump style explicitly.
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Dump a snapshot of atom quantities to one or more files every N
|
||||
timesteps. The timesteps on which dump output is written can also be
|
||||
controlled by a variable; see the :doc:`dump_modify every <dump_modify_vtk>` command for details.
|
||||
|
||||
Only information for atoms in the specified group is dumped. The
|
||||
:doc:`dump_modify thresh and region <dump_modify_vtk>` commands can also
|
||||
alter what atoms are included; see details below.
|
||||
|
||||
As described below, special characters ("*", "%") in the filename
|
||||
determine the kind of output.
|
||||
|
||||
.. warning::
|
||||
|
||||
Because periodic boundary conditions are enforced only
|
||||
on timesteps when neighbor lists are rebuilt, the coordinates of an
|
||||
atom written to a dump file may be slightly outside the simulation
|
||||
box.
|
||||
|
||||
.. warning::
|
||||
|
||||
Unless the :doc:`dump_modify sort <dump_modify_vtk>`
|
||||
option is invoked, the lines of atom information written to dump files
|
||||
will be in an indeterminate order for each snapshot. This is even
|
||||
true when running on a single processor, if the :doc:`atom_modify sort <atom_modify>` option is on, which it is by default. In this
|
||||
case atoms are re-ordered periodically during a simulation, due to
|
||||
spatial sorting. It is also true when running in parallel, because
|
||||
data for a single snapshot is collected from multiple processors, each
|
||||
of which owns a subset of the atoms.
|
||||
|
||||
For the *custom/vtk* style, sorting is off by default. See the
|
||||
:doc:`dump_modify <dump_modify_vtk>` doc page for details.
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
The dimensions of the simulation box are written to a separate file
|
||||
for each snapshot (either in legacy VTK or XML format depending on
|
||||
the format of the main dump file) with the suffix *_boundingBox*
|
||||
appended to the given dump filename.
|
||||
|
||||
For an orthogonal simulation box this information is saved as a
|
||||
rectilinear grid (legacy .vtk or .vtr XML format).
|
||||
|
||||
Triclinic simulation boxes (non-orthogonal) are saved as
|
||||
hexahedrons in either legacy .vtk or .vtu XML format.
|
||||
|
||||
Style *custom/vtk* allows you to specify a list of atom attributes
|
||||
to be written to the dump file for each atom. Possible attributes
|
||||
are listed above. In contrast to the *custom* style, the attributes
|
||||
are rearranged to ensure correct ordering of vector components
|
||||
(except for computes and fixes - these have to be given in the right
|
||||
order) and duplicate entries are removed.
|
||||
|
||||
You cannot specify a quantity that is not defined for a particular
|
||||
simulation - such as *q* for atom style *bond*, since that atom style
|
||||
doesn't assign charges. Dumps occur at the very end of a timestep,
|
||||
so atom attributes will include effects due to fixes that are applied
|
||||
during the timestep. An explanation of the possible dump custom/vtk attributes
|
||||
is given below. Since position data is required to write VTK files "x y z"
|
||||
do not have to be specified explicitly.
|
||||
|
||||
The VTK format uses a single snapshot of the system per file, thus
|
||||
a wildcard "*" must be included in the filename, as discussed below.
|
||||
Otherwise the dump files will get overwritten with the new snapshot
|
||||
each time.
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
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 :doc:`dump_modify first <dump_modify_vtk>` command, which
|
||||
can also 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 :doc:`dump_modify every <dump_modify_vtk>` command.
|
||||
The :doc:`dump_modify every <dump_modify_vtk>` command
|
||||
also allows a variable to be used to determine the sequence of
|
||||
timesteps on which dump files are written. In this mode a dump on the
|
||||
first timestep of a run will also not be written unless the
|
||||
:doc:`dump_modify first <dump_modify_vtk>` command is used.
|
||||
|
||||
Dump filenames can contain two wildcard characters. If a "*"
|
||||
character appears in the filename, then one file per snapshot is
|
||||
written and the "*" character is replaced with the timestep value.
|
||||
For example, tmp.dump*.vtk becomes tmp.dump0.vtk, tmp.dump10000.vtk,
|
||||
tmp.dump20000.vtk, etc. Note that the :doc:`dump_modify pad <dump_modify_vtk>`
|
||||
command can be used to insure all timestep numbers are the same length
|
||||
(e.g. 00010), which can make it easier to read a series of dump files
|
||||
in order with some post-processing tools.
|
||||
|
||||
If a "%" character appears in the filename, then each of P processors
|
||||
writes a portion of the dump file, and the "%" character is replaced
|
||||
with the processor ID from 0 to P-1 preceded by an underscore character.
|
||||
For example, tmp.dump%.vtp becomes tmp.dump_0.vtp, tmp.dump_1.vtp, ...
|
||||
tmp.dump_P-1.vtp, etc. This creates smaller files and can be a fast
|
||||
mode of output on parallel machines that support parallel I/O for output.
|
||||
|
||||
By default, P = the number of processors meaning one file per
|
||||
processor, but P can be set to a smaller value via the *nfile* or
|
||||
*fileper* keywords of the :doc:`dump_modify <dump_modify_vtk>` command.
|
||||
These options can be the most efficient way of writing out dump files
|
||||
when running on large numbers of processors.
|
||||
|
||||
For the legacy VTK format "%" is ignored and P = 1, i.e., only
|
||||
processor 0 does write files.
|
||||
|
||||
Note that using the "*" and "%" characters together can produce a
|
||||
large number of small dump files!
|
||||
|
||||
If *dump_modify binary* is used, the dump file (or files, if "*" or
|
||||
"%" is also used) is written in binary format. A binary dump file
|
||||
will be about the same size as a text version, but will typically
|
||||
write out much faster.
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
This section explains the atom attributes that can be specified as
|
||||
part of the *custom/vtk* style.
|
||||
|
||||
The *id*, *mol*, *proc*, *procp1*, *type*, *element*, *mass*, *vx*,
|
||||
*vy*, *vz*, *fx*, *fy*, *fz*, *q* attributes are self-explanatory.
|
||||
|
||||
*id* is the atom ID. *mol* is the molecule ID, included in the data
|
||||
file for molecular systems. *type* is the atom type. *element* is
|
||||
typically the chemical name of an element, which you must assign to
|
||||
each type via the :doc:`dump_modify element <dump_modify_vtk>` command.
|
||||
More generally, it can be any string you wish to associate with an
|
||||
atom type. *mass* is the atom mass. *vx*, *vy*, *vz*, *fx*, *fy*,
|
||||
*fz*, and *q* are components of atom velocity and force and atomic
|
||||
charge.
|
||||
|
||||
There are several options for outputting atom coordinates. The *x*,
|
||||
*y*, *z* attributes are used to write atom coordinates "unscaled", in
|
||||
the appropriate distance :doc:`units <units>` (Angstroms, sigma, etc).
|
||||
Additionaly, you can use *xs*, *ys*, *zs* if you want to also save the
|
||||
coordinates "scaled" to the box size, so that each value is 0.0 to
|
||||
1.0. If the simulation box is triclinic (tilted), then all atom
|
||||
coords will still be between 0.0 and 1.0. Use *xu*, *yu*, *zu* if you
|
||||
want the coordinates "unwrapped" by the image flags for each atom.
|
||||
Unwrapped means that if the atom has passed through a periodic
|
||||
boundary one or more times, the value is printed for what the
|
||||
coordinate would be if it had not been wrapped back into the periodic
|
||||
box. Note that using *xu*, *yu*, *zu* means that the coordinate
|
||||
values may be far outside the box bounds printed with the snapshot.
|
||||
Using *xsu*, *ysu*, *zsu* is similar to using *xu*, *yu*, *zu*, except
|
||||
that the unwrapped coordinates are scaled by the box size. Atoms that
|
||||
have passed through a periodic boundary will have the corresponding
|
||||
cooordinate increased or decreased by 1.0.
|
||||
|
||||
The image flags can be printed directly using the *ix*, *iy*, *iz*
|
||||
attributes. For periodic dimensions, they specify 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 *mux*, *muy*, *muz* attributes are specific to dipolar systems
|
||||
defined with an atom style of *dipole*. They give the orientation of
|
||||
the atom's point dipole moment. The *mu* attribute gives the
|
||||
magnitude of the atom's dipole moment.
|
||||
|
||||
The *radius* and *diameter* attributes are specific to spherical
|
||||
particles that have a finite size, such as those defined with an atom
|
||||
style of *sphere*.
|
||||
|
||||
The *omegax*, *omegay*, and *omegaz* attributes are specific to
|
||||
finite-size spherical particles that have an angular velocity. Only
|
||||
certain atom styles, such as *sphere* define this quantity.
|
||||
|
||||
The *angmomx*, *angmomy*, and *angmomz* attributes are specific to
|
||||
finite-size aspherical particles that have an angular momentum. Only
|
||||
the *ellipsoid* atom style defines this quantity.
|
||||
|
||||
The *tqx*, *tqy*, *tqz* attributes are for finite-size particles that
|
||||
can sustain a rotational torque due to interactions with other
|
||||
particles.
|
||||
|
||||
The *spin*, *eradius*, *ervel*, and *erforce* attributes are for
|
||||
particles that represent nuclei and electrons modeled with the
|
||||
electronic force field (EFF). See :doc:`atom_style electron <atom_style>` and :doc:`pair_style eff <pair_eff>` for more
|
||||
details.
|
||||
|
||||
The *c_ID* and *c_ID[N]* attributes allow per-atom vectors or arrays
|
||||
calculated by a :doc:`compute <compute>` to be output. The ID in the
|
||||
attribute should be replaced by the actual ID of the compute that has
|
||||
been defined previously in the input script. See the
|
||||
:doc:`compute <compute>` command for details. There are computes for
|
||||
calculating the per-atom energy, stress, centro-symmetry parameter,
|
||||
and coordination number of individual atoms.
|
||||
|
||||
Note that computes which calculate global or local quantities, as
|
||||
opposed to per-atom quantities, cannot be output in a dump custom/vtk
|
||||
command. Instead, global quantities can be output by the
|
||||
:doc:`thermo_style custom <thermo_style>` command, and local quantities
|
||||
can be output by the dump local command.
|
||||
|
||||
If *c_ID* is used as an attribute, then the per-atom vector calculated
|
||||
by the compute is printed. If *c_ID[N]* is used, then N must be in
|
||||
the range from 1-M, which will print the Nth column of the M-length
|
||||
per-atom array calculated by the compute.
|
||||
|
||||
The *f_ID* and *f_ID[N]* attributes allow vector or array per-atom
|
||||
quantities calculated by a :doc:`fix <fix>` to be output. The ID in the
|
||||
attribute should be replaced by the actual ID of the fix that has been
|
||||
defined previously in the input script. The :doc:`fix ave/atom <fix_ave_atom>` command is one that calculates per-atom
|
||||
quantities. Since it can time-average per-atom quantities produced by
|
||||
any :doc:`compute <compute>`, :doc:`fix <fix>`, or atom-style
|
||||
:doc:`variable <variable>`, this allows those time-averaged results to
|
||||
be written to a dump file.
|
||||
|
||||
If *f_ID* is used as a attribute, then the per-atom vector calculated
|
||||
by the fix is printed. If *f_ID[N]* is used, then N must be in the
|
||||
range from 1-M, which will print the Nth column of the M-length
|
||||
per-atom array calculated by the fix.
|
||||
|
||||
The *v_name* attribute allows per-atom vectors calculated by a
|
||||
:doc:`variable <variable>` to be output. The name in the attribute
|
||||
should be replaced by the actual name of the variable that has been
|
||||
defined previously in the input script. Only an atom-style variable
|
||||
can be referenced, since it is the only style that generates per-atom
|
||||
values. Variables of style *atom* can reference individual atom
|
||||
attributes, per-atom atom attributes, thermodynamic keywords, or
|
||||
invoke other computes, fixes, or variables when they are evaluated, so
|
||||
this is a very general means of creating quantities to output to a
|
||||
dump file.
|
||||
|
||||
See :doc:`Section_modify <Section_modify>` of the manual for information
|
||||
on how to add new compute and fix styles to LAMMPS to calculate
|
||||
per-atom quantities which could then be output into dump files.
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
|
||||
The *custom/vtk* style does not support writing of gzipped dump files.
|
||||
|
||||
The *custom/vtk* dump style is part of the USER-VTK package. It is
|
||||
only enabled if LAMMPS was built with that package. See the :ref:`Making LAMMPS <start_3>` section for more info.
|
||||
|
||||
To use this dump style, you also must link to the VTK library. See
|
||||
the info in lib/vtk/README and insure the Makefile.lammps file in that
|
||||
directory is appropriate for your machine.
|
||||
|
||||
The *custom/vtk* dump style neither supports buffering nor custom
|
||||
format strings.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`dump <dump>`, :doc:`dump image <dump_image>`,
|
||||
:doc:`dump_modify <dump_modify>`, :doc:`undump <undump>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
By default, files are written in ASCII format. If the file extension
|
||||
is not one of .vtk, .vtp or .vtu, the legacy VTK file format is used.
|
||||
|
||||
|
||||
.. _lws: http://lammps.sandia.gov
|
||||
.. _ld: Manual.html
|
||||
.. _lc: Section_commands.html#comm
|
|
@ -127,6 +127,9 @@
|
|||
<div class="section" id="dump-command">
|
||||
<span id="index-0"></span><h1>dump command<a class="headerlink" href="#dump-command" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
<div class="section" id="dump-custom-vtk-command">
|
||||
<h1><a class="reference internal" href="dump_custom_vtk.html"><em>dump custom/vtk</em></a> command<a class="headerlink" href="#dump-custom-vtk-command" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
<div class="section" id="dump-h5md-command">
|
||||
<h1><a class="reference internal" href="dump_h5md.html"><em>dump h5md</em></a> command<a class="headerlink" href="#dump-h5md-command" title="Permalink to this headline">¶</a></h1>
|
||||
</div>
|
||||
|
@ -169,6 +172,9 @@
|
|||
<em>xyz/mpiio</em> args = none
|
||||
</pre>
|
||||
<pre class="literal-block">
|
||||
<em>custom/vtk</em> args = similar to custom args below, discussed on <a class="reference internal" href="dump_custom_vtk.html"><em>dump custom/vtk</em></a> doc page
|
||||
</pre>
|
||||
<pre class="literal-block">
|
||||
<em>h5md</em> args = discussed on <a class="reference internal" href="dump_h5md.html"><em>dump h5md</em></a> doc page
|
||||
</pre>
|
||||
<pre class="literal-block">
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
:line
|
||||
|
||||
dump command :h3
|
||||
"dump custom/vtk"_dump_custom_vtk.html command :h3
|
||||
"dump h5md"_dump_h5md.html command :h3
|
||||
"dump image"_dump_image.html command :h3
|
||||
"dump movie"_dump_image.html command :h3
|
||||
|
@ -34,6 +35,8 @@ args = list of arguments for a particular style :l
|
|||
{xyz/gz} args = none :pre
|
||||
{xyz/mpiio} args = none :pre
|
||||
|
||||
{custom/vtk} args = similar to custom args below, discussed on "dump custom/vtk"_dump_custom_vtk.html doc page :pre
|
||||
|
||||
{h5md} args = discussed on "dump h5md"_dump_h5md.html doc page :pre
|
||||
|
||||
{image} args = discussed on "dump image"_dump_image.html doc page :pre
|
||||
|
|
|
@ -0,0 +1,483 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>dump custom/vtk command — LAMMPS documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="top" title="LAMMPS documentation" href="index.html"/>
|
||||
|
||||
|
||||
<script src="_static/js/modernizr.min.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav" role="document">
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="Manual.html" class="icon icon-home"> LAMMPS
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance & scalability</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying & extending LAMMPS</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="Manual.html">LAMMPS</a>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="Manual.html">Docs</a> »</li>
|
||||
|
||||
<li>dump custom/vtk command</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="http://lammps.sandia.gov">Website</a>
|
||||
<a href="Section_commands.html#comm">Commands</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="dump-custom-vtk-command">
|
||||
<span id="index-0"></span><h1>dump custom/vtk command<a class="headerlink" href="#dump-custom-vtk-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 args
|
||||
</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 dumped</li>
|
||||
<li>style = <em>custom/vtk</em></li>
|
||||
<li>N = dump every this many timesteps</li>
|
||||
<li>file = name of file to write dump info to</li>
|
||||
<li>args = list of arguments for a particular style</li>
|
||||
</ul>
|
||||
<pre class="literal-block">
|
||||
<em>custom/vtk</em> args = list of atom attributes
|
||||
possible attributes = id, mol, proc, procp1, type, element, mass,
|
||||
x, y, z, xs, ys, zs, xu, yu, zu,
|
||||
xsu, ysu, zsu, ix, iy, iz,
|
||||
vx, vy, vz, fx, fy, fz,
|
||||
q, mux, muy, muz, mu,
|
||||
radius, diameter, omegax, omegay, omegaz,
|
||||
angmomx, angmomy, angmomz, tqx, tqy, tqz,
|
||||
spin, eradius, ervel, erforce,
|
||||
c_ID, c_ID[N], f_ID, f_ID[N], v_name
|
||||
</pre>
|
||||
<pre class="literal-block">
|
||||
id = atom ID
|
||||
mol = molecule ID
|
||||
proc = ID of processor that owns atom
|
||||
procp1 = ID+1 of processor that owns atom
|
||||
type = atom type
|
||||
element = name of atom element, as defined by <code class="xref doc docutils literal"><span class="pre">dump_modify</span></code> command
|
||||
mass = atom mass
|
||||
x,y,z = unscaled atom coordinates
|
||||
xs,ys,zs = scaled atom coordinates
|
||||
xu,yu,zu = unwrapped atom coordinates
|
||||
xsu,ysu,zsu = scaled unwrapped atom coordinates
|
||||
ix,iy,iz = box image that the atom is in
|
||||
vx,vy,vz = atom velocities
|
||||
fx,fy,fz = forces on atoms
|
||||
q = atom charge
|
||||
mux,muy,muz = orientation of dipole moment of atom
|
||||
mu = magnitude of dipole moment of atom
|
||||
radius,diameter = radius,diameter of spherical particle
|
||||
omegax,omegay,omegaz = angular velocity of spherical particle
|
||||
angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
||||
tqx,tqy,tqz = torque on finite-size particles
|
||||
c_ID = per-atom vector calculated by a compute with ID
|
||||
c_ID[N] = Nth column of per-atom array calculated by a compute with ID
|
||||
f_ID = per-atom vector calculated by a fix with ID
|
||||
f_ID[N] = Nth 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>
|
||||
</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>dump dmpvtk all custom/vtk 100 dump*.myforce.vtk id type vx fx
|
||||
dump dmpvtp flow custom/vtk 100 dump*.%.displace.vtp id type c_myD[1] c_myD[2] c_myD[3] v_ke
|
||||
dump e_data all custom/vtk 100 dump*.vtu id type spin eradius fx fy fz eforce
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The style <em>custom/vtk</em> is similar to the <a class="reference internal" href="dump.html"><em>custom</em></a> style but
|
||||
uses the VTK library to write data to VTK simple legacy or XML format
|
||||
depending on the filename extension specified. This can be either
|
||||
<a href="#id1"><span class="problematic" id="id2">**</span></a>.vtk* for the legacy format or <a href="#id3"><span class="problematic" id="id4">**</span></a>.vtp* and <a href="#id5"><span class="problematic" id="id6">**</span></a>.vtu*, respectively,
|
||||
for the XML format; see the <a class="reference external" href="http://www.vtk.org/VTK/img/file-formats.pdf">VTK homepage</a> for a detailed
|
||||
description of these formats. Since this naming convention conflicts
|
||||
with the way binary output is usually specified (see below),
|
||||
<code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">binary</span></code> allows to set the binary
|
||||
flag for this dump style explicitly.</p>
|
||||
</div>
|
||||
<div class="section" id="description">
|
||||
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Dump a snapshot of atom quantities to one or more files every N
|
||||
timesteps. The timesteps on which dump output is written can also be
|
||||
controlled by a variable; see the <code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">every</span></code> command for details.</p>
|
||||
<p>Only information for atoms in the specified group is dumped. The
|
||||
<code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">thresh</span> <span class="pre">and</span> <span class="pre">region</span></code> commands can also
|
||||
alter what atoms are included; see details below.</p>
|
||||
<p>As described below, special characters (“*”, “%”) in the filename
|
||||
determine the kind of output.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="first admonition-title">Warning</p>
|
||||
<p class="last">Because periodic boundary conditions are enforced only
|
||||
on timesteps when neighbor lists are rebuilt, the coordinates of an
|
||||
atom written to a dump file may be slightly outside the simulation
|
||||
box.</p>
|
||||
</div>
|
||||
<div class="admonition warning">
|
||||
<p class="first admonition-title">Warning</p>
|
||||
<p class="last">Unless the <code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">sort</span></code>
|
||||
option is invoked, the lines of atom information written to dump files
|
||||
will be in an indeterminate order for each snapshot. This is even
|
||||
true when running on a single processor, if the <a class="reference internal" href="atom_modify.html"><em>atom_modify sort</em></a> option is on, which it is by default. In this
|
||||
case atoms are re-ordered periodically during a simulation, due to
|
||||
spatial sorting. It is also true when running in parallel, because
|
||||
data for a single snapshot is collected from multiple processors, each
|
||||
of which owns a subset of the atoms.</p>
|
||||
</div>
|
||||
<p>For the <em>custom/vtk</em> style, sorting is off by default. See the
|
||||
<code class="xref doc docutils literal"><span class="pre">dump_modify</span></code> doc page for details.</p>
|
||||
<hr class="docutils" />
|
||||
<p>The dimensions of the simulation box are written to a separate file
|
||||
for each snapshot (either in legacy VTK or XML format depending on
|
||||
the format of the main dump file) with the suffix <em>_boundingBox</em>
|
||||
appended to the given dump filename.</p>
|
||||
<p>For an orthogonal simulation box this information is saved as a
|
||||
rectilinear grid (legacy .vtk or .vtr XML format).</p>
|
||||
<p>Triclinic simulation boxes (non-orthogonal) are saved as
|
||||
hexahedrons in either legacy .vtk or .vtu XML format.</p>
|
||||
<p>Style <em>custom/vtk</em> allows you to specify a list of atom attributes
|
||||
to be written to the dump file for each atom. Possible attributes
|
||||
are listed above. In contrast to the <em>custom</em> style, the attributes
|
||||
are rearranged to ensure correct ordering of vector components
|
||||
(except for computes and fixes - these have to be given in the right
|
||||
order) and duplicate entries are removed.</p>
|
||||
<p>You cannot specify a quantity that is not defined for a particular
|
||||
simulation - such as <em>q</em> for atom style <em>bond</em>, since that atom style
|
||||
doesn’t assign charges. Dumps occur at the very end of a timestep,
|
||||
so atom attributes will include effects due to fixes that are applied
|
||||
during the timestep. An explanation of the possible dump custom/vtk attributes
|
||||
is given below. Since position data is required to write VTK files “x y z”
|
||||
do not have to be specified explicitly.</p>
|
||||
<p>The VTK format uses a single snapshot of the system per file, thus
|
||||
a wildcard “*” must be included in the filename, as discussed below.
|
||||
Otherwise the dump files will get overwritten with the new snapshot
|
||||
each time.</p>
|
||||
<hr class="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 <code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">first</span></code> command, which
|
||||
can also 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 <code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">every</span></code> command.
|
||||
The <code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">every</span></code> command
|
||||
also allows a variable to be used to determine the sequence of
|
||||
timesteps on which dump files are written. In this mode a dump on the
|
||||
first timestep of a run will also not be written unless the
|
||||
<code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">first</span></code> command is used.</p>
|
||||
<p>Dump filenames can contain two wildcard characters. If a “*”
|
||||
character appears in the filename, then one file per snapshot is
|
||||
written and the “*” character is replaced with the timestep value.
|
||||
For example, tmp.dump*.vtk becomes tmp.dump0.vtk, tmp.dump10000.vtk,
|
||||
tmp.dump20000.vtk, etc. Note that the <code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">pad</span></code>
|
||||
command can be used to insure all timestep numbers are the same length
|
||||
(e.g. 00010), which can make it easier to read a series of dump files
|
||||
in order with some post-processing tools.</p>
|
||||
<p>If a “%” character appears in the filename, then each of P processors
|
||||
writes a portion of the dump file, and the “%” character is replaced
|
||||
with the processor ID from 0 to P-1 preceded by an underscore character.
|
||||
For example, tmp.dump%.vtp becomes tmp.dump_0.vtp, tmp.dump_1.vtp, ...
|
||||
tmp.dump_P-1.vtp, etc. This creates smaller files and can be a fast
|
||||
mode of output on parallel machines that support parallel I/O for output.</p>
|
||||
<p>By default, P = the number of processors meaning one file per
|
||||
processor, but P can be set to a smaller value via the <em>nfile</em> or
|
||||
<em>fileper</em> keywords of the <code class="xref doc docutils literal"><span class="pre">dump_modify</span></code> command.
|
||||
These options can be the most efficient way of writing out dump files
|
||||
when running on large numbers of processors.</p>
|
||||
<p>For the legacy VTK format “%” is ignored and P = 1, i.e., only
|
||||
processor 0 does write files.</p>
|
||||
<p>Note that using the “*” and “%” characters together can produce a
|
||||
large number of small dump files!</p>
|
||||
<p>If <em>dump_modify binary</em> is used, the dump file (or files, if “*” or
|
||||
“%” is also used) is written in binary format. A binary dump file
|
||||
will be about the same size as a text version, but will typically
|
||||
write out much faster.</p>
|
||||
<hr class="docutils" />
|
||||
<p>This section explains the atom attributes that can be specified as
|
||||
part of the <em>custom/vtk</em> style.</p>
|
||||
<p>The <em>id</em>, <em>mol</em>, <em>proc</em>, <em>procp1</em>, <em>type</em>, <em>element</em>, <em>mass</em>, <em>vx</em>,
|
||||
<em>vy</em>, <em>vz</em>, <em>fx</em>, <em>fy</em>, <em>fz</em>, <em>q</em> attributes are self-explanatory.</p>
|
||||
<p><em>id</em> is the atom ID. <em>mol</em> is the molecule ID, included in the data
|
||||
file for molecular systems. <em>type</em> is the atom type. <em>element</em> is
|
||||
typically the chemical name of an element, which you must assign to
|
||||
each type via the <code class="xref doc docutils literal"><span class="pre">dump_modify</span> <span class="pre">element</span></code> command.
|
||||
More generally, it can be any string you wish to associate with an
|
||||
atom type. <em>mass</em> is the atom mass. <em>vx</em>, <em>vy</em>, <em>vz</em>, <em>fx</em>, <em>fy</em>,
|
||||
<em>fz</em>, and <em>q</em> are components of atom velocity and force and atomic
|
||||
charge.</p>
|
||||
<p>There are several options for outputting atom coordinates. The <em>x</em>,
|
||||
<em>y</em>, <em>z</em> attributes are used to write atom coordinates “unscaled”, in
|
||||
the appropriate distance <a class="reference internal" href="units.html"><em>units</em></a> (Angstroms, sigma, etc).
|
||||
Additionaly, you can use <em>xs</em>, <em>ys</em>, <em>zs</em> if you want to also save the
|
||||
coordinates “scaled” to the box size, so that each value is 0.0 to
|
||||
1.0. If the simulation box is triclinic (tilted), then all atom
|
||||
coords will still be between 0.0 and 1.0. Use <em>xu</em>, <em>yu</em>, <em>zu</em> if you
|
||||
want the coordinates “unwrapped” by the image flags for each atom.
|
||||
Unwrapped means that if the atom has passed through a periodic
|
||||
boundary one or more times, the value is printed for what the
|
||||
coordinate would be if it had not been wrapped back into the periodic
|
||||
box. Note that using <em>xu</em>, <em>yu</em>, <em>zu</em> means that the coordinate
|
||||
values may be far outside the box bounds printed with the snapshot.
|
||||
Using <em>xsu</em>, <em>ysu</em>, <em>zsu</em> is similar to using <em>xu</em>, <em>yu</em>, <em>zu</em>, except
|
||||
that the unwrapped coordinates are scaled by the box size. Atoms that
|
||||
have passed through a periodic boundary will have the corresponding
|
||||
cooordinate increased or decreased by 1.0.</p>
|
||||
<p>The image flags can be printed directly using the <em>ix</em>, <em>iy</em>, <em>iz</em>
|
||||
attributes. For periodic dimensions, they specify 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.</p>
|
||||
<p>The <em>mux</em>, <em>muy</em>, <em>muz</em> attributes are specific to dipolar systems
|
||||
defined with an atom style of <em>dipole</em>. They give the orientation of
|
||||
the atom’s point dipole moment. The <em>mu</em> attribute gives the
|
||||
magnitude of the atom’s dipole moment.</p>
|
||||
<p>The <em>radius</em> and <em>diameter</em> attributes are specific to spherical
|
||||
particles that have a finite size, such as those defined with an atom
|
||||
style of <em>sphere</em>.</p>
|
||||
<p>The <em>omegax</em>, <em>omegay</em>, and <em>omegaz</em> attributes are specific to
|
||||
finite-size spherical particles that have an angular velocity. Only
|
||||
certain atom styles, such as <em>sphere</em> define this quantity.</p>
|
||||
<p>The <em>angmomx</em>, <em>angmomy</em>, and <em>angmomz</em> attributes are specific to
|
||||
finite-size aspherical particles that have an angular momentum. Only
|
||||
the <em>ellipsoid</em> atom style defines this quantity.</p>
|
||||
<p>The <em>tqx</em>, <em>tqy</em>, <em>tqz</em> attributes are for finite-size particles that
|
||||
can sustain a rotational torque due to interactions with other
|
||||
particles.</p>
|
||||
<p>The <em>spin</em>, <em>eradius</em>, <em>ervel</em>, and <em>erforce</em> attributes are for
|
||||
particles that represent nuclei and electrons modeled with the
|
||||
electronic force field (EFF). See <a class="reference internal" href="atom_style.html"><em>atom_style electron</em></a> and <a class="reference internal" href="pair_eff.html"><em>pair_style eff</em></a> for more
|
||||
details.</p>
|
||||
<p>The <em>c_ID</em> and <em>c_ID[N]</em> attributes allow per-atom vectors or arrays
|
||||
calculated by a <a class="reference internal" href="compute.html"><em>compute</em></a> to be output. The ID in the
|
||||
attribute should be replaced by the actual ID of the compute that has
|
||||
been defined previously in the input script. See the
|
||||
<a class="reference internal" href="compute.html"><em>compute</em></a> command for details. There are computes for
|
||||
calculating the per-atom energy, stress, centro-symmetry parameter,
|
||||
and coordination number of individual atoms.</p>
|
||||
<p>Note that computes which calculate global or local quantities, as
|
||||
opposed to per-atom quantities, cannot be output in a dump custom/vtk
|
||||
command. Instead, global quantities can be output by the
|
||||
<a class="reference internal" href="thermo_style.html"><em>thermo_style custom</em></a> command, and local quantities
|
||||
can be output by the dump local command.</p>
|
||||
<p>If <em>c_ID</em> is used as an attribute, then the per-atom vector calculated
|
||||
by the compute is printed. If <em>c_ID[N]</em> is used, then N must be in
|
||||
the range from 1-M, which will print the Nth column of the M-length
|
||||
per-atom array calculated by the compute.</p>
|
||||
<p>The <em>f_ID</em> and <em>f_ID[N]</em> attributes allow vector or array per-atom
|
||||
quantities calculated by a <a class="reference internal" href="fix.html"><em>fix</em></a> to be output. The ID in the
|
||||
attribute should be replaced by the actual ID of the fix that has been
|
||||
defined previously in the input script. The <a class="reference internal" href="fix_ave_atom.html"><em>fix ave/atom</em></a> command is one that calculates per-atom
|
||||
quantities. Since it can time-average per-atom quantities produced by
|
||||
any <a class="reference internal" href="compute.html"><em>compute</em></a>, <a class="reference internal" href="fix.html"><em>fix</em></a>, or atom-style
|
||||
<a class="reference internal" href="variable.html"><em>variable</em></a>, this allows those time-averaged results to
|
||||
be written to a dump file.</p>
|
||||
<p>If <em>f_ID</em> is used as a attribute, then the per-atom vector calculated
|
||||
by the fix is printed. If <em>f_ID[N]</em> is used, then N must be in the
|
||||
range from 1-M, which will print the Nth column of the M-length
|
||||
per-atom array calculated by the fix.</p>
|
||||
<p>The <em>v_name</em> attribute allows per-atom vectors calculated by a
|
||||
<a class="reference internal" href="variable.html"><em>variable</em></a> to be output. The name in the attribute
|
||||
should be replaced by the actual name of the variable that has been
|
||||
defined previously in the input script. Only an atom-style variable
|
||||
can be referenced, since it is the only style that generates per-atom
|
||||
values. Variables of style <em>atom</em> can reference individual atom
|
||||
attributes, per-atom atom attributes, thermodynamic keywords, or
|
||||
invoke other computes, fixes, or variables when they are evaluated, so
|
||||
this is a very general means of creating quantities to output to a
|
||||
dump file.</p>
|
||||
<p>See <a class="reference internal" href="Section_modify.html"><em>Section_modify</em></a> of the manual for information
|
||||
on how to add new compute and fix styles to LAMMPS to calculate
|
||||
per-atom quantities which could then be output into dump files.</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>The <em>custom/vtk</em> style does not support writing of gzipped dump files.</p>
|
||||
<p>The <em>custom/vtk</em> dump style is part of the USER-VTK 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>To use this dump style, you also must link to the VTK library. See
|
||||
the info in lib/vtk/README and insure the Makefile.lammps file in that
|
||||
directory is appropriate for your machine.</p>
|
||||
<p>The <em>custom/vtk</em> dump style neither supports buffering nor custom
|
||||
format strings.</p>
|
||||
</div>
|
||||
<div class="section" id="related-commands">
|
||||
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
|
||||
<p><a class="reference internal" href="dump.html"><em>dump</em></a>, <a class="reference internal" href="dump_image.html"><em>dump image</em></a>,
|
||||
<a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a>, <a class="reference internal" href="undump.html"><em>undump</em></a></p>
|
||||
</div>
|
||||
<div class="section" id="default">
|
||||
<h2>Default<a class="headerlink" href="#default" title="Permalink to this headline">¶</a></h2>
|
||||
<p>By default, files are written in ASCII format. If the file extension
|
||||
is not one of .vtk, .vtp or .vtu, the legacy VTK file format is used.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2013 Sandia Corporation.
|
||||
</p>
|
||||
</div>
|
||||
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>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
|
||||
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
|
||||
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.StickyNav.enable();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,337 @@
|
|||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
dump custom/vtk command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
dump ID group-ID style N file args :pre
|
||||
|
||||
ID = user-assigned name for the dump :ulb,l
|
||||
group-ID = ID of the group of atoms to be dumped :l
|
||||
style = {custom/vtk} :l
|
||||
N = dump every this many timesteps :l
|
||||
file = name of file to write dump info to :l
|
||||
args = list of arguments for a particular style :l
|
||||
{custom/vtk} args = list of atom attributes
|
||||
possible attributes = id, mol, proc, procp1, type, element, mass,
|
||||
x, y, z, xs, ys, zs, xu, yu, zu,
|
||||
xsu, ysu, zsu, ix, iy, iz,
|
||||
vx, vy, vz, fx, fy, fz,
|
||||
q, mux, muy, muz, mu,
|
||||
radius, diameter, omegax, omegay, omegaz,
|
||||
angmomx, angmomy, angmomz, tqx, tqy, tqz,
|
||||
spin, eradius, ervel, erforce,
|
||||
c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :pre
|
||||
|
||||
id = atom ID
|
||||
mol = molecule ID
|
||||
proc = ID of processor that owns atom
|
||||
procp1 = ID+1 of processor that owns atom
|
||||
type = atom type
|
||||
element = name of atom element, as defined by "dump_modify"_dump_modify_vtk.html command
|
||||
mass = atom mass
|
||||
x,y,z = unscaled atom coordinates
|
||||
xs,ys,zs = scaled atom coordinates
|
||||
xu,yu,zu = unwrapped atom coordinates
|
||||
xsu,ysu,zsu = scaled unwrapped atom coordinates
|
||||
ix,iy,iz = box image that the atom is in
|
||||
vx,vy,vz = atom velocities
|
||||
fx,fy,fz = forces on atoms
|
||||
q = atom charge
|
||||
mux,muy,muz = orientation of dipole moment of atom
|
||||
mu = magnitude of dipole moment of atom
|
||||
radius,diameter = radius,diameter of spherical particle
|
||||
omegax,omegay,omegaz = angular velocity of spherical particle
|
||||
angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
||||
tqx,tqy,tqz = torque on finite-size particles
|
||||
c_ID = per-atom vector calculated by a compute with ID
|
||||
c_ID\[N\] = Nth column of per-atom array calculated by a compute with ID
|
||||
f_ID = per-atom vector calculated by a fix with ID
|
||||
f_ID\[N\] = Nth 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
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
dump dmpvtk all custom/vtk 100 dump*.myforce.vtk id type vx fx
|
||||
dump dmpvtp flow custom/vtk 100 dump*.%.displace.vtp id type c_myD\[1\] c_myD\[2\] c_myD\[3\] v_ke
|
||||
dump e_data all custom/vtk 100 dump*.vtu id type spin eradius fx fy fz eforce :pre
|
||||
|
||||
The style {custom/vtk} is similar to the "custom"_dump.html style but
|
||||
uses the VTK library to write data to VTK simple legacy or XML format
|
||||
depending on the filename extension specified. This can be either
|
||||
{*.vtk} for the legacy format or {*.vtp} and {*.vtu}, respectively,
|
||||
for the XML format; see the "VTK
|
||||
homepage"_http://www.vtk.org/VTK/img/file-formats.pdf for a detailed
|
||||
description of these formats. Since this naming convention conflicts
|
||||
with the way binary output is usually specified (see below),
|
||||
"dump_modify binary"_dump_modify_vtk.html allows to set the binary
|
||||
flag for this dump style explicitly.
|
||||
|
||||
[Description:]
|
||||
|
||||
Dump a snapshot of atom quantities to one or more files every N
|
||||
timesteps. The timesteps on which dump output is written can also be
|
||||
controlled by a variable; see the "dump_modify
|
||||
every"_dump_modify_vtk.html command for details.
|
||||
|
||||
Only information for atoms in the specified group is dumped. The
|
||||
"dump_modify thresh and region"_dump_modify_vtk.html commands can also
|
||||
alter what atoms are included; see details below.
|
||||
|
||||
As described below, special characters ("*", "%") in the filename
|
||||
determine the kind of output.
|
||||
|
||||
IMPORTANT NOTE: Because periodic boundary conditions are enforced only
|
||||
on timesteps when neighbor lists are rebuilt, the coordinates of an
|
||||
atom written to a dump file may be slightly outside the simulation
|
||||
box.
|
||||
|
||||
IMPORTANT NOTE: Unless the "dump_modify sort"_dump_modify_vtk.html
|
||||
option is invoked, the lines of atom information written to dump files
|
||||
will be in an indeterminate order for each snapshot. This is even
|
||||
true when running on a single processor, if the "atom_modify
|
||||
sort"_atom_modify.html option is on, which it is by default. In this
|
||||
case atoms are re-ordered periodically during a simulation, due to
|
||||
spatial sorting. It is also true when running in parallel, because
|
||||
data for a single snapshot is collected from multiple processors, each
|
||||
of which owns a subset of the atoms.
|
||||
|
||||
For the {custom/vtk} style, sorting is off by default. See the
|
||||
"dump_modify"_dump_modify_vtk.html doc page for details.
|
||||
|
||||
:line
|
||||
|
||||
The dimensions of the simulation box are written to a separate file
|
||||
for each snapshot (either in legacy VTK or XML format depending on
|
||||
the format of the main dump file) with the suffix {_boundingBox}
|
||||
appended to the given dump filename.
|
||||
|
||||
For an orthogonal simulation box this information is saved as a
|
||||
rectilinear grid (legacy .vtk or .vtr XML format).
|
||||
|
||||
Triclinic simulation boxes (non-orthogonal) are saved as
|
||||
hexahedrons in either legacy .vtk or .vtu XML format.
|
||||
|
||||
Style {custom/vtk} allows you to specify a list of atom attributes
|
||||
to be written to the dump file for each atom. Possible attributes
|
||||
are listed above. In contrast to the {custom} style, the attributes
|
||||
are rearranged to ensure correct ordering of vector components
|
||||
(except for computes and fixes - these have to be given in the right
|
||||
order) and duplicate entries are removed.
|
||||
|
||||
You cannot specify a quantity that is not defined for a particular
|
||||
simulation - such as {q} for atom style {bond}, since that atom style
|
||||
doesn't assign charges. Dumps occur at the very end of a timestep,
|
||||
so atom attributes will include effects due to fixes that are applied
|
||||
during the timestep. An explanation of the possible dump custom/vtk attributes
|
||||
is given below. Since position data is required to write VTK files "x y z"
|
||||
do not have to be specified explicitly.
|
||||
|
||||
The VTK format uses a single snapshot of the system per file, thus
|
||||
a wildcard "*" must be included in the filename, as discussed below.
|
||||
Otherwise the dump files will get overwritten with the new snapshot
|
||||
each time.
|
||||
|
||||
:line
|
||||
|
||||
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 "dump_modify first"_dump_modify_vtk.html command, which
|
||||
can also 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 "dump_modify every"_dump_modify_vtk.html command.
|
||||
The "dump_modify every"_dump_modify_vtk.html command
|
||||
also allows a variable to be used to determine the sequence of
|
||||
timesteps on which dump files are written. In this mode a dump on the
|
||||
first timestep of a run will also not be written unless the
|
||||
"dump_modify first"_dump_modify_vtk.html command is used.
|
||||
|
||||
Dump filenames can contain two wildcard characters. If a "*"
|
||||
character appears in the filename, then one file per snapshot is
|
||||
written and the "*" character is replaced with the timestep value.
|
||||
For example, tmp.dump*.vtk becomes tmp.dump0.vtk, tmp.dump10000.vtk,
|
||||
tmp.dump20000.vtk, etc. Note that the "dump_modify pad"_dump_modify_vtk.html
|
||||
command can be used to insure all timestep numbers are the same length
|
||||
(e.g. 00010), which can make it easier to read a series of dump files
|
||||
in order with some post-processing tools.
|
||||
|
||||
If a "%" character appears in the filename, then each of P processors
|
||||
writes a portion of the dump file, and the "%" character is replaced
|
||||
with the processor ID from 0 to P-1 preceded by an underscore character.
|
||||
For example, tmp.dump%.vtp becomes tmp.dump_0.vtp, tmp.dump_1.vtp, ...
|
||||
tmp.dump_P-1.vtp, etc. This creates smaller files and can be a fast
|
||||
mode of output on parallel machines that support parallel I/O for output.
|
||||
|
||||
By default, P = the number of processors meaning one file per
|
||||
processor, but P can be set to a smaller value via the {nfile} or
|
||||
{fileper} keywords of the "dump_modify"_dump_modify_vtk.html command.
|
||||
These options can be the most efficient way of writing out dump files
|
||||
when running on large numbers of processors.
|
||||
|
||||
For the legacy VTK format "%" is ignored and P = 1, i.e., only
|
||||
processor 0 does write files.
|
||||
|
||||
Note that using the "*" and "%" characters together can produce a
|
||||
large number of small dump files!
|
||||
|
||||
If {dump_modify binary} is used, the dump file (or files, if "*" or
|
||||
"%" is also used) is written in binary format. A binary dump file
|
||||
will be about the same size as a text version, but will typically
|
||||
write out much faster.
|
||||
|
||||
:line
|
||||
|
||||
This section explains the atom attributes that can be specified as
|
||||
part of the {custom/vtk} style.
|
||||
|
||||
The {id}, {mol}, {proc}, {procp1}, {type}, {element}, {mass}, {vx},
|
||||
{vy}, {vz}, {fx}, {fy}, {fz}, {q} attributes are self-explanatory.
|
||||
|
||||
{id} is the atom ID. {mol} is the molecule ID, included in the data
|
||||
file for molecular systems. {type} is the atom type. {element} is
|
||||
typically the chemical name of an element, which you must assign to
|
||||
each type via the "dump_modify element"_dump_modify_vtk.html command.
|
||||
More generally, it can be any string you wish to associate with an
|
||||
atom type. {mass} is the atom mass. {vx}, {vy}, {vz}, {fx}, {fy},
|
||||
{fz}, and {q} are components of atom velocity and force and atomic
|
||||
charge.
|
||||
|
||||
There are several options for outputting atom coordinates. The {x},
|
||||
{y}, {z} attributes are used to write atom coordinates "unscaled", in
|
||||
the appropriate distance "units"_units.html (Angstroms, sigma, etc).
|
||||
Additionaly, you can use {xs}, {ys}, {zs} if you want to also save the
|
||||
coordinates "scaled" to the box size, so that each value is 0.0 to
|
||||
1.0. If the simulation box is triclinic (tilted), then all atom
|
||||
coords will still be between 0.0 and 1.0. Use {xu}, {yu}, {zu} if you
|
||||
want the coordinates "unwrapped" by the image flags for each atom.
|
||||
Unwrapped means that if the atom has passed through a periodic
|
||||
boundary one or more times, the value is printed for what the
|
||||
coordinate would be if it had not been wrapped back into the periodic
|
||||
box. Note that using {xu}, {yu}, {zu} means that the coordinate
|
||||
values may be far outside the box bounds printed with the snapshot.
|
||||
Using {xsu}, {ysu}, {zsu} is similar to using {xu}, {yu}, {zu}, except
|
||||
that the unwrapped coordinates are scaled by the box size. Atoms that
|
||||
have passed through a periodic boundary will have the corresponding
|
||||
cooordinate increased or decreased by 1.0.
|
||||
|
||||
The image flags can be printed directly using the {ix}, {iy}, {iz}
|
||||
attributes. For periodic dimensions, they specify 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 {mux}, {muy}, {muz} attributes are specific to dipolar systems
|
||||
defined with an atom style of {dipole}. They give the orientation of
|
||||
the atom's point dipole moment. The {mu} attribute gives the
|
||||
magnitude of the atom's dipole moment.
|
||||
|
||||
The {radius} and {diameter} attributes are specific to spherical
|
||||
particles that have a finite size, such as those defined with an atom
|
||||
style of {sphere}.
|
||||
|
||||
The {omegax}, {omegay}, and {omegaz} attributes are specific to
|
||||
finite-size spherical particles that have an angular velocity. Only
|
||||
certain atom styles, such as {sphere} define this quantity.
|
||||
|
||||
The {angmomx}, {angmomy}, and {angmomz} attributes are specific to
|
||||
finite-size aspherical particles that have an angular momentum. Only
|
||||
the {ellipsoid} atom style defines this quantity.
|
||||
|
||||
The {tqx}, {tqy}, {tqz} attributes are for finite-size particles that
|
||||
can sustain a rotational torque due to interactions with other
|
||||
particles.
|
||||
|
||||
The {spin}, {eradius}, {ervel}, and {erforce} attributes are for
|
||||
particles that represent nuclei and electrons modeled with the
|
||||
electronic force field (EFF). See "atom_style
|
||||
electron"_atom_style.html and "pair_style eff"_pair_eff.html for more
|
||||
details.
|
||||
|
||||
The {c_ID} and {c_ID\[N\]} attributes allow per-atom vectors or arrays
|
||||
calculated by a "compute"_compute.html to be output. The ID in the
|
||||
attribute should be replaced by the actual ID of the compute that has
|
||||
been defined previously in the input script. See the
|
||||
"compute"_compute.html command for details. There are computes for
|
||||
calculating the per-atom energy, stress, centro-symmetry parameter,
|
||||
and coordination number of individual atoms.
|
||||
|
||||
Note that computes which calculate global or local quantities, as
|
||||
opposed to per-atom quantities, cannot be output in a dump custom/vtk
|
||||
command. Instead, global quantities can be output by the
|
||||
"thermo_style custom"_thermo_style.html command, and local quantities
|
||||
can be output by the dump local command.
|
||||
|
||||
If {c_ID} is used as an attribute, then the per-atom vector calculated
|
||||
by the compute is printed. If {c_ID\[N\]} is used, then N must be in
|
||||
the range from 1-M, which will print the Nth column of the M-length
|
||||
per-atom array calculated by the compute.
|
||||
|
||||
The {f_ID} and {f_ID\[N\]} attributes allow vector or array per-atom
|
||||
quantities calculated by a "fix"_fix.html to be output. The ID in the
|
||||
attribute should be replaced by the actual ID of the fix that has been
|
||||
defined previously in the input script. The "fix
|
||||
ave/atom"_fix_ave_atom.html command is one that calculates per-atom
|
||||
quantities. Since it can time-average per-atom quantities produced by
|
||||
any "compute"_compute.html, "fix"_fix.html, or atom-style
|
||||
"variable"_variable.html, this allows those time-averaged results to
|
||||
be written to a dump file.
|
||||
|
||||
If {f_ID} is used as a attribute, then the per-atom vector calculated
|
||||
by the fix is printed. If {f_ID\[N\]} is used, then N must be in the
|
||||
range from 1-M, which will print the Nth column of the M-length
|
||||
per-atom array calculated by the fix.
|
||||
|
||||
The {v_name} attribute allows per-atom vectors calculated by a
|
||||
"variable"_variable.html to be output. The name in the attribute
|
||||
should be replaced by the actual name of the variable that has been
|
||||
defined previously in the input script. Only an atom-style variable
|
||||
can be referenced, since it is the only style that generates per-atom
|
||||
values. Variables of style {atom} can reference individual atom
|
||||
attributes, per-atom atom attributes, thermodynamic keywords, or
|
||||
invoke other computes, fixes, or variables when they are evaluated, so
|
||||
this is a very general means of creating quantities to output to a
|
||||
dump file.
|
||||
|
||||
See "Section_modify"_Section_modify.html of the manual for information
|
||||
on how to add new compute and fix styles to LAMMPS to calculate
|
||||
per-atom quantities which could then be output into dump files.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
The {custom/vtk} style does not support writing of gzipped dump files.
|
||||
|
||||
The {custom/vtk} dump style is part of the USER-VTK package. It is
|
||||
only enabled if LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
To use this dump style, you also must link to the VTK library. See
|
||||
the info in lib/vtk/README and insure the Makefile.lammps file in that
|
||||
directory is appropriate for your machine.
|
||||
|
||||
The {custom/vtk} dump style neither supports buffering nor custom
|
||||
format strings.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"dump"_dump.html, "dump image"_dump_image.html,
|
||||
"dump_modify"_dump_modify.html, "undump"_undump.html
|
||||
|
||||
[Default:]
|
||||
|
||||
By default, files are written in ASCII format. If the file extension
|
||||
is not one of .vtk, .vtp or .vtu, the legacy VTK file format is used.
|
||||
|
|
@ -870,6 +870,10 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="dump_custom_vtk.html#index-0">dump custom/vtk</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="dump_h5md.html#index-0">dump h5md</a>
|
||||
</dt>
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue