Measuring Change in Distance Between Molecules Over Time

GROMACS version: 5.0.7
GROMACS modification: No

I am trying to track the change in distance between an organic complex and a sodium ion throughout an MD production (NPT) run. Is there a gromacs utility that can track the change in distance between two molecule’s center of mass throughout a simulation? Can gmx-distance do this?

It can.

Do you know how to specifically do this with gmx-distance?

gmx distance -select "com of group 'X' plus com of group 'Y'"