Calculating Average Temp

Dear LAMMPS users

I have defined some group of atoms in my simulation box and want to calculate their individual average temperature over time. I am thinking to use fix ave/time command for this. But doc page says that

“The group specified with this command is ignored. However, note that specified values may represent calculations performed by computes and fixes which store their own “group” definitions.”

Does that mean I cant use group ID to calculate its average temperature? Then what should I do to realise my calculation or which command I should use for the same?

Thanks.
Rajesh

Dear LAMMPS users

I have defined some group of atoms in my simulation box and want to
calculate their individual average temperature over time. I am thinking to
use fix ave/time command for this. But doc page says that

"The group specified with this command is ignored. However, note that
specified values may represent calculations performed by computes and fixes
which store their own “group” definitions."

Does that mean I cant use group ID to calculate its average temperature?

no, you can compute average temperatures for groups. but fix ave/time
doesn't compute temperatures, it just averages data.

axel.

Dear Axel

Thank you for your response. First I will use
compute mytemp all temp
then will define atom groups and then
fix id group-id ave/temp c_mytemp…

I think that should work?

Thanks
Rajesh

No, that makes no sense.

Dear Axel

Thanks. What about this one?

compute T1 group1 temp
compute T2 group2 temp


compute Tn groupn temp

and
fix id all ave/temp c_T1…

fix id all ave/temp c_T2…


fix id all ave/temp c_Tn…

Thanks.

fix ave/temp does not exist, you want to use fix ave/time.

Anders

Dear Anders,

Yes, I want to use the same fix ave/time. Will this work

compute T1 group1 temp
compute T2 group2 temp


compute Tn groupn temp

and
fix id all ave/time c_T1…

fix id all ave/time c_T2…


fix id all ave/time c_Tn…

or

compute T1 group1 temp
compute T2 group2 temp


compute Tn groupn temp

and
fix id group1 ave/time c_T1…

fix id group2 ave/time c_T2…


fix id group ave/time c_Tn…

Thanks all.

Both will produce identical output since the specified group is ignored in fix ave/time as you have seen in the documentation :slight_smile:

Anders

Dear Ander,

Will that produce group average or system average?

Thanks

Group average. Each compute measures the temperature of the specified group, so the ave/time will give you time average of the temperature of each group.

Anders

Dear Ander thank you for your guidance.