2
<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>
12
<H3>compute temp/cs command
16
<P>compute ID group-ID temp/cs group1 group2 pre
18
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
19
<LI>temp/cs = style name of this compute command
20
<LI>group1 = group-ID of either cores or shells
21
<LI>group2 = group-ID of either shells or cores
25
<PRE>compute oxygen_c-s all temp/cs O_core O_shell
26
compute core_shells all temp/cs cores shells
28
<P><B>Description:</B>
30
<P>Define a computation that calculates the temperature of a system based
31
on the center-of-mass velocity of atom pairs that are bonded to each
32
other. This compute is designed to be used with the adiabatic
33
core/shell model of <A HREF = "#MitchellFinchham">(Mitchell and Finchham)</A>. See
34
<A HREF = "Section_howto.html#howto_25">Section_howto 25</A> of the manual for an
35
overview of the model as implemented in LAMMPS. Specifically, this
36
compute enables correct temperature calculation and thermostatting of
37
core/shell pairs where it is desirable for the internal degrees of
38
freedom of the core/shell pairs to not be influenced by a thermostat.
39
A compute of this style can be used by any command that computes a
40
temperature via <A HREF = "fix_modify.html">fix_modify</A> e.g. <A HREF = "fix_temp_rescale.html">fix
41
temp/rescale</A>, <A HREF = "fix_nh.html">fix npt</A>, etc.
43
<P>For this compute, core and shell particles are specified by two
44
respective group IDs, which can be defined using the
45
<A HREF = "group.html">group</A> command. The number of atoms in the two groups
46
must be the same and there should be one bond defined between a pair
47
of atoms in the two groups.
49
<P>The temperature is calculated by the formula KE = dim/2 N k T, where
50
KE = total kinetic energy of the group of atoms (sum of 1/2 m v^2),
51
dim = 2 or 3 = dimensionality of the simulation, N = number of atoms
52
in the group, k = Boltzmann constant, and T = temperature. Note that
53
the velocity of each core or shell atom used in the KE calculation is
54
the velocity of the center-of-mass (COM) of the core/shell pair the
57
<P>A kinetic energy tensor, stored as a 6-element vector, is also
58
calculated by this compute for use in the computation of a pressure
59
tensor. The formula for the components of the tensor is the same as
60
the above formula, except that v^2 is replaced by vx*vy for the xy
61
component, etc. The 6 components of the vector are ordered xx, yy,
62
zz, xy, xz, yz. Again, the velocity of each core or shell atom is its
65
<P>The change this fix makes to core/shell atom velocities is essentially
66
computing the temperature after a "bias" has been removed from the
67
velocity of the atoms. This "bias" is the velocity of the atom
68
relative to the COM velocity of the core/shell pair. If this compute
69
is used with a fix command that performs thermostatting then this bias
70
will be subtracted from each atom, thermostatting of the remaining COM
71
velocity will be performed, and the bias will be added back in. This
72
means the thermostating will effectively be performed on the
73
core/shell pairs, instead of on the individual core and shell atoms.
74
Thermostatting fixes that work in this way include <A HREF = "fix_nh.html">fix
75
nvt</A>, <A HREF = "fix_temp_rescale.html">fix temp/rescale</A>, <A HREF = "fix_temp_berendsen.html">fix
76
temp/berendsen</A>, and <A HREF = "fix_langevin.html">fix
79
<P>The internal energy of core/shell pairs can be calculated by the
80
<A HREF = "compute_temp_chunk.html">compute temp/chunk</A> command, if chunks are
81
defined as core/shell pairs. See <A HREF = "Section_howto.html#howto_25">Section_howto
82
25</A> for more discussion on how to do this.
84
<P><B>Output info:</B>
86
<P>This compute calculates a global scalar (the temperature) and a global
87
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
88
These values can be used by any command that uses global scalar or
89
vector values from a compute as input.
91
<P>The scalar value calculated by this compute is "intensive". The
92
vector values are "extensive".
94
<P>The scalar value will be in temperature <A HREF = "units.html">units</A>. The
95
vector values will be in energy <A HREF = "units.html">units</A>.
97
<P><B>Restrictions:</B>
99
<P>The number of core/shell pairs contributing to the temperature is
100
assumed to be constant for the duration of the run. No fixes should
101
be used which generate new molecules or atoms during a simulation.
103
<P><B>Related commands:</B>
105
<P><A HREF = "compute_temp.html">compute temp</A>, <A HREF = "compute_temp_chunk.html">compute
108
<P><B>Default:</B> none
112
<A NAME = "MitchellFinchham"></A>
114
<P><B>(Mitchell and Finchham)</B> Mitchell, Finchham, J Phys Condensed Matter,