next up previous contents index
Next: Fully automated alignment and Up: More advanced usage Previous: Building multi-chain models with   Contents   Index


Accessing output data after modeling is complete

After automodel.make() finishes building your model(s), the output data is accessible to your script as automodel.outputs. This variable is an ordinary Python list, one element for each model (so a.outputs[0] refers to the first model, and so on). Each list element is a Python dictionary of key:value pairs, the most important of which are:

If you are also building loop models, information for these is made available in loopmodel.loop.outputs.

Example: examples/automodel/model-outputs.py


from modeller import *
from modeller.automodel import *

log.verbose()
env = environ()

env.io.atom_files_directory = ['.', '../atom_files']

# Build 3 models, and assess with both DOPE and GA341
a = automodel(env, alnfile = 'alignment.ali', knowns = '5fd1',
              sequence = '1fdx', assess_methods=(assess.DOPE, assess.GA341))
a.starting_model= 1
a.ending_model  = 3
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])


next up previous contents index
Next: Fully automated alignment and Up: More advanced usage Previous: Building multi-chain models with   Contents   Index
Automatic builds 2009-01-30