COM of micelle

GROMACS version: 2021.3
GROMACS modification: No

I have run a simulation looking into the micelle formation by a surfactant using 10-60 molecules in a bix. I would like to study the distribution of different atoms from the micelle core.

Looking into papers, I found that most groups have studied distance of different atoms of surfactant from COM of micelle. I assume “gmx rdf” will be used here. However, I could not figure out how to do that? The reference group can be defined with an index file. So, should I just take all molecules in the micelle as my selection group and Gromacs will itself calculate COM. Or, is there any other way?