Deleting atoms can be done by using any scripting language that manipulates the entries in the data file. If you want to delete the atom (when you don’t want to use the delete_atoms command in lammps), remember to delete the bond, angle and dihedral for which the atom is a part of i.e., delete those entries in the bond,angle, dihedral sections of the data file.
Thanks
Arun