Error in running gmx-MMPBSA for a lig-pro complex

1,536 views
Skip to first unread message

Hamid Irannejad

unread,
Apr 5, 2021, 6:09:25 PM4/5/21
to gmx_MMPBSA
Dear Mario
I get error running this script:

gmx_MMPBSA -O -i mmpbsa.in -cs md.tpr -ci index.ndx -cg 1 13 -ct md.xtc -cp topol.top
[INFO   ] Starting
[INFO   ] Checking external programs...
[INFO   ] cpptraj found! Using /home/hamid/amber20/bin/cpptraj
[INFO   ] tleap found! Using /home/hamid/amber20/bin/tleap
[INFO   ] parmchk2 found! Using /home/hamid/amber20/bin/parmchk2
[INFO   ] sander found! Using /home/hamid/amber20/bin/sander
[INFO   ] Using GROMACS version > 5.x.x!
[INFO   ] gmx found! Using /usr/local/gromacs/bin/gmx
[INFO   ] Checking external programs...Done.

[INFO   ] Building AMBER Topologies from GROMACS files...
[INFO   ] Checking if supported force fields exists in Amber data...
[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 Complex: 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   ] Cleaning GROMACS topologies...
[INFO   ] Building Normal Complex Amber Topology...
[INFO   ] Writing Normal Complex Amber Topology...
[INFO   ] No Receptor topology files was defined. Using ST approach...
[INFO   ] Building AMBER Receptor Topology from Complex...
[INFO   ] No Ligand Topology files was defined. Using ST approach...
[INFO   ] Building AMBER Ligand Topology from Complex...
[INFO   ] Cleaning normal complex trajectories...
[INFO   ] Building AMBER Topologies from GROMACS files...Done.

[INFO   ] Loading and checking parameter files for compatibility...

Preparing trajectories for simulation...
21 frames were processed by cpptraj for use in calculation.

Running calculations on normal system...

Beginning GB calculations with /home/hamid/amber20/bin/sander
  calculating complex contribution...
  calculating receptor contribution...
  calculating ligand contribution...
  File "/home/hamid/amber20/miniconda/bin/gmx_MMPBSA", line 8, in <module>
    sys.exit(gmxmmpbsa())
  File "/home/hamid/amber20/miniconda/lib/python3.8/site-packages/GMXMMPBSA/app.py", line 109, in gmxmmpbsa
    app.parse_output_files()
  File "/home/hamid/amber20/miniconda/lib/python3.8/site-packages/GMXMMPBSA/main.py", line 983, in parse_output_files
    self.calc_types[key] = {'complex': outclass[i](self.pre +
  File "/home/hamid/amber20/miniconda/lib/python3.8/site-packages/GMXMMPBSA/amber_outputs.py", line 663, in __init__
    AmberOutput._read(self)
  File "/home/hamid/amber20/miniconda/lib/python3.8/site-packages/GMXMMPBSA/amber_outputs.py", line 341, in _read
    self._get_energies(output_file)
  File "/home/hamid/amber20/miniconda/lib/python3.8/site-packages/GMXMMPBSA/amber_outputs.py", line 675, in _get_energies
    self.data['BOND'].append(float(words[2]))
ValueError: could not convert string to float: '*************'
Exiting. All files have been retained.

What is the problem and how it can be solved?

marioe911116

unread,
Apr 5, 2021, 6:35:21 PM4/5/21
to gmx_MMPBSA
Hi and welcome! This is a typical error when the energies are quite large because of an inconsistency in the trajectory. Did you fit your trajectory and check that there is not any discontinuity in the system?

Also, try to upgrade the program and see if the error disappears:

amber.python -m pip install git+https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA --upgrade

In case any of these solutions don't work, you can send us the files (.in, .ndx, .top, .tpr, and a small piece of the traj .xtc [10frames]) for review...

hope this helps!

Mario

Hamid Irannejad

unread,
Apr 5, 2021, 11:38:37 PM4/5/21
to gmx_MMPBSA
I already upgraded the gmx_MMPBSA to version 1.4, but the error still exists!
I do not know how to fit the trajectory and checking the discontinuity in the system! how to do this?
Thank you in advance,

Mario Ernesto

unread,
Apr 5, 2021, 11:52:22 PM4/5/21
to Hamid Irannejad, gmx_MMPBSA
In the development version we have improved the work with topologies... That's why I suggested to run the command before for installing the development version... On the other hand, it is mandatory for any analysis (not only gmx_MMPBSA) remove the pbc conditions... If your dynamics have any of the elements moving outside of the simulation box because of the pbc conditions, the energies will be wrong... Consider send us the files for review

Cheers

Mario

--
You received this message because you are subscribed to a topic in the Google Groups "gmx_MMPBSA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gmx_mmpbsa/EJ4jww3VN_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gmx_mmpbsa+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gmx_mmpbsa/ad409d95-95e9-440b-ab28-c4f344d23994n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

marioe911116

unread,
Apr 6, 2021, 6:11:31 AM4/6/21
to gmx_MMPBSA
As stated before, the problem was related to PBC conditions... I used these command to remove PBC condition from the trajectory:

echo 22 0 | gmx trjconv -s md.tpr -f md.xtc -center -pbc mol -ur compact -o md_noPBC.xtc -n index.ndx

echo 22 0 | gmx trjconv -s md.tpr -f md_noPBC.xtc -fit rot+trans -o md_fit.xtc -n

then, make sure to upgrade gmx_MMPBSA to the latest development version (gmx_MMPBSA v1.4.0+56.g8a565c7 based on MMPBSA version 16.0 and AmberTools 20) using this command:

amber.python -m pip install git+https://github.com/Valdes-Tresanco-MS/gmx_MMPBSA --upgrade

and then execute:

gmx_MMPBSA -O -i mmpbsa.in -cs md.tpr -ci index.ndx -cg 1 13 -ct md.xtc -cp topol.top

and it should run smoothly :)

thanks for using gmx_MMPBSA

best!

Mario

Gundala Viswanath

unread,
Dec 27, 2021, 12:25:03 AM12/27/21
to gmx_MMPBSA
Hi Mario, 

I encounter the same error. And I want to resolve it using your suggestion. Just to clarify:

echo 22 0 | gmx trjconv -s md.tpr -f md.xtc -center -pbc mol -ur compact -o md_noPBC.xtc -n index.ndx

echo 22 0 | gmx trjconv -s md.tpr -f md_noPBC.xtc -fit rot+trans -o md_fit.xtc -n


In your command above 22 and 0 is generic or specific for the initial questioner's data?

In my case I have:

Select a group: Selected 22: 'CL'
Select a group: Selected 0: 'System'

Is that correct choice?

Also you miss `-n index.ndx`  in `echo 22 0 | gmx trjconv -s md.tpr -f md_noPBC.xtc -fit rot+trans -o md_fit.xtc -n
command above. 

Lastly, the following command of yours: 



and then execute:

gmx_MMPBSA -O -i mmpbsa.in -cs md.tpr -ci index.ndx -cg 1 13 -ct md.xtc -cp topol.top

Should it be this instead?

gmx_MMPBSA -O -i mmpbsa.in -cs md.tpr -ci index.ndx -cg 1 13 -ct md_fit.xtc -cp topol.top

Thanks and hope to hear from you again.

G.V.

Mario Sergio Valdes

unread,
Dec 27, 2021, 12:42:07 AM12/27/21
to gmx_MMPBSA
I encounter the same error. And I want to resolve it using your suggestion. Just to clarify:

echo 22 0 | gmx trjconv -s md.tpr -f md.xtc -center -pbc mol -ur compact -o md_noPBC.xtc -n index.ndx

echo 22 0 | gmx trjconv -s md.tpr -f md_noPBC.xtc -fit rot+trans -o md_fit.xtc -n


In your command above 22 and 0 is generic or specific for the initial questioner's data? 

In my case I have:

Select a group: Selected 22: 'CL'
Select a group: Selected 0: 'System'

Is that correct choice?

22 corresponds to the index of the complex (receptor + ligand), specific to the system of this particular user. In your case, you need to create such a group and use it to center the path and remove the PBC.
 

Also you miss `-n index.ndx`  in `echo 22 0 | gmx trjconv -s md.tpr -f md_noPBC.xtc -fit rot+trans -o md_fit.xtc -n
command above. 


This is not an error. By default GROMACS automatically completes the flag with the files associated with their default name. That is, the index file that GROMACS generates is called index.ndx by default, so it is not required to define it explicitly when using the -n flag, as long as its file exists in the working directory and is called index.ndx
 
Lastly, the following command of yours: 



and then execute:

gmx_MMPBSA -O -i mmpbsa.in -cs md.tpr -ci index.ndx -cg 1 13 -ct md.xtc -cp topol.top

Should it be this instead?

gmx_MMPBSA -O -i mmpbsa.in -cs md.tpr -ci index.ndx -cg 1 13 -ct md_fit.xtc -cp topol.top


Yes, you must use the fitted trajectory
 
If you have questions about how to solve problems related to the trajectory, PBC, or the creation of groups in GROMACS, please consult the GROMACS documentation. Keep in mind that gmx_MMPBSA is a free energy calculation program, so you must ensure that both the parameters used for your simulation, as well as the results of this, must be consistent.

HTH!
Mario S.

Reply all
Reply to author
Forward
0 new messages