LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

temperature command

Syntax:

temperature ID group-ID style args keyword value ... 

Examples:

temperature mine peptide full
temperature new flow partial 1 1 0
temperature 2nd middle ramp vx 0 8 y 2 12 units lattice 

Description:

Define a method for computing the temperature of a group of atoms.

The ID of the temperature can be referred to in other commands which perform or modify temperature computations: thermo_modify, velocity, fix_modify, temp_modify.

The style determines how the temperature is computed. The full style means KE = dim/2 N k T, where KE = total kinetic energy of the group of atoms (sum of 1/2 m v^2), dim = 2 or 3 = dimensionality of the simulation, N = number of atoms in the group, k = Boltzmann constant, and T = temperature.

The partial style uses the same formula as full, except entire dimensions can be eliminated from the kinetic energy computation. This can be useful for systems where atoms are flowing, and only the thermal temperature in the non-flow directions is desired. A "0" means do not use the component of velocity in that dimension when computing KE. In the example above with arguments 1 1 0, only x and y velocities (not z) would be used in computing KE and temperature.

The ramp style can be used to eliminate an imposed velocity on a system before computing thermal KE. The meaning of these arguments is the same as for the velocity command which was presumably used to impose the velocity.

The optional units keyword affects the coordinates (c1,c2) and velocities (vlo,vhi) defined for the ramp style. If units is set to lattice then distance and velocity are in lattice spacing units (e.g. lattice spacings per tau). If units is box then the distance and velocity units are in Angstroms and sigma.

The units option affects the meaning of arguments for the ramp style. If units = box, the velocities and coordinates specified are in the standard units described by the units command (e.g. Angstroms/fmsec for real units). If units = lattice, velocities are in units of lattice spacings per time (e.g. spacings/fmsec) and coordinates are in lattice spacings. The lattice command must have been previously used to define the lattice spacing.

A temperature with ID = default is pre-defined by LAMMPS and uses to a full style computation on the all group of atoms. All operations in LAMMPS that compute temperatures use the default ID unless the input script changes it.

Restrictions: none

Related commands:

thermo_modify, velocity, fix_modify, temp_modify

Default:

A temperature with ID = default is defined by LAMMPS, as if it had been specified as "temperature default all full".