Hi,

I don't see how you can get rid of this loop actually.

The thing that occurs to me is that you are loading structures, but not deleting them!

So, at the other end of the "for i in KeepStruc" loop, you should have a "cmd.delete(i)".

Other than that, you don't need to be opening the files "out" or "full" inside the loop, or re-reading the data from "amb".

Hth.

gilleain torrance

On 25 Oct 2005, at 10:45, andrea spitaleri wrote:

Hi again, reading my post I found the bottleneck....shame on me :)

here it is:
.......
if (atomlig == "*"):
           ligand = cmd.select("ligand","segi B and "+i)
           atoms_lig = cmd.get_model('ligand')
           for atomsL in atoms_lig.atom:
               t = cmd.select("t","name "+atomsL.name)
               di = cmd.distance("di","t","p")
.........
I am running twice the same loop. removing "for atomsL in atoms_lig.atom" loop it goes faster. The problem is that now I am getting the "di" value as average over all atoms of the ligand. How I can get the different values in order to find the minimum distance between the ligand and the selected residue ??

Thanks in advance

andrea


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users



Reply via email to