Simmulation with non zero net charge

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

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.

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?

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.

Thank you so much for the suggestions,