Calculation of density for all components of simulated system, separately

GROMACS version: 2021

Hi. My simulated system contains 3 components (A, B, C). I need to time evolution of density for each component in 3 isolated Density vs Time plots. How to do that? Which of gmx energy and gmx density is suitable for me?

Best,
Lilian

You mean the scalar density? That would simply be the total density of the system, as produced by gmx energy, multiplied by the mass fraction of each component.