I sometimes need to remove atoms from LAMMPS datafiles by hand, removing each row that corresponds to an atomID I want to remove, then decrementing the total atom count. This causes the atom IDs to no longer be contiguous in the file.
This is valid in the LAMMPS datafile specification but it causes issues for certain commands, for instance the velocity command:
velocity all create 0.01 4928459 dist gaussian ERROR: Atom IDs must be consecutive for velocity create loop all (src/velocity.cpp:270)
Being okay with atomIDs being remapped, is there a quick way to make the atom IDs of a lammps datafile contiguous?
lammpsmanual to create group $\endgroup$