The kinetic energy is the same but rotational kinetic energy and pressure is different… this subsequently affects the dynamics in the second run.
Any idea as to why this happens…? If I run this for less timesteps for example run 4000 followed by another run 4000, there is continuity but after around 5000 timesteps it becomes unstable only when using 2 run commands. If I just use one run command of run 10000, the simulation is unaffected… wonder what happens between the two.
I know the setupflag is on during the first timestep of a run command but it shouldn’t affect the results at the end of the last timestep because there is no position update between the two… I expect both 5000 timesteps to be the same.
Any reason as to why only the rotational DOF’s are affected because i think that’s where the problem lies?
rot_kin is a custom thermo observable rather than a standard one, and without knowing what rot_kin is and what source code you have written to calculate it, it is impossible for us to diagnose why it is behaving as it does.
It is also entirely possible that the custom-written pair style has done something improper between runs, but again, we cannot diagnose anything without source code. (And not many will be inclined to help without, for example, some evidence that you have tried to use a debugger to narrow down the possibilities.)
I spent some time debugging and looking at the data, and I realized that my data is not continuous between the two run commands. For example, if I split a 10000 timestep run into two 5000 timestep runs and if I print out an atom array such as the radius array at the end of one run (end of 5000) and at the beginning of another (setup of 5000 second run), then reorganize these arrays such that they are in ascending order with respect to their tag[index], I get a few indices being swapped such as in the figure below that plots the difference between the sorted arrays wrt to tag:
Like the three out-of-place data points. I read on here that the local index ,i , can be switched during a run but I don’t know why some of these values get swapped during the switch especially when the data is organized with respect to their global index.
Here is what I expect, and what happens during the 4999th and 5000th timestep in the first run…notice how the difference is 0 because the data is continuously transferred.
You should check if this is related to atom sorting by testing your script with atom_modify sort no. If that’s where the problem is then you may have to check your implementation of “atom tracking” (i.e. callbacks to the Atom class and exchange functions).