Different temperatures at same timestep

Dear all,

I was calculating the temperature of water molecules using the compute temp/com command. During the run, i require to maintain the temperature for a short time using either NVT or temp/rescale. Both these methods work well to establish required temperature. However, once I unfix these and run NVE on the water molecules, the temperature computed on the last timestep of NVT and the first timestep of NVE (which is essentially the same timestep, in this case, the 20000th step) , there is a huge jump in temperature. Again, when we “rerun” this compute temp/com on the dump produced by this simulation( Dump file includes per atom velocities for correct calculation of temperature) this observed jump vanishes.

To clarify, the same compute command is used for the entire run.

Here is a part of the log from the actual simulation:

#nvt with temp set to 300K initially

Step c_temp_F c_velx c_vely c_velz PotEng KinEng TotEng

19500 297.35875 3.2631447e-11 6.6058449e-06 -2.5760152e-05 -5.1576651e-05 253806.09 13607.007 267413.1
20000 297.23123 3.3216514e-11 -7.8905978e-05 8.1130273e-05 -0.0001101935 253810.61 13602.726 267413.34
#unfixing nvt, fixing nve
20000 198.14829 3.3216514e-11 -7.8905978e-05 8.1130273e-05 -0.0001101935 253810.61 13602.726 267413.34
20500 217.45369 0.081321018 -1.1022971e-05 -5.2750552e-05 0.0002045335 252836.26 14574.962 267411.23

21000 215.81994 0.062207436 3.3929459e-05 -3.1717638e-05 -0.00011490475 252919 14492.706 267411.7

Now, from the rerun of this simulation:

19500 297.35777 3.8383375e-08 6.6330568e-06 -2.5766696e-05 -5.1628073e-05 253805.76 13606.974 267412.73

20000 297.22979 5.5340834e-08 -7.8904944e-05 8.1155717e-05 -0.00011013182 253810.37 13602.677 267413.05
#unfixing nvt, fixing nve
20000 297.22979 5.5368313e-08 -7.8904944e-05 8.1155717e-05 -0.00011013182 253810.35 13602.677 267413.03
20500 326.18377 0.081323385 -9.9721169e-06 -5.3108821e-05 0.00020624216 250199.31 14574.745 264774.05

21000 323.73431 0.062196797 3.6811502e-05 -3.1452395e-05 -0.00012786237 249768.47 14492.51 264260.98

Important to note is the slight change in temperature (second decimal place) in NVT phase of both actual run and rerun. All other thermo properties remain constant.
The version of lammps I am using is 29 Sep 2016. Water model used is tip4p/2005. Using fix shake. c_vel are computed average velocities in respective directions.

I would be obliged if anyone could help.

Thank you

Sritay Mistry

Graduate Student, Aerospace engineering
Indian Institute of Technology, Kanpur

In the first run, the temp changes from ~300 to ~200, which is likely

due to a different # of degrees of freedom

(DOF) being used in the T calculation. Hard to say w/out knowing

what temp compute you are printing the temp from - looks like your own,

not the default. Please post as simple an input script as possible that

simply does an unfix nvt between 2 runs and shows the temperature change.

Steve