Atom id or molecule id

I am simulating methane and hydrogen molecules mixture. I made separate groups for each molecules. say for example;
group all id <> atom-id
group methane molecule <> molecule-id-methane
group hydrogen molecule <> molecule-id-hydrogen
group mixture union <> methane hydrogen

Now using compute or fix command which group id need to mention, atom group id, all or union id mixture?

Impossible to say from remote without knowing more details.
But the choices for how to define the groups and which to use should be very obvious to you.
You just need to check out the documentation. That is what a documentation is for and we write documentation, so we don’t have to explain everything to everybody all the time over and over again. :wink:

Please note that group “all” is predefined and already covers all atoms, so adding to the group with another group command is a pointless exercise.