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

[modeller_usage] Model refinement



Dear All,

 

I am modelling a potassium channel protein using a template with fairly low sequence similarity to my target, therefore, I am trying to put several restraints. I am struggling to deal with a long loop supposed to be extracellular: so its location to the rest of the protein is roughly known. As I am refining the model using MD, the loop location completely became wrong, I suppose that the absence of alignment in the refinement process is the reason (which covers only small area of the loop anyway). I don’t know if there is anyway to exclude the loop while refining the rest of the model, or to restraint the loop in an approximate location of the structure (like putting distance restraint) while refining it. I must say that the gap in alignment corresponds to the loop is well over 15 amino acids.

Any thoughts are highly appreciated. My script is here:


from modeller import *
from modeller.automodel import *    # Load the automodel class

log.verbose()

# Override the 'special_restraints' and 'user_after_single_model' methods:
class MyModel(automodel):
    def special_restraints(self, aln):
# Constrain the A and B chains to be identical (but only restrain
        # the C-alpha atoms, to reduce the number of interatomic distances
        # that need to be calculated):
        s1 = selection(self.chains['A'], self.residue_range('7:A', '30:A'),self.residue_range('107:A', '130:A')).only_atom_types('CA')
        #s2 = selection(self.chains['A'], self.residue_range('107:A', '130:A')).only_atom_types('CA')
        s2 = selection(self.chains['A'], self.residue_range('157:A', '180:A'),self.residue_range('217:A', '240:A')).only_atom_types('CA')
        #s4 = selection(self.chains['A'], self.residue_range('217:A', '240:A')).only_atom_types('CA')
        s5 = selection(self.chains['A']).only_atom_types('CA')
        s6 = selection(self.chains['B']).only_atom_types('CA')
        s7 = selection(self.chains['A'], self.residue_range('80:A', '135:A')).only_atom_types('CA')
        s8 = selection(self.chains['A'], self.residue_range('185:A', '250:A')).only_atom_types('CA')
        self.restraints.add(secondary_structure.alpha(self.residue_range('7:A', '30:A')))
        #self.restraints.add(secondary_structure.alpha(self.residue_range('107:A', '130:A')))
        self.restraints.add(secondary_structure.alpha(self.residue_range('157:A', '180:A')))
        #self.restraints.add(secondary_structure.alpha(self.residue_range('217:A', '240:A')))
        #self.restraints.add(secondary_structure.alpha(self.residue_range('73:A', '92:A')))
        #self.restraints.symmetry.append(symmetry(s1, s2, 1.0))
        self.restraints.symmetry.append(symmetry(s7, s8, 1.0))
        #self.restraints.symmetry.append(symmetry(s2, s3, 1.0))
        #self.restraints.symmetry.append(symmetry(s3, s4, 1.0))
        self.restraints.symmetry.append(symmetry(s5, s6, 1.0))
def user_after_single_model(self):
        # Report on symmetry violations greater than 1A after building
        # each model:
        self.restraints.symmetry.report(1.0)

env = environ()
# directories for input atom files
env.schedule_scale = physical.values(default=1.0, soft_sphere=0.7)
env.io.atom_files_directory = ['.', '../atom_files']

# Be sure to use 'MyModel' rather than 'automodel' here!
a = MyModel(env,
            alnfile       = 'task3Modified8.ali' ,     # alignment filename
            knowns        = '1orq_9',              # codes of the templates
            sequence      = 'TASK3h27',              # code of the target
            assess_methods=assess.DOPE)
a.starting_model= 1                # index of the first model
a.ending_model  = 15                # index of the last model
# Very thorough VTFM optimization:
a.library_schedule = autosched.slow
a.max_var_iterations = 300

# Thorough MD optimization:
a.md_level = refine.slow

# Repeat the whole cycle 2 times and do not stop unless obj.func. > 1E6
a.repeat_optimization = 2
a.max_molpdf = 1ttt

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: %s (DOPE score %.3f)" % (m['name'], m[key])






My best regards

Ehab,

Research student