LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

thermo_style command

Syntax:

thermo_style style args 

Examples:

thermo_style multi
thermo_style custom step temp pe etotal press vol
thermo_style custom step temp etotal c_myTemp v_abc 

Description:

Set the style and content for printing thermodynamic data to the screen and log file.

Style one 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.

Style multi 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.

Style granular is used with atom style granular and prints a one-line numeric summary that is the equivalent of "thermo_style custom step atoms ke grot".

Style custom 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 computes, fixes, and variables that have been defined elsewhere in the input script or can even be new styles which users have added to LAMMPS (see the Section_modify section of the documentation). Thus the custom style provides a flexible means of outputting essentially any desired quantity as a simulation proceeds.

All styles except custom have vol appended to their list of outputs if the simulation box volume changes during the simulation.

Options invoked by the thermo_modify command can be used to set the one- or multi-line format of the print-out, the normalization of energy quantities (total or per-atom), and the numeric precision of each printed value.


Several of the thermodynamic quantities require a temperature to be computed: "temp", "press", "ke", "etotal", "enthalpy", "pxx etc", "tave", "pave". To do this, a compute of style "temp" is created, as if this command had been issued:

compute thermo_temp all temp 

See the compute temp command for details. Note that the ID of the new compute is thermo_temp and the group is all. You can change the attributes of this temperature (e.g. its degrees-of-freedom) via the compute_modify command. Alternatively, you can directly assign a new compute (that calculates temperature) which you have defined, to be used for any thermodynamic quantity that requires a temperature. This is done via the thermo_modify command.

Several of the thermodynamic quantities require a pressure to be computed: "press", "enthalpy", "pxx etc", "pave". To do this, a compute of style "pressure" is created, as if this command had been issued:

compute thermo_press all pressure thermo_temp 

See the compute pressure command for details. Note that the ID of the new compute is thermo_press and the group is all. You can change the attributes of this pressure via the compute_modify command. Alternatively, you can directly assign a new compute (that calculates pressure) which you have defined, to be used for any thermodynamic quantity that requires a pressure. This is done via the thermo_modify command.

The drot keyword requires a rotational energy to be compute for dipolar particles. To do this, a compute of style "rotate/dipole" is created, as if this command had been issued:

compute thermo_rotate_dipole all rotate/dipole 

See the compute rotate/dipole command for details. Note that the ID of the new compute is thermo_rotate_dipole and the group is all. You can change the attributes of this computation via the compute_modify command. Alternatively, you can directly assign a new compute which you have defined, to be used for drot. This is done via the thermo_modify command. For example, this could be useful if you wish to exclude certain particles from the compuation.

The grot keyword requires a rotational energy to be compute for granular particles. To do this, a compute of style "rotate/gran" is created, as if this command had been issued:

compute thermo_rotate_gran all rotate/gran 

See the compute rotate/gran command for details. Note that the ID of the new compute is thermo_rotate_gran and the group is all. You can change the attributes of this computation via the compute_modify command. Alternatively, you can directly assign a new compute which you have defined, to be used for grot. This is done via the thermo_modify command. For example, this could be useful if you wish to exclude frozen particles from the compuation.


The potential energy of the system pe will include contributions from fixes if the fix_modify thermo option was set for each fix. For example, the fix wall/lj93 fix will contribute the energy of atoms interacting with the wall.

A long-range tail correction etail for the VanderWaal pairwise energy will be non-zero only if the pair_modify tail option is turned on. The etail contribution is included in evdwl, pe, and etotal, and the corresponding tail correction to the pressure is included in press and pxx, pyy, etc.

The time-averaged keywords tave, pave, eave, peave are averaged over the last N thermodynamic outputs to the screen (not the last N timesteps), where N is the value set by the window option of the thermo_modify command (N = 10 by default).


The c_ID and c_ID[N] keywords allow scalar or vector quantities calculated by a compute to be output. The ID in the keyword should be replaced by the actual ID of the compute that has been defined elsewhere in the input script. See the compute command for details. Note that per-atom quantities calcalated by a compute cannot be output as part of thermodynamics. Rather, these quantities are output by the dump custom command.

If c_ID is used as a keyword, then the scalar quantity calculated by the compute is printed. If c_ID[N] is used, then N in the range from 1-M will print a specific component of the vector calculated by the compute. A value of N=0 will output the scalar quantity.

The f_ID and f_ID[N] keywords allow scalar or vector quantities calculated by a fix to be output. The ID in the keyword should be replaced by the actual ID of the fix that has been defined elsewhere in the input script. See the fix command for details.

If f_ID is used as a keyword, then the scalar quantity calculated by the fix is printed. If f_ID[N] is used, then N in the range from 1-M will print a specific component of the vector calculated by the fix. A value of N=0 will output the scalar quantity.

The v_name keyword allow the current value of a variable to be output. The name in the keyword should be replaced by the actual namd of the variable that has been defined elsewhere in the input script. See the variable command for details. Equal-style variables can calculate complex formulas involving atom and group properties, mathematical operations, other variables, etc. This keyword enables them to be evaluated and their value printed periodically during a simulation.

See this section for information on how to add new compute and fix styles as well as variable options to LAMMPS that calculate quantities that could then be output with these keywords.


Restrictions:

This command must come after the simulation box is defined by a read_data, read_restart, or create_box command.

Related commands:

thermo, thermo_modify, fix_modify, temperature

Default:

thermo_style one