ADL: Problem with "vina_screen_get_top.py" ...

Abdessamad Ababou aa673 at cam.ac.uk
Mon Oct 31 02:15:56 PDT 2011


Dear Autodockers,

 

I'm doing virtual screening using Autodock-vina on about 200,000 small
molecules (sm). At the start of the run (few 1000 sm) I used the below
python script (I copy from the vina program webpage) and it worked. But now
reaching 40,000 sm the script doesn't work anymore and I got this errors
message:

 

File "vina_screen_get_top.py", line 23, in ?

   doit(int(sys.argv[1]))

File "vina_screen_get_top.py", line 13, in doit

   Line = lines[1]

IndexError: list index out of range

 

Any help from you guys will be very much appreciated as I'm stuck to analyse
my results ... Many thanks for your time and help.

 

Best regards,

 

-Samad

 

==========================================

#! /usr/bin/env python

 

import sys

import glob

 

def doit(n):

    file_names = glob.glob('*.pdbqt')

    everything = []

    for file_name in file_names:

        file = open(file_name)

        lines = file.readlines()

        file.close()

        line = lines[1]

        result = float(line.split(':')[1].split()[0])

        everything.append([result, file_name])

    everything.sort(lambda x,y: cmp(x[0], y[0]))

    part = everything[:n]

    for p in part:

        print p[1],

    print

 

if __name__ == '__main__':

    doit(int(sys.argv[1]))

=========================

 



More information about the autodock mailing list