Thermo_style custom command has different results compared to compute command

Respected Lammps users, When I measure temperature during simulating melting of iron by using thermostyle command has totally different results when I apply compute command and fix ave/time.
Why it may be so?

thermo 1
thermo_style custom step lx ly lz press pxx pyy pzz pe temp
thermo_modify norm yes
thermo_modify lost ignore flush yes

compute myTemp all temp
fix 1 all ave/time 100 5 1000 c_myTemp file temp.profile
fix 7 water temp/rescale 100 1500 1500 0.02 0.7

Thanks for cooperation

Because your ave/time command extracts data every 100 timesteps, averages the results 5 times, and print the value every 1000 timesteps, but thermo print the instantaneous value every timestep…

Is it not suitable to use thermo_style command and setting timestep to check for instantaneous results for each time step in logfile? Why should I use compute if I don’t need average?

Your questions make no sense. You were saying that you get different results (but didn’t say how different) from averaging versus instantaneous. For that you have now an explanation. So why complain?

LAMMPS will execute the commands you ask it to do and give you the results that this produces. What you do with that is ultimately your concern. If you believe that LAMMPS is not functioning as documented, you need to provide better and more specific proof.

1 Like

The instantaneous values by using compute command have small differences; similarly the instantaneous values from thermo_style also have small differences of 15 to 50 Kelvin but when I compare both of these results makes a huge difference of 500 to 1000K for instantaneous and average values.

This is a useless answer without sufficient context. Please see my comments and suggestions to your other posts. Bottom line, if you don’t make an effort to post better questions, you will not get better responses or possibly no responses at all once people are tired of having to ask follow up questions or guessing information you don’t provide.