用MODELLER构建好模型后对loop区域进行自动的优化过程

来源:互联网 发布:美国10月非农数据 编辑:程序博客网 时间:2024/05/22 00:11
一:对生成的模型的所有的loop区域进行优化
# Homology modeling by the automodel classfrom modeller import *from modeller.automodel import *    # Load the automodel classlog.verbose()env = environ()# directories for input atom filesenv.io.atom_files_directory = ['.', '../atom_files']a = loopmodel(env,              alnfile  = 'alignment.ali',     # alignment filename              knowns   = '5fd1',              # codes of the templates              sequence = '1fdx')              # code of the targeta.starting_model= 1                 # index of the first modela.ending_model  = 1                 # index of the last model                                    # (determines how many models to calculate)a.md_level = None                   # No refinement of modela.loop.starting_model = 1           # First loop modela.loop.ending_model   = 4           # Last loop modela.loop.md_level       = refine.fast # Loop model refinement levela.make()                            # do homology modeling
 
a.loop.starting_model 和 a.loop.ending_model用于指定产生优化loop后的模型数量。
 
二:指定要优化的loop区域
from modeller import *from modeller.automodel import *log.verbose()env = environ()env.io.atom_files_directory = ['.', '../atom_files']# Create a new class based on 'loopmodel' so that we can redefine# select_loop_atomsclass MyLoop(loopmodel):    # This routine picks the residues to be refined by loop modeling    def select_loop_atoms(self):        # Two residue ranges (both will be refined simultaneously)        return selection(self.residue_range('19:', '28:'),                         self.residue_range('45:', '50:'))a = MyLoop(env,           alnfile  = 'alignment.ali',      # alignment filename           knowns   = '5fd1',               # codes of the templates           sequence = '1fdx',               # code of the target           loop_assess_methods=assess.DOPE) # assess each loop with DOPEa.starting_model= 1                 # index of the first modela.ending_model  = 1                 # index of the last modela.loop.starting_model = 1           # First loop modela.loop.ending_model   = 2           # Last loop modela.make()                            # do modeling and loop refinement

这个过程需要自己定义一个Myloop类,这个类继承了loopmodel类,这个类要重写loopmodel类中的select_loop_atoms()方法。
原创粉丝点击