Hi Ben
First of all I would like to apologise for a so basic question. However, I am not a pyton expert and do not have another one to ask here.
I run the loop.py scritp to generate 200 models.
However, my attempt to rank the models by DOPE score fails.
I am using the script below:
############################################
from modeller import *
from modeller.automodel import *
log.verbose()
env = environ()
env.io.atom_files_directory = ['.', '../atom_files']
# Read in HETATM records from template PDBs
env.io.hetatm = True
# Create a new class based on 'loopmodel' so that we can redefine
# select_loop_atoms
class MyLoop(loopmodel):
# This routine picks the residues to be refined by loop modeling
def select_loop_atoms(self):
# Two residue ranges (both will be refined simultaneously)
return selection(self.residue_range('23:A', '25:A'),
self.residue_range('73:A', '75:A'))
m = MyLoop(env, inimodel='Modeloutput23.pdb', sequence='Target1', loop_assess_methods=(assess.DOPE, assess.GA341))
m.loop.starting_model= 1 # index of the first loop model
m.loop.ending_model = 200 # index of the last loop model
m.loop.md_level = refine.very_fast # loop refinement method
m.make()
# Get a list of all successfully built models from a.outputs
ok_models = filter(lambda x: x['failure'] is None, a.outputs)
# Rank the models by DOPE score
key = 'DOPE score'
ok_models.sort(lambda a,b: cmp(a[key], b[key]))
# Get top model
m = ok_models[0]
print "Top model 1: %s (DOPE score %.3f)" % (m['name'], m[key])
m = ok_models[1]
print "Top model 2: %s (DOPE score %.3f)" % (m['name'], m[key])
m = ok_models[2]
print "Top model 3: %s (DOPE score %.3f)" % (m['name'], m[key])
m = ok_models[3]
print "Top model 4: %s (DOPE score %.3f)" % (m['name'], m[key])
m = ok_models[4]
print "Top model 5: %s (DOPE score %.3f)" % (m['name'], m[key])
##############################
I realise that "loop assess methods" could not be the same sintax for "model assess methods", but I do not know how to correct it in the script
Could you give me any help?
Thanks in advance,
Flavio