How to measure distance between two groups in an MD Simulations?

I’ve run a memberane-protein complex simulations.
POPC(membrane) is embedded with ergosterol.
I have to check the distance between protein and ergosterol.
How do I do this?

Hi,
it depends which distance you are interested in.
Maybe this discuss What is the difference between gmx distance, gmx mindist and gmx pairdist? could help to identify the tool you want.
\Alessandra