[gmx-developers] Meaning of the -correct switch in g_potential

Andrew DeYoung adeyoung at andrew.cmu.edu
Sat Feb 23 23:02:55 CET 2013


Dear Developers,

I am very sorry to bother you, but if you have time, I am wondering if you
can please help me to understand the meaning of the -correct option in
g_potential.  This has been a confusing topic to me and to some of my fellow
graduate students.  If you could please point me in the right direction as
to understanding this, I would be deeply grateful.

What is the purpose of the -correct option in g_potential?

I have a system in the slab geometry, so I use g_potential to compute the
charge density, electric field, and potential along the z-direction.  I
think that, essentially, g_potential bins the charges for each frame, and
then integrates to obtain the electric field and electric potential along z.

By default, -correct is OFF (i.e., -nocorrect).  But what if -correct is on?
In the manual page, it says that -correct tells the program to "Assume net
zero charge of groups to improve accuracy."  If you have time, I have three
questions:

(1) What does -correct do?  I am not very fluent at all in C, or in any
programming language.  But, looking at gmx_potential.c, it seems that
-correct somehow reassigns the values on the charge density arrays.  Can you
please help me understand what it is doing?

(2) What does it mean to "assume net zero charge of groups"?  When running
g_potential, I compute using the entire System selection.  My entire system
indeed has net zero charge (as any reasonable system should), so in that
sense, yes, my selection (System) has net zero charge.  But my system
contains an ionic liquid, so not all _charge_ groups have net zero chage.

(3) Should I use -correct?  When I compute the charge density rho of my
system (100,000 frames in a 10 ns trajectory) with and without the -correct
switch, the electric potential profiles differ at the level of ~0.1-0.5 V,
which is quite significant, I think.

Thank you so very much for your time!

Andrew DeYoung
Carnegie Mellon University




More information about the gromacs.org_gmx-developers mailing list