Wednesday, 11 September 2013

Finding Interfaces

Finding Interfaces

Supposing i have a dictionary that I have created using defaultdict like
this one(many hundred points long):
L [(32.992, 22.861, 29.486, 'TYR'), (32.613, 26.653, 29.569, 'VAL'),
(30.029, 28.873, 27.872, 'LEU')
A [(1.719, -25.217, 8.694, 'PRO'), (2.934, -21.997, 7.084, 'SER'), (5.35,
-19.779, 8.986, 'VAL')
H [(-0.511, 19.577, 27.422, 'GLU'), (2.336, 18.416, 29.649, 'VAL'), (2.65,
19.35, 33.322, 'GLN')
I then want to loop over every value in each key and check the distance
from that value to every other residue under the other keys. I know how to
check the distance using a simple formula, but I am having problems
getting the loop to work properly. Ideally it would check each point in L
against each point in A and H and then move on to checking each_value in A
against L and H etc...
I have tried simple comprehensions but I always get only one chain to
check one other chain before it finishes. Any help is appreciated.

No comments:

Post a Comment