lammps/doc/thermo_style.html

325 lines
16 KiB
HTML
Raw Normal View History

<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>thermo_style command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>thermo_style style args
</PRE>
<UL><LI>style = <I>one</I> or <I>multi</I> or <I>custom</I>
<LI>args = list of arguments for a particular style
<PRE> <I>one</I> args = none
<I>multi</I> args = none
<I>custom</I> args = list of attributes
possible attributes = step, elapsed, elaplong, dt, cpu, tpcpu, spcpu,
atoms, temp, press, pe, ke, etotal, enthalpy,
evdwl, ecoul, epair, ebond, eangle, edihed, eimp,
emol, elong, etail,
vol, lx, ly, lz, xlo, xhi, ylo, yhi, zlo, zhi,
xy, xz, yz, xlat, ylat, zlat,
pxx, pyy, pzz, pxy, pxz, pyz,
fmax, fnorm,
cella, cellb, cellc, cellalpha, cellbeta, cellgamma,
c_ID, c_ID[I], c_ID[I][J],
f_ID, f_ID[I], f_ID[I][J],
v_name
step = timestep
elapsed = timesteps since start of this run
elaplong = timesteps since start of initial run in a series of runs
dt = timestep size
cpu = elapsed CPU time in seconds
tpcpu = time per CPU second
spcpu = timesteps per CPU second
atoms = # of atoms
temp = temperature
press = pressure
pe = total potential energy
ke = kinetic energy
etotal = total energy (pe + ke)
enthalpy = enthalpy (etotal + press*vol)
evdwl = VanderWaal pairwise energy
ecoul = Coulombic pairwise energy
epair = pairwise energy (evdwl + ecoul + elong + etail)
ebond = bond energy
eangle = angle energy
edihed = dihedral energy
eimp = improper energy
emol = molecular energy (ebond + eangle + edihed + eimp)
elong = long-range kspace energy
etail = VanderWaal energy long-range tail correction
vol = volume
lx,ly,lz = box lengths in x,y,z
xlo,xhi,ylo,yhi,zlo,zhi = box boundaries
xy,xz,yz = box tilt for triclinic (non-orthogonal) simulation boxes
xlat,ylat,zlat = lattice spacings as calculated by <A HREF = "lattice.html">lattice</A> command
pxx,pyy,pzz,pxy,pxz,pyz = 6 components of pressure tensor
fmax = max component of force on any atom in any dimension
fnorm = length of force vector for all atoms
cella,cellb,cellc = periodic cell lattice constants a,b,c
cellalpha, cellbeta, cellgamma = periodic cell angles alpha,beta,gamma
c_ID = global scalar value calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID
c_ID[I][J] = I,J component of global array calculated by a compute with ID
f_ID = global scalar value calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID
f_ID[I][J] = I,J component of global array calculated by a fix with ID
v_name = scalar value calculated by an equal-style variable with name
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>thermo_style multi
thermo_style custom step temp pe etotal press vol
thermo_style custom step temp etotal c_myTemp v_abc
</PRE>
<P><B>Description:</B>
</P>
<P>Set the style and content for printing thermodynamic data to the
screen and log file.
</P>
<P>Style <I>one</I> 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 <I>multi</I> 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 <I>custom</I> 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 <A HREF = "compute.html">computes</A>, <A HREF = "fix.html">fixes</A>, and
equal-style <A 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 <A HREF = "Section_modify.html">Section_modify</A>
section of the documentation). Thus the <I>custom</I> style provides a
flexible means of outputting essentially any desired quantity as a
simulation proceeds.
</P>
<P>All styles except <I>custom</I> have <I>vol</I> 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
<A HREF = "fix_ave_time.html">fix ave/time</A> command.
</P>
<P>Options invoked by the <A HREF = "thermo_modify.html">thermo_modify</A> command can
be used to set the one- or multi-line format of the print-out, the
normalization of thermodynamic output (total values versus per-atom
values for extensive quantities (ones which scale with the number of
atoms in the system), and the numeric precision of each printed value.
</P>
<P>IMPORTANT NOTE: When you use a "thermo_style" command, all
thermodynamic settings are restored to their default values, including
those previously set by a <A HREF = "thermo_modify.html">thermo_modify</A> command.
Thus if your input script specifies a thermo_style command, you should
use the thermo_modify command after it.
</P>
<HR>
<P>Several of the thermodynamic quantities require a temperature to be
computed: "temp", "press", "ke", "etotal", "enthalpy", "pxx", etc. By
default this is done by using a <I>temperature</I> compute which is created
when LAMMPS starts up, as if this command had been issued:
</P>
<PRE>compute thermo_temp all temp
</PRE>
<P>See the <A HREF = "compute_temp.html">compute temp</A> command for details. Note
that the ID of this compute is <I>thermo_temp</I> and the group is <I>all</I>.
You can change the attributes of this temperature (e.g. its
degrees-of-freedom) via the <A HREF = "compute_modify.html">compute_modify</A>
command. Alternatively, you can directly assign a new compute (that
calculates temperature) which you have defined, to be used for
calculating any thermodynamic quantity that requires a temperature.
This is done via the <A HREF = "thermo_modify.html">thermo_modify</A> command.
</P>
<P>Several of the thermodynamic quantities require a pressure to be
computed: "press", "enthalpy", "pxx", etc. By default this is done by
using a <I>pressure</I> compute which is created when LAMMPS starts up, as
if this command had been issued:
</P>
<PRE>compute thermo_press all pressure thermo_temp
</PRE>
<P>See the <A HREF = "compute_pressure.html">compute pressure</A> command for details.
Note that the ID of this compute is <I>thermo_press</I> and the group is
<I>all</I>. You can change the attributes of this pressure via the
<A HREF = "compute_modify.html">compute_modify</A> command. Alternatively, you can
directly assign a new compute (that calculates pressure) which you
have defined, to be used for calculating any thermodynamic quantity
that requires a pressure. This is done via the
<A HREF = "thermo_modify.html">thermo_modify</A> command.
</P>
<P>Several of the thermodynamic quantities require a potential energy to
be computed: "pe", "etotal", "ebond", etc. This is done by using a
<I>pe</I> compute which is created when LAMMPS starts up, as if this
command had been issued:
</P>
<PRE>compute thermo_pe all pe
</PRE>
<P>See the <A HREF = "compute_pe.html">compute pe</A> command for details. Note that
the ID of this compute is <I>thermo_pe</I> and the group is <I>all</I>. You can
change the attributes of this potential energy via the
<A HREF = "compute_modify.html">compute_modify</A> command.
</P>
<HR>
<P>The kinetic energy of the system <I>ke</I> is inferred from the temperature
of the system with 1/2 Kb T of energy for each degree of freedom.
Thus, using different <A HREF = "compute.html">compute commands</A> for calculating
temperature, via the <A HREF = "thermo_modify.html">thermo_modify temp</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 <I>pe</I> will include contributions
from fixes if the <A HREF = "fix_modify.html">fix_modify thermo</A> option is set
for a fix that calculates such a contribution. For example, the <A HREF = "fix_wall.html">fix
wall/lj93</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 <I>etail</I> for the VanderWaal pairwise
energy will be non-zero only if the <A HREF = "pair_modify.html">pair_modify
tail</A> option is turned on. The <I>etail</I> contribution
is included in <I>evdwl</I>, <I>pe</I>, and <I>etotal</I>, and the corresponding tail
correction to the pressure is included in <I>press</I> and <I>pxx</I>, <I>pyy</I>,
etc.
</P>
<HR>
<P>The <I>step</I>, <I>elapsed</I>, and <I>elaplong</I> keywords refer to timestep
count. <I>Step</I> is the current timestep, or iteration count when a
<A HREF = "minimize.html">minimization</A> is being performed. <I>Elapsed</I> is the
number of timesteps elapsed since the beginning of this run.
<I>Elaplong</I> is the number of timesteps elapsed since the beginning of
an initial run in a series of runs. See the <I>start</I> and <I>stop</I>
keywords for the <A HREF = "run.html">run</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 <I>elapsed</I> and <I>elaplong</I> are the same value.
</P>
<P>The <I>cpu</I> keyword is elapsed CPU seconds since the beginning of this
run. The <I>tpcpu</I> and <I>spcpu</I> keywords are measures of how fast your
simulation is currently running. The <I>tpcpu</I> keyword is simulation
time per CPU second, where simulation time is in time
<A HREF = "units.html">units</A>. E.g. for metal units, the <I>tpcpu</I> value would be
picoseconds per CPU second. The <I>spcpu</I> 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 <I>tpcpu</I> keyword does not attempt to track any changes in
timestep size, e.g. due to using the <A HREF = "fix_dt_reset.html">fix dt/reset</A>
command.
</P>
<P>The <I>fmax</I> and <I>fnorm</I> keywords are useful for monitoring the progress
of an <A HREF = "minimize.html">energy minimization</A>. The <I>fmax</I> keyword
calculates the maximum force in any dimension on any atom in the
system, or the infinity-norm of the force vector for the system. The
<I>fnorm</I> keyword calculates the 2-norm or length of the force vector.
</P>
<P>The keywords <I>cella</I>, <I>cellb</I>, <I>cellc</I>, <I>cellalpha</I>, <I>cellbeta</I>,
<I>cellgamma</I>, correspond to the usual crystallographic quantities that
define the periodic unit cell of a crystal. See <A HREF = "Section_howto.html#howto_12">this
section</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
<I>lx</I>, <I>ly</I>, <I>lz</I>, <I>yz</I>, <I>xz</I>, <I>xy</I>,
</P>
<HR>
<P>The <I>c_ID</I> and <I>c_ID[I]</I> and <I>c_ID[I][J]</I> keywords allow global
values calculated by a compute to be output. As discussed on the
<A HREF = "compute.html">compute</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 can be referenced in a
<A HREF = "variable.html">variable</A> and the variable referenced by thermo_style
custom, as discussed below.
</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
<A HREF = "compute.html">compute</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 <A HREF = "thermo_modify.html">thermo_modify
norm</A> option being used.
</P>
<P>The <I>f_ID</I> and <I>f_ID[I]</I> and <I>f_ID[I][J]</I> keywords allow global
values calculated by a fix to be output. As discussed on the
<A HREF = "fix.html">fix</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 in a
<A HREF = "variable.html">variable</A> and the variable referenced by thermo_style
custom, as discussed below.
</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
<A HREF = "fix.html">fix</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 <A HREF = "thermo_modify.html">thermo_modify norm</A>
option being used.
</P>
<P>The <I>v_name</I> 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 variables can be referenced. See the
<A HREF = "variable.html">variable</A> command for details. Variables of style
<I>equal</I> 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>See <A HREF = "Section_modify.html">this section</A> for information on how to add
new compute and fix styles to LAMMPS to calculate quantities that can
then be referenced with these keywords to generate thermodynamic
output.
</P>
<HR>
<P><B>Restrictions:</B>
</P>
<P>This command must come after the simulation box is defined by a
<A HREF = "read_data.html">read_data</A>, <A HREF = "read_restart.html">read_restart</A>, or
<A HREF = "create_box.html">create_box</A> command.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "thermo.html">thermo</A>, <A HREF = "thermo_modify.html">thermo_modify</A>,
<A HREF = "fix_modify.html">fix_modify</A>, <A HREF = "compute_temp.html">compute temp</A>,
<A HREF = "compute_pressure.html">compute pressure</A>
</P>
<P><B>Default:</B>
</P>
<PRE>thermo_style one
</PRE>
</HTML>