Hi everybody, 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 follows:
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 (.py) script? 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) print di But this actually does not work. Any advise? Best regards Yusuf Tanrikulu -- Yusuf Tanrikulu Bioinformatics Diploma Student Department of Biosciences Johann Wolfgang Goethe-University Marie-Curie-Str. 11 D-60439 Frankfurt, Germany Email: tanri...@stud.uni-frankfurt.de