
Hi JD, I assume we're talking about Python here since Chimera commands don't return values. So, in Python if your atoms are in variables 'a1' and 'a2' then the distance between them is: chimera.distance(a1.xformCoord(), a2.xformCoord()) or alternatively: a1.xformCoord().distance(a2.xformCoord()) If the atoms are in the same molecule, you can get away with using .coord() instead of .xformCoord() since rotations/translations won't affect the inter-atom distance in that case. --Eric On Jul 23, 2008, at 9:21 AM, Jean Didier Pie Marechal wrote:
Dear all,
a small question. I know how to calculate the distance between two atoms calling the "distance" command and I generally use it embedded in the scripts I write. However, this time, I'd like to have access through my script only to the values of the distances (nothing related to the display) in order to stock them. I thought I would find my way through by using the StructMeasure module, but I am not able to do so. How could I just have a return of the distances between two atoms in the shell?
Thanks a lot,
JD