statistically significant change in volume after restart from equilibrated simulation

Dear all,

I have noticed some strange behavior of the cell volume in NpT simulations after restarting: the cell volume of a simulation increases by 1-2% compared to a previously equilibrated simulation, when restarting from a binary restart file. This change is statistically significant, as far as I can tell, and reproducible over various systems. This increase in volume does NOT happen if the simulation is restarted using a data file written at the end of a previous simulation.

Please find attached my test case, 256 SPC/E water molecules (data.lmp), simulated with “fix npt” for 100 ps (equil.lmp) and then restarted using either a binary restart file (restart_restart.lmp) or the ascii data file (restart_data.lmp). For this example I know that the resulting density should be (very) close to 1 g/cm^3. This is reproduced well in the initial equilibration and by a run restarted using a data file written at the end of the equilibration. The density is about 1% lower when restarting from the corresponding binary restart file (and fluctuates around that value for over 10 ns).
The same thing happens when I do not use SHAKE to constrain the bonds and angles, and also happens with a Berendsen barostat.

I tried both the stable and unstable LAMMPS versions as of today, compiled with OpenMPI 1.10.2, gcc 4.8.5, and different compiler options (simplest and least aggressive case was just -O2).

I am honestly not sure if it is a bug in LAMMPS, or a ‘feature’ of my input script(s). I’d appreciate your help and input.

Thank you in advance and best regards,

Frank

P.S.: I observed the effect also in other, larger systems, where you can see the change in volume clearly with the naked eye. In the test example here it’s a bit more subtle, but I am convinced it’s there. I was yet unable to observe the same effect in a pure Lennard-Jones fluid.

restart_data.lmp (1.1 KB)

restart_restart.lmp (1.08 KB)

equil.lmp (1.18 KB)

data.lmp (93.9 KB)

Hi Frank. Looking at your script. I believe the pair_modify settings are not stored in the restart for pair style hybrid. So you might be losing the tail pressure/energy term when the rst file is read.

Tim

Hi Tim,

looks like you’re right. I changed location of the pair_modify to be after the read_restart and then it works fine. And yes, it looks like this is specific to pair_style hybrid. For regular pair_style the settings seem to be stored. That’s why it didn’t show in my Lennard-Jones fluid (LJF) tests, where I didn’t use pair_style hybrid. If I use pair_style hybrid for the LJF, the same effect on the density appears if the pair_modify comes before the read_restart.

So the general question is: is this the way it’s supposed to be or could/should this be fixed, i.e., that pair_modify settings are stored in the restart file also for pair_style hybrid?

Thanks a bunch,

Frank