Simple usage

The simple example below constructs a single comparative model for the 1fdx sequence from the known 5fd1 structure, using alignment.ali, a PIR format alignment of 5fd1 and 1fdx. The final model is written into the PDB file 1fdx.B99990001.pdb. See Section 1.6.2 for instructions on how to run this script.

Example: examples/automodel/model-default.py

# Comparative modeling by the AutoModel class
from modeller import *              # Load standard Modeller classes
from modeller.automodel import *    # Load the AutoModel class

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 = AutoModel(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 comparative modeling

Example: examples/automodel/alignment.ali


C; A sample alignment in the PIR format; used in tutorial

>P1;5fd1
structureX:5fd1:1    :A:106  :A:ferredoxin:Azotobacter vinelandii: 1.90: 0.19
AFVVTDNCIKCKYTDCVEVCPVDCFYEGPNFLVIHPDECIDCALCEPECPAQAIFSEDEVPEDMQEFIQLNAELA
EVWPNITEKKDPLPDAEDWDGVKGKLQHLER*

>P1;1fdx
sequence:1fdx:1    :A:54   :A:ferredoxin:Peptococcus aerogenes: 2.00:-1.00
AYVINDSC--IACGACKPECPVNIIQGS--IYAIDADSCIDCGSCASVCPVGAPNPED-----------------
-------------------------------*

Stepping through the script, first we load the AutoModel class, using standard Python syntax to load a module. Next, we request verbose output (see Section 6.31) so that we can more easily spot errors. We then create an Environ() object (see Section 6.2) and call it env. This object holds the MODELLER ‘environment’, which comprises default values for many parameters, as well as the libraries used for comparative modeling (topology, parameters, dihedral classes, etc). An Environ object is needed to create most other MODELLER objects, but you can call it whatever you like (it doesn't have to be called env).

Once we have the Environ object, we can set some global parameters. In this case, we set IOData.atom_files_directory to set the directories to look for PDB files in.

Next, we create an AutoModel object, tell it which PIR alignment file to use, and which sequences are templates and which one we want to build a model for, and call it a. This doesn't actually build any models, but creates the object, ready to be tweaked for our purposes. In this case, we simply tell it to build a single model, by setting both AutoModel.starting_model and AutoModel.ending_model to 1. Finally, we actually build the model by running AutoModel.make().