Shake Error with Ewald but not PPPM

Hello,

I wanted to reach out because I have come across an error that I have been struggling to track down. I am trying to simulate a box of SPC/E water molecules (input file attached) in the NPT ensemble. With recent LAMMPS versions (16Mar18, 22Aug2018) when I simulate it using kspace_style pppm 1e-4 the simulation runs fine (doesn’t crash) and produces reasonable results. When I run the same input file using kspace_style ewald 1e-4 the simulation crashes with the following error:

ERROR on proc 8: Shake atoms 595 596 597 missing on proc 8 at step 28218 (…/fix_shake.cpp:535)

From reading the mailing list posts on this error - I know it usually is indicative of bad dynamics somewhere in the simulation so I spent a lot of time trying to see if it was the accuracy parameter, the initial configuration ( I tried both starting with a minimization and with nve/limit ) but in all cases as soon as I switched to NPT the trajectory would run a number of steps before crashing with the same shake error. This might be naive - but I was wondering if it could be a bug was somehow introduced with how shake atoms are handled over processor domains in NPT somehow? It seems strange to me that this bug would affect ewald but not pppm.

That being said, the next thing I tried was to pin down whether it was a LAMMPS version problem. So I checked it across the last three version we had installed on our cluster (the two listed above which had the same shake error, and then the 11Aug17 version). When I run the same set of simulations on the 11Aug17 version of LAMMPS this crash does not happen and the results reasonably match the results I get using pppm. ​

Is it a bug? Do you know what causes it? Is it something that I am doing wrong? I have included my input file and my data file for your perusal. I know that pppm is much faster than ewald; however, we are trying to reproduce the simulation procedure of a paper in the literature and so we are trying to calculate electrostatics as closely as possible to the same way they did.

Thanks so much for your help,

Zeke

data.water (110 KB)

in.water.ewald (704 Bytes)

If it’s bad dynamics on step 28000, then it could just be random
whether it happens with Ewald vs PPPM or with what version
of LAMMPS. If you ran long enough it could happen with any
of them. Are you checking to reneighbor every step? If not,
if an atom moves too far then you can get that error.

Steve