I am new to PyMol and scripting with Python, and I would be very grateful if
anybody can help me.
After loading serveral superposed molecules, I made a selection of some atoms as
from pymol import cmd
cmd.select('sel01', ('elem c and not (neighbor elem n+o)')
cmd.color ('green', 'sel01')
cmd.show ('spheres', 'sel01)
Now, I want to measure the distance from an atom in this selection to all other
atoms in sel01 and sum it up. How am I supposed to do this in my Python-Pymol
I know that it must be something like:
atoms = cmd.index('sel01')
di = 0
for i in atoms
for j in atoms
di += cmd.distance(i,j)
But this actually does not work. Any advise?
Bioinformatics Diploma Student
Department of Biosciences
Johann Wolfgang Goethe-University
D-60439 Frankfurt, Germany
Get latest updates about Open Source Projects, Conferences and News.