# Coulomb-(SR) is different between GROMACS versions

**URL:** <https://gromacs.bioexcel.eu/t/coulomb-sr-is-different-between-gromacs-versions/2837>\
**Category:** User discussions\
**Tags:** mdrun\
**Created:** [September 20, 2021, 2:34am UTC](https://gromacs.bioexcel.eu/t/coulomb-sr-is-different-between-gromacs-versions/2837 "2021-09-20T02:34:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![skim](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@skim](https://gromacs.bioexcel.eu/u/skim)\
**Post date:** [September 20, 2021, 2:34am UTC](https://gromacs.bioexcel.eu/t/coulomb-sr-is-different-between-gromacs-versions/2837/1 "2021-09-20T02:34:26Z")

</div>

GROMACS version: GROMACS 2018/2019/2020  
GROMACS modification: NO

Hello,

I noticed the Coulomb-(SR) values were different when the simulations were run with GROMACS 2018/2019 and GROMACS 2020. The parameters and initial structure were exactly identical between those simulations, and the difference in Coulomb-(SR) was ~50 kJ/mol, which is not negligible. The initial structure was prepared with CHARMM-GUI, and the force field was CHARM36.

I wonder whether the way that GROMACS calculates Coulomb-(SR) becomes changed since GROMACS 2020. The other energies were identical between GROMACS 2018/2019 results and GROMACS 2020 results.

Thank you.  
Best,  
Siyoung

---

<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:** [September 20, 2021, 7:30am UTC](https://gromacs.bioexcel.eu/t/coulomb-sr-is-different-between-gromacs-versions/2837/2 "2021-09-20T07:30:31Z")

</div>

No, there have been no changes.

But with PME, which I assume you are using, the individual short-range and long-range components don’t have physical meaning, on their sum does. One reason they might be different is that PME performance tuning in mdrun will change the cut-off and the Ewald splitting parameter, which affect Coulomb-SR and LR, but not their sum. You can see in the beginning and end of your log file whether PME tuning was active.

---

<div class="post-metadata">

**Author:** ![skim](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@skim](https://gromacs.bioexcel.eu/u/skim)\
**Post date:** [September 20, 2021, 1:20pm UTC](https://gromacs.bioexcel.eu/t/coulomb-sr-is-different-between-gromacs-versions/2837/3 "2021-09-20T13:20:18Z")

</div>

Dear Berk,

Thank you for your reply. I appreciate it.

I calculated all the energies because I noticed the difference in the potential between when I simulated with GROMACS 2018 or GROMACS 2020 given the same initial condition and same mdp parameters.

To reproduce this behavior, I made a simple TIP3 water system with CHARMM-GUI. The difference in Coulomb-(SR) between the two versions is not as big as the example that I previously ran, but you can see there is a difference by ~2 kJ/mol. The Coulomb-recip values are the same (Please see the attached snapshot).

You can reproduce the comparable results in the following link. Please change the GMX variables in the README file, and then run _bash README_. This one-line will give you something similar to the attached snapshot. (It will take \<10 secs on a local laptop because it will calculate only a few steps.)

> **[waterbox](https://www.dropbox.com/sh/i8psky1fx23m213/AACza0r52YSZyHDep584ttbXa?dl=0)**
>
> Shared with Dropbox

Thank you.  
Best,  
Siyoung

 ![Screen Shot 2021-09-20 at 8.10.07 AM](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/d/d8e2b98fb879ff75e3fa1460ca2469c7cfcf3dbc.png)

---

<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:** [September 20, 2021, 1:30pm UTC](https://gromacs.bioexcel.eu/t/coulomb-sr-is-different-between-gromacs-versions/2837/4 "2021-09-20T13:30:38Z")

</div>

This could be due to rounding errors. Have you compared in double precision?

---

<div class="post-metadata">

**Author:** ![skim](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@skim](https://gromacs.bioexcel.eu/u/skim)\
**Post date:** [September 20, 2021, 1:42pm UTC](https://gromacs.bioexcel.eu/t/coulomb-sr-is-different-between-gromacs-versions/2837/5 "2021-09-20T13:42:34Z")

</div>

Thank you. It is due to rounding errors. With double precision GROMACS, I get those the same as attached. Much appreciated!

 ![Screen Shot 2021-09-20 at 8.42.17 AM](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/5/5bdd4a557dc5df9470dbc0a20aef0706904ed481.png)
