using model-loop-refine in Modeller9v1
Hi, I am new to modeller and I have trouble creating a homology model of a protein using model-loop-refine. I modified the model-loop-refine.py script as shown below and I got error messages. I would appreciate it if any one can give me any suggestion. Thanks.
from modeller import * from modeller.automodel import *
log.verbose() env = environ()
env.io.atom_files_directory = './:../atom_files'
# 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): return selection(self.residue_range('53:', '67:') (self.residue_range('89:', '96:') (self.residue_range('118:', '144:') (self.residue_range('166:', '177:') (self.residue_range('199:', '221:') (self.residue_range('243:', '254:'))
a = myloop(env, alnfile = 'seg.ali', # alignment filename knowns = '1u19A', # codes of the templates sequence = 'mrg1', # code of the target loop_assess_methods=assess.DOPE) # assess each loop with DOPE a.starting_model= 1 # index of the first model a.ending_model = 1 # index of the last model
a.loop.starting_model = 1 # First loop model a.loop.ending_model = 2 # Last loop model
a.make() # do modeling and loop refinement
This is the error: File "model-loop-refine.py", line 21 m = myloop(env, ^ SyntaxError: invalid syntax
jinlian05@lzu.cn wrote: > return selection(self.residue_range('53:', '67:') > (self.residue_range('89:', '96:') > (self.residue_range('118:', '144:') > (self.residue_range('166:', '177:') > (self.residue_range('199:', '221:') > (self.residue_range('243:', '254:'))
This is invalid Python. Compare with the example at http://salilab.org/modeller/9v1/manual/node32.html
It should be return selection(self.residue_range('53:', '67:'), self.residue_range('89:', '96:'), self.residue_range('118:', '144:'), self.residue_range('166:', '177:'), self.residue_range('199:', '221:'), self.residue_range('243:', '254:'))
i.e. you need commas between each call to residue_range, and (as Pankaj already pointed out) you had extraneous parentheses.
Ben Webb, Modeller Caretaker
participants (3)
-
Charlie Allerston
-
jinlian05@lzu.cn
-
Modeller Caretaker