Intramolecule atomic distance using gmx distance

Hi,
I would like to calculate distance between two atoms in a molecule i.e intramolecular atomic distance from the trajectory file. Could anyone suggest the procedure?
I have tried the command gmx distance -f <.trr> -s <.gro> -n <.index> -select -oav <.xvg> but this command probably give either the intermoleculer distance.
Thanks in advance

gmx distance will compute whatever distance you specify when using -select. If you give it two atoms that are in the same molecule, it will compute exactly the distance you specify.

Thank you Dr. Justin @jalemkul for the clarification. Just a little query that suppose I have 100 molecules of A in the trajectory file and I would like to calculate the specific distance between two atoms for one molecule out of those 100. Will that be the same procedure as you suggested?
Thanks

If you provide a properly formatted selection that refers to two atoms of a given molecule, you will get that distance.

1 Like

Okay noted.Thank you so much @jalemkul Dr Justin.

Dear sir,
i have a micelle composed of 40 molecules A, and i have a drug molecule B. i wang to caculate the rdf function between the center of mass (com) of the micelle and drug B, but i can not get a proper result.( the drug was on the surface of the miclle ,but the rdf was not right.

how should i do next .
thank you in advance.

Hi! Just FYI, you’re more likely to have your question answered if you post it as a separate topic, rather than a comment to an old discussion.