[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[modeller_usage] Trouble with angle restrain in chimera



Hi everyone,

I am trying to build a chimera protein based on two known structures  that do not overlap, and I am trying to specify an angle restrain between the two domains that are model to give information of their relative orientation obtained experimentally  using this script:


# Homology modeling with multiple templates

from modeller import *                # Load standard Modeller classes
from modeller.automodel import *      # Load the automodel class

log.verbose() # request verbose output
env = environ() # create a new MODELLER environment to build this model in

# 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
        f = forms.gaussian(group=physical.angle,
                       feature=features.angle(a['CA:796'],
                                                            a['CA:822'],
                                                           a['CA:855']),
                       mean=2.827, stdev=0.010)
    rsr.add(f)



a = MyModel(env,
              alnfile   = 'align2.ali',                                                          # alignment filename
              knowns    = ('2OK2','1FW6','1E3M'),                                 # codes of the templates
              sequence  = 'PAOI')                                                           # code of the target
a.starting_model= 1                                                                        # index of the first model
a.ending_model = 50                                                                      # index of the last model
                                                                                                        # (determines how many models to calculate)
a.make()                         


but I get this error:


 File "model-multiple.py", line 12, in ?
    class MyModel(automodel):
  File "model-multiple.py", line 21, in MyModel
    rsr.add(f)
NameError: name 'rsr' is not defined



So I do not know what I am missing....if someone can help me!


Thank you in advance! Virginia.

I arise in the morning torn between a desire to improve the world and a
desire to enjoy the world. This makes it hard to plan the day. (E.B. White)