# Per atom temperature

I don’t mean to sound patronizing, but temperature is defined for a “large” number of atoms, not one atom. I know people have tried to calculate this before, but are you really trying to get some measure of the kinetic energy of each atom?

Regards,

Ramaswami.

Message: 3

Dear Ramaswami,
Many thanks for your point. I have read from Axel that “temperature” is not a well parameter for a small group of atoms, and it is better we use an average temperature for our system (by “compute temp” or “thermo_style temp” commands). However, I have seen in the recent articles that researchers present temperature distribution (an example is attached).
I got kinetic energy of my system (either per atom and total system); nevertheless, I would like to obtain its temperature distribution.
Stefan kindly recommended that I divided out the appropriate DOF per atoms. What is your idea about this? How can I use this if a couple of my particles are fixed and the rest of them are free in movement?
I look forward to receiving your hints.

Best,

Dear Ramaswami,
Many thanks for your point. I have read from Axel that "temperature" is
not a well parameter for a small group of atoms, and it is better we use an
average temperature for our system (by "compute temp" or "thermo_style
temp" commands). However, I have seen in the recent articles that
researchers present temperature distribution (an example is attached).
I got kinetic energy of my system (either per atom and total system);
nevertheless, I would like to obtain its temperature distribution.

Stefan kindly recommended that I divided out the appropriate DOF per atoms.

particles are fixed and the rest of them are free in movement?
I look forward to receiving your hints.

​please use common sense here. of course, you can apply the formula to
compute a (microscopic) temperature Sum_i (1/2 * m * v**2 * k_B​) / N_DOF
also to a group of 1 atom. the result doesn't really correspond to the
thermodynamic concept of a temperature, though. what you are really looking
at is the instantaneous kinetic energy mapped to a temperature scale. at
any rate, this is easy to implement with an atom style variable. i
recommend you freshen up your statistical thermodynamics knowledge and
check out particularly the meaning of ensemble averages and time averages
and their relation to macroscopic thermodynamic properties.

next comment i have is about your term "distribution". you are not very
precise here and thus it is very difficult to give meaningful advice.
distribution can mean a spatial distribution or a distribution by value,
i.e. a histogram. also, a spatial distribution can be computed for and
averaged over space in 1d, 2d, or 3d set of bins or through color-coding
individual points/atoms.

in the picture you attached uses the term "distribution" in the sense of a
spatial distribution.
but it would be more precise to talk about color coded visualization of a
snapshot, where the color if individual atoms is mapped to their kinetic
energy (and the kinetic energy measured in units corresponding to a
temperature). this is easy to do with many visualization programs. you can
dump the positions *and* velocities and simply visualize the system color
codes by velocity (if all atoms have the same mass or by velocity times
mass) and then simply recompute from the expression above which temperature
which kinetic energy corresponds to and then use that for your legend. of
course, you can also just compute the atom style variable mentioned above