1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
9 thermo_modify command :h3
13 thermo_modify keyword value ... :pre
15 one or more keyword/value pairs may be listed :ulb,l
16 keyword = {lost} or {lost/bond} or {norm} or {flush} or {line} or {format} or {temp} or {press}:l
17 {lost} value = {error} or {warn} or {ignore}
18 {lost/bond} value = {error} or {warn} or {ignore}
19 {norm} value = {yes} or {no}
20 {flush} value = {yes} or {no}
21 {line} value = {one} or {multi}
22 {format} values = {line} string, {int} string, {float} string, M string, or {none}
23 string = C-style format string
24 M = integer from 1 to N, where N = # of quantities being output
25 {temp} value = compute ID that calculates a temperature
26 {press} value = compute ID that calculates a pressure :pre
31 thermo_modify lost ignore flush yes
32 thermo_modify temp myTemp format 3 %15.8g
33 thermo_modify temp myTemp format line "%ld %g %g %15.8g"
34 thermo_modify line multi format float %g :pre
38 Set options for how thermodynamic information is computed and printed
41 NOTE: These options apply to the currently defined thermo style. When
42 you specify a "thermo_style"_thermo_style.html command, all
43 thermodynamic settings are restored to their default values, including
44 those previously reset by a thermo_modify command. Thus if your input
45 script specifies a thermo_style command, you should use the
46 thermo_modify command after it.
48 The {lost} keyword determines whether LAMMPS checks for lost atoms
49 each time it computes thermodynamics and what it does if atoms are
50 lost. An atom can be "lost" if it moves across a non-periodic
51 simulation box "boundary"_boundary.html or if it moves more than a box
52 length outside the simulation domain (or more than a processor
53 sub-domain length) before reneighboring occurs. The latter case is
54 typically due to bad dynamics, e.g. too large a timestep or huge
55 forces and velocities. If the value is {ignore}, LAMMPS does not
56 check for lost atoms. If the value is {error} or {warn}, LAMMPS
57 checks and either issues an error or warning. The code will exit with
58 an error and continue with a warning. A warning will only be issued
59 once, the first time an atom is lost. This can be a useful debugging
62 The {lost/bond} keyword determines whether LAMMPS throws an error or
63 not if an atom in a bonded interaction (bond, angle, etc) cannot be
64 found when it creates bonded neighbor lists. By default this is a
65 fatal error. However in some scenarios it may be desirable to only
66 issue a warning or ignore it and skip the computation of the missing
67 bond, angle, etc. An example would be when gas molecules in a vapor
68 are drifting out of the box through a fixed boundary condition (see
69 the "boundary"_boundary.html command). In this case one atom may be
70 deleted before the rest of the molecule is, on a later timestep.
72 The {norm} keyword determines whether various thermodynamic output
73 values are normalized by the number of atoms or not, depending on
74 whether it is set to {yes} or {no}. Different unit styles have
75 different defaults for this setting (see below). Even if {norm} is
76 set to {yes}, a value is only normalized if it is an "extensive"
77 quantity, meaning that it scales with the number of atoms in the
78 system. For the thermo keywords described by the doc page for the
79 "thermo_style"_thermo_style.html command, all energy-related keywords
80 are extensive, such as {pe} or {ebond} or {enthalpy}. Other keywords
81 such as {temp} or {press} are "intensive" meaning their value is
82 independent (in a statistical sense) of the number of atoms in the
83 system and thus are never normalized. For thermodynamic output values
84 extracted from fixes and computes in a "thermo_style
85 custom"_thermo_style.html command, the doc page for the individual
86 "fix"_fix.html or "compute"_compute.html lists whether the value is
87 "extensive" or "intensive" and thus whether it is normalized.
88 Thermodynamic output values calculated by a variable formula are
89 assumed to be "intensive" and thus are never normalized. You can
90 always include a divide by the number of atoms in the variable formula
91 if this is not the case.
93 The {flush} keyword invokes a flush operation after thermodynamic info
94 is written to the log file. This insures the output in that file is
95 current (no buffering by the OS), even if LAMMPS halts before the
98 The {line} keyword determines whether thermodynamics will be output as
99 a series of numeric values on one line or in a multi-line format with
100 3 quantities with text strings per line and a dashed-line header
101 containing the timestep and CPU time. This modify option overrides
102 the {one} and {multi} thermo_style settings.
104 The {format} keyword can be used to change the default numeric format
105 of any of quantities the "thermo_style"_thermo_style.html command
106 outputs. All the specified format strings are C-style formats,
107 e.g. as used by the C/C++ printf() command. The {line} keyword takes
108 a single argument which is the format string for the entire line of
109 thermo output, with N fields, which you must enclose in quotes if it
110 is more than one field. The {int} and {float} keywords take a single
111 format argument and are applied to all integer or floating-point
112 quantities output. The setting for {M string} also takes a single
113 format argument which is used for the Mth value output in each line,
114 e.g. the 5th column is output in high precision for "format 5
117 The {format} keyword can be used multiple times. The precedence is
118 that for each value in a line of output, the {M} format (if specified)
119 is used, else the {int} or {float} setting (if specified) is used,
120 else the {line} setting (if specified) for that value is used, else
121 the default setting is used. A setting of {none} clears all previous
122 settings, reverting all values to their default format.
124 NOTE: The thermo output values {step} and {atoms} are stored
125 internally as 8-byte signed integers, rather than the usual 4-byte
126 signed integers. When specifying the {format int} option you can use
127 a "%d"-style format identifier in the format string and LAMMPS will
128 convert this to the corresponding 8-byte form when it is applied to
129 those keywords. However, when specifying the {line} option or {format
130 M string} option for {step} and {natoms}, you should specify a format
131 string appropriate for an 8-byte signed integer, e.g. one with "%ld".
133 The {temp} keyword is used to determine how thermodynamic temperature
134 is calculated, which is used by all thermo quantities that require a
135 temperature ("temp", "press", "ke", "etotal", "enthalpy", "pxx", etc).
136 The specified compute ID must have been previously defined by the user
137 via the "compute"_compute.html command and it must be a style of
138 compute that calculates a temperature. As described in the
139 "thermo_style"_thermo_style.html command, thermo output uses a default
140 compute for temperature with ID = {thermo_temp}. This option allows
141 the user to override the default.
143 The {press} keyword is used to determine how thermodynamic pressure is
144 calculated, which is used by all thermo quantities that require a
145 pressure ("press", "enthalpy", "pxx", etc). The specified compute ID
146 must have been previously defined by the user via the
147 "compute"_compute.html command and it must be a style of compute that
148 calculates a pressure. As described in the
149 "thermo_style"_thermo_style.html command, thermo output uses a default
150 compute for pressure with ID = {thermo_press}. This option allows the
151 user to override the default.
153 NOTE: If both the {temp} and {press} keywords are used in a single
154 thermo_modify command (or in two separate commands), then the order in
155 which the keywords are specified is important. Note that a "pressure
156 compute"_compute_pressure.html defines its own temperature compute as
157 an argument when it is specified. The {temp} keyword will override
158 this (for the pressure compute being used by thermodynamics), but only
159 if the {temp} keyword comes after the {press} keyword. If the {temp}
160 keyword comes before the {press} keyword, then the new pressure
161 compute specified by the {press} keyword will be unaffected by the
168 "thermo"_thermo.html, "thermo_style"_thermo_style.html
172 The option defaults are lost = error, norm = yes for unit style of
173 {lj}, norm = no for unit style of {real} and {metal}, flush = no,
174 and temp/press = compute IDs defined by thermo_style.
176 The defaults for the line and format options depend on the thermo
177 style. For styles "one" and "custom", the line and format defaults
178 are "one", "%8d", and "%12.8g". For style "multi", the line and
179 format defaults are "multi", "%8d", and "%14.4f".