Bond length in Avogadro using program

Dear All,

I am new to Avogadro and I would like to know if there is any code/program to calculate the bond distances in molecule.
Say in benzene, I would like to calculate the bond distance between all six C-C bonds. I have so many much bigger molecules for which I would like to calculate the bond distance between specific atoms. Kindly let me know. Thank you.

Environment Information

Avogadro version:1.2.0 and 1.91.0
Operating system and version:
Windows 10

In both versions, you can use the “measure tool” and click on the atoms of interest:

In Avogadro 1.2, you can also go to a table view: View => Properties => Bond Properties

This will bring up a table with all the bond distances.

1 Like

Dear Prof. Geoff Hutchison

Thank you very much for your kind response. I was able to calculate the bond length the technique suggested by you.

I am just wondering if there is a way to calculate the bond length of the molecule from the terminal. I have several molecules for which I would like to calculate the bond length (and also between many different atoms). I also have MD trajectory , again for which I would like to measure the bond length. So, it would be useful if there is a command or something to use to measure the bond length.

Please let me know if I am not clear.

Thank you

If this is a common task, I would highly suggest writing a script, e.g., in Python.

For example, for MD trajectories, there’s the MDTraj project:
https://mdtraj.org/1.9.4/examples/atom-selection.html

print('x: %s\ty: %s\tz: %s' % tuple(traj.xyz[frame_idx, atom_idx,:]))

e.g.

x1, y1, z1 = traj.xyz[frame_idx, atom1,:]
x2, y2, z2 = traj.xyz[frame_idx, atom2,:]
distance = np.sqrt( (x1 - x2)**2 + (y1 - y2)**2 + (z1 - z2)**2) )
# also np.norm, etc.

Dear Sir,

Thank you for your kind response. Thank you for sharing the valuable feedback. I will look into the script.

Thanks