Persistent "atoms integrated more than once" WARNING with fix rigid

Hello,

I am facing a persistent “WARNING: One or more atoms are time integrated more than once” that I cannot solve. My simulation has two stages:

  1. A group of normal atoms (‘chalk’, type 2) falls onto a surface(blackboard).
  2. A rigid body (‘eraser’, type 3) starts moving to wipe the chalk.

The warning always appears at the beginning of stage 2 when the rigid body starts moving.
I have already tried many standard solutions, including:

  • Using a single fix nvt for all moving particles.
  • Using a single fix nve combined with fix langevin.
  • Running diagnostics that confirmed fix rigid works in isolation, and the two-stage unfix/refix logic also works in isolation with normal atoms.

My LAMMPS version is:(29 Aug 2024 - Update 2)
The source code that reproduces this warning is below. Could you please offer any insight?

Thank you for your help

code:
units lj
atom_style atomic
boundary p p f
region simbox block -40 40 -40 40 -7 30
create_box 3 simbox

lattice fcc 1.0
region blackboard_region block -15 25 -15 25 -1.0 1.0
create_atoms 1 region blackboard_region
group board type 1
mass 1 0.1

region chalk_region block -8 8 -8 8 7 8
create_atoms 2 random 20 12345 chalk_region
group chalk type 2
mass 2 1.0

region eraser_region block -5 15 -35 -15 2.0 5.0
create_atoms 3 region eraser_region
group eraser type 3
mass 3 1.0

group dynamic_particles type 2 3
displace_atoms board random 0.1 0.1 2.0 12345

2. Physics, Boundaries, and Fixes

pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0
pair_coeff 1 2 10.0 2.0
pair_coeff 2 2 1.0 1.0
pair_coeff 3 1 1.0 1.0
pair_coeff 3 2 10.0 1.0
pair_coeff 3 3 0.0 0.0

fix wall_zlo all wall/lj93 zlo -7.0 1.0 1.0 2.5
fix wall_zhi all wall/lj93 zhi 30.0 1.0 1.0 2.5

fix freeze_board board setforce 0.0 0.0 0.0

fix rigid_eraser eraser rigid single

fix integrator_main dynamic_particles nve
fix thermostat_main dynamic_particles langevin 0.1 0.1 0.1 12345

3. Stage 1: Chalk falls

fix freeze_eraser_temp eraser setforce 0.0 0.0 0.0
velocity chalk set 0.0 0.0 -4.0

timestep 0.005
dump 1 all xyz 10 dump_blackboard.xyz
run 1200

4. Stage 2: Eraser moves

unfix freeze_eraser_temp
velocity eraser set 0.0 3.0 0.0
run 2500

You have these two group definitions:

and you have these two time integration fixes:

Very obviously, the two groups overlap and thus the time integration fixes will generate the warning you see.

Thank you for quick reply.
I followed your advice and managed to create a script without the error.
However, with this new script, I have encountered a new, different problem.
I observe two behaviors depending on the eraser’s velocity:

  1. If I use velocity eraser set 0.0 1.0 0.0 rigid 3, the simulation runs without error, but the eraser does not seem to move at all.
  2. If I increase the y-velocity to 2.0 or higher, the simulation immediately crashes with the following error:
    ERROR on proc 0: Non-numeric atom coords - simulation unstable (src/OPENMP/domain_omp.cpp:58)Last command: run 100000
    job aborted: [ranks] message
    [0] application aborted aborting MPI_COMM_WORLD (comm=0x44000000), error 1, comm rank 0

Why is my simulation so unstable and sensitive to the eraser’s velocity?
I’m sorry for getting off the original topic, but could you please review my revised script and give me some advice on how to fix this error?

Here is the revised script:

1. Initialization

units lj
atom_style atomic
boundary p p f
region simbox block -40 40 -40 40 -7 30
create_box 3 simbox

lattice fcc 1.0
region blackboard block -15 25 -15 25 -1.0 1.0
create_atoms 1 region blackboard
group board type 1
mass 1 0.1

region chalk block -8 8 -8 8 7 8
create_atoms 2 random 20 12345 chalk
group chalk type 2
mass 2 1.0

region eraser block -5 15 -35 -15 5 7
create_atoms 3 region eraser
group eraser type 3
mass 3 1.0

displace_atoms board random 0.1 0.1 2.0 12345
velocity board set 0.0 0.0 0.0

2. Physics, Boundaries, and Fixes

pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0
pair_coeff 1 2 2.0 2.0
pair_coeff 2 2 1.0 1.0
pair_coeff 3 1 1.0 1.0
pair_coeff 3 2 2.0 1.0
pair_coeff 3 3 0.0 0.0

fix freeze1 board setforce 0.0 0.0 0.0
fix freeze2 eraser setforce 0.0 0.0 0.0
fix wall_zhi all wall/lj93 zhi 30.0 1.0 1.0 2.5
fix wall_zlo all wall/lj93 zlo -7.0 1.0 1.0 2.5
velocity chalk set 0.0 0.0 -4.0 units box

3. Stage 1: Chalk falls

fix 1 chalk nvt temp 0.1 0.1 0.1
timestep 0.0005
dump 1 all xyz 10 dump_blackboard.xyz
run 1200

4. Stage 2: Eraser moves

unfix freeze2
fix 3 eraser rigid/nvt single temp 0.1 0.1 0.1
velocity eraser set 0.0 1.0 0.0 rigid 3
run 10000

Thank you

Then please post this as a new topic.

I understand. I will post this as a new topic.