[lammps-users] problem using rerun command (out of range error)

hi all,

I tried to compute aggregate/atom during rerun, in order to include all pairs in the neighbor list.

The dump file was obtained in the original run using “dump custom” command, including wrapped and unscaled coordinates, velocity, image flags. And in the rerun process, simulation box was first defined by reading a restart file, and the x,y,z,vx,vy,vz,ix,iy,iz information was read by rerun command.

However, the simulation stops after few snapshots and gets the error “Out of range atoms - cannot compute PPPM”. The potential energy and total energy results of the few rerun snapshots are consistent with the original results, while the temperature is lower and pressure is higher in the rerun.

Considering that the original run went well, I was wondering what is wrong with my rerun file?

The lammps version is 29 Oct 2020, and the rerun.in and rerun.log are attached.

Hope someone could help.

Best regards.


rerun.log (4.32 KB)

rerun.in (1.2 KB)

You see a difference in temperature and pressure since you are not using fix shake which reduces the number of degrees of freedom and also changes the virial.
But this is rather irrelevant, since you only want to do the compute aggregate/atom analysis, there is no need to recompute forces.
Also it is important to make any changes in global settings after reading the restart since many (including special_bonds) are stored within the restart file.

You could skip computing forces (and thus also the problematic pppm kspace style) entirely by switching the corresponding styles after reading the restart to their “zero” version or to “none”. E.e. with:

read_restart restart.npt.25000000
special_bonds lj/coul 1.0 1.0 1.0

pair_style zero 10.0
pair_coeff * *
bond_style zero
bond_coeff * 1.0
angle_style zero
angle_coeff * 120
dihedral_style zero
dihedral_coeff *
improper_style zero
improper_coeff *
kspace_style none

neighbor 2 bin

group wax type 1 2 4 5 9 12 13

thermo_style custom step density lx ly lz
thermo 10000

#compute aggregation
compute agg wax aggregate/atom 5.25
dump 0 wax custom 10000 agg.txt c_agg

#rerun command
rerun npt_pro.lammpstrj dump x y z vx vy vz ix iy iz box yes

hi axel, thanks a lot for your help.

  1. the “skip computing force” method does the trick, and the aggregate/atom computation went well.

  2. after adding fix shake as original run, the temperature and pressure shows consistency.

there’s one thing still puzzles me, why does the rerun simulation stop with out of range error?

------------------ Original ------------------

1 Like

hi axel, thanks a lot for your help.


there’s one thing still puzzles me, why does the rerun simulation stop with out of range error?

for efficiency reasons atoms are strictly within the box boundaries only on timesteps where the neighbor lists are updated.
if those steps do not coincide with the steps where you are adding frames to the dump file, atoms may be outside the box and if they are too far away, pppm will complain.
for normal MD this usually is not a problem, but a re-run is a different situation, since the conformation can change quite a bit between individual steps.

you may need to force more frequent neighborlist updates or reduce the neighborlist skin size.

1 Like

thanks a lot, axel!

this really helps, it’s clear now.


------------------ Original ------------------