force from "rerun" command is different from the force in "dump" in the original code

Dear lammps users,

I want to find the force on each atom by the “rerun” command. For checking, I tried a simple example. First, I made a box containing some water molecules, and output forces by “dump” command. Second, output the forces on each atom by rerun command in another simulation. But the two forces are not the same. Could anyone help about this? Files are attached.

Best,

Khatereh

rerun_water.in (776 Bytes)

water.data (6.01 KB)

water.in (1.2 KB)

I expect that fix shake will change the forces (it does change positions) although I don’t know the details of the method.

Anders

Thank you Andres,

You are true. For the case I tried (one has shake and the other does not), the different is very much.

So, I checked two other cases:

  1. both first and second does not include shake. -> in this case the difference in forces are about 0.05 percent. (Does anyone knows that it is only because of rounding errors or not?)

  2. both first and second has shake in it. -> in this case the differences are in the order of 10 percent.( Does someone know why?)

So, maybe I should use this without shake. But how If I want to use shake as well?

The forces in your dump file include SHAKE constraint force for an entire timestep,
When you do a rerun, the SHAKE forces are only for 1/2 timestep, since they
are the forces that would be applied on the first timestep of a new run.
So I thnk the total force values you are examining will be different.

For the no shake case, I don’t know why they would be different.

Steve.