ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

gmx_MMPBSA环境配置避坑指南及简单使用教学

gmx_MMPBSA环境配置避坑指南及简单使用教学 首先gmx_MMPBSA依赖ambertools这个包大家可以看看我在服务器上折腾ambertools的过程AutoDL实例中ambertools的安装-CSDN博客所以这里介绍的是如何在PC的wsl ubuntu上配置环境。本人的ubuntu版本是22.04.5 LTS创建conda环境# 创建干净环境python3.11比较稳定 conda create -n gmxmmpbsa python3.11 conda activate gmxmmpbsa另外最近用到原先配置的源时似乎总是有404的错误如果有这个问题清除一下设置。直接用初始设置应该是可以完成安装的conda config --remove-key channels安装gmx_MMPBSA及其依赖最主要是ambertools这个包要单独装就像我之前的文章所说直接conda install编译容易出现问题我们这里用社区预编译的版本。装好ambertools之后再装别的这里的ambertools版本应该会是26# pip安装预编译的ambertools‑unofficial pip install ambertools-unofficial # 手动安装必须的依赖包 pip install numpy pandas scipy matplotlib seaborn pyparsing mpi4py # 安装gmx_MMPBSA不自动安装它的依赖 pip install gmx_MMPBSA --no-deps# 或者这样应该也行 pip install ambertools-unofficial pip install gmx_MMPBSA如果遇见兼容问题大家可以按这个大佬的排查一下后面我遇见什么问题也会更新gmx_MMPBSA 安装避坑指南从报错到成功的完整路径-CSDN博客检测环境依次输入以下内容观察输出情况# 首先检查gromacs是否可用 gmx -version # 其次检查gmx_MMPBSA是否串联成功 gmx_MMPBSA -h # 再检查ambertools带的小工具 tleap -h # 最后输出一下读写 cd your_work_dir gmx_MMPBSA --create_input gb -O # 会在当前文件夹创建一个in文件MMPBSA使用MM‑PBSAMolecular Mechanics‑Poisson‑Boltzmann Surface Area分子力学‑泊松玻尔兹曼表面积法用来算两个分子之间的结合自由能 ΔG_bind。具体算法就不展开讲了大家可以认为它是一个主流的计算蛋白-小分子、蛋白-蛋白结合强度的工具。其优点是仅需运行完MD生产的轨迹并且可以体现残基分解能即各残基res对结合界面的贡献。在这里借用一张科晶生物的图侵权立删使用前我们首先需要对轨迹xtc文件进行处理# 将被盒子分开的原子拼接回原位 选0 gmx trjconv -s md.tpr -f md.xtc -o md_noPBC.xtc -pbc mol -ur compact # 再居中 选1 再选0 其实这两步可以合并我写板一点 gmx trjconv -s md.tpr -f md_noPBC.xtc -o md_final.xtc -center -pbc none # 消除平移旋转对蛋白主体进行fit这里先选3再选0选1的话编号可能出问题且会消除配体 gmx trjconv -s md.tpr -f md_final.xtc -o md_fit.xtc -fit progressive # 还有这种写法 # gmx trjconv -s md.tpr -f md_final.xtc -o md_fit.xtc -fit rottrans # 再设定下index gmx make_ndx -f md.tpr -o index.ndx # e.g. # ri 1-200 # name 17 proA # ri 201-700 # name 18 proB # q简单描述下fit两种方式的区别progressive是以上一帧为参照系的而rottrans写法则是始终第一帧为参照系建议用progressive的写法其实轨迹较短且主要结构域变化较小时影响不大这一步类似chimerax的matchmaker和pymol的align及super功能还需要编写一个in文件可以使用文本编辑器复制以下内容存为带“ .in”的全部文件“.”格式。温馨提示别拿豆包写这个文件相关资源比较少写出来全是非法参数。8.26晚修改两处bugwithin要小写并改掉一处AI幻觉非法参数亲测可以跑用之前请删除注释gmxmmpbsa文本解释器比较恶心。9.1再更新一下这里可以选近似的gb算法pb会对原子命名要求很高可能识别出问题别的地方应该没问题。general sys_name Prot-prot_PBSA, startframe 1, endframe 500, interval 5, ! 取样频率 verbose 2, forcefields oldff/leaprc.ff99SBildn,leaprc.gaff, ! 匹配MD中的 amber99sb-ildn 力场虽然会从tpr读取但最好指定tleap生成拓扑结构用 PBRadii 3, ! PB计算推荐使用 mbondi2 (3) 或 mbondi3 (4)我的命令行版本需要写这个 qh_entropy 0, ! 关闭准谐振熵计算其实熵不写应该是默认不开 interaction_entropy 0, ! 关闭相互作用熵计算 c2_entropy 0 ! 关闭 C2 熵计算 / pb istrng 0.15, ! 生理盐浓度/离子强度 (mol/L) exdi 80.0, ! 外部溶剂介电常数 (水) scale 2 ! 每埃的网格数即0.5埃数值越小越精确 / decomp idecomp 3, ! 能量分解模式 (3 表示 1-4 能量项单独记入范德华/静电中) dec_verbose 2, ! 输出详细残基分解结果 print_res within 6.0 ! 自动计算界面6埃内残基有先验时也可以写形如 1-50, 100 /再贴一个官方输出的模板Input file generated by gmx_MMPBSA (1.6.5) Be careful with the variables you modify, some can have severe consequences on the results you obtain. # General namelist variables general sys_name # System name startframe 1 # First frame to analyze endframe 9999999 # Last frame to analyze interval 1 # Number of frames between adjacent frames analyzed forcefields oldff/leaprc.ff99SB,leaprc.gaff # Define the force field to build the Amber topology ions_parameters 1 # Define ions parameters to build the Amber topology PBRadii 3 # Define PBRadii to build amber topology from GROMACS files temperature 298.15 # Temperature qh_entropy 0 # Do quasi-harmonic calculation interaction_entropy 0 # Do Interaction Entropy calculation ie_segment 25 # Trajectory segment to calculate interaction entropy c2_entropy 0 # Do C2 Entropy calculation assign_chainID 0 # Assign chains ID exp_ki 0.0 # Experimental Ki in nM full_traj 0 # Print a full traj. AND the thread trajectories gmx_path # Force to use this path to get GROMACS executable keep_files 2 # How many files to keep after successful completion netcdf 0 # Use NetCDF intermediate trajectories solvated_trajectory 1 # Define if it is necessary to cleanup the trajectories verbose 1 # How many energy terms to print in the final output / # (AMBER) Generalized-Born namelist variables gb igb 5 # GB model to use intdiel 1.0 # Internal dielectric constant for sander extdiel 78.5 # External dielectric constant for sander saltcon 0.0 # Salt concentration (M) surften 0.0072 # Surface tension surfoff 0.0 # Surface tension offset molsurf 0 # Use Connelly surface (molsurf program) msoffset 0.0 # Offset for molsurf calculation probe 1.4 # Solvent probe radius for surface area calc ifqnt 0 # Use QM on part of the system qm_theory # Semi-empirical QM theory to use qm_residues # Residues to treat with QM com_qmmask # Mask specifying the quantum atoms in complex rec_qmmask # Mask specifying the quantum atoms in receptor lig_qmmask # Mask specifying the quantum atoms in ligand qmcharge_com 0 # Charge of QM region in complex qmcharge_lig 0 # Charge of QM region in ligand qmcharge_rec 0 # Charge of QM region in receptor qmcut 9999.0 # Cutoff in the QM region scfconv 1e-08 # Convergence criteria for the SCF calculation, in kcal/mol peptide_corr 0 # Apply MM correction to peptide linkages writepdb 1 # Write a PDB file of the selected QM region verbosity 0 # Controls the verbosity of QM/MM related output alpb 0 # Use Analytical Linearized Poisson-Boltzmann (ALPB) arad_method 1 # Selected method to estimate the effective electrostatic size /下面请确保用到的文件在同一个dir里并激活gmx_MMPBSA环境gmx_MMPBSA -O -i mmpbsa.in -cs md.tpr -ct md_fit.xtc -ci index.ndx -cg 17 18 -o FINAL_RESULTS.dat -do FINAL_DECOMP_MMPBSA.dat # 这样拆分tpr的写法也行 # gmx_MMPBSA -O -i mmpbsa.in -cs complex.tpr -ct md_fit.xtc -cr complex_ref.pdb -rs rec.tpr -ls lig.tpr推荐第一种。第二种需要res编号与轨迹一直比如1-200是蛋白A201-700是蛋白B拆分后不能使蛋白B被编号为1-500‑cr complex_ref.pdb是指MD初始的那个pdb文件手动对齐的也好、AF跑出来的也好、PDB数据库下载的也好总之是初始PDB。如果我的内容有所帮助还望友友们点赞收藏支持一下关注我一起探讨更多生物信息学内容
返回列表