As using the "write_data" command, the number of atoms in the Group changes?

Dear everyone, I am using LAMMPS version 2Aug2023, and I found that when just adding the

write_data command, the number of atoms in the group unexpectedly changed (as follows). Is this a bug? The files has been attached.

log1.lammps (6.5 KB)
log2.lammps (7.0 KB)
OctaMMT.data (189.6 KB)
Test.in (1.7 KB)

No. The write_data command forces a re-initialization and that also includes applying PBCs.
For efficiency reasons LAMMPS doesn’t enforce PBCs in every step. By default, atoms may move as far as half the skin distance outside the box before re-neighboring is triggered and then atoms are re-assigned to their subdomains.

1 Like

Thank you for your clarification!