<p>Set the style and content for printing thermodynamic data to the
screen and log file.</p>
<p>Style <em>one</em> prints a one-line summary of thermodynamic info that is
the equivalent of “thermo_style custom step temp epair emol etotal
press”. The line contains only numeric values.</p>
<p>Style <em>multi</em> prints a multiple-line listing of thermodynamic info
that is the equivalent of “thermo_style custom etotal ke temp pe ebond
eangle edihed eimp evdwl ecoul elong press”. The listing contains
numeric values and a string ID for each quantity.</p>
<p>Style <em>custom</em> is the most general setting and allows you to specify
which of the keywords listed above you want printed on each
thermodynamic timestep. Note that the keywords c_ID, f_ID, v_name are
references to <aclass="reference internal"href="compute.html"><spanclass="doc">computes</span></a>, <aclass="reference internal"href="fix.html"><spanclass="doc">fixes</span></a>, and
equal-style <aclass="reference external"href="variable.html"">variables</a> that have been defined
elsewhere in the input script or can even be new styles which users
have added to LAMMPS (see the <aclass="reference internal"href="Section_modify.html"><spanclass="doc">Section 10</span></a>
section of the documentation). Thus the <em>custom</em> style provides a
flexible means of outputting essentially any desired quantity as a
simulation proceeds.</p>
<p>All styles except <em>custom</em> have <em>vol</em> appended to their list of
outputs if the simulation box volume changes during the simulation.</p>
<p>The values printed by the various keywords are instantaneous values,
calculated on the current timestep. Time-averaged quantities, which
include values from previous timesteps, can be output by using the
f_ID keyword and accessing a fix that does time-averaging such as the
<p>The kinetic energy of the system <em>ke</em> is inferred from the temperature
of the system with 1/2 Kb T of energy for each degree of freedom.
Thus, using different <aclass="reference internal"href="compute.html"><spanclass="doc">compute commands</span></a> for calculating
temperature, via the <aclass="reference internal"href="thermo_modify.html"><spanclass="doc">thermo_modify temp</span></a> command,
may yield different kinetic energies, since different computes that
calculate temperature can subtract out different non-thermal
components of velocity and/or include different degrees of freedom
(translational, rotational, etc).</p>
<p>The potential energy of the system <em>pe</em> will include contributions
from fixes if the <aclass="reference internal"href="fix_modify.html"><spanclass="doc">fix_modify thermo</span></a> option is set
for a fix that calculates such a contribution. For example, the <aclass="reference internal"href="fix_wall.html"><spanclass="doc">fix wall/lj93</span></a> fix calculates the energy of atoms
interacting with the wall. See the doc pages for “individual fixes”
to see which ones contribute.</p>
<p>A long-range tail correction <em>etail</em> for the VanderWaal pairwise
energy will be non-zero only if the <aclass="reference internal"href="pair_modify.html"><spanclass="doc">pair_modify tail</span></a> option is turned on. The <em>etail</em> contribution
is included in <em>evdwl</em>, <em>epair</em>, <em>pe</em>, and <em>etotal</em>, and the
corresponding tail correction to the pressure is included in <em>press</em>
and <em>pxx</em>, <em>pyy</em>, etc.</p>
<hrclass="docutils"/>
<p>The <em>step</em>, <em>elapsed</em>, and <em>elaplong</em> keywords refer to timestep
count. <em>Step</em> is the current timestep, or iteration count when a
<aclass="reference internal"href="minimize.html"><spanclass="doc">minimization</span></a> is being performed. <em>Elapsed</em> is the
number of timesteps elapsed since the beginning of this run.
<em>Elaplong</em> is the number of timesteps elapsed since the beginning of
an initial run in a series of runs. See the <em>start</em> and <em>stop</em>
keywords for the <aclass="reference internal"href="run.html"><spanclass="doc">run</span></a> for info on how to invoke a series of
runs that keep track of an initial starting time. If these keywords
are not used, then <em>elapsed</em> and <em>elaplong</em> are the same value.</p>
<p>The <em>dt</em> keyword is the current timestep size in time
<aclass="reference internal"href="units.html"><spanclass="doc">units</span></a>. The <em>time</em> keyword is the current elapsed
simulation time, also in time <aclass="reference internal"href="units.html"><spanclass="doc">units</span></a>, which is simply
(step*dt) if the timestep size has not changed and the timestep has
not been reset. If the timestep has changed (e.g. via <aclass="reference internal"href="fix_dt_reset.html"><spanclass="doc">fix dt/reset</span></a>) or the timestep has been reset (e.g. via
the “reset_timestep” command), then the simulation time is effectively
a cummulative value up to the current point.</p>
<p>The <em>cpu</em> keyword is elapsed CPU seconds since the beginning of this
run. The <em>tpcpu</em> and <em>spcpu</em> keywords are measures of how fast your
simulation is currently running. The <em>tpcpu</em> keyword is simulation
time per CPU second, where simulation time is in time
<aclass="reference internal"href="units.html"><spanclass="doc">units</span></a>. E.g. for metal units, the <em>tpcpu</em> value would be
picoseconds per CPU second. The <em>spcpu</em> keyword is the number of
timesteps per CPU second. Both quantities are on-the-fly metrics,
measured relative to the last time they were invoked. Thus if you are
printing out thermodyamic output every 100 timesteps, the two keywords
will continually output the time and timestep rate for the last 100
steps. The <em>tpcpu</em> keyword does not attempt to track any changes in
timestep size, e.g. due to using the <aclass="reference internal"href="fix_dt_reset.html"><spanclass="doc">fix dt/reset</span></a>
command.</p>
<p>The <em>cpuremain</em> keyword estimates the CPU time remaining in the
current run, based on the time elapsed thus far. It will only be a
good estimate if the CPU time/timestep for the rest of the run is
similar to the preceding timesteps. On the initial timestep the value
will be 0.0 since there is no history to estimate from. For a
minimization run performed by the “minimize” command, the estimate is
based on the <em>maxiter</em> parameter, assuming the minimization will
proceed for the maximum number of allowed iterations.</p>
<p>The <em>part</em> keyword is useful for multi-replica or multi-partition
simulations to indicate which partition this output and this file
corresponds to, or for use in a <aclass="reference internal"href="variable.html"><spanclass="doc">variable</span></a> to append to
a filename for output specific to this partition. See <aclass="reference internal"href="Section_start.html#start-7"><spanclass="std std-ref">Section 2.7</span></a> of the manual for details on running
in multi-partition mode.</p>
<p>The <em>timeremain</em> keyword returns the remaining seconds when a
timeout has been configured via the <aclass="reference internal"href="timer.html"><spanclass="doc">timer timeout</span></a> command.
If the timeout timer is inactive, the value of this keyword is 0.0 and
if the timer is expired, it is negative. This allows for example to exit
loops cleanly, if the timeout is expired with:</p>
<em>cellgamma</em>, correspond to the usual crystallographic quantities that
define the periodic unit cell of a crystal. See <aclass="reference internal"href="Section_howto.html#howto-12"><spanclass="std std-ref">this section</span></a> of the doc pages for a geometric
description of triclinic periodic cells, including a precise defintion
of these quantities in terms of the internal LAMMPS cell dimensions
<p>For output values from a compute or fix, the bracketed index I used to
index a vector, as in <em>c_ID[I]</em> or <em>f_ID[I]</em>, can be specified
using a wildcard asterisk with the index to effectively specify
multiple values. This takes the form “*” or “*n” or “n*” or “m*n”.
If N = the size of the vector (for <em>mode</em> = scalar) or the number of
columns in the array (for <em>mode</em> = vector), then an asterisk with no
numeric values means all indices from 1 to N. A leading asterisk
means all indices from 1 to n (inclusive). A trailing asterisk means
all indices from n to N (inclusive). A middle asterisk means all
indices from m to n (inclusive).</p>
<p>Using a wildcard is the same as if the individual elements of the
vector had been listed one by one. E.g. these 2 thermo_style commands
are equivalent, since the <aclass="reference internal"href="compute_temp.html"><spanclass="doc">compute temp</span></a> command
creates a global vector with 6 values.</p>
<preclass="literal-block">
compute myTemp all temp
thermo_style custom step temp etotal c_myTemp[*]
thermo_style custom step temp etotal &
c_myTemp[1] c_myTemp[2] c_myTemp[3] &
c_myTemp[4] c_myTemp[5] c_myTemp[6]
</pre>
<hrclass="docutils"/>
<p>The <em>c_ID</em> and <em>c_ID[I]</em> and <em>c_ID[I][J]</em> keywords allow global
values calculated by a compute to be output. As discussed on the
<aclass="reference internal"href="compute.html"><spanclass="doc">compute</span></a> doc page, computes can calculate global,
per-atom, or local values. Only global values can be referenced by
this command. However, per-atom compute values for an individual atom
can be referenced in a <aclass="reference internal"href="variable.html"><spanclass="doc">variable</span></a> and the variable
referenced by thermo_style custom, as discussed below. See the
discussion above for how the I in <em>c_ID[I]</em> can be specified with a
wildcard asterisk to effectively specify multiple values from a global
compute vector.</p>
<p>The ID in the keyword should be replaced by the actual ID of a compute
that has been defined elsewhere in the input script. See the
<aclass="reference internal"href="compute.html"><spanclass="doc">compute</span></a> command for details. If the compute calculates
a global scalar, vector, or array, then the keyword formats with 0, 1,
or 2 brackets will reference a scalar value from the compute.</p>
<p>Note that some computes calculate “intensive” global quantities like
temperature; others calculate “extensive” global quantities like
kinetic energy that are summed over all atoms in the compute group.
Intensive quantities are printed directly without normalization by
thermo_style custom. Extensive quantities may be normalized by the
total number of atoms in the simulation (NOT the number of atoms in
the compute group) when output, depending on the <aclass="reference internal"href="thermo_modify.html"><spanclass="doc">thermo_modify norm</span></a> option being used.</p>
<p>The <em>f_ID</em> and <em>f_ID[I]</em> and <em>f_ID[I][J]</em> keywords allow global
values calculated by a fix to be output. As discussed on the
<aclass="reference internal"href="fix.html"><spanclass="doc">fix</span></a> doc page, fixes can calculate global, per-atom, or
local values. Only global values can be referenced by this command.
However, per-atom fix values can be referenced for an individual atom
in a <aclass="reference internal"href="variable.html"><spanclass="doc">variable</span></a> and the variable referenced by
thermo_style custom, as discussed below. See the discussion above for
how the I in <em>f_ID[I]</em> can be specified with a wildcard asterisk to
effectively specify multiple values from a global fix vector.</p>
<p>The ID in the keyword should be replaced by the actual ID of a fix
that has been defined elsewhere in the input script. See the
<aclass="reference internal"href="fix.html"><spanclass="doc">fix</span></a> command for details. If the fix calculates a global
scalar, vector, or array, then the keyword formats with 0, 1, or 2
brackets will reference a scalar value from the fix.</p>
<p>Note that some fixes calculate “intensive” global quantities like
timestep size; others calculate “extensive” global quantities like
energy that are summed over all atoms in the fix group. Intensive
quantities are printed directly without normalization by thermo_style
custom. Extensive quantities may be normalized by the total number of
atoms in the simulation (NOT the number of atoms in the fix group)
when output, depending on the <aclass="reference internal"href="thermo_modify.html"><spanclass="doc">thermo_modify norm</span></a>
option being used.</p>
<p>The <em>v_name</em> keyword allow the current value of a variable to be
output. The name in the keyword should be replaced by the variable
name that has been defined elsewhere in the input script. Only
equal-style and vector-style variables can be referenced; the latter
requires a bracketed term to specify the Ith element of the vector
calculated by the variable. However, an atom-style variable can be
referenced for an individual atom by an equal-style variable and that
variable referenced. See the <aclass="reference internal"href="variable.html"><spanclass="doc">variable</span></a> command for
details. Variables of style <em>equal</em> and <em>vector</em> and <em>atom</em> define a
formula which can reference per-atom properties or thermodynamic
keywords, or they can invoke other computes, fixes, or variables when
evaluated, so this is a very general means of creating thermodynamic
output.</p>
<p>Note that equal-style and vector-style variables are assumed to
produce “intensive” global quantities, which are thus printed as-is,
without normalization by thermo_style custom. You can include a
division by “natoms” in the variable formula if this is not the case.</p>
</div>
<hrclass="docutils"/>
<divclass="section"id="restrictions">
<h2>Restrictions</h2>
<p>This command must come after the simulation box is defined by a
<aclass="reference internal"href="read_data.html"><spanclass="doc">read_data</span></a>, <aclass="reference internal"href="read_restart.html"><spanclass="doc">read_restart</span></a>, or
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.