next up previous contents index
Next: Frequently asked questions and Up: Loop optimization Previous: Defining loop regions for   Contents   Index

Refining an existing PDB file

All of the loop modeling classes can also be used to refine a region of an existing PDB file, without comparative modeling, as in the example below. Note that it is necessary in this case to redefine the loopmodel.select_loop_atoms() routine, as no alignment is available for automatic loop detection.

Example: examples/automodel/loop.py


# Loop refinement of an existing model
from modeller import *
from modeller.automodel import *

log.verbose()
env = environ()

# directories for input atom files
env.io.atom_files_directory = './:../atom_files'

# Create a new class based on 'loopmodel' so that we can redefine
# select_loop_atoms (necessary)
class myloop(loopmodel):
    # This routine picks the residues to be refined by loop modeling
    def select_loop_atoms(self):
        # One loop from residue 19 to 28 inclusive
        return selection(self.residue_range('19:', '28:'))

m = myloop(env,
           inimodel='1fdx.B99990001.pdb', # initial model of the target
           sequence='1fdx')               # code of the target

m.loop.starting_model= 20           # index of the first loop model 
m.loop.ending_model  = 23           # index of the last loop model
m.loop.md_level = refine.very_fast  # loop refinement method

m.make()



Ben Webb 2007-01-19