[lammps-users] "Diffusion" calculation

Hi. I am trying to calculate the nonaffine part of displacement of atoms in a deformed cell (similar to calculating mean-squared displacement, but with affine part of deformation subtracted out), after the fact, using LAMMPS position dump files. I put in some periodic boundary conditions to account for atoms crossing box boundaries, and surprisingly they had no effect on the result! Then I checked and found that in the position dump files (after the first frame), atoms are not mapped back into the cell (as I understand it, this means that the coordinates of rather than "ghost" atoms are dumped?). This is very fortunate because it makes my calculation a lot easier - thanks, Steve, for having the foresight to do the dumps this way.

My question is, is there any point where the atomic coordinates ARE mapped back into the simulation cell? For example, are they mapped back in in the restart files? I would want to know this in order to take account of it, for example in runs that were aborted and then continued from a restart file.


Dump files do have atoms mapped back into the periodic box.
However, that remapping only happens on re-neighboring timesteps,
so its possible on a dump step, that atoms will be slightly outside
the box.

However, there is a set of image flags that can be dumped for
each atom (see dump_modify or dump custom) that will tell you
how many times the atom has crossed box boundaries.

I.e. x + imagex * boxlength = unmapped coordinate

So you can always tell where an atom would be if PBC were
not in place.