计算化学公社

 找回密码 Forget password
 注册 Register
Views: 24|回复 Reply: 0
打印 Print 上一主题 Last thread 下一主题 Next thread

[GROMACS] 用gmx_MMPBSA计算遇到IndexError: list index out of range Exiting

[复制链接 Copy URL]

1

帖子

0

威望

11

eV
积分
12

Level 1 能力者

本帖最后由 luxiao 于 2026-5-12 16:24 编辑

我模拟的是蛋白和小分子,想计算它们的结合自由能,gmx_MMPBSA是官网下载的没有问题,按照流程准备了.tpr /.xtc/.ndx/topol.top和mmgbsa.in 但是执行时出现了下面的问题。

[yxy@n1566 OVA-PHLnew]$ gmx_MMPBSA -O -i mmgbsa.in -cs md_0_10.tpr -ct fit.xtc -ci index_new.ndx -cg 1 13 -cp topol.top -o FINAL_RESULTS_MMPBSA.dat -eo FINAL_RESULTS_MMPBSA.csv
[INFO   ] Starting gmx_MMPBSA 1.6.4
[INFO   ] Command-line
  gmx_MMPBSA -O -i mmgbsa.in -cs md_0_10.tpr -ct fit.xtc -ci index_new.ndx -cg 1 13 -cp topol.top -o FINAL_RESULTS_MMPBSA.dat -eo FINAL_RESULTS_MMPBSA.csv

[INFO   ] Checking mmgbsa.in input file...
[INFO   ] Checking mmgbsa.in input file...Done.

[INFO   ] Checking external programs...
[INFO   ] cpptraj found! Using /home/yxy/miniconda3/envs/gmxMMPBSA/bin/cpptraj
[INFO   ] tleap found! Using /home/yxy/miniconda3/envs/gmxMMPBSA/bin/tleap
[INFO   ] parmchk2 found! Using /home/yxy/miniconda3/envs/gmxMMPBSA/bin/parmchk2
[INFO   ] sander found! Using /home/yxy/miniconda3/envs/gmxMMPBSA/bin/sander
[INFO   ] Using GROMACS version > 5.x.x!
[INFO   ] gmx found! Using /opt/gmx2023.3/bin/gmx
[INFO   ] Checking external programs...Done.

[INFO   ] Building AMBER topologies from GROMACS files...
[INFO   ] Get PDB files from GROMACS structures files...
[INFO   ] Making gmx_MMPBSA index for complex...
[INFO   ] Normal Complex: Saving group Protein_MOL (1_13) in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_COM.pdb
[INFO   ] No receptor structure file was defined. Using ST approach...
[INFO   ] Using receptor structure from complex to generate AMBER topology
[INFO   ] Normal Receptor: Saving group Protein (1) in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_REC.pdb
[INFO   ] No ligand structure file was defined. Using ST approach...
[INFO   ] Using ligand structure from complex to generate AMBER topology
[INFO   ] Normal Ligand: Saving group MOL (13) in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_LIG.pdb
[INFO   ] Checking the structures consistency...
[INFO   ]
[INFO   ] Using topology conversion. Setting radiopt = 0...
[INFO   ] Building Normal Complex Amber topology...
  File "/home/yxy/miniconda3/envs/gmxMMPBSA/bin/gmx_MMPBSA", line 6, in <module>
    sys.exit(gmxmmpbsa())
             ^^^^^^^^^^^
  File "/home/yxy/miniconda3/envs/gmxMMPBSA/lib/python3.11/site-packages/GMXMMPBSA/app.py", line 98, in gmxmmpbsa
    app.make_prmtops()
  File "/home/yxy/miniconda3/envs/gmxMMPBSA/lib/python3.11/site-packages/GMXMMPBSA/main.py", line 681, in make_prmtops
    self.FILES.mutant_receptor_prmtop, self.FILES.mutant_ligand_prmtop) = maketop.buildTopology()
                                                                          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yxy/miniconda3/envs/gmxMMPBSA/lib/python3.11/site-packages/GMXMMPBSA/make_top.py", line 125, in buildTopology
    tops = self.gmxtop2prmtop()
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/yxy/miniconda3/envs/gmxMMPBSA/lib/python3.11/site-packages/GMXMMPBSA/make_top.py", line 566, in gmxtop2prmtop
    com_top = self.cleantop(self.FILES.complex_top, self.indexes['COM']['COM'])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yxy/miniconda3/envs/gmxMMPBSA/lib/python3.11/site-packages/GMXMMPBSA/make_top.py", line 853, in cleantop
    rtemp_top = parmed.gromacs.GromacsTopologyFile(temp_top.name)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yxy/miniconda3/envs/gmxMMPBSA/lib/python3.11/site-packages/parmed/gromacs/gromacstop.py", line 346, in __init__
    self.read(fname, defines, parametrize)
  File "/home/yxy/miniconda3/envs/gmxMMPBSA/lib/python3.11/site-packages/parmed/gromacs/gromacstop.py", line 407, in read
    bond, bond_type = self._parse_bonds(line, bond_types, molecule.atoms)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yxy/miniconda3/envs/gmxMMPBSA/lib/python3.11/site-packages/parmed/gromacs/gromacstop.py", line 600, in _parse_bonds
    funct = int(words[2])
                ~~~~~^^^
IndexError: list index out of range
Exiting. All files have been retained.
AL告诉我是因为top文件里键有问题,由于文件大小限制我只把键部分粘贴下来了。
附上了输入的文件,期待有经验或知道原因的大佬回复。

md_0_10.tpr

2.9 MB, 下载次数 Times of downloads: 0

[ bonds ].txt

425.43 KB, 下载次数 Times of downloads: 1

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-5-12 22:59 , Processed in 0.191812 second(s), 24 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list