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

[modeller_usage] model_addrsr.py



Hi ,
      I am not able to model beta sheets even if i am using model_addrsr,py file. Can anyone please help me out..!!
         This is the script file i used.

# Addition of restraints to the default ones
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
#       Add some restraints from a file:
#       rsr.append(file='my_rsrs1.rsr')

#       Residues 20 through 30 should be an alpha helix:
#        rsr.add(secondary_structure.alpha(self.residue_range('269:', '302:')))
#        rsr.add(secondary_structure.alpha(self.residue_range('171:', '189:')))
#        rsr.add(secondary_structure.alpha(self.residue_range('171:', '189:')))
#        rsr.add(secondary_structure.alpha(self.residue_range('171:', '189:')))
#        rsr.add(secondary_structure.alpha(self.residue_range('209:', '228:')))
#        rsr.add(secondary_structure.alpha(self.residue_range('236:', '255:')))
#        rsr.add(secondary_structure.alpha(self.residue_range('335:', '353:')))
        #       Two beta-strands:
#        rsr.add(secondary_structure.strand(self.residue_range('148:', '154:')))
        rsr.add(secondary_structure.strand(self.residue_range('65:', '75:')))
#       An anti-parallel sheet composed of the two strands:
#       rsr.add(secondary_structure.sheet(at['N:1'], at['O:14'],
                                         # sheet_h_bonds=-5))
#       Use the following instead for a *parallel* sheet:
#       rsr.add(secondary_structure.sheet(at['N:1'], at['O:9'],
#                                         sheet_h_bonds=5))

#       Restrain the specified CA-CA distance to 10 angstroms (st. dev.=0.1)
#       Use a harmonic potential and X-Y distance group.
#        rsr.add(forms.gaussian(group=physical.xy_distance,
#                               feature=features.distance(at['CA:35'],
#                                                         at['CA:40']),
#                               mean=10.0, stdev=0.1))

a = MyModel(env,
            alnfile  = 'target-temp.ali',     # alignment filename
            knowns   = 'template',              # codes of the templates
            sequence = 'target')              # code of the target
a.starting_model= 1                 # index of the first model
a.ending_model  = 2                 # index of the last model
                                    # (determines how many models to calculate)
a.make()                            # do homology modeling

# Get a list of all successfully built models from a.outputs
ok_models = filter(lambda x: x['failure'] is None, a.outputs)