# System has non-zero total charge: 0.000200 You are using a plain Coulomb cut-off, which might produc

**URL:** <https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575>\
**Category:** User discussions\
**Tags:** grompp\
**Created:** [January 15, 2023, 7:21pm UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575 "2023-01-15T19:21:11Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![merry](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@merry](https://gromacs.bioexcel.eu/u/merry)\
**Post date:** [January 15, 2023, 7:21pm UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/1 "2023-01-15T19:21:11Z")

</div>

GROMACS version: 2019.4  
GROMACS modification: No

Hi. My system contains 1 polymer and 1 drug molecule. After using the following command:  
gmx\_mpi grompp -f ions.mdp -c box.gro -p topol.top -o ions.tpr

I encountered with:  
NOTE 1 [file topol.top, line 91]:  
System has non-zero total charge: 0.000200  
Total charge should normally be an integer. See  
[Floating point arithmetic — GROMACS webpage https://www.gromacs.org documentation](http://www.gromacs.org/Documentation/Floating_Point_Arithmetic)  
for discussion on how close it should be to an integer.

Removing all charge groups because cutoff-scheme=Verlet  
Analysing residue names:  
There are: 2 Other residues  
Analysing residues not classified as Protein/DNA/RNA/Water and splitting into groups…  
Number of degrees of freedom in T-Coupling group rest is 1053.00

## NOTE 2 [file ions.mdp]: You are using a plain Coulomb cut-off, which might produce artifacts. You might want to consider using PME electrostatics.

## ions.mdp file: integrator = steep emtol = 50.0 emstep = 0.01 nsteps = 50000 nstlist = 10 cutoff-scheme = Verlet ns\_type = grid rlist = 1.0 coulombtype = cutoff rcoulomb = 1.0 rvdw = 1.0 pbc = xyz

How to fix this issue?

---

<div class="post-metadata">

**Author:** ![merry](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@merry](https://gromacs.bioexcel.eu/u/merry)\
**Post date:** [January 16, 2023, 7:16am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/2 "2023-01-16T07:16:28Z")

</div>

For non-zero total charge (0.0002), I used:  
gmx\_mpi genion -s ions.tpr -o ions.gro -p topol.top -neutral -nn 0.0002

Then, I encountered with the following error:

Invalid value: ‘0.0002’; expected an integer

How to neutralize my system which have non-ineger charge?  
Should I change some parameters in mdp file?

---

<div class="post-metadata">

**Author:** ![awacha](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/awacha/32/19_2.png) [@awacha](https://gromacs.bioexcel.eu/u/awacha)\
**Post date:** [January 16, 2023, 7:34am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/3 "2023-01-16T07:34:46Z")

</div>

Hi,

this is a very small deviation, can be the result of some rounding error in the topology. Do you have a non-standard residue?

Adding an ion is definitely not a good idea here. You should check the topology of the system to find where this problem arises.

Kind regards,

Andras

---

<div class="post-metadata">

**Author:** ![merry](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@merry](https://gromacs.bioexcel.eu/u/merry)\
**Post date:** [January 16, 2023, 7:46am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/4 "2023-01-16T07:46:30Z")

</div>

Thanks for your guidance.

As I said, my system consists of a polymer and a drug molecules. With this mdp file, when I simulated the polymer alone, there was no problem. But when I add the drug molecule, this error occurs.

---

<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:** [January 16, 2023, 9:58am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/5 "2023-01-16T09:58:38Z")

</div>

The small non-zero charge is not really an issue, although I suggest to fix that and this must then be in the topology of the drug molecule. But you should never use a plain cut-off for Coulomb interactions.

---

<div class="post-metadata">

**Author:** ![merry](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@merry](https://gromacs.bioexcel.eu/u/merry)\
**Post date:** [January 16, 2023, 11:03am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/6 "2023-01-16T11:03:25Z")

</div>

Thanks Hess.

## ions.mdp file:

integrator = steep  
emtol = 50.0  
emstep = 0.01  
nsteps = 50000  
nstlist = 10  
cutoff-scheme = Verlet  
ns\_type = grid  
rlist = 1.0  
**coulombtype = PME**  
rvdw = 1.0  
pbc = xyz

This mdp file is ok?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [January 16, 2023, 11:33am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/7 "2023-01-16T11:33:45Z")

</div>

> [@hess](#):
>
> But you should never use a plain cut-off for Coulomb interactions.

I’ve raised this issue before, but users are in an impossible situation when running `genion`. If they specify a physically valid method like PME, they are warned that PME shouldn’t be used with a charged system. So to get around that, they switch to plan cutoff, at which point they get a warning that a plain cutoff simply shouldn’t be used. So, perhaps they resort to using `-maxwarn` to bypass things, which in my opinion, is a dangerous habit to adopt, because then it becomes normal to override important warnings to “make things work.”

Users need a way to tell `grompp` more explicitly that they are simply trying to add ions using the subsequent `.tpr` file, such that warnings related to physical validity are turned off. The `.tpr` file isn’t for a simulation, it’s just that we’re hacking the machinery to do something else - add ions.

---

<div class="post-metadata">

**Author:** ![merry](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@merry](https://gromacs.bioexcel.eu/u/merry)\
**Post date:** [January 16, 2023, 2:59pm UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/8 "2023-01-16T14:59:45Z")

</div>

Thanks Justin for your answer. I’m beginner in gromacs.  
Now, what parameters should I change or delete and add in this mdp file to fix these two notes that the gromacs mentions? Please specify in detail.

Best,

---

<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:** [January 16, 2023, 3:24pm UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/9 "2023-01-16T15:24:24Z")

</div>

Ah, forgot about that annoying issue …

Adding an integration option just for genion seems overkill. But since the error is emitted by grompp, somehow grompp needs to be told not to warn about the net charge.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [January 16, 2023, 3:56pm UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/10 "2023-01-16T15:56:01Z")

</div>

> [@merry](#):
>
> Now, what parameters should I change or delete and add in this mdp file to fix these two notes that the gromacs mentions? Please specify in detail.

For adding ions, it’s honestly irrelevant. You can use `-maxwarn` here if you want to get past the issues, just don’t make that a habit. And for anyone stumbling across this thread later, I only intend for that advice to be used here, until Berk comes up with a suitable workaround for the issue. Never use `-maxwarn` otherwise :)

---

<div class="post-metadata">

**Author:** ![shivam1](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@shivam1](https://gromacs.bioexcel.eu/u/shivam1)\
**Post date:** [April 19, 2023, 2:14am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/11 "2023-04-19T02:14:52Z")

</div>

> [@jalemkul](#):
>
> For adding ions, it’s honestly irrelevant. You can use `-maxwarn` here if you want to get past the issues, just don’t make that a habit

I have been trying to replicate your tutorial http://www.mdtutorials.com/gmx/complex/04\_ions.html (using the same files 3HTB.pdb and JZ4 ligand).

upon executing `gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr` it shows error of net charge.

```auto
NOTE 2 [file topol.top, line 24632]:
  System has non-zero total charge: 6.000000
  Total charge should normally be an integer. See
  http://www.gromacs.org/Documentation/Floating_Point_Arithmetic
  for discussion on how close it should be to an integer.

```

Even though I used `-maxwarn 2` flag, to get past the issue but it still shows the same error.  
isn’t it weird when I try to replicate it, it shows error.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [April 19, 2023, 2:45am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/12 "2023-04-19T02:45:20Z")

</div>

> [@shivam1](#):
>
> Even though I used `-maxwarn 2` flag, to get past the issue but it still shows the same error.  
> isn’t it weird when I try to replicate it, it shows error.

The `-maxwarn` flag has no impact on notes, and the appearance of a note should not cause `grompp` to fail (thus eliminating the need for `-maxwarn` in this context, because one no longer has to use plain cutoffs for Coulomb interactions).

---

<div class="post-metadata">

**Author:** ![shivam1](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@shivam1](https://gromacs.bioexcel.eu/u/shivam1)\
**Post date:** [April 19, 2023, 2:52am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/13 "2023-04-19T02:52:27Z")

</div>

Thanks for kind consideration.  
It shows not only the “Notes” but also the error . Please have a look.

```auto
NOTE 2 [file topol.top, line 24632]:
  System has non-zero total charge: 6.000000
  Total charge should normally be an integer. See
  http://www.gromacs.org/Documentation/Floating_Point_Arithmetic
  for discussion on how close it should be to an integer.
  

There were 2 notes

-------------------------------------------------------
Program: gmx grompp, version 2022.2
Source file: src/gromacs/gmxpreprocess/grompp.cpp (line 2172)

Fatal error:
There was 1 error in input file(s)

For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors

```

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [April 19, 2023, 3:06am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/14 "2023-04-19T03:06:34Z")

</div>

Then a separate ERROR message will be printed above in the terminal. Warnings can be bypassed with `-maxwarn`, notes are informative, but errors must be solved because they reflect a fatal problem.

---

<div class="post-metadata">

**Author:** ![shivam1](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@shivam1](https://gromacs.bioexcel.eu/u/shivam1)\
**Post date:** [April 19, 2023, 3:18am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/15 "2023-04-19T03:18:08Z")

</div>

> [@jalemkul](#):
>
> , but errors must be solved because they reflect a fatal problem

Thanks… I understood, but how to fix this error?  
I am just trying to replicate `http://www.mdtutorials.com/gmx/complex/04_ions.html` tutorial.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [April 19, 2023, 12:47pm UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/16 "2023-04-19T12:47:01Z")

</div>

> [@shivam1](#):
>
> Thanks… I understood, but how to fix this error?  
> I am just trying to replicate `http://www.mdtutorials.com/gmx/complex/04_ions.html` tutorial.

You need to post what the actual error is. But this sounds like a very different topic from the original point of this thread, so to avoid confusion, please start a new discussion.

---

<div class="post-metadata">

**Author:** ![shivam1](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@shivam1](https://gromacs.bioexcel.eu/u/shivam1)\
**Post date:** [April 20, 2023, 12:40am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/17 "2023-04-20T00:40:46Z")

</div>

@jalemkul  
Sorry for the confusion. It is the same error as the topic. Below is the error.

```auto
NOTE 2 [file topol.top, line 24632]:
  System has non-zero total charge: 6.000000
  Total charge should normally be an integer. See
  http://www.gromacs.org/Documentation/Floating_Point_Arithmetic
  for discussion on how close it should be to an integer.

```

Not finding a way to solve it. Just want to mention that I am replicating your tutorial and getting this error while executing

> gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr

only change in the protocol what I did is, I chose the force field from the default gmx location (`/usr/local/gromacs/share/gromacs/top/charmm36-mar2019.ff`) rather downloading and extracting it in local directory.

Thanks :)

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [April 20, 2023, 12:55am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/18 "2023-04-20T00:55:28Z")

</div>

> [@shivam1](#):
>
> It is the same error as the topic. Below is the error.

A note and an error are different. The original topic regards notes and how to understand them. You show above a fatal error which says there is an error in your input file. This is not the same as the original topic and you need to provide the entire terminal output from `grompp` that contains the error. It will say ERROR not NOTE.

---

<div class="post-metadata">

**Author:** ![shivam1](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@shivam1](https://gromacs.bioexcel.eu/u/shivam1)\
**Post date:** [April 20, 2023, 1:17am UTC](https://gromacs.bioexcel.eu/t/system-has-non-zero-total-charge-0-000200-you-are-using-a-plain-coulomb-cut-off-which-might-produc/5575/19 "2023-04-20T01:17:18Z")

</div>

Sorry for the confusion. I have found the similar issue so I have posted it there.  
Please have a look.

> [@Fatal error: There were 2 errors in input file(s)](https://gromacs.bioexcel.eu/t/fatal-error-there-were-2-errors-in-input-file-s/3207/6):
>
> You probably forgot to #include the associated parameter file. If there are new parameters for the ligand, the server generates them and our conversion utility writes them to a separate file. This is addressed in my tutorial: [Protein-Ligand Complex](http://www.mdtutorials.com/gmx/complex/index.html)
