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

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
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?

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?

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

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.

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.

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?

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.

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,

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.

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 :)

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.

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.

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).

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

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

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.

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.

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

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 :)

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.

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