Valdes-Tresanco-MS / gmx_MMPBSA

gmx_MMPBSA is a new tool based on AMBER's MMPBSA.py aiming to perform end-state free energy calculations with GROMACS files.
https://valdes-tresanco-ms.github.io/gmx_MMPBSA/
GNU General Public License v3.0
218 stars 64 forks source link

[Bug-gmx_MMPBSA]: tleap failed when querying _GMXMMPBSA_leap.in #337

Closed Tangbbmc closed 1 year ago

Tangbbmc commented 1 year ago

Bug summary

tleap failed when querying _GMXMMPBSA_leap.in

Terminal output

[INFO   ] Generating AMBER Compatible PDB Files...
[INFO   ] Changing the Complex residues name format from GROMACS to AMBER...
[INFO   ] Changing the Receptor residues name format from GROMACS to AMBER...
[INFO   ] Changing the Ligand residues name format from GROMACS to AMBER...
[INFO   ] Splitting  receptor and ligand in PDB files..
[INFO   ] Building tleap input files...
[ERROR  ] MMPBSA_Error /home/twg/miniconda3/envs/AmberTools22/bin/tleap failed when querying _GMXMMPBSA_leap.in.
           Check the gmx_MMPBSA.log file to report the problem.
  File "/home/twg/miniconda3/envs/gmxMMPBSA/bin/gmx_MMPBSA", line 8, in <module>
    sys.exit(gmxmmpbsa())
  File "/home/twg/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/app.py", line 98, in gmxmmpbsa
    app.make_prmtops()
  File "/home/twg/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/main.py", line 548, in make_prmtops
    self.FILES.mutant_receptor_prmtop, self.FILES.mutant_ligand_prmtop) = maketop.buildTopology()
  File "/home/twg/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 121, in buildTopology
    tops = self.makeToptleap()
  File "/home/twg/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 1383, in makeToptleap
    self._run_tleap(tleap, 'leap.in', data_path)
  File "/home/twg/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 1510, in _run_tleap
    GMXMMPBSA_ERROR('%s failed when querying %s' % (tleap, self.FILES.prefix + arg1))
  File "/home/twg/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/exceptions.py", line 169, in __init__
    raise exc(msg + '\nCheck the gmx_MMPBSA.log file to report the problem.')
MMPBSA_Error: /home/twg/miniconda3/envs/AmberTools22/bin/tleap failed when querying _GMXMMPBSA_leap.in
Check the gmx_MMPBSA.log file to report the problem.
Exiting. All files have been retained.

gmx_MMPBSA.log

gmx_MMPBSA.log

Operating system

Ubuntu 18.04

gmx_MMPBSA Version

gmx_MMPBSA v1.5.7

Python version

PYTHON VERSION: 3.9.16

Installation

conda AmberTools + pip

marioernestovaldes commented 1 year ago

please, define the topology with the -cp topol.top flag

Tangbbmc commented 1 year ago

@marioernestovaldes Sorry! I still don't quite understand! Is there something wrong with my com.tpr file? com_tpr.zip

marioernestovaldes commented 1 year ago

Define the topology with the -cp topol.top flag as in this example:

gmx_MMPBSA -O -i mmpbsa.in -cs str_noLP.pdb -ci index_mod_gromacs.ndx -cg 1 17 -ct com_traj.xtc -cp topol.top -o FINAL_RESULTS_MMPBSA.dat -eo FINAL_RESULTS_MMPBSA.csv

Tangbbmc commented 1 year ago

@marioernestovaldes Oh, I get it. As you suggested, I executed new gmx_MMPBSA command with the -cp topol.top flag. The previously mentioned error really disappeared. However, the subsequent successfully running required the placement of charmm36-mar2019.ff file, ligand.itp and ligand.prm in the running folder. Here, I have a confusion.

The ligand.mol2 file has been present in the folder, why do I also require topol.top file when running gmx_MMPBSA command?

For the Protein-ligand (ST) example from test files you provided, the binding free energy calculation does not require topol.top file (in which the command is gmx_MMPBSA -O -i mmpbsa.in -cs com.tpr -ci index.ndx -cg 1 13 -ct com_traj.xtc -lm ligand.mol2 -o FINAL_RESULTS_MMPBSA.dat -eo FINAL_RESULTS_MMPBSA.csv).

marioernestovaldes commented 1 year ago

When working with CHARMM-generated files, topology is always required. please check https://valdes-tresanco-ms.github.io/gmx_MMPBSA/dev/howworks/

For systems prepared with AMBER ff, when you provide the topology file with the -cp topol.top flag, forcefields, and ligand.mol2 are discarded and the conversion is generated from that of the topology that was provided... This is a more consistent and robust way to generate the topology and avoid errors related to "wrong" .mol2 files... For now, you can use both methods, but moving forward we will transition to using always the topology of the system.

Tangbbmc commented 1 year ago

OK, I understand! Thanks for your patient explanation! Here, I would like to consult a question. Do the force fields for binding free energy calculations need to be consistent with the those used in molecular dynamic simulation?

发件人:"Mario E. Valdés-Tresanco" @.> 发送日期:2023-02-20 11:42:23 收件人:Valdes-Tresanco-MS/gmx_MMPBSA @.> 抄送人:Tangbbmc @.>,Author @.> 主题:Re: [Valdes-Tresanco-MS/gmx_MMPBSA] [Bug-gmx_MMPBSA]: tleap failed when querying _GMXMMPBSA_leap.in (Issue #337)

When you provide the topology file with the -cp topol.top flag, forcefields, and ligand.mol2 are discarded and the conventions are generated from that of the topology that was provided... This is a more consistent and robust way to generate the topology and avoid errors related to "wrong" .mol2 files... For now, you can use both methods, but moving forward we will transition to using always the topology of the system. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

marioernestovaldes commented 1 year ago

yes, it's expected to be the same, although gmx_MMPBSA does not enforce the use of the same force field... that will ultimately depend on you...