[gmx-users] partial charges leading to non-zero total charge/floating point arithmetic

Justin Lemkul jalemkul at vt.edu
Mon Apr 23 16:33:13 CEST 2018

On 4/23/18 10:29 AM, Shayna Hilburg wrote:
> Hi all,
> I'm setting up a system and I am getting a non-zero total charge of
> approximately 0.0002. I have several thousand ions in a system where the
> cation is a single atom of charge +2, and then the anion is a CO3 molecule
> (C with +1.3 and O with -1.1). If I change the partial charges to be full
> charges (C with +1 and O with -1), there is no longer a non-zero total
> charge.
> According to the error documentation, I understand this is probably due to
> floating point arithmetic, but I do not understand fully which calculation
> might be causing it and what technique I should take to have a neutral
> system. I am running in a low dielectric medium so I think the slight net
> charge could be an issue. Any suggestions would be appreciated!

You don't have any problem. The relevant discussion is here: 

You're likely seeing an issue because of the 1.3 charge, per Erik's 
comment above.

Using the latest version (or any in the 2018 series) should avoid the 
note about non-zero charge.



Justin A. Lemkul, Ph.D.
Assistant Professor
Virginia Tech Department of Biochemistry

303 Engel Hall
340 West Campus Dr.
Blacksburg, VA 24061

jalemkul at vt.edu | (540) 231-3129


More information about the gromacs.org_gmx-users mailing list