“TypeError: Cannot instantiate an AmberParm from unknown functional”

153 views
Skip to first unread message

Break Xerxes

unread,
Apr 27, 2023, 3:54:39 AM4/27/23
to gmx_MMPBSA
Hi,
I am getting error when running command for gmx_MMPBSA, here are details of the issue.

Command Line: 
mpirun -np 1 gmx_MMPBSA MPI -i mmgbsa.in -cs md.tpr -ci index.ndx -cg 19 22 -ct md_fit.xtc -cp topol.top -nogui -o FINAL_RESULTS_MMPBSA.dat -eo  FINAL_RESULTS_MMPBSA.csv

Returned error:
“TypeError: Cannot instantiate an AmberParm from unknown functional”

Terminal output:
[INFO   ] Checking mmgbsa.in input file...
[INFO   ] Checking mmgbsa.in input file...Done.

[INFO   ] Checking external programs...
[INFO   ] cpptraj found! Using /dssg/home/acct-ccehp/ccehp-yhr313/.conda/envs/gmxMMPBSA/bin/cpptraj
[INFO   ] tleap found!
Using /dssg/home/acct-ccehp/ccehp-yhr313/.conda/envs/gmxMMPBSA/bin/tleap
[INFO   ] parmchk2 found! Using /dssg/home/acct-ccehp/ccehp-yhr313/.conda/envs/gmxMMPBSA/bin/parmchk2
[INFO   ] sander found! Using /dssg/home/acct-ccehp/ccehp-yhr313/.conda/envs/gmxMMPBSA/bin/sander
[INFO   ] Using GROMACS version > 5.x.x!
[INFO   ] gmx found! Using /dssg/home/acct-ccehp/ccehp-yhr313/.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...
[INFO   ] Normal Complex: Saving group S309_RBD (19_22) 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 S309 (19) 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 RBD (22) 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...
/home/user/ .conda/envs/gmxMMPBSA/lib/python3.9/site-packages/parmed/gromacs/gromacstop.py:533: GromacsWarning: pairs funct != 1; unknown functional
  warnings.warn('pairs funct != 1; unknown functional',
/home/user/ .conda/envs/gmxMMPBSA/lib/python3.9/site-packages/parmed/gromacs/gromacstop.py:533: GromacsWarning: pairs funct != 1; unknown functional
  warnings.warn('pairs funct != 1; unknown functional',
......
/home/user/ .conda/envs/gmxMMPBSA/lib/python3.9/site-packages/parmed/gromacs/gromacstop.py:533: GromacsWarning: pairs funct != 1; unknown functional
  warnings.warn('pairs funct != 1; unknown functional',
  File " /home/user/ .conda/envs/gmxMMPBSA/bin/gmx_MMPBSA", line 8, in <module>
    sys.exit(gmxmmpbsa())
  File " /home/user/ .conda/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/app.py", line 98, in gmxmmpbsa
    app.make_prmtops()
  File " /home/user/ .conda/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/main.py", line 687, in make_prmtops
    self.FILES.mutant_receptor_prmtop, self.FILES.mutant_ligand_prmtop) = maketop.buildTopology()
  File " /home/user/ .conda/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 125, in buildTopology
    tops = self.gmxtop2prmtop()
  File " /home/user/ .conda/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/make_top.py", line 553, in gmxtop2prmtop
    com_amb_prm = parmed.amber.AmberParm.from_structure(com_top)
  File " /home/user/ .conda/envs/gmxMMPBSA/lib/python3.9/site-packages/parmed/amber/_amberparm.py", line 306, in from_structure
    raise TypeError('Cannot instantiate an AmberParm from unknown functional')
TypeError: Cannot instantiate an AmberParm from unknown functional
Exiting. All files have been retained.

About trajectory:
I use Amber ff19sb & GLYCAM06j to obtain the trajectory, for the receptor is a glycoprotein and ligand is a protein. In that case, I use the forcefield  "leaprc.protein.ff19SB, leaprc.GLYCAM_06j-1"  in the input file "mmpbsa.in".
Initially, I suspect the AmberTools21 do not match well with the ff19sb, then I change the forcefield to ff14sbonlysc & GLYCAM06j and rerun the trajectory,  and trying to install AmberTools22 at the same time. Unfortunately, both of them, resulting the same error.
Then, I suspect the forcefield combination "leaprc.protein.ff19SB, leaprc.GLYCAM_06j-1" cannot add to the same group, in other words, this combination cannot describe a glycoprotein in binding energy calculation(I supposed). So I change the receptor group to the oligosaccharides. However, I get the same error again.
Addtionally, I also tried to only use protein forcefield and chose protein-only group, still return the same error.

gmx_MMPBSA Version
gmx_MMPBSA v1.6.1 based on MMPBSA version 16.0 and AmberTools 20

Operating system
CentOS7.7



Mario Sergio Valdes

unread,
Apr 27, 2023, 10:27:48 AM4/27/23
to gmx_MMPBSA
In this case, as the topology is defined, the defined force fields are not used to generate the topology, but it is converted directly from Gromacs to Amber. This looks like there are missing parameters. Please send me the topology files (*.top, *.itps, toppar folder if exists)

Break Xerxes

unread,
Apr 27, 2023, 10:32:04 PM4/27/23
to gmx_MMPBSA
Can you see my reply?

Break Xerxes

unread,
Apr 27, 2023, 10:43:11 PM4/27/23
to gmx_MMPBSA
Well, I send the file again to see whether google will or not swallow my reply.

Addtionally, I tried to take off the " -cp topol.top" in command line, and the error I mentioned above disappered. But another error occured:
"[ERROR  ] MMPBSA_Error

/dssg/home/acct-ccehp/ccehp-yhr313/.conda/envs/gmxMMPBSA/bin/tleap failed when querying _GMXMMPBSA_leap.in"


By viewing log file, it seems that an error occured when marking per-residue atom chain types, but I don't know how to deal with. 

在2023年4月27日星期四 UTC+8 22:27:48<mariosergi...@gmail.com> 写道:
gmx_MMPBSA.log
toppar.zip
topol.top
Message has been deleted

Mario Sergio Valdes

unread,
Apr 28, 2023, 12:44:56 AM4/28/23
to gmx_MMPBSA
Sorry for the delay. I was looking for information on this bug. I'm not sure why, but it seems that part of the parameterization of your system follows a nomenclature similar to GROMOS (You can see it in lines 7080-7091, 14847-14991, column funct = 2 which corresponds to an extra LJ or Coulomb potential [https://manual.gromacs.org/current/reference-manual/topologies/topology-file-formats.html#id36]).
According to the ParmEd developer, Amber does not support the functional forms for the bonded terms used in the GROMOS force fields, so it is impossible to convert the topology from Gromacs to Amber (https://github.com/ParmEd/ParmEd/issues /647). Weirdly, you get this error using both ff with support for Amber.

Edit: Sorry for the mistake in the text, the autocorrect played a trick on me
Mario S.

Break Xerxes

unread,
Apr 28, 2023, 11:43:19 PM4/28/23
to gmx_MMPBSA
Much appreciation for your valuable suggestions! 
Maybe the file I share is too big, google not allow me to post it in the topic. Thus, I send it to your email and the file you need all in the zip package :)
I follow your advice to check the one of the results which has positive value in FINAL_RESULT_MMPBSA.dat, and I find that not only ΔEDISPER but also ΔEPB is large, as you can see in the .dat file.
So how to comprehend the large positive value of ΔEPB (since whether complex or receptor or ligand have large negative value)
FINAL_RESULT_MMPBSA.dat

Break Xerxes

unread,
Apr 28, 2023, 11:46:38 PM4/28/23
to gmx_MMPBSA
Well, I know why I cannot see my reply above. I always chose "reply to author" 😂

Mario Sergio Valdes

unread,
Apr 28, 2023, 11:59:07 PM4/28/23
to gmx_MMPBSA
The solvation energy must be positive since it accounts for the energy required to separate the solute from the solvent (in this case, water). This value is high, due to the nature of your system. This energy is generally inversely related to the EEL component, since the more interactions of this nature the system has, the more hydrophilic it will be. Being more hydrophilic, it will have more interaction with water, and therefore more energy will be required to separate it from it. If you calculate the energy with the parameter inp = 1, the final value should be negative

Break Xerxes

unread,
Apr 29, 2023, 2:48:09 AM4/29/23
to gmx_MMPBSA
Thank you so much for your patience and detailed explanation! 

Break Xerxes

unread,
Apr 29, 2023, 4:20:38 AM4/29/23
to gmx_MMPBSA
I'm sorry to bother you again, I'm still curious about one more question since I didn't find the answer in the group: how to comprehend the value of UB, IMP, CMAP, 1-4 VDW and 1-4 EEL? 
For the first three, they seem to be absent when using the Amber force field to calculate the binding free energy, on account that I want to know what kind of contribution they represent here. For the latter two, I would like to know why these two contributions are calculated separately for the 1-4 interactions when there is already a section representing van der Waals interactions (VDWAALS) and electrostatic interactions (EEL)? 
I suppose the reason for calculating the 1-4 interaction separately is the algorithm used can't consider the 1-4 interaction with other components at the same time, but I'm not sure about it.

在2023年4月29日星期六 UTC+8 11:59:07<mariosergi...@gmail.com> 写道:

Mario Sergio Valdes

unread,
Apr 29, 2023, 5:35:26 AM4/29/23
to gmx_MMPBSA
UB, IMP, and CMAP are terms from Charmm ff. CMAP is also included in the Amber19SB ff
For the 1-4 energies you can check this very-well explained thread of Amber's mailing lists  https://structbio.vanderbilt.edu/archives/amber-archive/2008/4453.php
Hope this helps!
Reply all
Reply to author
Forward
0 new messages