633 lines
45 KiB
HTML
633 lines
45 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>8.3.1. Output from LAMMPS (thermo, dumps, computes, fixes, variables) — 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/Howto_output.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="8.3.2. Use chunks to calculate system properties" href="Howto_chunk.html" />
|
|
<link rel="prev" title="8.2.8. Long-range dispersion settings" href="Howto_dispersion.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 class="current">
|
|
<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 current"><a class="reference internal" href="Howto.html">8. Howto discussions</a><ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="Howto.html#general-howto">8.1. General howto</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="Howto.html#settings-howto">8.2. Settings howto</a></li>
|
|
<li class="toctree-l2 current"><a class="reference internal" href="Howto.html#analysis-howto">8.3. Analysis howto</a><ul class="current">
|
|
<li class="toctree-l3 current"><a class="current reference internal" href="#">8.3.1. Output from LAMMPS (thermo, dumps, computes, fixes, variables)</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="Howto_chunk.html">8.3.2. Use chunks to calculate system properties</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="Howto_grid.html">8.3.3. Using distributed grids</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="Howto_temperature.html">8.3.4. Calculate temperature</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="Howto_elastic.html">8.3.5. Calculate elastic constants</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="Howto_kappa.html">8.3.6. Calculate thermal conductivity</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="Howto_viscosity.html">8.3.7. Calculate viscosity</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="Howto_diffusion.html">8.3.8. Calculate diffusion coefficients</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="Howto_structured_data.html">8.3.9. Output structured data from LAMMPS</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="Howto.html#force-fields-howto">8.4. Force fields howto</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="Howto.html#packages-howto">8.5. Packages howto</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="Howto.html#tutorials-howto">8.6. Tutorials howto</a></li>
|
|
</ul>
|
|
</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>
|
|
<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"><a class="reference internal" href="dumps.html">Dump Styles</a></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="Howto.html"><span class="section-number">8. </span>Howto discussions</a></li>
|
|
<li class="breadcrumb-item active"><span class="section-number">8.3.1. </span>Output from LAMMPS (thermo, dumps, computes, fixes, variables)</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="Howto_dispersion.html" class="btn btn-neutral float-left" title="8.2.8. Long-range dispersion settings" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
|
<a href="Howto_chunk.html" class="btn btn-neutral float-right" title="8.3.2. Use chunks to calculate system properties" 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="output-from-lammps-thermo-dumps-computes-fixes-variables">
|
|
<h1><span class="section-number">8.3.1. </span>Output from LAMMPS (thermo, dumps, computes, fixes, variables)<a class="headerlink" href="#output-from-lammps-thermo-dumps-computes-fixes-variables" title="Link to this heading"></a></h1>
|
|
<p>There are four basic forms of LAMMPS output:</p>
|
|
<ul class="simple">
|
|
<li><p><a class="reference internal" href="thermo_style.html"><span class="doc">Thermodynamic output</span></a>, which is a list of
|
|
quantities printed every few timesteps to the screen and logfile.</p></li>
|
|
<li><p><a class="reference internal" href="dump.html"><span class="doc">Dump files</span></a>, which contain snapshots of atoms and various
|
|
per-atom values and are written at a specified frequency.</p></li>
|
|
<li><p>Certain fixes can output user-specified quantities to files:
|
|
<a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a> for time averaging,
|
|
<a class="reference internal" href="fix_ave_chunk.html"><span class="doc">fix ave/chunk</span></a> for spatial or other averaging, and
|
|
<a class="reference internal" href="fix_print.html"><span class="doc">fix print</span></a> for single-line output of
|
|
<a class="reference internal" href="variable.html"><span class="doc">variables</span></a>. Fix print can also output to the screen.</p></li>
|
|
<li><p><a class="reference internal" href="restart.html"><span class="doc">Restart files</span></a>.</p></li>
|
|
</ul>
|
|
<p>A simulation prints one set of thermodynamic output and (optionally)
|
|
restart files. It can generate any number of dump files and fix
|
|
output files, depending on what <a class="reference internal" href="dump.html"><span class="doc">dump</span></a> and <a class="reference internal" href="fix.html"><span class="doc">fix</span></a>
|
|
commands you specify.</p>
|
|
<p>As discussed below, LAMMPS gives you a variety of ways to determine
|
|
what quantities are calculated and printed when the thermodynamics,
|
|
dump, or fix commands listed above perform output. Throughout this
|
|
discussion, note that users can also <a class="reference internal" href="Modify.html"><span class="doc">add their own computes and
|
|
fixes to LAMMPS</span></a> which can generate values that can then be
|
|
output with these commands.</p>
|
|
<p>The following subsections discuss different LAMMPS commands related
|
|
to output and the kind of data they operate on and produce:</p>
|
|
<ul class="simple">
|
|
<li><p><a class="reference internal" href="#global"><span class="std std-ref">Global/per-atom/local/per-grid data</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#scalar"><span class="std std-ref">Scalar/vector/array data</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#disambiguation"><span class="std std-ref">Disambiguation</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#thermo"><span class="std std-ref">Thermodynamic output</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#dump"><span class="std std-ref">Dump file output</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#fixoutput"><span class="std std-ref">Fixes that write output files</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#computeoutput"><span class="std std-ref">Computes that process output quantities</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#fixprocoutput"><span class="std std-ref">Fixes that process output quantities</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#compute"><span class="std std-ref">Computes that generate values to output</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#fix"><span class="std std-ref">Fixes that generate values to output</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#variable"><span class="std std-ref">Variables that generate values to output</span></a></p></li>
|
|
<li><p><a class="reference internal" href="#table"><span class="std std-ref">Summary table of output options and data flow between commands</span></a></p></li>
|
|
</ul>
|
|
<section id="global-per-atom-local-per-grid-data">
|
|
<span id="global"></span><h2>Global/per-atom/local/per-grid data<a class="headerlink" href="#global-per-atom-local-per-grid-data" title="Link to this heading"></a></h2>
|
|
<p>Various output-related commands work with four different “styles” of
|
|
data: global, per-atom, local, and per-grid. A global datum is one or
|
|
more system-wide values, e.g. the temperature of the system. A
|
|
per-atom datum is one or more values per atom, e.g. the kinetic energy
|
|
of each atom. Local datums are calculated by each processor based on
|
|
the atoms it owns, and there may be zero or more per atom, e.g. a list
|
|
of bond distances.</p>
|
|
<p>A per-grid datum is one or more values per grid cell, for a grid which
|
|
overlays the simulation domain. Similar to atoms and per-atom data,
|
|
the grid cells and the data they store are distributed across
|
|
processors; each processor owns the grid cells whose center points
|
|
fall within its subdomain.</p>
|
|
</section>
|
|
<section id="scalar-vector-array-data">
|
|
<span id="scalar"></span><h2>Scalar/vector/array data<a class="headerlink" href="#scalar-vector-array-data" title="Link to this heading"></a></h2>
|
|
<p>Global, per-atom, local, and per-grid datums can come in three
|
|
“kinds”: a single scalar value, a vector of values, or a 2d array of
|
|
values. More specifically these are the valid kinds for each style:</p>
|
|
<ul class="simple">
|
|
<li><p>global scalar</p></li>
|
|
<li><p>global vector</p></li>
|
|
<li><p>global array</p></li>
|
|
<li><p>per-atom vector</p></li>
|
|
<li><p>per-atom array</p></li>
|
|
<li><p>local vector</p></li>
|
|
<li><p>local array</p></li>
|
|
<li><p>per-grid vector</p></li>
|
|
<li><p>per-grid array</p></li>
|
|
</ul>
|
|
<p>A per-atom vector means a single value per atom; the “vector” is the
|
|
length of the number of atoms. A per-atom array means multiple values
|
|
per atom. Similarly a local vector or array means one or multiple
|
|
values per entity (e.g. per bond in the system). And a per-grid
|
|
vector or array means one or multiple values per grid cell.</p>
|
|
<p>The doc page for a compute or fix or variable that generates data will
|
|
specify both the styles and kinds of data it produces, e.g. a per-atom
|
|
vector. Note that a compute or fix may generate multiple styles and
|
|
kinds of output. However, for per-atom data only a vector or array is
|
|
output, never both. Likewise for per-local and per-grid data. An
|
|
example of a fix which generates multiple styles and kinds of data is
|
|
the <a class="reference internal" href="fix_mdi_qm.html"><span class="doc">fix mdi/qm</span></a> command. It outputs a global
|
|
scalar, global vector, and per-atom array for the quantum mechanical
|
|
energy and virial of the system and forces on each atom.</p>
|
|
<p>By contrast, different variable styles generate only a single kind of
|
|
data: a global scalar for an equal-style variable, global vector for a
|
|
vector-style variable, and a per-atom vector for an atom-style
|
|
variable.</p>
|
|
<p>When data is accessed by another command, as in many of the output
|
|
commands discussed below, it can be referenced via the following
|
|
bracket notation, where ID in this case is the ID of a compute. The
|
|
leading “c_” would be replaced by “f_” for a fix, or “v_” for a
|
|
variable (and ID would be the name of the variable):</p>
|
|
<table class="docutils align-default">
|
|
<tbody>
|
|
<tr class="row-odd"><td><p>c_ID</p></td>
|
|
<td><p>entire scalar, vector, or array</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p>c_ID[I]</p></td>
|
|
<td><p>one element of vector, one column of array</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>c_ID[I][J]</p></td>
|
|
<td><p>one element of array</p></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Note that using one bracket reduces the dimension of the data once
|
|
(vector -> scalar, array -> vector). Using two brackets reduces the
|
|
dimension twice (array -> scalar). Thus a command that uses scalar
|
|
values as input can also conceptually operate on an element of a
|
|
vector or array.</p>
|
|
<p>Per-grid vectors or arrays are accessed similarly, except that the ID
|
|
for the compute or fix includes a grid name and a data name. This is
|
|
because a fix or compute can create multiple grids (of different
|
|
sizes) and multiple sets of data (for each grid). The fix or compute
|
|
defines names for each grid and for each data set, so that all of them
|
|
can be accessed by other commands. See the <a class="reference internal" href="Howto_grid.html"><span class="doc">Howto grid</span></a> doc page for more details.</p>
|
|
</section>
|
|
<section id="disambiguation">
|
|
<span id="id1"></span><h2>Disambiguation<a class="headerlink" href="#disambiguation" title="Link to this heading"></a></h2>
|
|
<p>When a compute or fix produces data in multiple styles, e.g. global
|
|
and per-atom, a reference to the data can sometimes be ambiguous.
|
|
Usually the context in which the input script references the data
|
|
determines which style is meant.</p>
|
|
<p>For example, if a compute outputs a global vector and a per-atom
|
|
array, an element of the global vector will be accessed by using
|
|
<code class="docutils literal notranslate"><span class="pre">c_ID[I]</span></code> in <a class="reference internal" href="thermo_style.html"><span class="doc">thermodynamic output</span></a>, while a
|
|
column of the per-atom array will be accessed by using <code class="docutils literal notranslate"><span class="pre">c_ID[I]</span></code> in
|
|
a <a class="reference internal" href="dump.html"><span class="doc">dump custom</span></a> command.</p>
|
|
<p>However, if a <a class="reference internal" href="variable.html"><span class="doc">atom-style variable</span></a> references
|
|
<code class="docutils literal notranslate"><span class="pre">c_ID[I]</span></code>, then it could be intended to refer to a single element of
|
|
the global vector or a column of the per-atom array. The doc page for
|
|
any command that has a potential ambiguity (variables are the most
|
|
common) will explain how to resolve the ambiguity.</p>
|
|
<p>In this case, an atom-style variables references per-atom data if it
|
|
exists. If access to an element of a global vector is needed (as in
|
|
this example), an equal-style variable which references the value can
|
|
be defined and used in the atom-style variable formula instead.</p>
|
|
<p>Similarly, <a class="reference internal" href="thermo_style.html"><span class="doc">thermodynamic output</span></a> can only
|
|
reference global data from a compute or fix. But you can indirectly
|
|
access per-atom data as follows. The reference <code class="docutils literal notranslate"><span class="pre">c_ID[245][2]</span></code> for
|
|
the ID of a <a class="reference internal" href="compute_displace_atom.html"><span class="doc">compute displace/atom</span></a>
|
|
command, refers to the y-component of displacement for the atom with
|
|
ID 245. While you cannot use that reference directly in the
|
|
<a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command, you can use it an
|
|
equal-style variable formula, and then reference the variable in
|
|
thermodynamic output.</p>
|
|
</section>
|
|
<section id="thermodynamic-output">
|
|
<span id="thermo"></span><h2>Thermodynamic output<a class="headerlink" href="#thermodynamic-output" title="Link to this heading"></a></h2>
|
|
<p>The frequency and format of thermodynamic output is set by the
|
|
<a class="reference internal" href="thermo.html"><span class="doc">thermo</span></a>, <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a>, and
|
|
<a class="reference internal" href="thermo_modify.html"><span class="doc">thermo_modify</span></a> commands. The <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style</span></a> command also specifies what values are calculated and
|
|
written out. Pre-defined keywords can be specified (e.g. press, etotal,
|
|
etc). Three additional kinds of keywords can also be specified (c_ID,
|
|
f_ID, v_name), where a <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> or <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> provides the value to be output. In each
|
|
case, the compute, fix, or variable must generate global values for
|
|
input to the <a class="reference internal" href="dump.html"><span class="doc">thermo_style custom</span></a> command.</p>
|
|
<p>Note that thermodynamic output values can be “extensive” or
|
|
“intensive”. The former scale with the number of atoms in the system
|
|
(e.g. total energy), the latter do not (e.g. temperature). The
|
|
setting for <a class="reference internal" href="thermo_modify.html"><span class="doc">thermo_modify norm</span></a> determines whether
|
|
extensive quantities are normalized or not. Computes and fixes
|
|
produce either extensive or intensive values; see their individual doc
|
|
pages for details. <a class="reference internal" href="variable.html"><span class="doc">Equal-style variables</span></a> produce only
|
|
intensive values; you can include a division by “natoms” in the
|
|
formula if desired, to make an extensive calculation produce an
|
|
intensive result.</p>
|
|
</section>
|
|
<section id="dump-file-output">
|
|
<span id="dump"></span><h2>Dump file output<a class="headerlink" href="#dump-file-output" title="Link to this heading"></a></h2>
|
|
<p>Dump file output is specified by the <a class="reference internal" href="dump.html"><span class="doc">dump</span></a> and
|
|
<a class="reference internal" href="dump_modify.html"><span class="doc">dump_modify</span></a> commands. There are several
|
|
pre-defined formats (dump atom, dump xtc, etc).</p>
|
|
<p>There is also a <a class="reference internal" href="dump.html"><span class="doc">dump custom</span></a> format where the user
|
|
specifies what values are output with each atom. Pre-defined atom
|
|
attributes can be specified (id, x, fx, etc). Three additional kinds
|
|
of keywords can also be specified (c_ID, f_ID, v_name), where a
|
|
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a> or <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> provides the values to be output. In each case, the
|
|
compute, fix, or variable must generate per-atom values for input to
|
|
the <a class="reference internal" href="dump.html"><span class="doc">dump custom</span></a> command.</p>
|
|
<p>There is also a <a class="reference internal" href="dump.html"><span class="doc">dump local</span></a> format where the user specifies
|
|
what local values to output. A pre-defined index keyword can be
|
|
specified to enumerate the local values. Two additional kinds of
|
|
keywords can also be specified (c_ID, f_ID), where a
|
|
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a> or <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>
|
|
provides the values to be output. In each case, the compute or fix
|
|
must generate local values for input to the <a class="reference internal" href="dump.html"><span class="doc">dump local</span></a>
|
|
command.</p>
|
|
<p>There is also a <a class="reference internal" href="dump.html"><span class="doc">dump grid</span></a> format where the user
|
|
specifies what per-grid values to output from computes or fixes that
|
|
generate per-grid data.</p>
|
|
</section>
|
|
<section id="fixes-that-write-output-files">
|
|
<span id="fixoutput"></span><h2>Fixes that write output files<a class="headerlink" href="#fixes-that-write-output-files" title="Link to this heading"></a></h2>
|
|
<p>Several fixes take various quantities as input and can write output
|
|
files: <a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a>, <a class="reference internal" href="fix_ave_chunk.html"><span class="doc">fix ave/chunk</span></a>, <a class="reference internal" href="fix_ave_histo.html"><span class="doc">fix ave/histo</span></a>, <a class="reference internal" href="fix_ave_correlate.html"><span class="doc">fix
|
|
ave/correlate</span></a>, and <a class="reference internal" href="fix_print.html"><span class="doc">fix print</span></a>.</p>
|
|
<p>The <a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a> command enables direct output
|
|
to a file and/or time-averaging of global scalars or vectors. The
|
|
user specifies one or more quantities as input. These can be global
|
|
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a> values, global <a class="reference internal" href="fix.html"><span class="doc">fix</span></a> values, or
|
|
<a class="reference internal" href="variable.html"><span class="doc">variables</span></a> of any style except the atom style which
|
|
produces per-atom values. Since a variable can refer to keywords used
|
|
by the <a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style custom</span></a> command (like temp or
|
|
press) and individual per-atom values, a wide variety of quantities
|
|
can be time averaged and/or output in this way. If the inputs are one
|
|
or more scalar values, then the fix generate a global scalar or vector
|
|
of output. If the inputs are one or more vector values, then the fix
|
|
generates a global vector or array of output. The time-averaged
|
|
output of this fix can also be used as input to other output commands.</p>
|
|
<p>The <a class="reference internal" href="fix_ave_chunk.html"><span class="doc">fix ave/chunk</span></a> command enables direct output
|
|
to a file of chunk-averaged per-atom quantities like those output in
|
|
dump files. Chunks can represent spatial bins or other collections of
|
|
atoms, e.g. individual molecules. The per-atom quantities can be atom
|
|
density (mass or number) or atom attributes such as position,
|
|
velocity, force. They can also be per-atom quantities calculated by a
|
|
<a class="reference internal" href="compute.html"><span class="doc">compute</span></a>, by a <a class="reference internal" href="fix.html"><span class="doc">fix</span></a>, or by an atom-style
|
|
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a>. The chunk-averaged output of this fix is
|
|
global and can also be used as input to other output commands.</p>
|
|
<p>Note that the <a class="reference internal" href="fix_ave_grid.html"><span class="doc">fix ave/grid</span></a> command can also
|
|
average the same per-atom quantities within spatial bins, but it does
|
|
this for a distributed grid whose grid cells are owned by different
|
|
processors. It outputs per-grid data, not global data, so it is more
|
|
efficient for large numbers of averaging bins.</p>
|
|
<p>The <a class="reference internal" href="fix_ave_histo.html"><span class="doc">fix ave/histo</span></a> command enables direct output
|
|
to a file of histogrammed quantities, which can be global or per-atom
|
|
or local quantities. The histogram output of this fix can also be
|
|
used as input to other output commands.</p>
|
|
<p>The <a class="reference internal" href="fix_ave_correlate.html"><span class="doc">fix ave/correlate</span></a> command enables direct
|
|
output to a file of time-correlated quantities, which can be global
|
|
values. The correlation matrix output of this fix can also be used as
|
|
input to other output commands.</p>
|
|
<p>The <a class="reference internal" href="fix_print.html"><span class="doc">fix print</span></a> command can generate a line of output
|
|
written to the screen and log file or to a separate file, periodically
|
|
during a running simulation. The line can contain one or more
|
|
<a class="reference internal" href="variable.html"><span class="doc">variable</span></a> values for any style variable except the
|
|
vector or atom styles). As explained above, variables themselves can
|
|
contain references to global values generated by <a class="reference internal" href="thermo_style.html"><span class="doc">thermodynamic
|
|
keywords</span></a>, <a class="reference internal" href="compute.html"><span class="doc">computes</span></a>, <a class="reference internal" href="fix.html"><span class="doc">fixes</span></a>, or other <a class="reference internal" href="variable.html"><span class="doc">variables</span></a>, or to per-atom values
|
|
for a specific atom. Thus the <a class="reference internal" href="fix_print.html"><span class="doc">fix print</span></a> command is
|
|
a means to output a wide variety of quantities separate from normal
|
|
thermodynamic or dump file output.</p>
|
|
</section>
|
|
<section id="computes-that-process-output-quantities">
|
|
<span id="computeoutput"></span><h2>Computes that process output quantities<a class="headerlink" href="#computes-that-process-output-quantities" title="Link to this heading"></a></h2>
|
|
<p>The <a class="reference internal" href="compute_reduce.html"><span class="doc">compute reduce</span></a> and <a class="reference internal" href="compute_reduce.html"><span class="doc">compute
|
|
reduce/region</span></a> commands take one or more per-atom or
|
|
local vector quantities as inputs and “reduce” them (sum, min, max,
|
|
ave) to scalar quantities. These are produced as output values which
|
|
can be used as input to other output commands.</p>
|
|
<p>The <a class="reference internal" href="compute_slice.html"><span class="doc">compute slice</span></a> command take one or more
|
|
global vector or array quantities as inputs and extracts a subset of
|
|
their values to create a new vector or array. These are produced as
|
|
output values which can be used as input to other output commands.</p>
|
|
<p>The <a class="reference internal" href="compute_property_atom.html"><span class="doc">compute property/atom</span></a> command takes
|
|
a list of one or more pre-defined atom attributes (id, x, fx, etc) and
|
|
stores the values in a per-atom vector or array. These are produced
|
|
as output values which can be used as input to other output commands.
|
|
The list of atom attributes is the same as for the <a class="reference internal" href="dump.html"><span class="doc">dump custom</span></a> command.</p>
|
|
<p>The <a class="reference internal" href="compute_property_local.html"><span class="doc">compute property/local</span></a> command
|
|
takes a list of one or more pre-defined local attributes (bond info,
|
|
angle info, etc) and stores the values in a local vector or array.
|
|
These are produced as output values which can be used as input to
|
|
other output commands.</p>
|
|
<p>The <a class="reference internal" href="compute_property_grid.html"><span class="doc">compute property/grid</span></a> command takes
|
|
a list of one or more pre-defined per-grid attributes (id, grid cell
|
|
coords, etc) and stores the values in a per-grid vector or array.
|
|
These are produced as output values which can be used as input to the
|
|
<a class="reference internal" href="dump.html"><span class="doc">dump grid</span></a> command.</p>
|
|
<p>The <a class="reference internal" href="compute_property_chunk.html"><span class="doc">compute property/chunk</span></a> command
|
|
takes a list of one or more pre-defined chunk attributes (id, count,
|
|
coords for spatial bins) and stores the values in a global vector or
|
|
array. These are produced as output values which can be used as input
|
|
to other output commands.</p>
|
|
</section>
|
|
<section id="fixes-that-process-output-quantities">
|
|
<span id="fixprocoutput"></span><h2>Fixes that process output quantities<a class="headerlink" href="#fixes-that-process-output-quantities" title="Link to this heading"></a></h2>
|
|
<p>The <a class="reference internal" href="fix_vector.html"><span class="doc">fix vector</span></a> command can create global vectors as
|
|
output from global scalars as input, accumulating them one element at
|
|
a time.</p>
|
|
<p>The <a class="reference internal" href="fix_ave_atom.html"><span class="doc">fix ave/atom</span></a> command performs time-averaging
|
|
of per-atom vectors. The per-atom quantities can be atom attributes
|
|
such as position, velocity, force. They can also be per-atom
|
|
quantities calculated by a <a class="reference internal" href="compute.html"><span class="doc">compute</span></a>, by a <a class="reference internal" href="fix.html"><span class="doc">fix</span></a>, or by an atom-style <a class="reference internal" href="variable.html"><span class="doc">variable</span></a>. The
|
|
time-averaged per-atom output of this fix can be used as input to
|
|
other output commands.</p>
|
|
<p>The <a class="reference internal" href="fix_store_state.html"><span class="doc">fix store/state</span></a> command can archive one
|
|
or more per-atom attributes at a particular time, so that the old
|
|
values can be used in a future calculation or output. The list of
|
|
atom attributes is the same as for the <a class="reference internal" href="dump.html"><span class="doc">dump custom</span></a>
|
|
command, including per-atom quantities calculated by a <a class="reference internal" href="compute.html"><span class="doc">compute</span></a>, by a <a class="reference internal" href="fix.html"><span class="doc">fix</span></a>, or by an atom-style <a class="reference internal" href="variable.html"><span class="doc">variable</span></a>. The output of this fix can be used as input to other
|
|
output commands.</p>
|
|
<p>The <a class="reference internal" href="fix_ave_grid.html"><span class="doc">fix ave/grid</span></a> command performs time-averaging
|
|
of either per-atom or per-grid data.</p>
|
|
<p>For per-atom data it performs averaging for the atoms within each grid
|
|
cell, similar to the <a class="reference internal" href="fix_ave_chunk.html"><span class="doc">fix ave/chunk</span></a> command when
|
|
its chunks are defined as regular 2d or 3d bins. The per-atom
|
|
quantities can be atom density (mass or number) or atom attributes
|
|
such as position, velocity, force. They can also be per-atom
|
|
quantities calculated by a <a class="reference internal" href="compute.html"><span class="doc">compute</span></a>, by a <a class="reference internal" href="fix.html"><span class="doc">fix</span></a>, or by an atom-style <a class="reference internal" href="variable.html"><span class="doc">variable</span></a>.</p>
|
|
<p>The chief difference between the <a class="reference internal" href="fix_ave_grid.html"><span class="doc">fix ave/grid</span></a>
|
|
and <a class="reference internal" href="fix_ave_chunk.html"><span class="doc">fix ave/chunk</span></a> commands when used in this
|
|
context is that the former uses a distributed grid, while the latter
|
|
uses a global grid. Distributed means that each processor owns the
|
|
subset of grid cells within its subdomain. Global means that each
|
|
processor owns a copy of the entire grid. The <a class="reference internal" href="fix_ave_grid.html"><span class="doc">fix ave/grid</span></a> command is thus more efficient for large grids.</p>
|
|
<p>For per-grid data, the <a class="reference internal" href="fix_ave_grid.html"><span class="doc">fix ave/grid</span></a> command
|
|
takes inputs for grid data produced by other computes or fixes and
|
|
averages the values for each grid point over time.</p>
|
|
</section>
|
|
<section id="computes-that-generate-values-to-output">
|
|
<span id="compute"></span><h2>Computes that generate values to output<a class="headerlink" href="#computes-that-generate-values-to-output" title="Link to this heading"></a></h2>
|
|
<p>Every <a class="reference internal" href="compute.html"><span class="doc">compute</span></a> in LAMMPS produces either global or
|
|
per-atom or local or per-grid values. The values can be scalars or
|
|
vectors or arrays of data. These values can be output using the other
|
|
commands described in this section. The page for each compute command
|
|
describes what it produces. Computes that produce per-atom or local
|
|
or per-grid values have the word “atom” or “local” or “grid as the
|
|
last word in their style name. Computes without the word “atom” or
|
|
“local” or “grid” produce global values.</p>
|
|
</section>
|
|
<section id="fixes-that-generate-values-to-output">
|
|
<span id="fix"></span><h2>Fixes that generate values to output<a class="headerlink" href="#fixes-that-generate-values-to-output" title="Link to this heading"></a></h2>
|
|
<p>Some <a class="reference internal" href="fix.html"><span class="doc">fixes</span></a> in LAMMPS produces either global or per-atom
|
|
or local or per-grid values which can be accessed by other commands.
|
|
The values can be scalars or vectors or arrays of data. These values
|
|
can be output using the other commands described in this section. The
|
|
page for each fix command tells whether it produces any output
|
|
quantities and describes them.</p>
|
|
</section>
|
|
<section id="variables-that-generate-values-to-output">
|
|
<span id="variable"></span><h2>Variables that generate values to output<a class="headerlink" href="#variables-that-generate-values-to-output" title="Link to this heading"></a></h2>
|
|
<p><a class="reference internal" href="variable.html"><span class="doc">Variables</span></a> defined in an input script can store one or
|
|
more strings. But equal-style, vector-style, and atom-style or
|
|
atomfile-style variables generate a global scalar value, global vector
|
|
or values, or a per-atom vector, respectively, when accessed. The
|
|
formulas used to define these variables can contain references to the
|
|
thermodynamic keywords and to global and per-atom data generated by
|
|
computes, fixes, and other variables. The values generated by
|
|
variables can be used as input to and thus output by the other
|
|
commands described in this section.</p>
|
|
<p>Per-grid variables have not (yet) been implemented.</p>
|
|
</section>
|
|
<section id="summary-table-of-output-options-and-data-flow-between-commands">
|
|
<span id="table"></span><h2>Summary table of output options and data flow between commands<a class="headerlink" href="#summary-table-of-output-options-and-data-flow-between-commands" title="Link to this heading"></a></h2>
|
|
<p>This table summarizes the various commands that can be used for
|
|
generating output from LAMMPS. Each command produces output data of
|
|
some kind and/or writes data to a file. Most of the commands can take
|
|
data from other commands as input. Thus you can link many of these
|
|
commands together in pipeline form, where data produced by one command
|
|
is used as input to another command and eventually written to the
|
|
screen or to a file. Note that to hook two commands together the
|
|
output and input data types must match, e.g. global/per-atom/local
|
|
data and scalar/vector/array data.</p>
|
|
<p>Also note that, as described above, when a command takes a scalar as
|
|
input, that could also be an element of a vector or array. Likewise a
|
|
vector input could be a column of an array.</p>
|
|
<table class="docutils align-default">
|
|
<tbody>
|
|
<tr class="row-odd"><td><p>Command</p></td>
|
|
<td><p>Input</p></td>
|
|
<td><p>Output</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="thermo_style.html"><span class="doc">thermo_style custom</span></a></p></td>
|
|
<td><p>global scalars</p></td>
|
|
<td><p>screen, log file</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="dump.html"><span class="doc">dump custom</span></a></p></td>
|
|
<td><p>per-atom vectors</p></td>
|
|
<td><p>dump file</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="dump.html"><span class="doc">dump local</span></a></p></td>
|
|
<td><p>local vectors</p></td>
|
|
<td><p>dump file</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="dump.html"><span class="doc">dump grid</span></a></p></td>
|
|
<td><p>per-grid vectors</p></td>
|
|
<td><p>dump file</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="fix_print.html"><span class="doc">fix print</span></a></p></td>
|
|
<td><p>global scalar from variable</p></td>
|
|
<td><p>screen, file</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="print.html"><span class="doc">print</span></a></p></td>
|
|
<td><p>global scalar from variable</p></td>
|
|
<td><p>screen</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="compute.html"><span class="doc">computes</span></a></p></td>
|
|
<td><p>N/A</p></td>
|
|
<td><p>global/per-atom/local/per-grid scalar/vector/array</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="fix.html"><span class="doc">fixes</span></a></p></td>
|
|
<td><p>N/A</p></td>
|
|
<td><p>global/per-atom/local/per-grid scalar/vector/array</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="variable.html"><span class="doc">variables</span></a></p></td>
|
|
<td><p>global scalars and vectors, per-atom vectors</p></td>
|
|
<td><p>global scalar and vector, per-atom vector</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="compute_reduce.html"><span class="doc">compute reduce</span></a></p></td>
|
|
<td><p>per-atom/local vectors</p></td>
|
|
<td><p>global scalar/vector</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="compute_slice.html"><span class="doc">compute slice</span></a></p></td>
|
|
<td><p>global vectors/arrays</p></td>
|
|
<td><p>global vector/array</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="compute_property_atom.html"><span class="doc">compute property/atom</span></a></p></td>
|
|
<td><p>N/A</p></td>
|
|
<td><p>per-atom vector/array</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="compute_property_local.html"><span class="doc">compute property/local</span></a></p></td>
|
|
<td><p>N/A</p></td>
|
|
<td><p>local vector/array</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="compute_property_grid.html"><span class="doc">compute property/grid</span></a></p></td>
|
|
<td><p>N/A</p></td>
|
|
<td><p>per-grid vector/array</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="compute_property_chunk.html"><span class="doc">compute property/chunk</span></a></p></td>
|
|
<td><p>N/A</p></td>
|
|
<td><p>global vector/array</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="fix_vector.html"><span class="doc">fix vector</span></a></p></td>
|
|
<td><p>global scalars</p></td>
|
|
<td><p>global vector</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="fix_ave_atom.html"><span class="doc">fix ave/atom</span></a></p></td>
|
|
<td><p>per-atom vectors</p></td>
|
|
<td><p>per-atom vector/array</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="fix_ave_time.html"><span class="doc">fix ave/time</span></a></p></td>
|
|
<td><p>global scalars/vectors</p></td>
|
|
<td><p>global scalar/vector/array, file</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="fix_ave_chunk.html"><span class="doc">fix ave/chunk</span></a></p></td>
|
|
<td><p>per-atom vectors</p></td>
|
|
<td><p>global array, file</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="fix_ave_grid.html"><span class="doc">fix ave/grid</span></a></p></td>
|
|
<td><p>per-atom vectors or per-grid vectors</p></td>
|
|
<td><p>per-grid vector/array</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="fix_ave_histo.html"><span class="doc">fix ave/histo</span></a></p></td>
|
|
<td><p>global/per-atom/local scalars and vectors</p></td>
|
|
<td><p>global array, file</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference internal" href="fix_ave_correlate.html"><span class="doc">fix ave/correlate</span></a></p></td>
|
|
<td><p>global scalars</p></td>
|
|
<td><p>global array, file</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference internal" href="fix_store_state.html"><span class="doc">fix store/state</span></a></p></td>
|
|
<td><p>per-atom vectors</p></td>
|
|
<td><p>per-atom vector/array</p></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
|
<a href="Howto_dispersion.html" class="btn btn-neutral float-left" title="8.2.8. Long-range dispersion settings" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
|
<a href="Howto_chunk.html" class="btn btn-neutral float-right" title="8.3.2. Use chunks to calculate system properties" 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> |