# dumping temperature

Hello all,

I am working with a system containing 2 types of atoms, stand besides each other in two different regions and at two different initial temperatures. Because I need temperature of each region I figured I should use compute temp/region. There are two regions, therefore, I need two of this compute command.
For example:
Region 1 (containing 100 atoms), T=300K
Region 2 (containing 100 atoms), T=400K

Now, I want to make a dump file with a column for temperature along with xyz: a column with computed temperature of each region for each atom of the corresponding region. (Just for visualizing!)
But there are two problems:
1- Temperature is not a per-atom parameter. However, temp/region outputs a global scalar value. How can reach it to use in dump command?

(The second one might be needed in other situations, too)
2- If I have some compute, … for different group-IDs, how should I dump them for corresponding group-IDs in one dump file?

Soheil

Well, I guess it would be quite wrong, physics-wise, to define temperature per-atom, although I see some technical advantages in using it (always keeping in mind you are doing things wrong). You can dump the velocity if you want, and then use equipartition (for whatever system you might have) to infer the temperature.

Pablo

PS: please do NOT tell my colleagues I’ve just talked about “temperature per-atom”, this is a secret just between us.

Hello all,

I am working with a system containing 2 types of atoms, stand besides each
other in two different regions and at two different initial temperatures.
Because I need temperature of each region I figured I should use compute
temp/region. There are two regions, therefore, I need two of this compute
command.
For example:
Region 1 (containing 100 atoms), T=300K
Region 2 (containing 100 atoms), T=400K

Now, I want to make a dump file with a column for temperature along with
xyz: a column with computed temperature of each region for each atom of the
corresponding region. (Just for visualizing!)

But there are two problems:
1- Temperature is not a per-atom parameter. However, temp/region outputs a
global scalar value. How can reach it to use in dump command?

you could try the following:

define an atom style variable with the following expression:

and dump this variable. for more details, check out the variable documentation.

(The second one might be needed in other situations, too)
2- If I have some compute, ... for different group-IDs, how should I dump
them for corresponding group-IDs in one dump file?

you can use the same trick from above, where you assign a different
number to each group id and then use that number to identify the
groups. you could also use bitmasks (i.e. powers of two) if the groups
overlap.

or you could just assign a different molecule id to the members of
each group (if there is no overlap and you don't use molecule id for
anything else).

axel.

Thanks to Axel, Deepak and Pablo, both quesions are answered.

But, Pablo, assigning temperature to each atom doesn’t mean calculating temperature/atom. While the first one is right and could be useful, the latter (as you have said) is absolutely wrong.
PS: this would be our secret! 