Distance between two benzene centroids vs time plot?

GROMACS version:
GROMACS modification: Yes/No
Here post your question

Hello Everyone,

I want to plot “the distance between a pair of benzene (only C-atoms) centroids vs time” for the MD run.
I found that gmx traj can be used to extract the centre of mass of these benzene rings using index. The system has a total of 12 pairs of such benzene rings. So, extracting 24 centroids separately and calculating distances between them followed by plotting them seems to be very tedious.

Is there any way to use gmx to extract all centroids in one go (as gmx angle, pairdist, etc.)? Or is there any other script to extract such kind of data?

Thank you for your time.

Regards
Ranajit

Hi,
Maybe the options -refgrouping and -selgrouping in gmx pairdist ( gmx pairdist — GROMACS 2022.1 documentation) can help you, or similar options in gmx distance (it depends which type of distance you are interested in).
You can also have a look at the tag gmx-distance for similar posts and solution
\Alessandra

Hi @alevilla,
Thank you for your comment.
I will try this way. If I face any error I will get back here again.
Regards
Ranajit