gmx_MMPBSA
gmx_MMPBSA copied to clipboard
[Bug-gmx_MMPBSA]: The Topology's File Process Is Wrong
Bug summary
In the [ molecules ] section of the topology file, if ions such as "SOD" and "CLA" are placed before the ligand, the function parmed.gromacs.GromacsTopologyFile cannot correctly process the topology file, resulting in an atom index shift. After comparing the results with the original and commenting out lines 837 to 855 in make_top.py, I printed the values of "temp_top", "res_list", and "rtemp_top". The result "546" is incorrect, while "712" is correct.
Additionally, I built a Docker image to run gmx_MMPBSA. Below is my Dockerfile:
Build the conda image
FROM ubuntu:22.04
COPY ./Miniconda3-latest-Linux-x86_64.sh /root/Miniconda3-latest-Linux-x86_64.sh
ENV PATH=/usr/local/conda/bin:$PATH
RUN bash /root/Miniconda3-latest-Linux-x86_64.sh -b -p /usr/local/conda && \
rm /root/Miniconda3-latest-Linux-x86_64.sh && \
conda init bash
Build the gmx_MMPBSA image
FROM conda:latest
COPY ./run_gmx_mmpbsa.sh /bin/run_gmx_mmpbsa.sh
RUN conda create -n gmxMMPBSA python=3.9 -y #The python=3.10 is failed.
RUN conda install -n gmxMMPBSA -c conda-forge "mpi4py<=3.1.5" "ambertools=22.0" -y && \
conda install -n gmxMMPBSA -c conda-forge "gromacs<=2023.4" pocl -y && \
conda install -n gmxMMPBSA -c conda-forge "gcc=11" "gxx" "pandas=1.2.2" -y && \
bash -c "source activate gmxMMPBSA && pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gmx_MMPBSA && pip cache purge" && \
conda uninstall -n gmxMMPBSA -c conda-forge "gcc" "gxx" -y && \
conda clean --all -y
ENTRYPOINT [ "bash", "/bin/run_gmx_mmpbsa.sh" ]
CMD []
The run_gmx_mmpbsa.sh script:
#!/bin/bash
source activate gmxMMPBSA
gmx_MMPBSA "${@:1}"
It's my topol.top: ;; ;; Generated by CHARMM-GUI FF-Converter ;; ;; Correspondance: ;; [email protected] or [email protected] ;; ;; The main GROMACS topology file ;;
; Include forcefield parameters #include "toppar/forcefield.itp" #include "toppar/PROA.itp" #include "toppar/SOD.itp" #include "toppar/CLA.itp" #include "toppar/BAL.itp" #include "toppar/POPC.itp" #include "toppar/TIP3.itp"
[ system ] ; Name Title
[ molecules ] ; Compound #mols PROA 1 SOD 83 CLA 85 BAL 1 POPC 271 TIP3 29997
Terminal output
The number of atoms in the topology (8781) and the complex structure (8663) are different. Please check these files and verify that they are correct. Otherwise report the error...
Check the gmx_MMPBSA.log file to report the problem.
File "/usr/local/conda/envs/gmxMMPBSA/bin/gmx_MMPBSA", line 8, in <module>
sys.exit(gmxmmpbsa())
File "/usr/local/conda/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/app.py", line 98, in gmxmmpbsa
app.make_prmtops()
File "/usr/local/conda/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/main.py", line 681, in make_prmtops
self.FILES.mutant_receptor_prmtop, self.FILES.mutant_ligand_prmtop) = maketop.buildTopology()
File "/usr/local/conda/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 124, in buildTopology
tops = self.gmxtop2prmtop()
File "/usr/local/conda/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 577, in gmxtop2prmtop
GMXMMPBSA_ERROR(f"The number of atoms in the topology ({error_info[1]}) and the complex structure "
File "/usr/local/conda/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/exceptions.py", line 171, in __init__
raise exc('\n\n' + msg + '\n\nCheck the gmx_MMPBSA.log file to report the problem.')
MMPBSA_Error:
The number of atoms in the topology (8781) and the complex structure (8663) are different. Please check these files and verify that they are correct. Otherwise report the error...
Check the gmx_MMPBSA.log file to report the problem.
Exiting. All files have been retained.
gmx_MMPBSA.log
[INFO ] Starting gmx_MMPBSA v1.6.3 [DEBUG ] WDIR : /workdir [DEBUG ] AMBERHOME : /usr/local/conda/envs/gmxMMPBSA [DEBUG ] PYTHON EXE : /usr/local/conda/envs/gmxMMPBSA/bin/python [DEBUG ] PYTHON VERSION: 3.9.20 (main, Oct 3 2024, 07:27:41) [GCC 11.2.0] [DEBUG ] MPI : /usr/local/conda/envs/gmxMMPBSA/bin/mpirun [DEBUG ] ParmEd : 4.2.2 [DEBUG ] OS PLATFORM : Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 [DEBUG ] OS SYSTEM : Linux [DEBUG ] OS VERSION : #1 SMP Fri Mar 29 23:14:13 UTC 2024 [DEBUG ] OS PROCESSOR : x86_64
[INFO ] Command-line gmx_MMPBSA -O -i mmpbsa.in -cs md.pdb -ct noPBC.xtc -ci t.ndx -cg 1 15 -lm BAL.mol2 -cp all.top -o FINAL_RESULTS_MMPBSA.dat -eo FINAL_RESULTS_MMPBSA.csv
[DEBUG ] |Input file: [DEBUG ] |-------------------------------------------------------------- [DEBUG ] |Input file generated by gmx_MMPBSA (v1.6.1) [DEBUG ] |Be careful with the variables you modify, some can have severe consequences on the results you obtain. [DEBUG ] | [DEBUG ] |# General namelist variables [DEBUG ] |&general [DEBUG ] | sys_name = "Prot-Lig-Memb" # System name [DEBUG ] | startframe = 501 # First frame to analyze [DEBUG ] | endframe = 1000 # Last frame to analyze [DEBUG ] | interval = 1 # Number of frames between adjacent frames analyzed [DEBUG ] | forcefields = "leaprc.protein.ff19SB,leaprc.gaff" # Define the force field to build the Amber topology [DEBUG ] | ions_parameters = 1 # Define ions parameters to build the Amber topology (126_tip3p) [DEBUG ] | temperature = 310 # Temperature [DEBUG ] |/ [DEBUG ] |# (AMBER) Generalized-Born namelist variables [DEBUG ] |&gb [DEBUG ] |igb=1, saltcon=0.150 [DEBUG ] |/ [DEBUG ] |# Decomposition namelist variables [DEBUG ] |&decomposition [DEBUG ] | idecomp = 2 # Which type of decomposition analysis to do [DEBUG ] | dec_verbose = 3 # Control energy terms are printed to the output [DEBUG ] | print_res = "within 6" # Which residues to print decomposition data for [DEBUG ] | csv_format = 1 # Write decomposition data in CSV format [DEBUG ] |/ [DEBUG ] | [DEBUG ] | [DEBUG ] |-------------------------------------------------------------- [DEBUG ] [INFO ] Checking mmpbsa.in input file... [INFO ] Checking mmpbsa.in input file...Done.
[INFO ] Checking external programs... [INFO ] cpptraj found! Using /usr/local/conda/envs/gmxMMPBSA/bin/cpptraj [INFO ] tleap found! Using /usr/local/conda/envs/gmxMMPBSA/bin/tleap [INFO ] parmchk2 found! Using /usr/local/conda/envs/gmxMMPBSA/bin/parmchk2 [INFO ] sander found! Using /usr/local/conda/envs/gmxMMPBSA/bin/sander [INFO ] Using GROMACS version > 5.x.x! [INFO ] gmx found! Using /usr/local/conda/envs/gmxMMPBSA/bin.AVX2_256/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... [DEBUG ] Running command: echo -e "name 1 GMXMMPBSA_REC\n name 15 GMXMMPBSA_LIG\n 1 | 15\n q\n" | /usr/local/conda/envs/gmxMMPBSA/bin.AVX2_256/gmx make_ndx -n t.ndx -o _GMXMMPBSA_COM_index.ndx -f md.pdb [DEBUG ] :-) GROMACS - gmx make_ndx, 2023.4-conda_forge (-: [DEBUG ] [DEBUG ] Executable: /usr/local/conda/envs/gmxMMPBSA/bin.AVX2_256/gmx [DEBUG ] Data prefix: /usr/local/conda/envs/gmxMMPBSA [DEBUG ] Working dir: /workdir [DEBUG ] Command line: [DEBUG ] gmx make_ndx -n t.ndx -o _GMXMMPBSA_COM_index.ndx -f md.pdb [DEBUG ] [DEBUG ] [DEBUG ] Reading structure file [DEBUG ] [DEBUG ] GROMACS reminds you: "All approaches at a higher level are suspect until confirmed at the molecular level." (Francis Crick) [DEBUG ] [DEBUG ] Going to read 1 old index file(s) [DEBUG ] [DEBUG ] 0 System : 135136 atoms [DEBUG ] 1 Protein : 8647 atoms [DEBUG ] 2 Protein-H : 4320 atoms [DEBUG ] 3 C-alpha : 543 atoms [DEBUG ] 4 Backbone : 1629 atoms [DEBUG ] 5 MainChain : 2171 atoms [DEBUG ] 6 MainChain+Cb : 2666 atoms [DEBUG ] 7 MainChain+H : 2686 atoms [DEBUG ] 8 SideChain : 5961 atoms [DEBUG ] 9 SideChain-H : 2149 atoms [DEBUG ] 10 Prot-Masses : 8647 atoms [DEBUG ] 11 non-Protein : 126489 atoms [DEBUG ] 12 Other : 126489 atoms [DEBUG ] 13 SOD : 83 atoms [DEBUG ] 14 CLA : 85 atoms [DEBUG ] 15 BAL : 16 atoms [DEBUG ] 16 POPC : 36314 atoms [DEBUG ] 17 TIP3 : 89991 atoms [DEBUG ] [DEBUG ] nr : group '!': not 'name' nr name 'splitch' nr Enter: list groups [DEBUG ] 'a': atom '&': and 'del' nr 'splitres' nr 'l': list residues [DEBUG ] 't': atom type '|': or 'keep' nr 'splitat' nr 'h': help [DEBUG ] 'r': residue 'res' nr 'chain' char [DEBUG ] "name": group 'case': case sensitive 'q': save and quit [DEBUG ] 'ri': residue index [DEBUG ] [DEBUG ] > [DEBUG ] [DEBUG ] > [DEBUG ] [DEBUG ] > [DEBUG ] Copied index group 1 'GMXMMPBSA_REC' [DEBUG ] Copied index group 15 'GMXMMPBSA_LIG' [DEBUG ] Merged two groups with OR: 8647 16 -> 8663 [DEBUG ] [DEBUG ] > [INFO ] Normal Complex: Saving group Protein_BAL (1_15) in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_COM.pdb [DEBUG ] Running command: echo -e "GMXMMPBSA_REC_GMXMMPBSA_LIG"| /usr/local/conda/envs/gmxMMPBSA/bin.AVX2_256/gmx editconf -f md.pdb -n _GMXMMPBSA_COM_index.ndx -o _GMXMMPBSA_COM.pdb [DEBUG ] :-) GROMACS - gmx editconf, 2023.4-conda_forge (-: [DEBUG ] [DEBUG ] Executable: /usr/local/conda/envs/gmxMMPBSA/bin.AVX2_256/gmx [DEBUG ] Data prefix: /usr/local/conda/envs/gmxMMPBSA [DEBUG ] Working dir: /workdir [DEBUG ] Command line: [DEBUG ] gmx editconf -f md.pdb -n _GMXMMPBSA_COM_index.ndx -o _GMXMMPBSA_COM.pdb [DEBUG ] [DEBUG ] [DEBUG ] Select a group for output: [DEBUG ] Group 0 ( System) has 135136 elements [DEBUG ] Group 1 ( GMXMMPBSA_REC) has 8647 elements [DEBUG ] Group 2 ( Protein-H) has 4320 elements [DEBUG ] Group 3 ( C-alpha) has 543 elements [DEBUG ] Group 4 ( Backbone) has 1629 elements [DEBUG ] Group 5 ( MainChain) has 2171 elements [DEBUG ] Group 6 ( MainChain+Cb) has 2666 elements [DEBUG ] Group 7 ( MainChain+H) has 2686 elements [DEBUG ] Group 8 ( SideChain) has 5961 elements [DEBUG ] Group 9 ( SideChain-H) has 2149 elements [DEBUG ] Group 10 ( Prot-Masses) has 8647 elements [DEBUG ] Group 11 ( non-Protein) has 126489 elements [DEBUG ] Group 12 ( Other) has 126489 elements [DEBUG ] Group 13 ( SOD) has 83 elements [DEBUG ] Group 14 ( CLA) has 85 elements [DEBUG ] Group 15 ( GMXMMPBSA_LIG) has 16 elements [DEBUG ] Group 16 ( POPC) has 36314 elements [DEBUG ] Group 17 ( TIP3) has 89991 elements [DEBUG ] Group 18 (GMXMMPBSA_REC_GMXMMPBSA_LIG) has 8663 elements [DEBUG ] Select a group: [DEBUG ] GROMACS reminds you: "A method is more important than a discovery, since the right method will lead to new and even more important discoveries." (Lev Landau) [DEBUG ] [DEBUG ] Note that major changes are planned in future for editconf, to improve usability and utility. [DEBUG ] Read 135136 atoms [DEBUG ] Volume: 1338.83 nm^3, corresponds to roughly 602400 electrons [DEBUG ] No velocities found [DEBUG ] Selected 18: 'GMXMMPBSA_REC_GMXMMPBSA_LIG' [INFO ] Generating ligand parameters from BAL.mol2 file... [DEBUG ] Running command: /usr/local/conda/envs/gmxMMPBSA/bin/parmchk2 -i BAL.mol2 -f mol2 -o _GMXMMPBSA_BAL.frcmod -s 1 [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 [DEBUG ] Running command: echo -e "1"| /usr/local/conda/envs/gmxMMPBSA/bin.AVX2_256/gmx editconf -f md.pdb -n _GMXMMPBSA_COM_index.ndx -o _GMXMMPBSA_REC.pdb [DEBUG ] :-) GROMACS - gmx editconf, 2023.4-conda_forge (-: [DEBUG ] [DEBUG ] Executable: /usr/local/conda/envs/gmxMMPBSA/bin.AVX2_256/gmx [DEBUG ] Data prefix: /usr/local/conda/envs/gmxMMPBSA [DEBUG ] Working dir: /workdir [DEBUG ] Command line: [DEBUG ] gmx editconf -f md.pdb -n _GMXMMPBSA_COM_index.ndx -o _GMXMMPBSA_REC.pdb [DEBUG ] [DEBUG ] [DEBUG ] Select a group for output: [DEBUG ] Group 0 ( System) has 135136 elements [DEBUG ] Group 1 ( GMXMMPBSA_REC) has 8647 elements [DEBUG ] Group 2 ( Protein-H) has 4320 elements [DEBUG ] Group 3 ( C-alpha) has 543 elements [DEBUG ] Group 4 ( Backbone) has 1629 elements [DEBUG ] Group 5 ( MainChain) has 2171 elements [DEBUG ] Group 6 ( MainChain+Cb) has 2666 elements [DEBUG ] Group 7 ( MainChain+H) has 2686 elements [DEBUG ] Group 8 ( SideChain) has 5961 elements [DEBUG ] Group 9 ( SideChain-H) has 2149 elements [DEBUG ] Group 10 ( Prot-Masses) has 8647 elements [DEBUG ] Group 11 ( non-Protein) has 126489 elements [DEBUG ] Group 12 ( Other) has 126489 elements [DEBUG ] Group 13 ( SOD) has 83 elements [DEBUG ] Group 14 ( CLA) has 85 elements [DEBUG ] Group 15 ( GMXMMPBSA_LIG) has 16 elements [DEBUG ] Group 16 ( POPC) has 36314 elements [DEBUG ] Group 17 ( TIP3) has 89991 elements [DEBUG ] Group 18 (GMXMMPBSA_REC_GMXMMPBSA_LIG) has 8663 elements [DEBUG ] Select a group: [DEBUG ] GROMACS reminds you: "A method is more important than a discovery, since the right method will lead to new and even more important discoveries." (Lev Landau) [DEBUG ] [DEBUG ] Note that major changes are planned in future for editconf, to improve usability and utility. [DEBUG ] Read 135136 atoms [DEBUG ] Volume: 1338.83 nm^3, corresponds to roughly 602400 electrons [DEBUG ] No velocities found [DEBUG ] Selected 1: 'GMXMMPBSA_REC' [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 BAL (15) in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_LIG.pdb [DEBUG ] Running command: echo -e "15"| /usr/local/conda/envs/gmxMMPBSA/bin.AVX2_256/gmx editconf -f md.pdb -n _GMXMMPBSA_COM_index.ndx -o _GMXMMPBSA_LIG.pdb [DEBUG ] :-) GROMACS - gmx editconf, 2023.4-conda_forge (-: [DEBUG ] [DEBUG ] Executable: /usr/local/conda/envs/gmxMMPBSA/bin.AVX2_256/gmx [DEBUG ] Data prefix: /usr/local/conda/envs/gmxMMPBSA [DEBUG ] Working dir: /workdir [DEBUG ] Command line: [DEBUG ] gmx editconf -f md.pdb -n _GMXMMPBSA_COM_index.ndx -o _GMXMMPBSA_LIG.pdb [DEBUG ] [DEBUG ] [DEBUG ] Select a group for output: [DEBUG ] Group 0 ( System) has 135136 elements [DEBUG ] Group 1 ( GMXMMPBSA_REC) has 8647 elements [DEBUG ] Group 2 ( Protein-H) has 4320 elements [DEBUG ] Group 3 ( C-alpha) has 543 elements [DEBUG ] Group 4 ( Backbone) has 1629 elements [DEBUG ] Group 5 ( MainChain) has 2171 elements [DEBUG ] Group 6 ( MainChain+Cb) has 2666 elements [DEBUG ] Group 7 ( MainChain+H) has 2686 elements [DEBUG ] Group 8 ( SideChain) has 5961 elements [DEBUG ] Group 9 ( SideChain-H) has 2149 elements [DEBUG ] Group 10 ( Prot-Masses) has 8647 elements [DEBUG ] Group 11 ( non-Protein) has 126489 elements [DEBUG ] Group 12 ( Other) has 126489 elements [DEBUG ] Group 13 ( SOD) has 83 elements [DEBUG ] Group 14 ( CLA) has 85 elements [DEBUG ] Group 15 ( GMXMMPBSA_LIG) has 16 elements [DEBUG ] Group 16 ( POPC) has 36314 elements [DEBUG ] Group 17 ( TIP3) has 89991 elements [DEBUG ] Group 18 (GMXMMPBSA_REC_GMXMMPBSA_LIG) has 8663 elements [DEBUG ] Select a group: [DEBUG ] GROMACS reminds you: "Player Sleeps With the Fishes" (Ein Bekanntes Spiel Von ID Software) [DEBUG ] [DEBUG ] Note that major changes are planned in future for editconf, to improve usability and utility. [DEBUG ] Read 135136 atoms [DEBUG ] Volume: 1338.83 nm^3, corresponds to roughly 602400 electrons [DEBUG ] No velocities found [DEBUG ] Selected 15: 'GMXMMPBSA_LIG' [INFO ] Checking the structures consistency... [INFO ] [INFO ] Using topology conversion. Setting radiopt = 0... [INFO ] Building Normal Complex Amber topology... [ERROR ] MMPBSA_Error
The number of atoms in the topology (8781) and the complex structure (8663) are different. Please check these files and verify that they are correct. Otherwise report the error...
Check the gmx_MMPBSA.log file to report the problem.
Operating system
Ubuntu
gmx_MMPBSA Version
gmx_MMPBSA v1.6.3 based on MMPBSA version 16.0 and AmberTools 20
Python version
Python 3.9.20
Installation
conda AmberTools + pip