sanjay singh wrote: ...
Then I used advanced example as a template to write my input script: from modeller import * from modeller.automodel import * class mymodel(automodel): def special_restraints(self, aln): rsr = self.restraints for ids in (('NZ:278:A','C4A:500:A')): atoms = [self.atoms[i] for i in ids]
You have a missing comma in your Python script. This is a consequence of the way Python handles one-element tuples (singletons). Please refer to www.python.org[*], or your favorite Python reference, for more information. But the simple fix is to instead write:
for ids in (('NZ:278:A','C4A:500:A'),):In fact in this case you don't need a for loop at all, since you are only defining a single restraint.
[*] http://docs.python.org/tut/node7.html#SECTION007300000000000000000 Ben Webb, Modeller Caretaker -- http://www.salilab.org/modeller/ Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage