# Formula for calculation of Coulomb & LJ SR & 1-4 interactions

**URL:** <https://gromacs.bioexcel.eu/t/formula-for-calculation-of-coulomb-lj-sr-1-4-interactions/4063>\
**Category:** User discussions\
**Tags:** forcefield, mdp-parameters\
**Created:** [April 24, 2022, 6:38pm UTC](https://gromacs.bioexcel.eu/t/formula-for-calculation-of-coulomb-lj-sr-1-4-interactions/4063 "2022-04-24T18:38:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaunak](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@shaunak](https://gromacs.bioexcel.eu/u/shaunak)\
**Post date:** [April 24, 2022, 6:38pm UTC](https://gromacs.bioexcel.eu/t/formula-for-calculation-of-coulomb-lj-sr-1-4-interactions/4063/1 "2022-04-24T18:38:19Z")

</div>

GROMACS version: 2021.5  
GROMACS modification: Yes

I’m trying to manually calculate the Coulomb & LJ interaction for a custom drug that I had modelled earlier using custom parameters, and verify them. When I checked the log for the 0th step after MD, it showed Coulomb 14 & SR values in the log file. Using the straightforward sum\_i sum\_j f \* q\_j \* q\_j / r, f = 138.4, didn’t give me the value shown in the log file.

This question has been asked earlier [here](https://gromacs.org-gmx-users.maillist.sys.kth.narkive.com/MmDFkMCP/gmx-users-difference-in-coulomb-sr-and-coulomb-14), but I couldn’t find the 3.4.7 manual for the formula for Coulomb-14 explanation.

Another user has calculated it in this [query](https://gromacs.bioexcel.eu/t/coulomb-sr-calculated-by-manual-and-gromacs-are-inconsistent/2609), but the answer is vague to figure out the formula from the question.

Could you provide the manual on calculation of these energies? Thank you in advance.

Kind regards,  
Shaunak.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [April 26, 2022, 8:07am UTC](https://gromacs.bioexcel.eu/t/formula-for-calculation-of-coulomb-lj-sr-1-4-interactions/4063/2 "2022-04-26T08:07:52Z")

</div>

You don’t say what doesn’t match. The Coulomb 14 term should be identical to the plain Coulomb formula you provided, potentially scaled by a constant if the force field has such a scaling.

The SR term will depend on the cut-off distance, type of electrostatics and Coulomb modifier used, which you all don’t specify. When using PME, it will also depend on the box dimensions.

---

<div class="post-metadata">

**Author:** ![shaunak](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@shaunak](https://gromacs.bioexcel.eu/u/shaunak)\
**Post date:** [May 3, 2022, 8:01pm UTC](https://gromacs.bioexcel.eu/t/formula-for-calculation-of-coulomb-lj-sr-1-4-interactions/4063/3 "2022-05-03T20:01:07Z")

</div>

Hi Hess. Apologies for the delay in response.  
We have used coulombtype = Cut-off and coulomb-modifier = Potential-shift-Verlet in our gromacs simulation. We obtained Coulomb-14 = -1.45624e+03 kJ/mol and Coulomb (SR) = 7.80542e+02 kJ/mol for step 0 in our log file. The value that we obtain from the plain Coulomb formula above = -5423.2624652445875 kJ/mol.

Kind Regards,  
Shaunak Badani

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [May 4, 2022, 7:44am UTC](https://gromacs.bioexcel.eu/t/formula-for-calculation-of-coulomb-lj-sr-1-4-interactions/4063/4 "2022-05-04T07:44:47Z")

</div>

There is a constant offset off the total potential with plain Coulomb cut-off for excluded pairs, identical to the reaction field correction. We have updated the reference manual in the 2022.1 release to document this.
