Project

General

Profile

Bug #140

reaction field kappa and ionic strength

Added by no name over 12 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

errors in the code regarding
1) *kappa in rf_util.c, which is used for the reaction field method; and
2) calculation of ionic strength.

1) in rf_util.c line 180, *kappa is calculated as
*kappa = sqrt(2*I/(EPSILON0*eps_rf*BOLTZ*Temp));

but the factor 2 in the square root is only correct if the sum in the ionic
strength I is actually divided by 2, which it isn't.
so the factor 2 in *kappa^2 should be omitted, or the ionic strength should be
divided by 2.

2) in force.c line 880, the ionic strength is calculated by summing the absolute
values of the charges, but should be the squares of the charges.
zsq += fabs(q);
this is only correct for monovalent charge groups.

History

#1 Updated by Berk Hess over 12 years ago

I have fixed these bugs nearly a year ago,
but since then we have not (yet) released an update to 3.3.1.

Note that these errors only occur with generalized reaction field,
not plain reaction field.
We were considering removing GRF, since if electrostatics
are important, one should anyhow use PME.

Thanks for reporting these bugs,

Berk.

#2 Updated by Gerrit Code Review Bot over 5 years ago

Gerrit received a related patchset '1' for Issue #140.
Uploader: Roland Schulz ()
Change-Id: I7c5569693a4b84f481f0f7afd85f0f01c33295cf
Gerrit URL: https://gerrit.gromacs.org/3532

Also available in: Atom PDF