using model-addrsr in modeller9v1
Hi, I am new to modeller and I have trouble creating a homology model of a protein using model-addrsr. By predicting secondary structure, between residues "305-318" is alpha-helix. I modified the model-addrsr.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 * # Load the automodel class
log.verbose() env = environ()
# directories for input atom files env.io.atom_files_directory = './:../atom_files'
class mymodel(automodel): def special_restraints(self, aln): rsr = self.restraints at = self.atoms rsr.add(secondary_structure.alpha(self.residue_range('305:', '318:'))) a = mymodel(env, alnfile = 'seg.ali', # alignment filename knowns = '1u19A', # codes of the templates sequence = 'mrg1') # code of the target a.starting_model= 1 # index of the first model a.ending_model = 1 # index of the last model # (determines how many models to calculate) a.make() # do homology modeling
The error: File "modelrsr.py", line 14 rsr.add(secondary_structure.alpha(self.residue_range('305:', '318:'))) ^ IndentationError: unindent does not match any outer indentation level
The .log file:
MODELLER 9v1, 2007/01/19, r4822
PROTEIN STRUCTURE MODELLING BY SATISFACTION OF SPATIAL RESTRAINTS
Copyright(c) 1989-2007 Andrej Sali All Rights Reserved
Written by A. Sali with help from B. Webb, M.S. Madhusudhan, M-Y. Shen, M.A. Marti-Renom, N. Eswar, F. Alber, M. Topf, B. Oliva, A. Fiser, R. Sanchez, B. Yerkovich, A. Badretdinov, F. Melo, J.P. Overington, E. Feyfant University of California, San Francisco, USA Rockefeller University, New York, USA Harvard University, Cambridge, USA Imperial Cancer Research Fund, London, UK Birkbeck College, University of London, London, UK
Kind, OS, HostName, Kernel, Processor: 4, Linux linux 2.6.11.4-21.7-default i686 Date and time of compilation : 2007/01/19 13:47:34 MODELLER executable type : i386-intel8 Job starting time (YY/MM/DD HH:MM:SS): 2007/04/17 22:15:53
jinlian05@lzu.cn wrote: > I am new to modeller and I have trouble creating a homology model of a > protein using model-addrsr. By predicting secondary structure, between residues > "305-318" is alpha-helix. I modified the model-addrsr.py script as > shown below and I got error messages. I would appreciate it if any one > can give me any suggestion.
This is also a Python error, not a Modeller problem. I recommend the excellent Python tutorial at http://docs.python.org/tut/tut.html
> class mymodel(automodel): > def special_restraints(self, aln): > rsr = self.restraints > at = self.atoms > rsr.add(secondary_structure.alpha(self.residue_range('305:', '318:')))
Just like the error message says, your indentation level is incorrect. i.e. the last line should be lined up with the two lines above.
Ben Webb, Modeller Caretaker
participants (2)
-
jinlian05@lzu.cn
-
Modeller Caretaker