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

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