MODELLER

Repairing of the pdb file ( missing residues):

from modeller import * from modeller.automodel import * # Load the automodel classlog.verbose()env = environ()# directories for input atom filesenv.io.atom_files_directory = ['.', '../atom_files']class MyModel(automodel): def select_atoms(self): return selection(self.residue_range('133', '135'), self.residue_range('216', '230'))a = MyModel(env, alnfile = 'alignment.ali', knowns = '1qg8', sequence = '1qg8_fill')a.starting_model= 1a.ending_model = 1a.make()

from modeller import * from modeller.automodel import * log.verbose() env = environ() env.io.atom_files_directory = ['.', '../atom_files'] # Create a new class based on 'loopmodel' so that we can redefine # select_loop_atoms class MyLoop(loopmodel): # This routine picks the residues to be refined by loop modeling def select_loop_atoms(self): # Two residue ranges (both will be refined simultaneously) return selection(self.residue_range('19:', '28:'), self.residue_range('45:', '50:')) a = MyLoop(env, alnfile = 'alignment.ali', # alignment filename knowns = '5fd1', # codes of the templates sequence = '1fdx', # code of the target loop_assess_methods=assess.DOPE) # assess each loop with DOPE a.starting_model= 1 # index of the first model a.ending_model = 1 # index of the last model a.loop.starting_model = 1 # First loop model a.loop.ending_model = 2 # Last loop model a.make() # do modeling and loop refinement

# Get the sequence of the PDB file, and write to an alignment file

#from modeller import *

code = 'pdbname'e = environ()m = model(e, file=code)aln = alignment(e)aln.append_model(m, align_codes=code)aln.write(file=code+'.seq')

#For generating Helix or strand and...

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('20:', '30:'))) # Two beta-strands: rsr.add(secondary_structure.strand(self.residue_range('1:', '6:'))) rsr.add(secondary_structure.strand(self.residue_range('9:', '14:'))) # 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))

#Including disulfide bridge

# Homology modeling by the automodel class from modeller import * # Load standard Modeller classes from modeller.automodel import * # Load the automodel class # Redefine the special_patches routine to include the additional disulfides # (this routine is empty by default): class MyModel(automodel): def special_patches(self, aln): # A disulfide between residues 8 and 45: self.patch(residue_type='DISU', residues=(self.residues['8'], self.residues['45'])) 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'] a = MyModel(env, alnfile = 'alignment.ali', # alignment filename knowns = '5fd1', # codes of the templates sequence = '1fdx') # code of the target a.starting_model= 1 # index of the first model a.ending_model = 1 # index of the last model # (determines how many models to calculate) a.make() # do the actual homology modeling

View more »