"Rigid body atoms missing" at very large steps

Dear Lammps users and developers,
I am now doing a simulation of Nitrogen gas in equilibrium, here is my input script :
################################input script#########################
units metal
atom_style molecular

processors 1 24 1
boundary p p p
read_data N2.dat
replicate 1 120 1

mass 1 14.007
pair_style lj/cut 10
pair_coeff * * 0.004067 3.17

timestep 0.005
neighbor 5 bin
neigh_modify every 1 delay 0 check no cluster yes

thermo 10000
thermo_style custom step cpu atoms temp press etotal

group N2 type == 1
fix 1 N2 rigid/small molecule
velocity N2 create 297.3 12345 dist gaussian # temperature may not be 297.3K
run 1
velocity N2 scale 297.3 # now it should be
unfix 1
fix 2 N2 rigid/nve/small molecule

dump 1 N2 custom 80 N2_atom.lammpstrj id mol proc x y z vx vy vz fx fy fz xsu ysu zsu ix iy iz
run 3500000
##################################### N2.dat ########################
1 atom types
0.0 36.9895 xlo xhi
0.0 10.0 ylo yhi
0.0 36.9895 zlo zhi

Atoms # molecular

1 1 1 15.000 5.5485 15.000
2 1 1 15.000 4.4515 15.000

The email attachments are my simulation input script and simulation results.

Qihan Ma <[email protected]…24…> 于2020年8月8日周六 下午6:31写道:

N2.dat (236 Bytes)

slurm-3811158.out (34.1 KB)

in.N2RBSnew (1.21 KB)

Dear Lammps users and developers,
I am now doing a simulation of Nitrogen gas in equilibrium, here is my input script :

[…]

In my simulation, I first use “velocity” command to set correct temperature (this method is discussed in the “Restrictions” part of the “fix rigid command”), then I use “fix rigid/nve/small” to do the following simulation. The test case above operates well at the beginning, but at a very large step, the simulation will stop due to the error:
ERROR on proc 6: Rigid body atoms 42 41 missing on proc 6 at step 3497083 (…/fix_rigid_small.cpp:3331)
Or in some test cases, the error may be:
ERROR: Lost atoms: original %% current %%
By Observing the trajectory of the losing particle, I think that the error happens at the boundary of the simulation box. But I can’t find any abnormal situation before the error happens. The Lammps version is lammps-3Mar20.
By reading Lammps user mannual and searching the similar questions in the maillist, I tried to fix the problem by using smaller timesteps(as low as 0.5fs) and bigger communication cutoff, but the error still existed. And It seems that the shape of the box has nothing to do with the error.
So now I am very comfused about the problem, and I would be very grateful if anyone could give me some suggestions about the problem.

due to simulating a gas, you have very mobile atoms. that means that your atoms may pass through the simulation cell frequently due to periodic boundaries.
just check your trajectory file, where you are dumping the image flags. I would suspect the crashes happen, when you overflow those flags.
with the default compilation settings, you have only 10 bits to store those flags, that means, the value may be between -511 and 512 until it wraps around.
the cell size/shape will affect this, since your cell is very stretched, so there is a much larger chance that the image flags will wrap around in those directions.

the issue can be avoided by compiling LAMMPS with the -DLAMMPS_BIGBIG setting, which extends the storage for image flags to 21 bits, i.e. its value can go from -1048575 to 1048576 before it wraps around.

axel.

Thank you very much for your suggestion !

Axel Kohlmeyer <[email protected]> 于2020年8月10日周一 上午1:55写道: