How to calculate 2D charge density and mass density of group of molecules?

GROMACS version: GROMACS - gmx mdrun, 2018.2
GROMACS modification: No
gmx densmap command work for 2D number density.
gmx densmap -f nvt.trr -s nvt.tpr -n index.ndx -aver y -bin 0.1 -dmin 0 -dmax 90 -unit nm-3 -o water.xpm
Is it possible to calculate charge density and mass density for 2D by using gmx densmap or other way.