problem with creating an empty group

Dear LAMMPS users,

I want to create an empty group, and then use fix deposit to add atoms into this group. So I use the command “group incident empty”. However, it gives me an error message immediately after this command says,
ERROR: Illegal group command (…/group.cpp:521)

Thank you so much for your help!



Based on your command structure, it seems there is nothing wrong (according to the latest LAMMPS version manual).

But there is not enough information to find out the reason for the error message.
Please always include the LAMMPS version that you’re using. It often provides crucial information.

Hi Imanuel,

Thank you for your reply. I’m using the version Aug 11 2017. Maybe this version doesn’t work with this command?

In my script, I only have several lines to initialize simulation as a test. I also attach them here. Thank you so much for your help!

units metal
dimension 3
boundary p p f
atom_style full

#------------------create simulation box-------------------#
lattice diamond 5.6577
region whole block 0 5.656854249 0 5.656854249 0 6 units lattice
create_box 3 whole

#------------------structure and potential set up---------------#
read_dump …/after_deposit_200.custom 2020000 x y z vx vy vz label type type add yes format native
mass 1 72.64
mass 2 35.45
mass 3 39.948
set type 1 charge 0

set type 2 charge 0
set type 3 charge 0

pair_style hybrid tersoff zbl 3.0 4.0
pair_coeff * * tersoff …/…/…/SiCl_sz.tersoff Si Cl NULL
pair_coeff 1 3 zbl 32 18
pair_coeff 2 3 zbl 17 18
pair_coeff 3 3 zbl 18 18
#define parameters for LJ interaction here

#------------------define bulk and surface atoms----------------#
region bulk block INF INF INF INF 0 39.57 units box
region surface block INF INF INF INF 39.577 54 units box
region vacuum block 0 64 0 64 60 90 units box
group batom region bulk

group satom region surface
group Ar type 3
group Cl type 2
group incident empty
compute 1 satom temp
compute 2 Cl temp

print “all done!”

Hi Imanuel,

Thank you for your reply. I'm using the version Aug 11 2017. Maybe this
version doesn't work with this command?

​yes, it is too old. however, a simple way to create an empty group would

group empty type 9999​


Dear Axel,

Thank you so much for this information!