(no subject)

Dear Lammps users,
I have a question regarding Delete_atoms command in LAMMPS and I appreciate any help in advance

Firstly, I create 2 atom types in LAMMPS by using create_atoms command,
And, I give two different mass to each atom type by using mass command,
Then, after I relax the system, I want to remove one type of atoms,
So, I use Delete_atoms command to delete the specified group atoms
$ delete_atoms group 2
(group 2 contain the whole 2nd type atoms).

At last, I use write_data to output the system data.
But, when I check the output data file,
It still contains 2 kinds of atom, and mass also has 2 kinds types.
But, the atoms were deleted by the delete_atoms command.

so is that any bug of LAMMPS,
or can I use any command remove the atom type and mass when I delete atoms?

No, this is not a bug. This is how it is supposed to be. You set the total number of (possible) atom types (and their associated information) when you create the simulation box. This information is then locked in and cannot be changed. It is independent from what atom types are actually present.