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

[modeller_usage] Restraints



Hi everybody,

 

I am really hoping that I am not asking a dumb question but I cannot seem to get the restraints to work on my protein.  To try and get to grips with this I am using a target-template sequence identity of 100%.  I have set the secondary structure as is in the known structure but cannot seem to ‘force’ the restraints through onto the target.

 

I have posted the script below.  Any help on this would be very much appreciated!

 

Many thanks in advance,

 

Tory

 

 

 

from modeller import *

from modeller.automodel import *

 

class MyModel(automodel):

                def special_restraints(self, aln):

                                rsr = self.restraints

                               

                                # Addition of 3 disulphides:

                                self.patch(residue_type='DISU', residues=(self.residues['43'],self.residues['62']))  

                                               

                                #Residues 20 through 30 should be an alpha helix:

                                rsr.add(secondary_structure.alpha(self.residue_range('20:', '37:')))

                                rsr.add(secondary_structure.alpha(self.residue_range('54:', '65:')))

                                rsr.add(secondary_structure.alpha(self.residue_range('75:', '89:')))

                                rsr.add(secondary_structure.alpha(self.residue_range('111:', '115:')))

                                rsr.add(secondary_structure.alpha(self.residue_range('119:', '128:')))

                                rsr.add(secondary_structure.alpha(self.residue_range('137:', '154:')))

                                    

                                #Two beta-strands:

                                rsr.add(secondary_structure.strand(self.residue_range('13:', '18:')))

                                rsr.add(secondary_structure.strand(self.residue_range('42:', '43:')))

                                rsr.add(secondary_structure.strand(self.residue_range('66:', '73:')))

                                rsr.add(secondary_structure.strand(self.residue_range('102:', '106:')))

                                rsr.add(secondary_structure.strand(self.residue_range('132:', '133:')))

                               

                               

 

log.verbose()

env = environ()

 

# directories for input atom files

env.io.atom_files_directory = ['.', '../../atom_files']

 

a = MyModel(env,

                                                alnfile='../tlr1_tir_template.ali',

            knowns='1fyv',

            sequence='hTLR1TIR',

            assess_methods=(assess.DOPE, assess.normalized_dope, assess.DOPEHR, assess.GA341))

           

a.starting_model = 1

a.ending_model = 100

 

# Very thorough VTFM optimization:

a.library_schedule = autosched.slow

a.max_var_iterations = 300

 

# Thorough MD optimization:

a.md_level = refine.very_slow

 

# Repeat the whole cycle 2 times and do not stop unless obj.func. > 1E6

a.repeat_optimization = 5

a.max_molpdf = 1e6

 

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])