How to understand "group-ID" in "fix ID group-ID gcmc N X M type seed T mu displace"

Dear all
hi, the lammps users .I want to ask you a question about gcmc command.

fix ID group-ID gcmc N X M type seed T mu displace
fix 2 gas gcmc 10 1000 1000 2 29494 298.0 -0.5 0.01

For the fix, where is the area to simulate exchanging and moving? If it is my box by default, what is “group-ID” in “fix gcmc”? If it is understood as the part to be fixed, but I have only done “group” before, and there is no “gas” in the simulated box. But if it is understood as the inserted particle, what is the type(2) behind it
I haven’t thought clearly for a long time and urgently need a friend to show someone how to get onto the right path。
With regards!

Hi,
group-ID refers to the existing group on which the fix applies, here gas is just the name of the group. If you have no group, just use ‘all’ instead.
Type 2 refers to the type of atom that will be inserted/deleted by the fix gcmc.
Simon

ok,thank you.I want to simulate graphene adsorbing gas and my code is just as follows

group gas type 2
fix 2 gas gcmc 10 1000 1000 2 29494 298.0 -0.5 0.01

When executing code to “fix gcmc”,the group “gas”exits,but there is no atom in “gas”。In “fix
gcmc”,the atom fixed(inserted and deleted) is not the type(2) actually?Then ,how does "fix gcmc"apply on “gas” ?Why "group-ID"is not the group “graphene”

This is all explained in the documentation.

What type of atom is inserted or removed is determined in the fix gcmc command line.
It also says that atoms are added/removed from the group all and the group-ID of the fix.

That you have defined the group gas through type 2 selection is completely irrelevant here. It is an empty group and how the group was defined is not recorded anywhere.

Of course you could also use the group “graphene” as the fix group, but it would make little sense to add your adsorbed gas atoms to it, or does it?

In general, please keep in mind that LAMMPS is a computer program and thus blindly follows the rules that have been programmed into it. You cannot expect it to follow reason. It is your job as the user to translate your intentions into instructions that LAMMPS will execute accordingly.