possible mv^2 to temperature conversion bug

Hi All,

In all of compute_temp***.cpp files, the tfactor is defined as

tfactor = force->mvv2e / (dof * force->boltz);

Is there a factor 1/2 missing?

Jiuning Hu

No. Because tfactor is applied to 2*KE = Sum(mvv), not KE.

Thanks Aidan,

If you check the code in compute_temp.cpp, you will find that there is no 1/2 factor in either tfactor or the KE in ComputeTemp::compute_scalar().

The lammps version I downloaded is 4Jul12.

Jiuning Hu

There is no KE in compute_temp.cpp. The intermediate sum over m*v*v is 2*KE.