--- branches/development/src/nonbonded/Electrostatic.cpp 2012/06/05 17:49:36 1734 +++ branches/development/src/nonbonded/Electrostatic.cpp 2012/06/21 19:26:46 1760 @@ -193,8 +193,9 @@ namespace OpenMD { // throw warning sprintf( painCave.errMsg, - "Electrostatic::initialize: dampingAlpha was not specified in the input file.\n" - "\tA default value of %f (1/ang) will be used for the cutoff of\n\t%f (ang).\n", + "Electrostatic::initialize: dampingAlpha was not specified in the\n" + "\tinput file. A default value of %f (1/ang) will be used for the\n" + "\tcutoff of %f (ang).\n", dampingAlpha_, cutoffRadius_); painCave.severity = OPENMD_INFO; painCave.isFatal = 0; @@ -577,12 +578,12 @@ namespace OpenMD { if (j_is_Charge) { if (screeningMethod_ == DAMPED) { // assemble the damping variables - //res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); - //erfcVal = res.first; - //derfcVal = res.second; + res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); + erfcVal = res.first; + derfcVal = res.second; - erfcVal = erfc(dampingAlpha_ * *(idat.rij)); - derfcVal = - alphaPi_ * exp(-alpha2_ * *(idat.r2)); + //erfcVal = erfc(dampingAlpha_ * *(idat.rij)); + //derfcVal = - alphaPi_ * exp(-alpha2_ * *(idat.r2)); c1 = erfcVal * riji; c2 = (-derfcVal + c1) * riji; @@ -1048,6 +1049,7 @@ namespace OpenMD { // indirect reaction field terms. *(idat.vpair) += indirect_vpair; + (*(idat.excludedPot))[ELECTROSTATIC_FAMILY] += epot; (*(idat.pot))[ELECTROSTATIC_FAMILY] += indirect_Pot; *(idat.f1) += indirect_dVdr; @@ -1076,6 +1078,7 @@ namespace OpenMD { chg1 += *(sdat.flucQ); // dVdFQ is really a force, so this is negative the derivative *(sdat.dVdFQ) -= *(sdat.flucQ) * data.hardness + data.electronegativity; + cerr << "dVdFQ harmonic part = " << *(sdat.dVdFQ) << "\n"; } if (summationMethod_ == esm_REACTION_FIELD) {