# MMPBSA Key Error: 'BDC'

**URL:** <https://gromacs.bioexcel.eu/t/mmpbsa-key-error-bdc/5508>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [December 30, 2022, 4:27pm UTC](https://gromacs.bioexcel.eu/t/mmpbsa-key-error-bdc/5508 "2022-12-30T16:27:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![isilver](https://avatars.discourse-cdn.com/v4/letter/i/13edae/32.png) [@isilver](https://gromacs.bioexcel.eu/u/isilver)\
**Post date:** [December 30, 2022, 4:27pm UTC](https://gromacs.bioexcel.eu/t/mmpbsa-key-error-bdc/5508/1 "2022-12-30T16:27:07Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question

Hi! I am trying to run an energy scoring of a simulation between two proteins using mmpbsa. I am trying to use decomposition, however, I receive a ‘BDC’ error, which I do not know what it is referring to or how to adjust it. Please advise!

I have pasted the mmpbsa.in input file used below as well as the lines of code which appeared once the function was run.

mmpbsa.in:

Input file generated by gmx\_MMPBSA (v1.5.6)  
Be careful with the variables you modify, some can have severe consequences on the results you obtain.

# General namelist variables

&general  
sys\_name = “” # System name  
startframe = 1 # First frame to analyze  
endframe = 9999999 # Last frame to analyze  
interval = 1 # Number of frames between adjacent frames analyzed  
forcefields = “oldff/leaprc.ff99SB,leaprc.gaff” # Define the force field to build the Amber topology  
ions\_parameters = 1 # Define ions parameters to build the Amber topology  
PBRadii = 3 # Define PBRadii to build amber topology from GROMACS files  
temperature = 298.15 # Temperature  
qh\_entropy = 0 # Do quasi-harmonic calculation  
interaction\_entropy = 0 # Do Interaction Entropy calculation  
ie\_segment = 25 # Trajectory segment to calculate interaction entropy  
c2\_entropy = 0 # Do C2 Entropy calculation  
assign\_chainID = 0 # Assign chains ID  
exp\_ki = 0.0 # Experimental Ki in nM  
full\_traj = 0 # Print a full traj. AND the thread trajectories  
gmx\_path = “” # Force to use this path to get GROMACS executable  
keep\_files = 2 # How many files to keep after successful completion  
netcdf = 0 # Use NetCDF intermediate trajectories  
solvated\_trajectory = 1 # Define if it is necessary to cleanup the trajectories  
verbose = 1 # How many energy terms to print in the final output  
/

# (AMBER) Generalized-Born namelist variables

&gb  
igb = 5 # GB model to use  
intdiel = 1.0 # Internal dielectric constant for sander  
extdiel = 78.5 # External dielectric constant for sander  
saltcon = 0.0 # Salt concentration (M)  
surften = 0.0072 # Surface tension  
surfoff = 0.0 # Surface tension offset  
molsurf = 0 # Use Connelly surface (‘molsurf’ program)  
msoffset = 0.0 # Offset for molsurf calculation  
probe = 1.4 # Solvent probe radius for surface area calc  
ifqnt = 0 # Use QM on part of the system  
qm\_theory = “” # Semi-empirical QM theory to use  
qm\_residues = “” # Residues to treat with QM  
qmcharge\_com = 0 # Charge of QM region in complex  
qmcharge\_lig = 0 # Charge of QM region in ligand  
qmcharge\_rec = 0 # Charge of QM region in receptor  
qmcut = 9999.0 # Cutoff in the QM region  
scfconv = 1e-08 # Convergence criteria for the SCF calculation, in kcal/mol  
peptide\_corr = 0 # Apply MM correction to peptide linkages  
writepdb = 1 # Write a PDB file of the selected QM region  
verbosity = 0 # Controls the verbosity of QM/MM related output  
alpb = 0 # Use Analytical Linearized Poisson-Boltzmann (ALPB)  
arad\_method = 1 # Selected method to estimate the effective electrostatic size  
/

Sample input file for decomposition analysis  
This input file is meant to show only that gmx\_MMPBSA works. Althought,  
we tried to used the input files as recommended in the Amber manual,  
some parameters have been changed to perform more expensive calculations  
in a reasonable amount of time. Feel free to change the parameters  
according to what is better for your system.

sys\_name=“Decomposition”,  
startframe=1,  
endframe=10,  
forcefields=“leaprc.protein.ff14SB”  
/

igb=5, saltcon=0.150,  
/  
#make sure to include at least one residue from both the receptor  
#and ligand in the print\_res mask of the &decomp section.  
#this requirement is automatically fulfilled when using the within keyword.  
#[Re: [AMBER] Is there any problem with this input file? from Bill Miller III on 2013-08-05 (Amber Archive Aug 2013)](http://archive.ambermd.org/201308/0075.html)  
&decomp  
idecomp=2, dec\_verbose=3,  
print\_res=“within 4”  
/

LINES OF CODE AFTER FUNCTION WAS RUN:

gmx\_MMPBSA -O -i mmpbsa.in -cs md\_0\_10.tpr -ci index.ndx -cg 21 22 -ct md\_0\_10.xtc -cp topol.top

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

[INFO] Checking external programs…  
[INFO] cpptraj found! Using /home/dovschulman/miniconda3/bin/cpptraj  
[INFO] tleap found! Using /home/dovschulman/miniconda3/bin/tleap  
[INFO] parmchk2 found! Using /home/dovschulman/miniconda3/bin/parmchk2  
[INFO] sander found! Using /home/dovschulman/miniconda3/bin/sander  
[INFO] Using GROMACS version \> 5.x.x!  
[INFO] gmx found! Using /usr/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 21\_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 21 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 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…  
[INFO] Detected Amber/OPLS force field topology format…  
[WARNING] 5981 invalid DIHEDRAL\_PERIODICITY = 0 found in Complex topology… Setting DIHEDRAL\_PERIODICITY = 1  
[INFO] Assigning PBRadii mbondi2 to Complex…  
[INFO] Writing Normal Complex AMBER topology…  
[INFO] No Receptor topology file was defined. Using ST approach…  
[INFO] Building AMBER Receptor topology from Complex…  
[INFO] Assigning PBRadii mbondi2 to Receptor…  
[INFO] Writing Normal Receptor AMBER topology…  
[INFO] No Ligand topology file was defined. Using ST approach…  
[INFO] Building AMBER Ligand topology from Complex…  
[INFO] Assigning PBRadii mbondi2 to Ligand…  
[INFO] Writing Normal Ligand AMBER topology…  
[INFO] Selecting residues by distance (4 Å) between receptor and ligand for decomposition analysis…  
[INFO] Selected 61 residues:  
L:A:LYS:1000 L:A:LEU:1001 L:A:VAL:1002 L:A:ARG:1003 L:A:LEU:1017 L:A:LYS:1018 L:A:ASN:1019  
L:A:GLY:1020 L:A:THR:1021 L:A:VAL:1023 L:A:SER:1033 L:A:MET:1034 L:A:ASN:1035 L:A:HIS:1037  
L:A:MET:1043 L:A:LEU:1045 L:A:LYS:1046 L:A:ARG:1048 L:A:VAL:1051 L:A:GLN:1052 L:A:LEU:1053  
L:A:GLU:1054 L:A:THR:1055 L:A:LEU:1056 L:A:SER:1057 L:A:ILE:1058 L:A:ARG:1059 L:A:GLY:1060  
L:A:ASN:1061 L:A:ASN:1062 R:B:ASN:28 R:B:TYR:58 R:B:PRO:59 R:B:ILE:61 R:B:SER:62 R:B:LEU:63 R:B:HIS:64  
R:B:ALA:65 R:B:LEU:66 R:B:SER:67 R:B:ARG:68 R:B:ASP:69 R:B:TYR:79 R:B:MET:81 R:B:VAL:82 R:B:ASN:83 R:B:VAL:106  
R:B:GLU:107 R:B:PRO:108 R:B:ILE:109 R:B:GLU:111 R:B:ARG:113 R:B:PHE:126 R:B:CYS:130 R:B:GLN:133 R:B:HIS:136 R:B:PRO:137  
R:B:ASP:138 R:B:ASP:141 R:B:SER:144 R:B:ASP:145

[INFO] Cleaning normal complex trajectories…  
[INFO] Building AMBER topologies from GROMACS files… Done.

[INFO] Loading and checking parameter files for compatibility…  
[INFO] Preparing trajectories for simulation…

[INFO] 1001 frames were processed by cpptraj for use in calculation.

[INFO] Running calculations on normal system…  
[INFO] Beginning GB calculations with /home/dovschulman/miniconda3/bin/sander  
[INFO] calculating complex contribution…  
[INFO] calculating receptor contribution…  
[INFO] calculating ligand contribution…  
[INFO] Parsing results to output files…

[INFO] Timing:  
[INFO] Total GROMACS setup time: 0.003 hr.  
[INFO] Total AMBER setup time: 0.000 hr.  
[INFO] Creating trajectories with cpptraj: 0.002 hr.  
[INFO] Total calculation time: 2.267 hr.  
[INFO] Total GB calculation time: 2.267 hr.  
[INFO] Statistics calculation & output writing: 0.000 hr.  
[INFO] Total time taken: 2.272 hr.

[INFO]  
Finalizing gmx\_MMPBSA: [ERROR] = 0; [WARNING] = 1  
Check the gmx\_MMPBSA.log file for more details…

[INFO]  
Thank you for using gmx\_MMPBSA. Please consider supporting gmx\_MMPBSA by citing our publication:  
Valdés-Tresanco, M.S., Valdés-Tresanco, M.E., Valiente, P.A. and Moreno E.  
gmx\_MMPBSA: A New Tool to Perform End-State Free Energy Calculations with GROMACS.  
J Chem Theory Comput., 2021, 17 (10):6281-6291. Epub 2021 Sep 29. PMID: 34586825.  
[https://pubs.acs.org/doi/10.1021/acs.jctc.1c00645](https://pubs.acs.org/doi/10.1021/acs.jctc.1c00645)

Also consider citing MMPBSA.py:  
Miller III, B. R., McGee Jr., T. D., Swails, J. M. Homeyer, N. Gohlke, H. and Roitberg, A. E.  
MMPBSA.py: An Efficient Program for End-State Free Energy Calculations.  
J. Chem. Theory Comput., 2012, 8 (9) pp 3314-3321

[INFO] Opening gmx\_MMPBSA\_ana to analyze results…

multiprocessing.pool.RemoteTraceback:  
“”"  
Traceback (most recent call last):  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/pandas/core/indexes/base.py”, line 3621, in get\_loc  
return self.\_engine.get\_loc(casted\_key)  
File “pandas/\_libs/index.pyx”, line 136, in pandas.\_libs.index.IndexEngine.get\_loc  
File “pandas/\_libs/index.pyx”, line 163, in pandas.\_libs.index.IndexEngine.get\_loc  
File “pandas/\_libs/hashtable\_class\_helper.pxi”, line 5198, in pandas.\_libs.hashtable.PyObjectHashTable.get\_item  
File “pandas/\_libs/hashtable\_class\_helper.pxi”, line 5206, in pandas.\_libs.hashtable.PyObjectHashTable.get\_item  
KeyError: ‘BDC’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):  
File “/home/dovschulman/miniconda3/lib/python3.9/multiprocessing/pool.py”, line 125, in worker  
result = (True, func(\*args, \*\*kwds))  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/GMXMMPBSA/analyzer/dialogs.py”, line 585, in run\_process  
obj = obj\_method(\*\*v[‘args’]) if v[‘args’] else obj\_method()  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/GMXMMPBSA/API.py”, line 810, in get\_ana\_data  
dict(data=decomp[level][level1][level2][level3], level=item\_lvl,  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/pandas/core/frame.py”, line 3504, in **getitem**  
return self.\_getitem\_multilevel(key)  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/pandas/core/frame.py”, line 3555, in \_getitem\_multilevel  
loc = self.columns.get\_loc(key)  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/pandas/core/indexes/multi.py”, line 2869, in get\_loc  
loc = self.\_get\_level\_indexer(key, level=0)  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/pandas/core/indexes/multi.py”, line 3222, in \_get\_level\_indexer  
idx = self.\_get\_loc\_single\_level\_index(level\_index, key)  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/pandas/core/indexes/multi.py”, line 2802, in \_get\_loc\_single\_level\_index  
return level\_index.get\_loc(key)  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/pandas/core/indexes/base.py”, line 3623, in get\_loc  
raise KeyError(key) from err  
KeyError: ‘BDC’  
“”"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):  
File “/home/dovschulman/miniconda3/lib/python3.9/site-packages/GMXMMPBSA/analyzer/dialogs.py”, line 598, in run  
for result in imap\_unordered\_it:  
File “/home/dovschulman/miniconda3/lib/python3.9/multiprocessing/pool.py”, line 870, in next  
raise value  
KeyError: ‘BDC’  
[ERROR] Unable to start gmx\_MMPBSA\_ana…  
[INFO] Finalized…
