
Hi, I had sucessfull modelled a protein without restrains. However, when I put alpha helix restrains in the script below I face this problem: File "model-restriction-single.py", line 21 rsr.add(secondary_structure.alpha(self.residue_range('47:', '57:'))) ^ IndentationError: unindent does not match any outer indentation level I saw the script too many times and I am not able to see where the problem is. Could anyone help-me? from modeller import * from modeller.automodel import * log.verbose() env = environ() env.io.hetatm = True # 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 # Add some restraints from a file: # Residues 47 through 57 should be an alpha helix: rsr.add(secondary_structure.alpha(self.residue_range('47:', '57:'))) # Residues 130 through 140 should be an alpha helix: rsr.add(secondary_structure.alpha(self.residue_range('130:', '140:'))) # Residues 182 through 184 should be an alpha helix: rsr.add(secondary_structure.alpha(self.residue_range('182:', '184:'))) # Residues 191 through 195 should be an alpha helix: rsr.add(secondary_structure.alpha(self.residue_range('191:', '195:'))) a = MyModel(env, alnfile='MODEL-TemplateA.ali', knowns='TemplateA', sequence='MODEL', assess_methods=(assess.DOPE, assess.GA341)) a.starting_model = 1 a.ending_model = 5 0 a.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])