# Density plot of ionic liquid

**URL:** <https://gromacs.bioexcel.eu/t/density-plot-of-ionic-liquid/12588>\
**Category:** User discussions\
**Created:** [August 31, 2025, 3:24am UTC](https://gromacs.bioexcel.eu/t/density-plot-of-ionic-liquid/12588 "2025-08-31T03:24:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahamatolla](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@Rahamatolla](https://gromacs.bioexcel.eu/u/Rahamatolla)\
**Post date:** [August 31, 2025, 3:24am UTC](https://gromacs.bioexcel.eu/t/density-plot-of-ionic-liquid/12588/1 "2025-08-31T03:24:38Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Hi, i am working on ioniq liquid simulation with graphene double layer. I want to plot density pofile of BMIM and PF6 seperately when apply electric field.do you provide a command to generate density profile?

---

<div class="post-metadata">

**Author:** ![pjohansson](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pjohansson/32/316_2.png) [@pjohansson](https://gromacs.bioexcel.eu/u/pjohansson)\
**Post date:** [September 3, 2025, 8:59am UTC](https://gromacs.bioexcel.eu/t/density-plot-of-ionic-liquid/12588/2 "2025-09-03T08:59:51Z")

</div>

Hi,

Use `gmx density` with the flag `-ng 2`. The program will then ask you for two index group to plot separately. You’ll also have to supply your index file that specifies the groups with `-n <yourindexfile>`.

Regards,  
Petter
