next up previous contents index
Next: Adding additional restraints to Up: More advanced usage Previous: Providing your own restraints   Contents   Index


Using your own initial model

Normally, automodel generates an initial model by transferring coordinates from the templates. However, if you have a prepared PDB file containing an initial model, you can have automodel use this instead with the inifile keyword, as in the example below. (This automatically sets automodel.generate_method to generate.read_xyz for you, which is necessary for this to work.)

Example: examples/automodel/model-myini.py


# Modeling using a provided initial structure file (inifile)
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'

a = automodel(env,
              alnfile  = 'alignment.ali',     # alignment filename
              knowns   = '5fd1',              # codes of the templates
              sequence = '1fdx',              # code of the target
              inifile  = 'my-initial.pdb')    # use 'my' initial structure
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 homology modeling



Ben Webb 2007-08-03