How to compute properties in a spherical region

GROMACS version: 2021
GROMACS modification: No

I would like to compute density fluctuations and mean square displacements within a spherical region around an atom. But I do not know if there is a way to define a region with the simulation box to compute these properties executing the current computation functions.