Hi, I’m trying to understand the calculation of Coulomb (SR) in an alanine dipeptide molecule.
In my effort to do so, I read documentation and came across this statement ( Long Range Electrostatics - GROMACS 2026.1 documentation ):
”The term Coulomb (SR) contains the V_{dir} with the constant shift applied minus the reciprocal contribution for excluded atom pairs.”
When I ran it for the tpr file attached (as nve_pme.dat, just renamed from tpr because gromacs wouldn’t let me upload tpr files), (gmx mdrun -deffnm nve_pme), and took the energy dump of coulomb sr (gmx energy -f nve_pme.edr, select Coulomb SR), I got the following output:
”@ legend length 2
@ s0 legend “Coulomb (SR)”
0.000000 -340.237762”
I then took the human readable verbose version of the tpr, generated by (gmx dump -s nve_pme.tpr > nve_pme_verbose.tpr, attached as nve_pme_verbose.dat)
nve_pme_verbose.dat (43.5 KB)
, and passed it through the python script (attached) that calculates pairwise real part of the electrostatic energy, shifted with cutoff such that potential at cutoff is 0, and only includes pairs that have distance < rcutoff. It also calculates the total reciprocal energy for the excluded pairs, and subtracts it from the previously calculated sum. This final value is what I interpret to be Coulomb (SR), but the output of the script shows:
”Raw real-space sum : -73.27686428337606 kJ/mol
Exclusion correction : -190.07040972488696 kJ/mol
V_Coulomb_SR (total) : 116.7935454415109 kJ/mol”
Could someone please help in identifying which part of the calculation I did wrong? Thanks!
nve_pme.dat (11.4 KB)
calculate_coulomb_sr.dat (3.0 KB)