序
HTMD是一个特别的分子可编程环境,用于准备、处理、模拟、可视化和分析分子系统。
HTMD兼容ACEMD,NAMD,GROMACS和AMBER。
前面几篇文章介绍了,ACEMD的一些基本的操作以及如何构建蛋白和蛋白配体体系,本文在前面的基础上运行Jupyter Notebook在浏览器中利用IPython进行一个完整的动力学模拟。
Molecular Dynamics in HTMD
#!/usr/bin/python3
# coding: utf-8
# In[1]:导入模块
from htmd.ui import *
# In[2]:创建蛋白的坐标与拓扑文件,并添加溶剂盒子
tryp = Molecule("3PTB.pdb")
tryp.renumberResidues()
tryp.remove("resname BEN")
tryp_op = proteinPrepare(tryp)
tryp_seg = autoSegment(tryp_op)
tryp_solv = solvate(tryp_seg,pad=10)
#tryp_amber = amber.build(tryp_solv, param= ["frcmod.ionslrcm_cm_tip3p"], outdir='build-amber')
tryp_charmm = charmm.build(tryp_solv, outdir='build-charmm')
运行代码块产生的体系相关坐标和拓扑文件。
# In[3]:导入平衡模块
from htmd.protocols.equilibration_v2 import Equilibration
# In[4]:设置平衡协议
md = Equilibration()
md.runtime = 1000
md.timeunits = 'fs'
md.temperature = 300
md.useconstantratio = False # only for membrane sims
# this is only needed for setting the flatbottom potential, otherwise remove it
# md.fb_reference = 'protein and resid 293'
# md.fb_selection = 'segname L and noh'
# md.fb_box = [-25, 25, -25, 25, 43, 45]
# md.fb_k = 5
md.write('./build-charmm/','./equil')
# In[5]:
%ls equil/
# In[6]:平衡体系
local = LocalGPUQueue()
local.submit('./equil/')
local.wait()
运行代码,产生的提交平衡任务的脚本以及平衡的输入参数文件和结果文件。
# In[9]:运行动力学
local = LocalGPUQueue()
local.submit('./prod/')
local.wait()
运行代码,产生的提交动力学任务的脚本以及动力学的输入参数文件和结果文件。
# In[10]:动力学轨迹可视化
from htmd.config import config
config(viewer='ngl')
molTraj = Molecule('prod/structure.psf')
molTraj.read('prod/output.xtc')
molTraj.view()
参考资料
.1.https://software.acellera.com/docs/latest/htmd/tutorials/md-protocols.html
2.http://gainstrong.net/works/hudong/
3.https://software.acellera.com/docs/latest/htmd/userguide/introduction.html
4.https://software.acellera.com/docs/latest/htmd/userguide/building.html
领取专属 10元无门槛券
私享最新 技术干货