[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [modeller_usage] how to evaluate 100 profiles?



hori koshii wrote:
Hi, does anyone know python and modeller very well and give us some help to run a model evaluation script for 100 homology models. (how
to set 'EGPh.B99990001.pdb' as a variable and make it like a loop so
the number can be increased by 1 in the next run), or another other ways you know?

Assuming your models are named EGPh.B99990001.pdb through
EGPh.B99990100.pdb, the following should do the trick, building profiles EGPh-1.profile through EGPh-100.profile:

from modeller import *
log.verbose()
env = environ()
env.libs.topology.read(file='$(LIB)/top_heav.lib')
env.libs.parameters.read(file='$(LIB)/par.lib')
env.io.atom_files_directory = './:../atom_files'

for n in range(1, 101):
    # read model file
    mdl = model(env)
    code = "EGPh"
    file = '%s.B9999%04d.pdb' % (code, n)
    mdl.read(file=file)
    aln = alignment(env)
    # generate topology
    aln.append_model(mdl, atom_files=file, align_codes=code)
    aln.append_model(mdl, atom_files=file, align_codes=code+'-ini')
    mdl.generate_topology(aln, sequence=code+'-ini')
    mdl.transfer_xyz(aln)
    mdl.assess_dope(output='ENERGY_PROFILE NO_REPORT',
                    file='%d-%d.profile' % (code, n),
                    normalize_profile=True, smoothing_window=15)


	Ben Webb, Modeller Caretaker
--
             http://www.salilab.org/modeller/
Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage