[lammps-users] Lost atom error

Hi everyone,

I am simulating a rigid body (a cluster) consisting 32 particles (P) in 1315
solvent (S) particles. LJ units are used in the simulation. P-P interactions are
switched off because they belong to the same rigid body. S-S and P-S
interactions are Lennard Jones interactions. Simulation crashed at step 7833710
with error:

�ERROR: Lost atoms: original 1347 current 1346�

I tried to debug the problem by calculating the thermodynamic properties and
dumping the coordinates, image tags, velocities and forces at each step and
below is the summary of the detective work that I have done:

Here is the output from the log file:

Are all atoms in your rigid cluster in the same periodic box at the beginning
of the simulation? I encountered similar behavior a few months ago, when it
turned out that the restart2data tool messed up the information about what
image an atom is in. It was fixed on 12/08/06.

  -- Lutz

This looks like the following problem.

Image flags in LAMMPS are limited to +/- 512 box lengths. It
used to be +/- 500. I'm guessing you're using a slightly old version
of LAMMPS where it was 500. In the old version,
if an atom moves more than 500 box lengths in Z (which it
looks like one or your rigid body atoms is), then it will corrupt
the XY images, since all 3 flags are stored in one int. In the
current version Z would wrap around from -512 to 512 w/out corrupting
the XY.

Normally, this wouldn't be a problem, except maybe for post-processing
a trajectory, since the image flags don't affect dynamics.

But for rigid bodies they do. They are used to "unwrap" the body
across boundaries. So if one atom's image flag goes bad, then the
body willl unwrap into a body that is 1000 box lengths in size and you're
probably sunk.

Possible solutions: don't let your rigid body drift so many box lengths.
Fix recenter or fix spring could tether the body to the central box.

Or if that's not feasible, stop your simulation before it has drifted
500 box lengths, write a restart file, convert to a data file, and
reset (by hand)
the image flags for the rigid body to be 0 again.

Steve