Hi Leigh -
How are you getting the coordinates? This works for me:
```
import math
# Show more digits for the distance label
set label_distance_digits, 10
# Make an alanine residue
fab A, ala
# Get coordinates from 2 atoms
o = cmd.get_coords("/ala///1/O")[0]
h = cmd.get_coords("/ala///1/H")[
yep!
On Thu, Oct 12, 2017 at 2:07 PM, Roger Rowlett wrote:
> You are using d = sqrt(dx^2 + dy^2 + dz^2), right? (Where dx = x2 - x1,
> etc.)
>
> ___
> Roger S. Rowlett
> Gordon & Dorothy Kline Professor
> Department of Chemistry
> Colgate University
> 13 Oak D
You are using d = sqrt(dx^2 + dy^2 + dz^2), right? (Where dx = x2 - x1,
etc.)
___
Roger S. Rowlett
Gordon & Dorothy Kline Professor
Department of Chemistry
Colgate University
13 Oak Drive
Hamilton, NY 13346
tel: (315)-228-7245
ofc: (315)-228-7395
fax: (315)-2
Anyone know how pymol calculates distance between two atoms?
I wrote a python script that calculates distance using the distance formula
and the xyz coordinates in the pdb, and it differs from the wizard by ~40%.
Any ideas on what might be going on would be helpdul
Thanks!
Leigh
-