Why getting error while using delete atom command in lammps?

Hi there,

I am using delete-atoms command to delete some molecules in my data file. But I get the error “Illegal delete atoms command”. Can anybody help debug my input file?
Also, the version of LAMMPS that I am using is 2017.

echo               both
units              real
dimension          3
boundary           p p p
atom_style         full

restart 200       restart

# Pair_Coefficient ..............................................................................................................................................


pair_style    	    lj/class2/coul/long 10 15
dielectric          1.0
bond_style          class2
angle_style         class2
dihedral_style      class2
improper_style      class2
read_data          System.data
#read_restart          System.data
#info coeffs out log

#...................................................................................................................................................................................

kspace_style        pppm 0.0001


neighbor           2  bin
neigh_modify       every 1 delay 0 check yes


# group of hydrogen bonding

group S          type 5
group Os         type 6
group Ow         type 8
group H          type 7


#graphene group
group graphene id 1:6400

#Hydronium group
group H3O+ molecule <> 63 683

#Water group
group H2O molecule <> 684 1919

#Delete Hydronium molecules
delete_atoms random count 11 no H3O+ NULL 482793

#Delete Water molecules
delete_atoms random count 16 no H2O NULL 482793



# Warite data
write_data Composite_3Lamb.data

Any help is highly appreciated,

Thanks,

That is likely the reason. Have you tried a more recent version?

Dear @akohlmey, Thank you for your response.
No! Unfortunately, I do not have access to the newer version. I will try to upgrade my current one and try it again.

For testing, you can download a pre-compiled version from github: Releases · lammps/lammps · GitHub

@akohlmey Thank you. I will try that. In the meantime, could you please let me know if the code needs to be modified?

You can figure that out easily by yourself. Just compare the command to the documentation. For the old version of LAMMPS you have to compare against the documentation of that specific version. The online version always represents the latest release.