Dear Molecular dynamics expert,

I was wondering whether I can apply the K.E = 3/2(k.T) relation in order to calculate the temperature per atom in MD or not.

Actually, mathematically it seems that it is possible. However from physical point of view, or from statistic mechanics point of view, I have no idea.

Yours Sincerely,

Bahman Daneshian

This is not really a question specifically related to M.D. but to statistical mechanics. If your system is sufficiently large (i.e., in the thermodynamic limit), and in equilibrium in such a way that the energy is equipartitioned, this relation should hold (as long as you make sure to multiply the right hand side by the number of degrees of freedom as well). It is the most straightforward way of calculating the temperature.

However, if the prerequisites are not met, this expression will, in general, not be equal to the thermodynamic definition of temperature (dU/dS or whatever is appropriate for your ensemble).

Whether these prerequisites hold for your simulation is for you to judge.

I’d also like to add that the equipartition theorem states that = 3/2NkT, i.e. it’s only a relation that holds for the **mean** value of the kinetic energy, not the instantaneous value.

Anders

thank you very much for your helpful comments. So it is better to only present Ke/atom.

I have an idea in order to calculate the local temperature with MD:

We can mesh the region in to several bins OR tables and then calculate the temperature for each bins which included several atoms.

I agree! The compute temp/chunk command should help!

Anders

I agree! The compute temp/chunk command should help!

however, compute temp/chunk comes with the same caveats as mentioned before, and one additional issue to watch out for.

temperature in general is not very well defined for finite systems, especially not on the scale of MD simulations (let alone for sub-partitions of such a system). temperature is generally computed under the assumption of (exact) equipartitioning of energy; however, in practice that only is given when averaging over a very large sample. for a system in equilibrium *and* sufficiently sampling the relevant phase space, you can also use the time average in addition to the average over the sample.

the additional issue is, that compute temp/chunk has no knowledge of removed degrees of freedom, e.g. by fix shake, fix rigid and alike. it only looks at individual atoms. the same goes for translation invariance, which applies to the entire system (i.e. one has to subtract 3 from the total number of degrees of freedom), but not to spatial bins. so if you would have only 1 bin, you would get a (slightly) different result than for the total system via compute temp.

axel.