# Simmulation with non zero net charge

**URL:** <https://gromacs.bioexcel.eu/t/simmulation-with-non-zero-net-charge/8463>\
**Category:** User discussions\
**Created:** [February 28, 2024, 8:35pm UTC](https://gromacs.bioexcel.eu/t/simmulation-with-non-zero-net-charge/8463 "2024-02-28T20:35:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgarci4](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@rgarci4](https://gromacs.bioexcel.eu/u/rgarci4)\
**Post date:** [February 28, 2024, 8:35pm UTC](https://gromacs.bioexcel.eu/t/simmulation-with-non-zero-net-charge/8463/1 "2024-02-28T20:35:39Z")

</div>

GROMACS version: 2020.2  
GROMACS modification: No  
Here post your question

I am running a simulation of a +3 ion in water, with the following flags mentioned bellow. As I am using a PME electrostatics in a charge system. When I run it with no counter ions the energy is stable. I wonder why the energy does not go to infinite?

cutoff-scheme = verlet  
nstlist = 10  
ns\_type = grid  
pbc = xyz  
rlist = 2.0  
verlet-buffer-tolerance = 0.005

coulombtype = PME  
rcoulomb = 1.2

vdwtype = cutoff  
vdw-modifier = potential-switch  
rvdw-switch = 1.0  
rvdw = 1.2

DispCorr = EnerPres

fourierspacing = 0.12

pme\_order = 6  
ewald\_rtol = 1e-06  
epsilon\_surface = 0

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [February 29, 2024, 7:14am UTC](https://gromacs.bioexcel.eu/t/simmulation-with-non-zero-net-charge/8463/2 "2024-02-29T07:14:59Z")

</div>

There will be a non-physical uniform background charge applied. You should have got a warning like:  
`"You are using Ewald electrostatics in a system with net charge. This can lead to severe artifacts, such as ions moving into regions with low dielectric, due to the uniform background charge. We suggest to neutralize your system with counter ions, possibly in combination with a physiological salt concentration."`

In a uniform system the background charge might work fine, but in general it is better to use ions to neutralize the system.

---

<div class="post-metadata">

**Author:** ![rgarci4](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@rgarci4](https://gromacs.bioexcel.eu/u/rgarci4)\
**Post date:** [February 29, 2024, 6:32pm UTC](https://gromacs.bioexcel.eu/t/simmulation-with-non-zero-net-charge/8463/3 "2024-02-29T18:32:15Z")

</div>

Thanks Magnus,

In the case of free energy perturbation calculations where the ion-water interaction is scaled, is there an alternative to rely on the background compensation in the intermediate steps?

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [February 29, 2024, 8:43pm UTC](https://gromacs.bioexcel.eu/t/simmulation-with-non-zero-net-charge/8463/4 "2024-02-29T20:43:06Z")

</div>

I would use a counter ion that is decoupled together with the ion. But you should take care so that the two ions do not interact. Use a system (water box) that is large enough and use, e.g., a flat bottomed potential to keep the ions far apart.

---

<div class="post-metadata">

**Author:** ![rgarci4](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@rgarci4](https://gromacs.bioexcel.eu/u/rgarci4)\
**Post date:** [February 29, 2024, 11:40pm UTC](https://gromacs.bioexcel.eu/t/simmulation-with-non-zero-net-charge/8463/5 "2024-02-29T23:40:51Z")

</div>

Thank you so much for the suggestions,
