[gmx-users] Strange grompp error: System has non-zero total charge

Mark Abraham Mark.Abraham at anu.edu.au
Thu Jan 8 02:29:07 CET 2009


Suman Chakrabarty wrote:
> Hi,
> 
> I am trying energy minimization with a simple alkane chain in a DMSO
> box. So there should not be any unbalanced charge on any individual
> molecule. Each atom of the alkane is uncharged and DMSO has following
> entries in dmso.itp file:
> 
> [ atoms ]
> ;   nr    type   resnr  residu  atom    cgnr    charge  mass
>     1     SDMSO     1   DMSO    SDmso   1        0.139  32.06000
>     2     CDMSO     1   DMSO    CDms1   1        0.16   15.03500
>     3     ODMSO     1   DMSO    ODmso   1       -0.459  15.99940
>     4     CDMSO     1   DMSO    CDms2   1        0.16   15.03500
> 
> So total charge on a DMSO is zero.
> 
> But when I run grompp for the energy minimization it complains:
> 
> NOTE 1 [file topol.top, line 548]:
>   System has non-zero total charge: -4.882812e-04

A difference from zero this small can be ignored, since it results from 
arithmetic problems with using approximate floating-point 
representations of exact decimal values. For example, 0.02 cannot be 
represented exactly, and it is well known that (something like) adding 
0.02 to itself one hundred times does not give a floating-point result 
that is numerically equal to two.

Mark



More information about the gromacs.org_gmx-users mailing list