# Comparative modeling with ligand transfer from the template
from modeller import * # Load standard Modeller classes
from modeller.automodel import * # Load the AutoModel class
import sys
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']
# Read in HETATM records from template PDBs
env.io.hetatm = True
a = AutoModel(env, alnfile='ahr-mult.ali',
knowns=('3f1o_pasA','3h7w_pasA','3h82_pasA'), sequence='AhR', assess_methods=(assess.DOPE))
a.starting_model= 1 # index of the first model
a.ending_model = 100 # index of the last model
# (determines how many models to calculate)
a.make() # do the actual comparative modeling
To sort the models by DOPE score:
# Comparative modeling with ligand transfer from the template
from modeller import * # Load standard Modeller classes
from modeller.automodel import * # Load the AutoModel class
import sys
log.verbose() # request verbose output
env = Environ() # create a new MODELLER environment to build this model in
# Get a list of all successfully built models from a.output
ok_models = [x for x in a.outputs if x['failure'] is None
# Rank the models by DOPE score
key = 'DOPE score'
if sys.version_info[:2] == (2,3):
ok_models.sort(lambda a,b: cmp(a[key], b[key]))
else:
ok_models.sort(key=lambda a: a[key])
# Get top model
m = ok_models[0]
print("Top model: %s (DOPE score %.3f)" % (m['name'], m[key]))
File "model-output.py", line 17
key = 'DOPE score'
^
SyntaxError: invalid syntax
# Comparative modeling with ligand transfer from the template
from modeller import * # Load standard Modeller classes
from modeller.automodel import * # Load the AutoModel class
import sys
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']
# Read in HETATM records from template PDBs
env.io.hetatm = True
a = AutoModel(env, alnfile='ahr-mult.ali',
knowns=('3f1o_pasA','3h7w_pasA','3h82_pasA'), sequence='AhR', assess_methods=(assess.DOPE))
a.starting_model= 1 # index of the first model
a.ending_model = 100 # index of the last model
# (determines how many models to calculate)
a.make() # do the actual comparative modeling
# Get a list of all succesfully built models from a.output
ok_models = [x for x in a.outputs if x['failure'] is None
# Rank the models by DOPE score
key = 'DOPE score'
if sys.version_info[:2] == (2,3):
ok_models.sort(lambda a,b: cmp(a[key], b[key]))
else:
ok_models.sort(key=lambda a: a[key])
# Get top model
m = ok_models[0]
print("Top model: %s (DOPE score %.3f)" % (m['name'], m[key]))
Error shown:
File "model-output.py", line 27
key = 'DOPE score'
^
SyntaxError: invalid syntax
Best,
Amanda F. Ghilardi