1316 lines
86 KiB
HTML
1316 lines
86 KiB
HTML
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en" >
|
||
<head>
|
||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>dump image command — LAMMPS documentation</title>
|
||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/sphinx-design.min.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/css/lammps.css" type="text/css" />
|
||
<link rel="shortcut icon" href="_static/lammps.ico"/>
|
||
<link rel="canonical" href="https://docs.lammps.org/dump_image.html" />
|
||
<!--[if lt IE 9]>
|
||
<script src="_static/js/html5shiv.min.js"></script>
|
||
<![endif]-->
|
||
|
||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||
<script src="_static/design-tabs.js?v=f930bc37"></script>
|
||
<script async="async" src="_static/mathjax/es5/tex-mml-chtml.js?v=cadf963e"></script>
|
||
<script src="_static/js/theme.js"></script>
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="dump_modify command" href="dump_modify.html" />
|
||
<link rel="prev" title="dump h5md command" href="dump_h5md.html" />
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav">
|
||
<div class="wy-grid-for-nav">
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search" >
|
||
|
||
|
||
|
||
<a href="Manual.html">
|
||
|
||
<img src="_static/lammps-logo.png" class="logo" alt="Logo"/>
|
||
</a>
|
||
<div class="lammps_version">Version: <b>19 Nov 2024</b></div>
|
||
<div class="lammps_release">git info: </div>
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||
<input type="text" name="q" placeholder="Search docs" aria-label="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="Navigation menu">
|
||
<p class="caption" role="heading"><span class="caption-text">User Guide</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="Intro.html">1. Introduction</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Install.html">2. Install LAMMPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Build.html">3. Build LAMMPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Run_head.html">4. Run LAMMPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Commands.html">5. Commands</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Packages.html">6. Optional packages</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Speed.html">7. Accelerate performance</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Howto.html">8. Howto discussions</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Examples.html">9. Example scripts</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Tools.html">10. Auxiliary tools</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Errors.html">11. Errors</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Programmer Guide</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="Library.html">1. LAMMPS Library Interfaces</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Python_head.html">2. Use Python with LAMMPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Modify.html">3. Modifying & extending LAMMPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Developer.html">4. Information for Developers</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Command Reference</span></p>
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="commands_list.html">Commands</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="fixes.html">Fix Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="computes.html">Compute Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="pairs.html">Pair Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="bonds.html">Bond Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="angles.html">Angle Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="dihedrals.html">Dihedral Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="impropers.html">Improper Styles</a></li>
|
||
<li class="toctree-l1 current"><a class="reference internal" href="dumps.html">Dump Styles</a><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html">dump command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-vtk-command"><span class="xref std std-doc">dump vtk</span> command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-h5md-command"><span class="xref std std-doc">dump h5md</span> command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-molfile-command"><span class="xref std std-doc">dump molfile</span> command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-netcdf-command"><span class="xref std std-doc">dump netcdf</span> command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-image-command"><span class="xref std std-doc">dump image</span> command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-movie-command"><span class="xref std std-doc">dump movie</span> command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-atom-adios-command"><span class="xref std std-doc">dump atom/adios</span> command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-custom-adios-command"><span class="xref std std-doc">dump custom/adios</span> command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump.html#dump-cfg-uef-command"><span class="xref std std-doc">dump cfg/uef</span> command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_adios.html">dump atom/adios command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_adios.html#dump-custom-adios-command">dump custom/adios command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_cfg_uef.html">dump cfg/uef command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_h5md.html">dump h5md command</a></li>
|
||
<li class="toctree-l2 current"><a class="current reference internal" href="#">dump image command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#dump-movie-command">dump movie command</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#syntax">Syntax</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#dump-modify-options-for-dump-image-movie">dump_modify options for dump image/movie</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#id1">Syntax</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#examples">Examples</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#description">Description</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#image-quality-settings">Image Quality Settings</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#dump-modify-keywords-for-dump-image-and-dump-movie">Dump_modify keywords for dump image and dump movie</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#restrictions">Restrictions</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#related-commands">Related commands</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#default">Default</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_modify.html">dump_modify command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_modify.html#dump-modify-command-for-image-movie-options"><span class="xref std std-doc">dump_modify</span> command for image/movie options</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_molfile.html">dump molfile command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_netcdf.html">dump netcdf command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_netcdf.html#dump-netcdf-mpiio-command">dump netcdf/mpiio command</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="dump_vtk.html">dump vtk command</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="fix_modify_atc_commands.html">fix_modify AtC commands</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Bibliography.html">Bibliography</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||
<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 style-external-links">
|
||
<div role="navigation" aria-label="Page navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href="Manual.html" class="icon icon-home" aria-label="Home"></a></li>
|
||
<li class="breadcrumb-item"><a href="dumps.html">Dump Styles</a></li>
|
||
<li class="breadcrumb-item active">dump image command</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
<a href="https://www.lammps.org"><img src="_static/lammps-logo.png" width="64" height="16" alt="LAMMPS Homepage"></a> | <a href="Commands_all.html">Commands</a>
|
||
</li>
|
||
</ul><div class="rst-breadcrumbs-buttons" role="navigation" aria-label="Sequential page navigation">
|
||
<a href="dump_h5md.html" class="btn btn-neutral float-left" title="dump h5md command" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="dump_modify.html" class="btn btn-neutral float-right" title="dump_modify command" accesskey="n">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<p><span class="math notranslate nohighlight">\(\renewcommand{\AA}{\text{Å}}\)</span></p>
|
||
<section id="dump-image-command">
|
||
<span id="index-1"></span><span id="index-0"></span><h1>dump image command<a class="headerlink" href="#dump-image-command" title="Link to this heading"></a></h1>
|
||
</section>
|
||
<section id="dump-movie-command">
|
||
<h1>dump movie command<a class="headerlink" href="#dump-movie-command" title="Link to this heading"></a></h1>
|
||
<p>(see below for <a class="reference internal" href="#dump-modify-image"><span class="std std-ref">dump_modify options</span></a> specific to dump image/movie)</p>
|
||
<section id="syntax">
|
||
<h2>Syntax<a class="headerlink" href="#syntax" title="Link to this heading"></a></h2>
|
||
<div class="highlight-LAMMPS notranslate"><div class="highlight"><pre><span></span><span class="k">dump </span><span class="nv nv-Identifier">ID</span><span class="w"> </span><span class="nv nv-Identifier">group-ID</span><span class="w"> </span><span class="n">style</span><span class="w"> </span><span class="n">N</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="n">color</span><span class="w"> </span><span class="n">diameter</span><span class="w"> </span><span class="n">keyword</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="n">...</span>
|
||
</pre></div>
|
||
</div>
|
||
<ul>
|
||
<li><p>ID = user-assigned name for the dump</p></li>
|
||
<li><p>group-ID = ID of the group of atoms to be imaged</p></li>
|
||
<li><p>style = <em>image</em> or <em>movie</em> = style of dump command (other styles such as <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"><span class="doc">dump</span></a> doc page)</p></li>
|
||
<li><p>N = dump every this many timesteps</p></li>
|
||
<li><p>file = name of file to write image to</p></li>
|
||
<li><p>color = atom attribute that determines color of each atom</p></li>
|
||
<li><p>diameter = atom attribute that determines size of each atom</p></li>
|
||
<li><p>zero or more keyword/value pairs may be appended</p></li>
|
||
<li><p>keyword = <em>atom</em> or <em>adiam</em> or <em>bond</em> or <em>grid</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>box</em> or <em>axes</em> or <em>subbox</em> or <em>shiny</em> or <em>fsaa</em> or <em>ssao</em></p>
|
||
<pre class="literal-block"><em>atom</em> = <em>yes</em> or <em>no</em> = do or do not draw atoms
|
||
<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>grid</em> = per-grid value to use when coloring each grid cell
|
||
per-grid value = c_ID:gname:dname, c_ID:gname:dname[I], f_ID:gname:dname, f_ID:gname:dname[I]
|
||
gname = name of grid defined by compute or fix
|
||
dname = name of data field defined by compute or fix
|
||
c_ID = per-grid vector calculated by a compute with ID
|
||
c_ID[I] = Ith column of per-grid array calculated by a compute with ID
|
||
f_ID = per-grid vector calculated by a fix with ID
|
||
f_ID[I] = Ith column of per-grid array calculated by a fix with ID
|
||
<em>line</em> = color width
|
||
color = <em>type</em>
|
||
width = numeric value for line width (distance units)
|
||
<em>tri</em> = color tflag width
|
||
color = <em>type</em>
|
||
tflag = 1 for just triangle, 2 for just tri edges, 3 for both
|
||
width = numeric value for tringle edge width (distance units)
|
||
<em>body</em> = color bflag1 bflag2
|
||
color = <em>type</em>
|
||
bflag1,bflag2 = 2 numeric flags to affect how bodies are drawn
|
||
<em>fix</em> = fixID color fflag1 fflag2
|
||
fixID = ID of fix that generates objects to draw
|
||
color = <em>type</em>
|
||
fflag1,fflag2 = 2 numeric flags to affect how fix objects 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 = <em>s</em> for static, <em>d</em> 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>box</em> values = yes/no diam = draw outline of simulation box
|
||
yes/no = do or do not draw simulation box lines
|
||
diam = diameter of box lines as fraction of shortest box length
|
||
<em>axes</em> values = axes length diam = draw xyz axes
|
||
axes = <em>yes</em> or <em>no</em> = do or do not draw xyz axes lines next to simulation box
|
||
length = length of axes lines as fraction of respective box lengths
|
||
diam = diameter of axes lines as fraction of shortest box length
|
||
<em>subbox</em> values = lines diam = draw outline of processor subdomains
|
||
lines = <em>yes</em> or <em>no</em> = do or do not draw subdomain lines
|
||
diam = diameter of subdomain lines as fraction of shortest box length
|
||
<em>shiny</em> value = sfactor = shinyness of spheres and cylinders
|
||
sfactor = shinyness of spheres and cylinders from 0.0 to 1.0
|
||
<em>fsaa</em> arg = yes/no
|
||
yes/no = do or do not apply anti-aliasing
|
||
<em>ssao</em> value = shading seed dfactor = SSAO depth shading
|
||
shading = <em>yes</em> or <em>no</em> = turn depth shading on/off
|
||
seed = random # seed (positive integer)
|
||
dfactor = strength of shading from 0.0 to 1.0</pre>
|
||
</li>
|
||
</ul>
|
||
</section>
|
||
</section>
|
||
<section id="dump-modify-options-for-dump-image-movie">
|
||
<span id="dump-modify-image"></span><h1>dump_modify options for dump image/movie<a class="headerlink" href="#dump-modify-options-for-dump-image-movie" title="Link to this heading"></a></h1>
|
||
<section id="id1">
|
||
<h2>Syntax<a class="headerlink" href="#id1" title="Link to this heading"></a></h2>
|
||
<div class="highlight-LAMMPS notranslate"><div class="highlight"><pre><span></span><span class="k">dump_modify </span><span class="nv nv-Identifier">dump-ID</span><span class="w"> </span><span class="n">keyword</span><span class="w"> </span><span class="n">values</span><span class="w"> </span><span class="n">...</span>
|
||
</pre></div>
|
||
</div>
|
||
<ul>
|
||
<li><p>these keywords apply only to the <em>image</em> and <em>movie</em> styles and are documented on this page</p></li>
|
||
<li><p>keyword = <em>acolor</em> or <em>adiam</em> or <em>amap</em> or <em>gmap</em> or <em>backcolor</em> or <em>bcolor</em> or <em>bdiam</em> or <em>bitrate</em> or <em>boxcolor</em> or <em>color</em> or <em>framerate</em> or <em>gmap</em></p></li>
|
||
<li><p>see the <a class="reference internal" href="dump_modify.html"><span class="doc">dump modify</span></a> doc page for more general keywords</p>
|
||
<pre class="literal-block"><em>acolor</em> args = type color
|
||
type = atom type (numeric or type label) or range of numeric types (see below)
|
||
color = name of color or color1/color2/...
|
||
<em>adiam</em> args = type diam
|
||
type = atom type (numeric or type label) or range of numeric types (see below)
|
||
diam = diameter of atoms of that type (distance units)
|
||
<em>amap</em> args = lo hi style delta N entry1 entry2 ... entryN
|
||
lo = number or <em>min</em> = lower bound of range of color map
|
||
hi = number or <em>max</em> = upper bound of range of color map
|
||
style = 2 letters = <em>c</em> or <em>d</em> or <em>s</em> plus <em>a</em> or <em>f</em>
|
||
<em>c</em> for continuous
|
||
<em>d</em> for discrete
|
||
<em>s</em> for sequential
|
||
<em>a</em> for absolute
|
||
<em>f</em> for fractional
|
||
delta = binsize (only used for style <em>s</em>, otherwise ignored)
|
||
binsize = range is divided into bins of this width
|
||
N = # of subsequent entries
|
||
entry = value color (for continuous style)
|
||
value = number or <em>min</em> or <em>max</em> = single value within range
|
||
color = name of color used for that value
|
||
entry = lo hi color (for discrete style)
|
||
lo/hi = number or <em>min</em> or <em>max</em> = lower/upper bound of subset of range
|
||
color = name of color used for that subset of values
|
||
entry = color (for sequential style)
|
||
color = name of color used for a bin of values
|
||
<em>backcolor</em> arg = color
|
||
color = name of color for background
|
||
<em>bcolor</em> args = type color
|
||
type = bond type (numeric or type label) or range of numeric types (see below)
|
||
color = name of color or color1/color2/...
|
||
<em>bdiam</em> args = type diam
|
||
type = bond type (numeric or type label) or range of numeric types (see below)
|
||
diam = diameter of bonds of that type (distance units)
|
||
<em>bitrate</em> arg = rate
|
||
rate = target bitrate for movie in kbps
|
||
<em>boxcolor</em> arg = color
|
||
color = name of color for simulation box lines and processor subdomain lines
|
||
<em>color</em> args = name R G B
|
||
name = name of color
|
||
R,G,B = red/green/blue numeric values from 0.0 to 1.0
|
||
<em>framerate</em> arg = fps
|
||
fps = frames per second for movie
|
||
<em>gmap</em> args = identical to <em>amap</em> args</pre>
|
||
</li>
|
||
</ul>
|
||
</section>
|
||
<section id="examples">
|
||
<h2>Examples<a class="headerlink" href="#examples" title="Link to this heading"></a></h2>
|
||
<div class="highlight-LAMMPS notranslate"><div class="highlight"><pre><span></span><span class="k">dump </span><span class="nv nv-Identifier">d0</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">image</span><span class="w"> </span><span class="m">100</span><span class="w"> </span><span class="n">dump.</span><span class="o">*</span><span class="n">.jpg</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">type</span>
|
||
<span class="k">dump </span><span class="nv nv-Identifier">d1</span><span class="w"> </span><span class="nv nv-Identifier">mobile</span><span class="w"> </span><span class="n">image</span><span class="w"> </span><span class="m">500</span><span class="w"> </span><span class="n">snap.</span><span class="o">*</span><span class="n">.png</span><span class="w"> </span><span class="n">element</span><span class="w"> </span><span class="n">element</span><span class="w"> </span><span class="n">ssao</span><span class="w"> </span><span class="n">yes</span><span class="w"> </span><span class="m">4539</span><span class="w"> </span><span class="m">0.6</span>
|
||
<span class="k">dump </span><span class="nv nv-Identifier">d2</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">image</span><span class="w"> </span><span class="m">200</span><span class="w"> </span><span class="n">img</span><span class="o">-*</span><span class="n">.ppm</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">zoom</span><span class="w"> </span><span class="m">2.5</span><span class="w"> </span><span class="n">adiam</span><span class="w"> </span><span class="m">1.5</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="m">1280</span><span class="w"> </span><span class="m">720</span>
|
||
<span class="k">dump </span><span class="nv nv-Identifier">m0</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">movie</span><span class="w"> </span><span class="m">1000</span><span class="w"> </span><span class="n">movie.mpg</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="m">640</span><span class="w"> </span><span class="m">480</span>
|
||
<span class="k">dump </span><span class="nv nv-Identifier">m1</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">movie</span><span class="w"> </span><span class="m">1000</span><span class="w"> </span><span class="n">movie.avi</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="m">640</span><span class="w"> </span><span class="m">480</span>
|
||
<span class="k">dump </span><span class="nv nv-Identifier">m2</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">movie</span><span class="w"> </span><span class="m">100</span><span class="w"> </span><span class="n">movie.m4v</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="n">zoom</span><span class="w"> </span><span class="m">1.8</span><span class="w"> </span><span class="n">adiam</span><span class="w"> </span><span class="n">v_value</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="m">1280</span><span class="w"> </span><span class="m">720</span>
|
||
|
||
<span class="k">dump_modify </span><span class="nv nv-Identifier">1</span><span class="w"> </span><span class="n">amap</span><span class="w"> </span><span class="n">min</span><span class="w"> </span><span class="n">max</span><span class="w"> </span><span class="n">cf</span><span class="w"> </span><span class="m">0.0</span><span class="w"> </span><span class="m">3</span><span class="w"> </span><span class="n">min</span><span class="w"> </span><span class="n">green</span><span class="w"> </span><span class="m">0.5</span><span class="w"> </span><span class="n">yellow</span><span class="w"> </span><span class="n">max</span><span class="w"> </span><span class="n">blue</span><span class="w"> </span><span class="n">boxcolor</span><span class="w"> </span><span class="n">red</span>
|
||
|
||
<span class="k">labelmap</span><span class="w"> </span><span class="n">atom</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="n">C</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="n">H</span><span class="w"> </span><span class="m">3</span><span class="w"> </span><span class="n">O</span><span class="w"> </span><span class="m">4</span><span class="w"> </span><span class="n">N</span>
|
||
<span class="k">dump_modify </span><span class="nv nv-Identifier">1</span><span class="w"> </span><span class="n">acolor</span><span class="w"> </span><span class="n">C</span><span class="w"> </span><span class="n">gray</span><span class="w"> </span><span class="n">acolor</span><span class="w"> </span><span class="n">H</span><span class="w"> </span><span class="n">white</span><span class="w"> </span><span class="n">acolor</span><span class="w"> </span><span class="n">O</span><span class="w"> </span><span class="n">red</span><span class="w"> </span><span class="n">acolor</span><span class="w"> </span><span class="n">N</span><span class="w"> </span><span class="n">blue</span>
|
||
</pre></div>
|
||
</div>
|
||
</section>
|
||
<section id="description">
|
||
<h2>Description<a class="headerlink" href="#description" title="Link to this heading"></a></h2>
|
||
<p>Dump a high-quality rendered image of the atom configuration every <span class="math notranslate nohighlight">\(N\)</span>
|
||
timesteps and save the images either as a sequence of JPEG or PNG or
|
||
PPM files, or as a single movie file. The options for this command as
|
||
well as the <a class="reference internal" href="dump_modify.html"><span class="doc">dump_modify</span></a> command control what is
|
||
included in the image or movie and how it appears. A series of such
|
||
images can easily be manually converted into an animated movie of your
|
||
simulation or the process can be automated without writing the
|
||
intermediate files using the dump movie style; see further details
|
||
below. Other dump styles store snapshots of numerical data associated
|
||
with atoms in various formats, as discussed on the <a class="reference internal" href="dump.html"><span class="doc">dump</span></a>
|
||
doc page.</p>
|
||
<p>Note that a set of images or a movie can be made after a simulation
|
||
has been run, using the <a class="reference internal" href="rerun.html"><span class="doc">rerun</span></a> command to read snapshots
|
||
from an existing dump file, and using these dump commands in the rerun
|
||
script to generate the images/movie.</p>
|
||
<p>Here are two sample images, rendered as <span class="math notranslate nohighlight">\(1024\times 1024\)</span> JPEG files.</p>
|
||
<p><a class="reference internal" href="_images/dump1.jpg"><img alt="dump1" src="_images/dump1.jpg" style="width: 48%;" /></a> <a class="reference internal" href="_images/dump2.jpg"><img alt="dump2" src="_images/dump2.jpg" style="width: 48%;" /></a></p>
|
||
Click to see the full-size images:<p>Only atoms in the specified group are rendered in the image. The
|
||
<a class="reference internal" href="dump_modify.html"><span class="doc">dump_modify region and thresh</span></a> commands can also
|
||
alter what atoms are included in the image.
|
||
The filename suffix determines whether a JPEG, PNG, or PPM file is
|
||
created with the <em>image</em> dump style. If the suffix is “.jpg” or
|
||
“.jpeg”, then a <a class="reference external" href="https://jpeg.org/jpeg/">JPEG format</a> file is created, if the
|
||
suffix is “.png”, then a <a class="reference external" href="https://en.wikipedia.org/wiki/Portable_Network_Graphics">PNG format</a> is created, else
|
||
a <a class="reference external" href="https://en.wikipedia.org/wiki/Netpbm">PPM (aka NETPBM) format</a> file is created.
|
||
The JPEG and PNG files are binary; PPM has a text mode header followed
|
||
by binary data. JPEG images have lossy compression, PNG has lossless
|
||
compression, and PPM files are uncompressed but can be compressed with
|
||
gzip, if LAMMPS has been compiled with -DLAMMPS_GZIP and a “.gz” suffix
|
||
is used.</p>
|
||
<p>Similarly, the format of the resulting movie is chosen with the <em>movie</em>
|
||
dump style. This is handled by the underlying FFmpeg converter and thus
|
||
details have to be looked up in the <a class="reference external" href="https://ffmpeg.org/">FFmpeg documentation</a>. Typical examples are: .avi, .mpg, .m4v, .mp4,
|
||
.mkv, .flv, .mov, .gif Additional settings of the movie compression like
|
||
<em>bitrate</em> and <em>framerate</em> can be set using the dump_modify command as
|
||
described below.</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 the <a class="reference internal" href="Build_settings.html"><span class="doc">Build settings</span></a> page for
|
||
details.</p>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>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>
|
||
<hr class="docutils" />
|
||
<p>Dumps are performed on timesteps that are a multiple of <span class="math notranslate nohighlight">\(N\)</span> (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 <span class="math notranslate nohighlight">\(N\)</span>. This behavior can be
|
||
changed via the <a class="reference internal" href="dump_modify.html"><span class="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. <span class="math notranslate nohighlight">\(N\)</span> can be changed between runs by
|
||
using the <a class="reference internal" href="dump_modify.html"><span class="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 <a class="reference internal" href="dump_modify.html"><span class="doc">dump_modify pad</span></a> command can be used to
|
||
ensure 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>
|
||
<hr class="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 <a class="reference internal" href="dump.html"><span class="doc">dump custom</span></a> command, including <em>type</em> and
|
||
<em>element</em>. This includes per-atom quantities calculated by a
|
||
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a>, <a class="reference internal" href="fix.html"><span class="doc">fix</span></a>, or <a class="reference internal" href="variable.html"><span class="doc">variable</span></a>,
|
||
which are prefixed by “c_”, “f_”, or “v_”, 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><p>type 1 = red</p></li>
|
||
<li><p>type 2 = green</p></li>
|
||
<li><p>type 3 = blue</p></li>
|
||
<li><p>type 4 = yellow</p></li>
|
||
<li><p>type 5 = aqua</p></li>
|
||
<li><p>type 6 = cyan</p></li>
|
||
</ul>
|
||
<p>and repeats itself for types <span class="math notranslate nohighlight">\(> 6\)</span>. This mapping can be changed by the
|
||
“dump_modify acolor” command, as described below.</p>
|
||
<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 “dump_modify adiam”
|
||
command, as described below.</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, as described
|
||
below. 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://li.mit.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 dump_modify amap
|
||
command, as described below. 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"><span class="doc">atom_style sphere</span></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 keywords 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. As described below, the dump modify
|
||
command 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>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"><span class="doc">units</span></a>
|
||
the input script defines, e.g. Angstroms.</p>
|
||
<hr class="docutils" />
|
||
<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, threshold settings of the
|
||
<a class="reference internal" href="dump_modify.html"><span class="doc">dump_modify</span></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"><span class="doc">read_data</span></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><p>type 1 = red</p></li>
|
||
<li><p>type 2 = green</p></li>
|
||
<li><p>type 3 = blue</p></li>
|
||
<li><p>type 4 = yellow</p></li>
|
||
<li><p>type 5 = aqua</p></li>
|
||
<li><p>type 6 = cyan</p></li>
|
||
</ul>
|
||
<p>and repeats itself for bond types > 6. This mapping can be changed by
|
||
the “dump_modify bcolor” command, as described below.</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"><span class="doc">units</span></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 two 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 “dump_modify bdiam” command,
|
||
as described below.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>line</em> keyword can be used when <a class="reference internal" href="atom_style.html"><span class="doc">atom_style line</span></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><p>type 1 = red</p></li>
|
||
<li><p>type 2 = green</p></li>
|
||
<li><p>type 3 = blue</p></li>
|
||
<li><p>type 4 = yellow</p></li>
|
||
<li><p>type 5 = aqua</p></li>
|
||
<li><p>type 6 = cyan</p></li>
|
||
</ul>
|
||
<p>and repeats itself for types > 6. There is not yet an option to
|
||
change this via the dump_modify 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"><span class="doc">units</span></a> the input script defines,
|
||
e.g. Angstroms.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>tri</em> keyword can be used when <a class="reference internal" href="atom_style.html"><span class="doc">atom_style tri</span></a> is
|
||
used to define particles as triangles, and will draw them as triangles
|
||
or edges (3 lines) or both, depending on the setting for <em>tflag</em>. If
|
||
edges are drawn, the <em>width</em> setting determines the diameters of the
|
||
line segments. If this keyword is not used, triangle 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><p>type 1 = red</p></li>
|
||
<li><p>type 2 = green</p></li>
|
||
<li><p>type 3 = blue</p></li>
|
||
<li><p>type 4 = yellow</p></li>
|
||
<li><p>type 5 = aqua</p></li>
|
||
<li><p>type 6 = cyan</p></li>
|
||
</ul>
|
||
<p>and repeats itself for types > 6. There is not yet an option to
|
||
change this via the dump_modify command.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>body</em> keyword can be used when <a class="reference internal" href="atom_style.html"><span class="doc">atom_style body</span></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="Howto_body.html"><span class="doc">Howto body</span></a> page describes 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="Howto_body.html"><span class="doc">Howto body</span></a> page for a
|
||
description of what these parameters mean for each body style.</p>
|
||
<p>The only setting currently allowed for the <em>color</em> value is <em>type</em>,
|
||
which will color the body particles according to the atom type of the
|
||
particle. By default the mapping of types to colors is as follows:</p>
|
||
<ul class="simple">
|
||
<li><p>type 1 = red</p></li>
|
||
<li><p>type 2 = green</p></li>
|
||
<li><p>type 3 = blue</p></li>
|
||
<li><p>type 4 = yellow</p></li>
|
||
<li><p>type 5 = aqua</p></li>
|
||
<li><p>type 6 = cyan</p></li>
|
||
</ul>
|
||
<p>and repeats itself for types > 6. There is not yet an option to
|
||
change this via the dump_modify command.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>fix</em> keyword can be used with a <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> that produces
|
||
objects to be drawn.</p>
|
||
<p>The <em>fflag1</em> and <em>fflag2</em> settings are numerical values which are
|
||
passed to the fix to affect how the drawing of its objects is done.
|
||
See the individual fix page for a description of what these
|
||
parameters mean for a particular fix.</p>
|
||
<p>The only setting currently allowed for the <em>color</em> value is <em>type</em>,
|
||
which will color the fix objects according to their type. By default
|
||
the mapping of types to colors is as follows:</p>
|
||
<ul class="simple">
|
||
<li><p>type 1 = red</p></li>
|
||
<li><p>type 2 = green</p></li>
|
||
<li><p>type 3 = blue</p></li>
|
||
<li><p>type 4 = yellow</p></li>
|
||
<li><p>type 5 = aqua</p></li>
|
||
<li><p>type 6 = cyan</p></li>
|
||
</ul>
|
||
<p>and repeats itself for types > 6. There is not yet an option to
|
||
change this via the dump_modify command.</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>, and <em>zoom</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>, and <em>zoom</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"><span class="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
|
||
specified 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>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>up_internal = view cross (up cross view)
|
||
</pre></div>
|
||
</div>
|
||
<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>
|
||
<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 “dump_modify
|
||
boxcolor” 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 subdomain
|
||
boundaries are rendered as thin cylinders in the image. If <em>no</em> is
|
||
set (default), then the subdomain boundaries are not drawn and the
|
||
<em>diam</em> setting is ignored. If <em>yes</em> is set, the 12 edges of each
|
||
processor subdomain 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 subdomain boundaries can be set with the “dump_modify
|
||
boxcolor” 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>
|
||
<div class="versionadded">
|
||
<p><span class="versionmodified added">Added in version 21Nov2023.</span></p>
|
||
</div>
|
||
<p>The <em>fsaa</em> keyword can be used with the dump image command to improve
|
||
the image quality by enabling full scene anti-aliasing. Internally the
|
||
image is rendered at twice the width and height and then scaled down by
|
||
computing the average of each 2x2 block of pixels to produce a single
|
||
pixel in the final image at the original size. This produces images with
|
||
smoother, less ragged edges. The application of this algorithm can
|
||
increase the cost of computing the image by about 3x or more.</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 strength of the effect can be scaled by the <em>dfactor</em>
|
||
parameter. If <em>no</em> is set, no depth shading is performed. The
|
||
calculation of this effect can increase the cost of computing the image
|
||
substantially by 5x or more, especially with larger images. When used
|
||
in combination with the <em>fsaa</em> keyword the computational cost of depth
|
||
shading is particularly large.</p>
|
||
</section>
|
||
<hr class="docutils" />
|
||
<section id="image-quality-settings">
|
||
<h2>Image Quality Settings<a class="headerlink" href="#image-quality-settings" title="Link to this heading"></a></h2>
|
||
<p>The two keywords <em>fsaa</em> and <em>ssao</em> can be used to improve the image
|
||
quality at the expense of additional computational cost to render the
|
||
images. The images below show from left to right the same render with
|
||
default settings, with <em>fsaa</em> added, with <em>ssao</em> added, and with both
|
||
keywords added.</p>
|
||
<p><a class="reference internal" href="_images/image.default.png"><img alt="imagequality1" src="_images/image.default.png" style="width: 24%;" /></a> <a class="reference internal" href="_images/image.fsaa.png"><img alt="imagequality2" src="_images/image.fsaa.png" style="width: 24%;" /></a> <a class="reference internal" href="_images/image.ssao.png"><img alt="imagequality3" src="_images/image.ssao.png" style="width: 24%;" /></a> <a class="reference internal" href="_images/image.both.png"><img alt="imagequality4" src="_images/image.both.png" style="width: 24%;" /></a></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
|
||
MPEG or other movie file you can use:</p>
|
||
<ul>
|
||
<li><ol class="loweralpha simple">
|
||
<li><p>Use the ImageMagick convert program.</p></li>
|
||
</ol>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>convert<span class="w"> </span>*.jpg<span class="w"> </span>foo.gif
|
||
convert<span class="w"> </span>-loop<span class="w"> </span><span class="m">1</span><span class="w"> </span>*.ppm<span class="w"> </span>foo.mpg
|
||
</pre></div>
|
||
</div>
|
||
<p>Animated GIF files from ImageMagick are not optimized. You can use
|
||
a program like gifsicle to optimize and thus massively shrink them.
|
||
MPEG files created by ImageMagick are in MPEG-1 format with a rather
|
||
inefficient compression and low quality compared to more modern
|
||
compression styles like MPEG-4, H.264, VP8, VP9, H.265 and so on.</p>
|
||
</li>
|
||
<li><ol class="loweralpha simple" start="2">
|
||
<li><p>Use QuickTime.</p></li>
|
||
</ol>
|
||
<p>Select “Open Image Sequence” under the File menu Load the images into
|
||
QuickTime to animate them Select “Export” under the File menu Save the
|
||
movie as a QuickTime movie (*.mov) or in another format. QuickTime
|
||
can generate very high quality and efficiently compressed movie
|
||
files. Some of the supported formats require to buy a license and some
|
||
are not readable on all platforms until specific runtime libraries are
|
||
installed.</p>
|
||
</li>
|
||
<li><ol class="loweralpha simple" start="3">
|
||
<li><p>Use FFmpeg</p></li>
|
||
</ol>
|
||
<p>FFmpeg is a command-line tool that is available on many platforms and
|
||
allows extremely flexible encoding and decoding of movies.</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cat<span class="w"> </span>snap.*.jpg<span class="w"> </span><span class="p">|</span><span class="w"> </span>ffmpeg<span class="w"> </span>-y<span class="w"> </span>-f<span class="w"> </span>image2pipe<span class="w"> </span>-c:v<span class="w"> </span>mjpeg<span class="w"> </span>-i<span class="w"> </span>-<span class="w"> </span>-b:v<span class="w"> </span>2000k<span class="w"> </span>movie.m4v
|
||
cat<span class="w"> </span>snap.*.ppm<span class="w"> </span><span class="p">|</span><span class="w"> </span>ffmpeg<span class="w"> </span>-y<span class="w"> </span>-f<span class="w"> </span>image2pipe<span class="w"> </span>-c:v<span class="w"> </span>ppm<span class="w"> </span>-i<span class="w"> </span>-<span class="w"> </span>-b:v<span class="w"> </span>2400k<span class="w"> </span>movie.avi
|
||
</pre></div>
|
||
</div>
|
||
<p>Front ends for FFmpeg exist for multiple platforms. For more
|
||
information see the <a class="reference external" href="https://ffmpeg.org/">FFmpeg homepage</a></p>
|
||
</li>
|
||
</ul>
|
||
<hr class="docutils" />
|
||
<p>Play the movie:</p>
|
||
<ul>
|
||
<li><ol class="loweralpha simple">
|
||
<li><p>Use your browser to view an animated GIF movie.</p></li>
|
||
</ol>
|
||
<p>Select “Open File” under the File menu
|
||
Load the animated GIF file</p>
|
||
</li>
|
||
<li><p>b) Use the freely available mplayer or ffplay tool to view a
|
||
movie. Both are available for multiple OSes and support a large
|
||
variety of file formats and decoders.</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mplayer<span class="w"> </span>foo.mpg
|
||
ffplay<span class="w"> </span>bar.avi
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>c) Use the <a class="reference external" href="https://lammps.github.io/pizza">Pizza.py</a>
|
||
<a class="reference external" href="https://lammps.github.io/pizza/doc/animate.html">animate tool</a>,
|
||
which works directly on a series of image files.</p>
|
||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">a</span> <span class="o">=</span> <span class="n">animate</span><span class="p">(</span><span class="s2">"foo*.jpg"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>d) QuickTime and other Windows- or macOS-based media players can
|
||
obviously play movie files directly. Similarly for corresponding tools
|
||
bundled with Linux desktop environments. However, due to licensing
|
||
issues with some file formats, the formats may require installing
|
||
additional libraries, purchasing a license, or may not be
|
||
supported.</p></li>
|
||
</ul>
|
||
</section>
|
||
<hr class="docutils" />
|
||
<section id="dump-modify-keywords-for-dump-image-and-dump-movie">
|
||
<h2>Dump_modify keywords for dump image and dump movie<a class="headerlink" href="#dump-modify-keywords-for-dump-image-and-dump-movie" title="Link to this heading"></a></h2>
|
||
<p>The following dump_modify keywords apply only to the dump image and
|
||
dump movie styles. Any keyword that works with dump image also works
|
||
with dump movie, since the movie is simply a collection of images.
|
||
Some of the keywords only affect the dump movie style. The
|
||
descriptions give details.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>acolor</em> keyword can be used with the dump image command, when its
|
||
atom color setting is <em>type</em>, to set the color that atoms of each type
|
||
will be drawn in the image.</p>
|
||
<p>The specified <em>type</em> should be a type label or integer from 1 to Ntypes
|
||
= the number of atom types. For numeric types, a wildcard asterisk can
|
||
be used in place of or in conjunction with the <em>type</em> argument to
|
||
specify a range of atom types. This takes the form “*” or “*n” or
|
||
“n*” or “m*n”. If N = the number of atom types, then an asterisk with
|
||
no numeric values means all types from 1 to N. A leading asterisk
|
||
means all types from 1 to n (inclusive). A trailing asterisk means all
|
||
types from n to N (inclusive). A middle asterisk means all types from
|
||
m to n (inclusive).</p>
|
||
<p>The specified <em>color</em> can be a single color which is any of the 140
|
||
pre-defined colors (see below) or a color name defined by the
|
||
“dump_modify color” command, as described below. Or it can be two or
|
||
more colors separated by a “/” character, e.g. red/green/blue. In the
|
||
former case, that color is assigned to all the specified atom types.
|
||
In the latter case, the list of colors are assigned in a round-robin
|
||
fashion to each of the specified atom types.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>adiam</em> keyword can be used with the dump image command, when its
|
||
atom diameter setting is <em>type</em>, to set the size that atoms of each
|
||
type will be drawn in the image. The specified <em>type</em> should be a type
|
||
label or integer from 1 to Ntypes. As with the <em>acolor</em> keyword, a
|
||
wildcard asterisk can be used as part of the <em>type</em> argument to specify
|
||
a range of numeric atom types. The specified <em>diam</em> is the size in
|
||
whatever distance <a class="reference internal" href="units.html"><span class="doc">units</span></a> the input script is using, e.g.
|
||
Angstroms.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>amap</em> keyword can be used with the dump image command, with its
|
||
<em>atom</em> keyword, when its atom setting is an atom-attribute, to setup a
|
||
color map. The color map is used to assign a specific RGB
|
||
(red/green/blue) color value to an individual atom when it is drawn,
|
||
based on the atom’s attribute, which is a numeric value, e.g. its
|
||
x-component of velocity if the atom-attribute “vx” was specified.</p>
|
||
<p>The basic idea of a color map is that the atom-attribute will be
|
||
within a range of values, and that range is associated with a series
|
||
of colors (e.g. red, blue, green). An atom’s specific value (vx =
|
||
-3.2) can then mapped to the series of colors (e.g. halfway between
|
||
red and blue), and a specific color is determined via an interpolation
|
||
procedure.</p>
|
||
<p>There are many possible options for the color map, enabled by the
|
||
<em>amap</em> keyword. Here are the details.</p>
|
||
<p>The <em>lo</em> and <em>hi</em> settings determine the range of values allowed for
|
||
the atom attribute. If numeric values are used for <em>lo</em> and/or <em>hi</em>,
|
||
then values that are lower/higher than that value are set to the
|
||
value. I.e. the range is static. If <em>lo</em> is specified as <em>min</em> or
|
||
<em>hi</em> as <em>max</em> then the range is dynamic, and the lower and/or
|
||
upper bound will be calculated each time an image is drawn, based
|
||
on the set of atoms being visualized.</p>
|
||
<p>The <em>style</em> setting is two letters, such as “ca”. The first letter is
|
||
either “c” for continuous, “d” for discrete, or “s” for sequential.
|
||
The second letter is either “a” for absolute, or “f” for fractional.</p>
|
||
<p>A continuous color map is one in which the color changes continuously
|
||
from value to value within the range. A discrete color map is one in
|
||
which discrete colors are assigned to sub-ranges of values within the
|
||
range. A sequential color map is one in which discrete colors are
|
||
assigned to a sequence of sub-ranges of values covering the entire
|
||
range.</p>
|
||
<p>An absolute color map is one in which the values to which colors are
|
||
assigned are specified explicitly as values within the range. A
|
||
fractional color map is one in which the values to which colors are
|
||
assigned are specified as a fractional portion of the range. For
|
||
example if the range is from -10.0 to 10.0, and the color red is to be
|
||
assigned to atoms with a value of 5.0, then for an absolute color map
|
||
the number 5.0 would be used. But for a fractional map, the number
|
||
0.75 would be used since 5.0 is 3/4 of the way from -10.0 to 10.0.</p>
|
||
<p>The <em>delta</em> setting must be specified for all styles, but is only used
|
||
for the sequential style; otherwise the value is ignored. It
|
||
specifies the bin size to use within the range for assigning
|
||
consecutive colors to. For example, if the range is from <span class="math notranslate nohighlight">\(-10.0\)</span> to
|
||
<span class="math notranslate nohighlight">\(10.0\)</span> and a <em>delta</em> of <span class="math notranslate nohighlight">\(1.0\)</span> is used, then 20 colors will be
|
||
assigned to the range. The first will be from
|
||
<span class="math notranslate nohighlight">\(-10.0 \le \text{color1} < -9.0\)</span>, then second from
|
||
<span class="math notranslate nohighlight">\(-9.0 \le color2 < -8.0\)</span>, etc.</p>
|
||
<p>The <em>N</em> setting is how many entries follow. The format of the entries
|
||
depends on whether the color map style is continuous, discrete or
|
||
sequential. In all cases the <em>color</em> setting can be any of the 140
|
||
pre-defined colors (see below) or a color name defined by the
|
||
dump_modify color option.</p>
|
||
<p>For continuous color maps, each entry has a <em>value</em> and a <em>color</em>.
|
||
The <em>value</em> is either a number within the range of values or <em>min</em> or
|
||
<em>max</em>. The <em>value</em> of the first entry must be <em>min</em> and the <em>value</em>
|
||
of the last entry must be <em>max</em>. Any entries in between must have
|
||
increasing values. Note that numeric values can be specified either
|
||
as absolute numbers or as fractions (0.0 to 1.0) of the range,
|
||
depending on the “a” or “f” in the style setting for the color map.</p>
|
||
<p>Here is how the entries are used to determine the color of an individual
|
||
atom, given the value <span class="math notranslate nohighlight">\(X\)</span> of its atom attribute. <span class="math notranslate nohighlight">\(X\)</span> will
|
||
fall between 2 of the entry values. The color of the atom is linearly
|
||
interpolated (in each of the RGB values) between the 2 colors associated
|
||
with those entries. For example, if <span class="math notranslate nohighlight">\(X = -5.0\)</span> and the two
|
||
surrounding entries are “red” at <span class="math notranslate nohighlight">\(-10.0\)</span> and “blue” at
|
||
<span class="math notranslate nohighlight">\(0.0\)</span>, then the atom’s color will be halfway between “red” and
|
||
“blue”, which happens to be “purple”.</p>
|
||
<p>For discrete color maps, each entry has a <em>lo</em> and <em>hi</em> value and a
|
||
<em>color</em>. The <em>lo</em> and <em>hi</em> settings are either numbers within the
|
||
range of values or <em>lo</em> can be <em>min</em> or <em>hi</em> can be <em>max</em>. The <em>lo</em>
|
||
and <em>hi</em> settings of the last entry must be <em>min</em> and <em>max</em>. Other
|
||
entries can have any <em>lo</em> and <em>hi</em> values and the sub-ranges of
|
||
different values can overlap. Note that numeric <em>lo</em> and <em>hi</em> values
|
||
can be specified either as absolute numbers or as fractions (0.0 to 1.0)
|
||
of the range, depending on the “a” or “f” in the style setting for the
|
||
color map.</p>
|
||
<p>Here is how the entries are used to determine the color of an individual
|
||
atom, given the value X of its atom attribute. The entries are scanned
|
||
from first to last. The first time that <em>lo</em> <= X <= <em>hi</em>, X is
|
||
assigned the color associated with that entry. You can think of the
|
||
last entry as assigning a default color (since it will always be matched
|
||
by X), and the earlier entries as colors that override the default.
|
||
Also note that no interpolation of a color RGB is done. All atoms will
|
||
be drawn with one of the colors in the list of entries.</p>
|
||
<p>For sequential color maps, each entry has only a <em>color</em>. Here is how
|
||
the entries are used to determine the color of an individual atom,
|
||
given the value X of its atom attribute. The range is partitioned
|
||
into N bins of width <em>binsize</em>. Thus X will fall in a specific bin
|
||
from 1 to N, say the Mth bin. If it falls on a boundary between 2
|
||
bins, it is considered to be in the higher of the 2 bins. Each bin is
|
||
assigned a color from the E entries. If E < N, then the colors are
|
||
repeated. For example if 2 entries with colors red and green are
|
||
specified, then the odd numbered bins will be red and the even bins
|
||
green. The color of the atom is the color of its bin. Note that the
|
||
sequential color map is really a shorthand way of defining a discrete
|
||
color map without having to specify where all the bin boundaries are.</p>
|
||
<p>Here is an example of using a sequential color map to color all the
|
||
atoms in individual molecules with a different color. See the
|
||
examples/pour/in.pour.2d.molecule input script for an example of how
|
||
this is used.</p>
|
||
<div class="highlight-LAMMPS notranslate"><div class="highlight"><pre><span></span><span class="k">variable </span><span class="nv nv-Identifier">colors</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span>
|
||
<span class="w"> </span><span class="s">"red green blue yellow white &</span>
|
||
<span class="s"> purple pink orange lime gray"</span>
|
||
<span class="k">variable </span><span class="nv nv-Identifier">mol</span><span class="w"> </span><span class="n">atom</span><span class="w"> </span><span class="n">mol</span><span class="o">%</span><span class="m">10</span>
|
||
<span class="k">dump </span><span class="nv nv-Identifier">1</span><span class="w"> </span><span class="nv nv-Identifier">all</span><span class="w"> </span><span class="n">image</span><span class="w"> </span><span class="m">250</span><span class="w"> </span><span class="n">image.</span><span class="o">*</span><span class="n">.jpg</span><span class="w"> </span><span class="n">v_mol</span><span class="w"> </span><span class="n">type</span><span class="w"> </span><span class="o">&</span>
|
||
<span class="w"> </span><span class="n">zoom</span><span class="w"> </span><span class="m">1.6</span><span class="w"> </span><span class="n">adiam</span><span class="w"> </span><span class="m">1.5</span>
|
||
<span class="k">dump_modify </span><span class="nv nv-Identifier">1</span><span class="w"> </span><span class="n">pad</span><span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="n">amap</span><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="n">sa</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="m">10</span><span class="w"> </span><span class="nv">${colors}</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>In this case, 10 colors are defined, and molecule IDs are
|
||
mapped to one of the colors, even if there are 1000s of molecules.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>backcolor</em> sets the background color of the images. The color
|
||
name can be any of the 140 pre-defined colors (see below) or a color
|
||
name defined by the dump_modify color option.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>bcolor</em> keyword can be used with the dump image command, with its
|
||
<em>bond</em> keyword, when its color setting is <em>type</em>, to set the color
|
||
that bonds of each type will be drawn in the image.</p>
|
||
<p>The specified <em>type</em> should be a type label or integer from 1 to
|
||
<span class="math notranslate nohighlight">\(N\)</span>, where <span class="math notranslate nohighlight">\(N\)</span> is the number of bond types. For numeric
|
||
types, a wildcard asterisk can be used in place of or in conjunction
|
||
with the <em>type</em> argument to specify a range of bond types. This takes
|
||
the form “*” or “*n” or “m*” or “m*n”. If <span class="math notranslate nohighlight">\(N\)</span> is the number
|
||
of bond types, then an asterisk with no numerical values means all
|
||
types from 1 to <span class="math notranslate nohighlight">\(N\)</span>. A leading asterisk means all types from 1
|
||
to n (inclusive). A trailing asterisk means all types from m to
|
||
<span class="math notranslate nohighlight">\(N\)</span> (inclusive). A middle asterisk means all types from m to n
|
||
(inclusive).</p>
|
||
<p>The specified <em>color</em> can be a single color which is any of the 140
|
||
pre-defined colors (see below) or a color name defined by the
|
||
dump_modify color option. Or it can be two or more colors separated
|
||
by a “/” character (e.g., red/green/blue). In the former case, that
|
||
color is assigned to all the specified bond types. In the latter
|
||
case, the list of colors are assigned in a round-robin fashion to each
|
||
of the specified bond types.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>bdiam</em> keyword can be used with the dump image command, with its
|
||
<em>bond</em> keyword, when its <em>diam</em> setting is <em>type</em>, to set the diameter
|
||
that bonds of each type will be drawn in the image. The specified
|
||
<em>type</em> should be a type label or integer from 1 to Nbondtypes. As with
|
||
the <em>bcolor</em> keyword, a wildcard asterisk can be used as part of the
|
||
<em>type</em> argument to specify a range of numeric bond types. The
|
||
specified <em>diam</em> is the size in whatever distance <a class="reference internal" href="units.html"><span class="doc">units</span></a>
|
||
you are using (e.g., Angstroms).</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>bitrate</em> keyword can be used with the <a class="reference internal" href="#"><span class="doc">dump movie</span></a> command to define the size of the resulting movie file
|
||
and its quality via setting how many kbits per second are to be used
|
||
for the movie file. Higher bitrates require less compression and will
|
||
result in higher quality movies. The quality is also determined by
|
||
the compression format and encoder. The default setting is 2000
|
||
kbit/s, which will result in average quality with older compression
|
||
formats.</p>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>Not all movie file formats supported by dump movie allow the
|
||
bitrate to be set. If not, the setting is silently ignored.</p>
|
||
</div>
|
||
<hr class="docutils" />
|
||
<p>The <em>boxcolor</em> keyword sets the color of the simulation box drawn
|
||
around the atoms in each image as well as the color of processor
|
||
subdomain boundaries. See the “dump image box” command for how to
|
||
specify that a box be drawn via the <em>box</em> keyword, and the subdomain
|
||
boundaries via the <em>subbox</em> keyword. The color name can be any of the
|
||
140 pre-defined colors (see below) or a color name defined by the
|
||
dump_modify color option.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>color</em> keyword allows definition of a new color name, in addition
|
||
to the 140-predefined colors (see below), and associates three
|
||
red/green/blue RGB values with that color name. The color name can
|
||
then be used with any other dump_modify keyword that takes a color
|
||
name as a value. The RGB values should each be floating point values
|
||
between 0.0 and 1.0 inclusive.</p>
|
||
<p>When a color name is converted to RGB values, the user-defined color
|
||
names are searched first, then the 140 pre-defined color names. This
|
||
means you can also use the <em>color</em> keyword to overwrite one of the
|
||
pre-defined color names with new RBG values.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>framerate</em> keyword can be used with the <a class="reference internal" href="#"><span class="doc">dump movie</span></a> command to define the duration of the resulting movie
|
||
file. Movie files written by the dump <em>movie</em> command have a default
|
||
frame rate of 24 frames per second and the images generated will be
|
||
converted at that rate. Thus a sequence of 1000 dump images will
|
||
result in a movie of about 42 seconds. To make a movie run longer you
|
||
can either generate images more frequently or lower the frame rate.
|
||
To speed a movie up, you can do the inverse. Using a frame rate
|
||
higher than 24 is not recommended, as it will result in simply
|
||
dropping the rendered images. It is more efficient to dump images less
|
||
frequently.</p>
|
||
<hr class="docutils" />
|
||
<p>The <em>gmap</em> keyword can be used with the dump image command, with its
|
||
<em>grid</em> keyword, to setup a color map. The color map is used to assign
|
||
a specific RGB (red/green/blue) color value to an individual grid cell
|
||
when it is drawn, based on the grid cell value, which is a numeric
|
||
quantity specified with the <em>grid</em> keyword.</p>
|
||
<p>The arguments for the <em>gmap</em> keyword are identical to those for the
|
||
<em>amap</em> keyword (for atom coloring) described above.</p>
|
||
</section>
|
||
<hr class="docutils" />
|
||
<section id="restrictions">
|
||
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Link to this heading"></a></h2>
|
||
<p>To write JPEG images, you must use the -DLAMMPS_JPEG switch when
|
||
building LAMMPS and link with a JPEG library. To write PNG images, you
|
||
must use the -DLAMMPS_PNG switch when building LAMMPS and link with a
|
||
PNG library.</p>
|
||
<p>To write <em>movie</em> dumps, you must use the -DLAMMPS_FFMPEG switch when
|
||
building LAMMPS and have the FFmpeg executable available on the
|
||
machine where LAMMPS is being run. Typically its name is lowercase
|
||
(i.e., “ffmpeg”).</p>
|
||
<p>See the <a class="reference internal" href="Build_settings.html"><span class="doc">Build settings</span></a> page for details.</p>
|
||
<p>Note that since FFmpeg is run as an external program via a pipe,
|
||
LAMMPS has limited control over its execution and no knowledge about
|
||
errors and warnings printed by it. Those warnings and error messages
|
||
will be printed to the screen only. Due to the way image data are
|
||
communicated to FFmpeg, it will often print the message</p>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pipe:: Input/output error
|
||
</pre></div>
|
||
</div>
|
||
<p>which can be safely ignored. Other warnings
|
||
and errors have to be addressed according to the FFmpeg documentation.
|
||
One known issue is that certain movie file formats (e.g., MPEG level 1
|
||
and 2 format streams) have video bandwidth limits that can be crossed
|
||
when rendering too large of image sizes. Typical warnings look like
|
||
this:</p>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[mpeg @ 0x98b5e0] packet too large, ignoring buffer limits to mux it
|
||
[mpeg @ 0x98b5e0] buffer underflow st=0 bufi=281407 size=285018
|
||
[mpeg @ 0x98b5e0] buffer underflow st=0 bufi=283448 size=285018
|
||
</pre></div>
|
||
</div>
|
||
<p>In this case it is recommended either to reduce the size of the image
|
||
or to encode in a different format that is also supported by your copy of
|
||
FFmpeg and which does not have this limitation (e.g., .avi, .mkv, mp4).</p>
|
||
</section>
|
||
<section id="related-commands">
|
||
<h2>Related commands<a class="headerlink" href="#related-commands" title="Link to this heading"></a></h2>
|
||
<p><a class="reference internal" href="dump.html"><span class="doc">dump</span></a>, <a class="reference internal" href="dump_modify.html"><span class="doc">dump_modify</span></a>, <a class="reference internal" href="undump.html"><span class="doc">undump</span></a></p>
|
||
</section>
|
||
<section id="default">
|
||
<h2>Default<a class="headerlink" href="#default" title="Link to this heading"></a></h2>
|
||
<p>The defaults for the dump image and dump movie keywords are as follows:</p>
|
||
<ul class="simple">
|
||
<li><p>adiam = not specified (use diameter setting)</p></li>
|
||
<li><p>atom = yes</p></li>
|
||
<li><p>bond = none none (if no bonds in system)</p></li>
|
||
<li><p>bond = atom 0.5 (if bonds in system)</p></li>
|
||
<li><p>size = 512 512</p></li>
|
||
<li><p>view = 60 30 (for 3d)</p></li>
|
||
<li><p>view = 0 0 (for 2d)</p></li>
|
||
<li><p>center = s 0.5 0.5 0.5</p></li>
|
||
<li><p>up = 0 0 1 (for 3d)</p></li>
|
||
<li><p>up = 0 1 0 (for 2d)</p></li>
|
||
<li><p>zoom = 1.0</p></li>
|
||
<li><p>box = yes 0.02</p></li>
|
||
<li><p>axes = no 0.0 0.0</p></li>
|
||
<li><p>subbox no 0.0</p></li>
|
||
<li><p>shiny = 1.0</p></li>
|
||
<li><p>ssao = no</p></li>
|
||
</ul>
|
||
<hr class="docutils" />
|
||
<p>The defaults for the dump_modify keywords specific to dump image and dump movie are as follows:</p>
|
||
<ul class="simple">
|
||
<li><p>acolor = * red/green/blue/yellow/aqua/cyan</p></li>
|
||
<li><p>adiam = * 1.0</p></li>
|
||
<li><p>amap = min max cf 0.0 2 min blue max red</p></li>
|
||
<li><p>backcolor = black</p></li>
|
||
<li><p>bcolor = * red/green/blue/yellow/aqua/cyan</p></li>
|
||
<li><p>bdiam = * 0.5</p></li>
|
||
<li><p>bitrate = 2000</p></li>
|
||
<li><p>boxcolor = yellow</p></li>
|
||
<li><p>color = 140 color names are pre-defined as listed below</p></li>
|
||
<li><p>framerate = 24</p></li>
|
||
<li><p>fsaa = no</p></li>
|
||
<li><p>gmap = min max cf 0.0 2 min blue max red</p></li>
|
||
</ul>
|
||
<hr class="docutils" />
|
||
<p>These are the standard 109 element names that LAMMPS pre-defines for
|
||
use with the dump image and dump_modify commands.</p>
|
||
<ul class="simple">
|
||
<li><p>1-10 = “H”, “He”, “Li”, “Be”, “B”, “C”, “N”, “O”, “F”, “Ne”</p></li>
|
||
<li><p>11-20 = “Na”, “Mg”, “Al”, “Si”, “P”, “S”, “Cl”, “Ar”, “K”, “Ca”</p></li>
|
||
<li><p>21-30 = “Sc”, “Ti”, “V”, “Cr”, “Mn”, “Fe”, “Co”, “Ni”, “Cu”, “Zn”</p></li>
|
||
<li><p>31-40 = “Ga”, “Ge”, “As”, “Se”, “Br”, “Kr”, “Rb”, “Sr”, “Y”, “Zr”</p></li>
|
||
<li><p>41-50 = “Nb”, “Mo”, “Tc”, “Ru”, “Rh”, “Pd”, “Ag”, “Cd”, “In”, “Sn”</p></li>
|
||
<li><p>51-60 = “Sb”, “Te”, “I”, “Xe”, “Cs”, “Ba”, “La”, “Ce”, “Pr”, “Nd”</p></li>
|
||
<li><p>61-70 = “Pm”, “Sm”, “Eu”, “Gd”, “Tb”, “Dy”, “Ho”, “Er”, “Tm”, “Yb”</p></li>
|
||
<li><p>71-80 = “Lu”, “Hf”, “Ta”, “W”, “Re”, “Os”, “Ir”, “Pt”, “Au”, “Hg”</p></li>
|
||
<li><p>81-90 = “Tl”, “Pb”, “Bi”, “Po”, “At”, “Rn”, “Fr”, “Ra”, “Ac”, “Th”</p></li>
|
||
<li><p>91-100 = “Pa”, “U”, “Np”, “Pu”, “Am”, “Cm”, “Bk”, “Cf”, “Es”, “Fm”</p></li>
|
||
<li><p>101-109 = “Md”, “No”, “Lr”, “Rf”, “Db”, “Sg”, “Bh”, “Hs”, “Mt”</p></li>
|
||
</ul>
|
||
<hr class="docutils" />
|
||
<p>These are the 140 colors that LAMMPS pre-defines for use with the dump
|
||
image and dump_modify commands. Additional colors can be defined with
|
||
the dump_modify color command. The 3 numbers listed for each name are
|
||
the RGB (red/green/blue) values. Divide each value by 255 to get the
|
||
equivalent 0.0 to 1.0 value.</p>
|
||
<table class="docutils align-default">
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>aliceblue = 240, 248, 255</p></td>
|
||
<td><p>antiquewhite = 250, 235, 215</p></td>
|
||
<td><p>aqua = 0, 255, 255</p></td>
|
||
<td><p>aquamarine = 127, 255, 212</p></td>
|
||
<td><p>azure = 240, 255, 255</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>beige = 245, 245, 220</p></td>
|
||
<td><p>bisque = 255, 228, 196</p></td>
|
||
<td><p>black = 0, 0, 0</p></td>
|
||
<td><p>blanchedalmond = 255, 255, 205</p></td>
|
||
<td><p>blue = 0, 0, 255</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>blueviolet = 138, 43, 226</p></td>
|
||
<td><p>brown = 165, 42, 42</p></td>
|
||
<td><p>burlywood = 222, 184, 135</p></td>
|
||
<td><p>cadetblue = 95, 158, 160</p></td>
|
||
<td><p>chartreuse = 127, 255, 0</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>chocolate = 210, 105, 30</p></td>
|
||
<td><p>coral = 255, 127, 80</p></td>
|
||
<td><p>cornflowerblue = 100, 149, 237</p></td>
|
||
<td><p>cornsilk = 255, 248, 220</p></td>
|
||
<td><p>crimson = 220, 20, 60</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>cyan = 0, 255, 255</p></td>
|
||
<td><p>darkblue = 0, 0, 139</p></td>
|
||
<td><p>darkcyan = 0, 139, 139</p></td>
|
||
<td><p>darkgoldenrod = 184, 134, 11</p></td>
|
||
<td><p>darkgray = 169, 169, 169</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>darkgreen = 0, 100, 0</p></td>
|
||
<td><p>darkkhaki = 189, 183, 107</p></td>
|
||
<td><p>darkmagenta = 139, 0, 139</p></td>
|
||
<td><p>darkolivegreen = 85, 107, 47</p></td>
|
||
<td><p>darkorange = 255, 140, 0</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>darkorchid = 153, 50, 204</p></td>
|
||
<td><p>darkred = 139, 0, 0</p></td>
|
||
<td><p>darksalmon = 233, 150, 122</p></td>
|
||
<td><p>darkseagreen = 143, 188, 143</p></td>
|
||
<td><p>darkslateblue = 72, 61, 139</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>darkslategray = 47, 79, 79</p></td>
|
||
<td><p>darkturquoise = 0, 206, 209</p></td>
|
||
<td><p>darkviolet = 148, 0, 211</p></td>
|
||
<td><p>deeppink = 255, 20, 147</p></td>
|
||
<td><p>deepskyblue = 0, 191, 255</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>dimgray = 105, 105, 105</p></td>
|
||
<td><p>dodgerblue = 30, 144, 255</p></td>
|
||
<td><p>firebrick = 178, 34, 34</p></td>
|
||
<td><p>floralwhite = 255, 250, 240</p></td>
|
||
<td><p>forestgreen = 34, 139, 34</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>fuchsia = 255, 0, 255</p></td>
|
||
<td><p>gainsboro = 220, 220, 220</p></td>
|
||
<td><p>ghostwhite = 248, 248, 255</p></td>
|
||
<td><p>gold = 255, 215, 0</p></td>
|
||
<td><p>goldenrod = 218, 165, 32</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>gray = 128, 128, 128</p></td>
|
||
<td><p>green = 0, 128, 0</p></td>
|
||
<td><p>greenyellow = 173, 255, 47</p></td>
|
||
<td><p>honeydew = 240, 255, 240</p></td>
|
||
<td><p>hotpink = 255, 105, 180</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>indianred = 205, 92, 92</p></td>
|
||
<td><p>indigo = 75, 0, 130</p></td>
|
||
<td><p>ivory = 255, 240, 240</p></td>
|
||
<td><p>khaki = 240, 230, 140</p></td>
|
||
<td><p>lavender = 230, 230, 250</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>lavenderblush = 255, 240, 245</p></td>
|
||
<td><p>lawngreen = 124, 252, 0</p></td>
|
||
<td><p>lemonchiffon = 255, 250, 205</p></td>
|
||
<td><p>lightblue = 173, 216, 230</p></td>
|
||
<td><p>lightcoral = 240, 128, 128</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>lightcyan = 224, 255, 255</p></td>
|
||
<td><p>lightgoldenrodyellow = 250, 250, 210</p></td>
|
||
<td><p>lightgreen = 144, 238, 144</p></td>
|
||
<td><p>lightgrey = 211, 211, 211</p></td>
|
||
<td><p>lightpink = 255, 182, 193</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>lightsalmon = 255, 160, 122</p></td>
|
||
<td><p>lightseagreen = 32, 178, 170</p></td>
|
||
<td><p>lightskyblue = 135, 206, 250</p></td>
|
||
<td><p>lightslategray = 119, 136, 153</p></td>
|
||
<td><p>lightsteelblue = 176, 196, 222</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>lightyellow = 255, 255, 224</p></td>
|
||
<td><p>lime = 0, 255, 0</p></td>
|
||
<td><p>limegreen = 50, 205, 50</p></td>
|
||
<td><p>linen = 250, 240, 230</p></td>
|
||
<td><p>magenta = 255, 0, 255</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>maroon = 128, 0, 0</p></td>
|
||
<td><p>mediumaquamarine = 102, 205, 170</p></td>
|
||
<td><p>mediumblue = 0, 0, 205</p></td>
|
||
<td><p>mediumorchid = 186, 85, 211</p></td>
|
||
<td><p>mediumpurple = 147, 112, 219</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>mediumseagreen = 60, 179, 113</p></td>
|
||
<td><p>mediumslateblue = 123, 104, 238</p></td>
|
||
<td><p>mediumspringgreen = 0, 250, 154</p></td>
|
||
<td><p>mediumturquoise = 72, 209, 204</p></td>
|
||
<td><p>mediumvioletred = 199, 21, 133</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>midnightblue = 25, 25, 112</p></td>
|
||
<td><p>mintcream = 245, 255, 250</p></td>
|
||
<td><p>mistyrose = 255, 228, 225</p></td>
|
||
<td><p>moccasin = 255, 228, 181</p></td>
|
||
<td><p>navajowhite = 255, 222, 173</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>navy = 0, 0, 128</p></td>
|
||
<td><p>oldlace = 253, 245, 230</p></td>
|
||
<td><p>olive = 128, 128, 0</p></td>
|
||
<td><p>olivedrab = 107, 142, 35</p></td>
|
||
<td><p>orange = 255, 165, 0</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>orangered = 255, 69, 0</p></td>
|
||
<td><p>orchid = 218, 112, 214</p></td>
|
||
<td><p>palegoldenrod = 238, 232, 170</p></td>
|
||
<td><p>palegreen = 152, 251, 152</p></td>
|
||
<td><p>paleturquoise = 175, 238, 238</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>palevioletred = 219, 112, 147</p></td>
|
||
<td><p>papayawhip = 255, 239, 213</p></td>
|
||
<td><p>peachpuff = 255, 239, 213</p></td>
|
||
<td><p>peru = 205, 133, 63</p></td>
|
||
<td><p>pink = 255, 192, 203</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>plum = 221, 160, 221</p></td>
|
||
<td><p>powderblue = 176, 224, 230</p></td>
|
||
<td><p>purple = 128, 0, 128</p></td>
|
||
<td><p>red = 255, 0, 0</p></td>
|
||
<td><p>rosybrown = 188, 143, 143</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>royalblue = 65, 105, 225</p></td>
|
||
<td><p>saddlebrown = 139, 69, 19</p></td>
|
||
<td><p>salmon = 250, 128, 114</p></td>
|
||
<td><p>sandybrown = 244, 164, 96</p></td>
|
||
<td><p>seagreen = 46, 139, 87</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>seashell = 255, 245, 238</p></td>
|
||
<td><p>sienna = 160, 82, 45</p></td>
|
||
<td><p>silver = 192, 192, 192</p></td>
|
||
<td><p>skyblue = 135, 206, 235</p></td>
|
||
<td><p>slateblue = 106, 90, 205</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>slategray = 112, 128, 144</p></td>
|
||
<td><p>snow = 255, 250, 250</p></td>
|
||
<td><p>springgreen = 0, 255, 127</p></td>
|
||
<td><p>steelblue = 70, 130, 180</p></td>
|
||
<td><p>tan = 210, 180, 140</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>teal = 0, 128, 128</p></td>
|
||
<td><p>thistle = 216, 191, 216</p></td>
|
||
<td><p>tomato = 253, 99, 71</p></td>
|
||
<td><p>turquoise = 64, 224, 208</p></td>
|
||
<td><p>violet = 238, 130, 238</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>wheat = 245, 222, 179</p></td>
|
||
<td><p>white = 255, 255, 255</p></td>
|
||
<td><p>whitesmoke = 245, 245, 245</p></td>
|
||
<td><p>yellow = 255, 255, 0</p></td>
|
||
<td><p>yellowgreen = 154, 205, 50</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="dump_h5md.html" class="btn btn-neutral float-left" title="dump h5md command" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="dump_modify.html" class="btn btn-neutral float-right" title="dump_modify command" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright 2003-2025 Sandia Corporation.</p>
|
||
</div>
|
||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||
|
||
|
||
</footer>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script>
|
||
jQuery(function () {
|
||
SphinxRtdTheme.Navigation.enable(false);
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html> |