[lammps-users] Definition of temperature in compute temp command

Hi,

I am trying to validate an homemade MD code by comparing my results with those obtained by LAMMPS for a simple test case. However, I would need some clarification about the compute temp command.

In the user manual, it is written that the temperature is linked with the kinetic energy of the system by:

KE = dim 1/2 N k T

where KE = sum( 1/2 m v^2 )

If working in lj units, these equations can be written as:

KE* = dim 1/2 N T*

where KE* = sum( 1/2 v* ^2)

which means the nondimensional temperature of the system (in a 2d system) is T* = KE* / N = mean kinetic energy of the system.

However, when I use the thermo command to compute temperature (which is done with the compute temp command) and kinetic energy, I find that the mean kinetic energy of the system is not the same as the temperature of the system, but is smaller.

If I substract the velocity of the center of mass of the system using compute temp/com, the temperature of the system is still larger than the mean kinetic energy of the system.

My question is: what contributions are considered in the computation of the temperature of the system besides the velocity of the center of mass ? In other words, how can I obtain the results from the above equations from the temperatures obtained by the compute temp command ?

Thank you in advance,

Jonathan Dallaire
Department of mechanical engineering
Laval University

All the code for this is in compute_temp.cpp, so you can
see exactly what it computes. It does subtract 3 degrees-of-freedom
by default, so if the difference you are seeing is small, it may
be that.

Steve