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
215 stars 64 forks source link

[Bug-gmx_MMPBSA]: "MoleculeError: Cannot exclude an atom from itself! Atoms are: <Atom CL [0]" #332

Closed hackerzone85 closed 1 year ago

hackerzone85 commented 1 year ago

Bug summary

150 ns MDS of I7L (MPXV) and Batefenterol (Chorine containing) was performed. The same MDS was performed with Burixafor and eluxadolin drug. MMGBSA analysis gives errors with Batefenterol and not with burixafor and eluxadolin. Configuration is kept the same for all cases. The system for MDS is prepared with charmm36-jul2021 forcefield.

Terminal output

$ mpirun -np 75 gmx_MMPBSA MPI -O -i mmpbsa.in -cs ../md_0_150.tpr -ci ../index.ndx -cg 1 13 -ct ../md_0_150_noPBC_noWAT_noJUMP.xtc -cp ../../topol.top -o FINAL_RESULTS_MMPBSA.dat -eo FINAL_RESULTS_MMPBSA.csv
[INFO   ] Starting gmx_MMPBSA v1.5.7
[INFO   ] Command-line
  mpirun -np 75 gmx_MMPBSA MPI -O -i mmpbsa.in -cs ../md_0_150.tpr -ci ../index.ndx -cg 1 13 -ct ../md_0_150_noPBC_noWAT_noJUMP.xtc -cp ../../topol.top -o FINAL_RESULTS_MMPBSA.dat -eo FINAL_RESULTS_MMPBSA.csv

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

[INFO   ] Checking external programs...
[INFO   ] cpptraj found! Using /home/ddalab/anaconda3/envs/gmxMMPBSA/bin/cpptraj
[INFO   ] tleap found! Using /home/ddalab/anaconda3/envs/gmxMMPBSA/bin/tleap
[INFO   ] parmchk2 found! Using /home/ddalab/anaconda3/envs/gmxMMPBSA/bin/parmchk2
[INFO   ] sander found! Using /home/ddalab/anaconda3/envs/gmxMMPBSA/bin/sander
[INFO   ] Using GROMACS version > 5.x.x!
[INFO   ] gmx found! Using /home/ddalab/GMX2021.1/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 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 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 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/ddalab/anaconda3/envs/gmxMMPBSA/bin/gmx_MMPBSA", line 8, in <module>
    sys.exit(gmxmmpbsa())
  File "/home/ddalab/anaconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/app.py", line 98, in gmxmmpbsa
    app.make_prmtops()
  File "/home/ddalab/anaconda3/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/ddalab/anaconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 118, in buildTopology
    tops = self.gmxtop2prmtop()
  File "/home/ddalab/anaconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 478, in gmxtop2prmtop
    com_top = self.cleantop(self.FILES.complex_top, self.indexes['COM']['COM'])
  File "/home/ddalab/anaconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 765, in cleantop
    rtemp_top = parmed.gromacs.GromacsTopologyFile(ttp_file.as_posix())
  File "/home/ddalab/anaconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/parmed/gromacs/gromacstop.py", line 346, in __init__
    self.read(fname, defines, parametrize)
  File "/home/ddalab/anaconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/parmed/gromacs/gromacstop.py", line 470, in read
    atoms[0].exclude(a)
  File "/home/ddalab/anaconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/parmed/topologyobjects.py", line 969, in exclude
    raise MoleculeError(f"Cannot exclude an atom from itself! Atoms are: {self} {other}")
MoleculeError: Cannot exclude an atom from itself! Atoms are: <Atom CL [0]; In BAT 0> <Atom CL [0]; In BAT 0>
Error occurred on rank 0.
Exiting. All files have been retained.
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

gmx_MMPBSA.log

gmx_MMPBSA.log

Operating system

Ubuntu 20.04.4 LTS

gmx_MMPBSA Version

1.5.7

Python version

3.9.15

Installation

conda AmberTools + conda

marioernestovaldes commented 1 year ago

It seems to be a topology-related issue... Could you please send the topology?

hackerzone85 commented 1 year ago

ligand_topology_files.zip Screenshot from 2023-02-16 13-06-48

marioernestovaldes commented 1 year ago

please, delete the exclusions (line 893) and virtual sites (line 889) sections... they are not necessary for the MMGBSA calculation and that's probably what's causing the issue... also, follow this tutorial

https://valdes-tresanco-ms.github.io/gmx_MMPBSA/dev/examples/Protein_ligand_LPH_atoms_CHARMMff/

to perform the calculations with ligand containing LPH

hackerzone85 commented 1 year ago

Thanks for the quick reply. Our problem is resolved now by removing the exclusions and virtual_sites2 sections from the bat.itp (Ligand topology) file.