Extract the temperature of a particle in a group

Hello everyone, I am trying to extract the temperature of a particle in a group of 16 particles, my code is:

group tmprofile id 151 33 32 29 26 23 20 17 14 11 8 5 2 1 36 176
fix 2 tmprofile ave/atom 1 4000 4000 x v_temp

and it works when I use " dump tempp tmprofile custom 4000 profile.dat id f_2[2]" but can’t extract the temperature of the particle 33 and 36 in variables to calculate the difference in another variable.

Before, I tried:
group ghot 33
compute gTemp ghot temp
variable comhot equal c_gTemp

but always is zero. Thanks for read me and I hope you can help me to understand this better.

Two comments:

  1. There is not enough information here to make any assessment. What is v_temp? All the other “Before, I tried” commands are out of context. How should anybody know what you are doing without being able to read your mind??? It is usually best in cases like this, to take one of the LAMMPS examples and then add (only!) the commands necessary to demonstrate your problem.

  2. Generally speaking, the concept of a “temperature” is rather ill defined for small systems or groups of particles, let alone individual particles. That said, the “kinetic energy” of the same particle is very well defined. Technically, you can compute the temperature based on assuming perfect equipartitioning across all degrees of freedom, but that goes against the experience of having local fluctuations.