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

**URL:** <https://gromacs.bioexcel.eu/t/how-to-calculate-2d-charge-density-and-mass-density-of-group-of-molecules/10006>\
**Category:** User discussions\
**Created:** [August 27, 2024, 11:23am UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-2d-charge-density-and-mass-density-of-group-of-molecules/10006 "2024-08-27T11:23:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sana](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/sana/32/1217_2.png) [@sana](https://gromacs.bioexcel.eu/u/sana)\
**Post date:** [August 27, 2024, 11:23am UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-2d-charge-density-and-mass-density-of-group-of-molecules/10006/1 "2024-08-27T11:23:43Z")

</div>

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.
