一:自動建模的過程中包含水分子,配體殘基和氫原子
如果你的模板序列中包含配體或非蛋白殘基,你可以在".ali"文件中通過在模板序列和待建序列的末尾加點"."來表示,當然在執行的腳本中還要加上語句env.io.hetatm=True,默認情況下不會處理HETATM的原子。
Example: examples/automodel/model-ligand.py
# Homology modeling with ligand transfer from the template
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']
# Read in HETATM records from template PDBs
env.io.hetatm = True
a = automodel(env,
alnfile = 'align-ligand.ali', # alignment filename
knowns = '5fd1', # codes of the templates
sequence = '1fdx') # code of the target
a.starting_model= 4 # index of the first model
a.ending_model = 4 # index of the last model
# (determines how many models to calculate)
a.make() # do the actual homology modeling
Example: examples/automodel/align-ligand.ali
C; Similar to alignment.ali, but with ligands included
>P1;5fd1
structureX:5fd1:1 :A:108 :A:ferredoxin:Azotobacter vinelandii: 1.90: 0.19
AFVVTDNCIKCKYTDCVEVCPVDCFYEGPNFLVIHPDECIDCALCEPECPAQAIFSEDEVPEDMQEFIQLNAELA
EVWPNITEKKDPLPDAEDWDGVKGKLQHLER..*
>P1;1fdx
sequence:1fdx:1 : :56 : :ferredoxin:Peptococcus aerogenes: 2.00:-1.00
AYVINDSC--IACGACKPECPVNIIQGS--IYAIDADSCIDCGSCASVCPVGAPNPED-----------------
-------------------------------..*
上面中的每個"."代表一個HETATM的殘基,如果你有多個模板的話,只想要其中一個模板的配體作為建模的配體,那麼可以將其他模板的對應的配體的殘基改為"-".
如果想保留模板中的水分子,則需要在模板序列和待建序列中加入"w"字母,並且需要設置env.io.water=True.
如果想在待建序列中加入H原子,則需要在設置env.io.hydrogen=True.
二:對構建出的模型進行優化(更改默認的優化過程)
# Example of changing the default optmization schedule
from modeller import *
from modeller.automodel import *
log.verbose()
env = environ()
# Give less weight to all soft-sphere restraints:
env.schedule_scale = physical.values(default=1.0, soft_sphere=0.7)
env.io.atom_files_directory = ['.', '../atom_files']
a = automodel(env, alnfile='alignment.ali', knowns='5fd1', sequence='1fdx')
a.starting_model = a.ending_model = 1
#建好模型後的優化過程
# Very thorough VTFM optimization:
a.library_schedule = autosched.slow
a.max_var_iterations = 300
# Thorough MD optimization:
a.md_level = refine.slow
# Repeat the whole cycle 2 times and do not stop unless obj.func. > 1E6
a.repeat_optimization = 2
a.max_molpdf = 1e6
a.make()
三:利用多個模板來構建出一個模型
Example: examples/automodel/model-multiple.py
# Homology modeling with multiple templatesfrom modeller import * # Load standard Modeller classesfrom modeller.automodel import * # Load the automodel classlog.verbose() # request verbose outputenv = environ() # create a new MODELLER environment to build this model in# directories for input atom filesenv.io.atom_files_directory = ['.', '../atom_files']a = automodel(env, alnfile = 'align-multiple.ali', # alignment filename knowns = ('5fd1', '1bqx'), # 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.make() # do the actual homology modeling
Example: examples/automodel/align-multiple.ali
>P1;5fd1structureX:5fd1:1 :A:106 :A:ferredoxin:Azotobacter vinelandii: 1.90: 0.19AFVVTDNCIKCKYTDCVEVCPVDCFYEGPNFLVIHPDECIDCALCEPECPAQAIFSEDEVPEDMQEFIQLNAELAEVWPNITEKKDPLPDAEDWDGVKGKLQHLER*>P1;1bqxstructureN:1bqx: 1 :A: 77 :A:ferredoxin:Bacillus schlegelii:-1.00:-1.00AYVITEPCIGTKCASCVEVCPVDCIHEGEDQYYIDPDVCIDCGACEAVCPVSAIYHEDFVPEEWKSYIQKNRDFFKK-----------------------------*>P1;1fdxsequence:1fdx:1 : :54 : :ferredoxin:Peptococcus aerogenes: 2.00:-1.00AYVINDSC--IACGACKPECPVNIIQGS--IYAIDADSCIDCGSCASVCPVGAPNPED------------------------------------------------*
四:使用automodel.residue_range()來優化所建模型的部分殘基
# Homology modeling by the automodel class
#
# Demonstrates how to refine only a part of the model.
#
# You may want to use the more exhaustive "loop" modeling routines instead.
#
from modeller import *
from modeller.automodel import * # Load the automodel class
log.verbose()
# Override the 'select_atoms' routine in the 'automodel' class:
# (To build an all-hydrogen model, derive from allhmodel rather than automodel
# here.)
class MyModel(automodel):
def select_atoms(self):
# Select residues 1 and 2 (PDB numbering)
return selection(self.residue_range('1:', '2:'))
# The same thing from chain A (required for multi-chain models):
# return selection(self.residue_range('1:A', '2:A'))
# Residues 4, 6, 10:
# return selection(self.residues['4'], self.residues['6'],
# self.residues['10'])
# All residues except 1-5:
# return selection(self) - selection(self.residue_range('1', '5'))
env = environ()
# directories for input atom files
env.io.atom_files_directory = ['.', '../atom_files']
# selected atoms do not feel the neighborhood
env.edat.nonbonded_sel_atoms = 2
# Be sure to use 'MyModel' rather than 'automodel' here!
a = MyModel(env,
alnfile = 'alignment.ali', # alignment filename
knowns = '5fd1', # codes of the templates
sequence = '1fdx') # code of the target
a.starting_model= 3 # index of the first model
a.ending_model = 3 # index of the last model
# (determines how many models to calculate)
a.make() # do homology modeling
五:模擬過程中包含二硫鍵
默認情況下automodel會自動的產生適當的二硫鍵的限制,這通過使用model.patch_ss_templates()函數。
手動的添加二硫鍵的限制可以通過使用model.patch()函數,這個函數調用CHARMM的拓撲文件“DISU”來修補殘基。
# Homology modeling by the automodel class
from modeller import * # Load standard Modeller classes
from modeller.automodel import * # Load the automodel class
# Redefine the special_patches routine to include the additional disulfides
# (this routine is empty by default):
class MyModel(automodel):
def special_patches(self, aln):
# A disulfide between residues 8 and 45:
self.patch(residue_type='DISU', residues=(self.residues['8'],
self.residues['45']))
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 = MyModel(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 homology modeling
閱讀更多 翌然小白 的文章