After restarting the simulation, strange problems occur (Lost atoms)

Hi Lammps users
Lost atoms problem occur when I restarted my simulation.
My system has two layers wall atoms at bottom and top separately, and water atoms between wall. The boundary conditions are " p p f". The wall atoms are fixed, but the top wall and bottom wall are moved at constant velocity by following command.

velocity bot_wall set -0.000625 0.0 0.0 units box
velocity top_wall set 0.000625 0.0 0.0 units box
fix still wall setforce 0.0 0.0 0.0

I did the simulation for my system for 4 ns ,after 4 ns, I restart my simulation but I got lost atoms warning. I know this probably because bad initial configuration, too large timesteps or bad potential parameters. Then I start my simulation from 3 ns, the same problem occurred again, which I think can exclude the aforementioned reasons. This because I can run my simulation with same timesteps , initial configuration and potential parameters from 0 to 4 ns without restarting, but I can not run it from 3 to 4 ns with restarting my simulation.

In the restart input, I changed the aforementioned commands to

velocity bot_wall set NULL NULL NULL units box
velocity top_wall set NULL NULL NULL units box
fix still wall setforce 0.0 NULL NULL
So I think there must be wrong in the changed commands. Therefore, I changed it back. As it is expected, I can restart the simulation without lost atoms error. But as mentioned in this post
The restart file does store the atom velocity, therefore my simulation supposes to run without error with the NULL for the velocity.

So what is wrong?

There is also another simulation I did. The setting is almost same as the former one except one of the layer is flexible and another one is fixed (thus there is one fixed layer and flexible layer at bottom and top). I can restart simulation either with specify the velocity or without specifying velocity, but I found that specifying velocity again in restart input has impact on the results due to the restart file store the velocity.

Should I specify the velocity for the wall in restart input?

Fan Li

This comand:
fix still wall setforce 0.0 0.0 0.0
and this
fix still wall setforce 0.0 NULL NULL

are different. They both act every timestep. So if

you want the yz forces to be zero every step, you

must use the first version. If you use the 2nd version

in your restarted simulations, the yz forces will become

(over many steps) whatever they want to be, and the

dynamics of those atoms will thus be different.