--- branches/development/src/nonbonded/Electrostatic.cpp 2011/05/27 16:45:44 1571 +++ branches/development/src/nonbonded/Electrostatic.cpp 2011/06/17 20:16:35 1584 @@ -52,11 +52,11 @@ namespace OpenMD { namespace OpenMD { Electrostatic::Electrostatic(): name_("Electrostatic"), initialized_(false), - forceField_(NULL) {} + forceField_(NULL), info_(NULL) {} void Electrostatic::initialize() { - Globals* simParams_; + Globals* simParams_ = info_->getSimParams(); summationMap_["HARD"] = esm_HARD; summationMap_["SWITCHING_FUNCTION"] = esm_SWITCHING_FUNCTION; @@ -407,13 +407,15 @@ namespace OpenMD { return; } - void Electrostatic::setElectrostaticCutoffRadius( RealType theECR, - RealType theRSW ) { - cutoffRadius_ = theECR; - rrf_ = cutoffRadius_; - rt_ = theRSW; + void Electrostatic::setCutoffRadius( RealType rCut ) { + cutoffRadius_ = rCut; + rrf_ = cutoffRadius_; haveCutoffRadius_ = true; } + + void Electrostatic::setSwitchingRadius( RealType rSwitch ) { + rt_ = rSwitch; + } void Electrostatic::setElectrostaticSummationMethod( ElectrostaticSummationMethod esm ) { summationMethod_ = esm; } @@ -909,7 +911,7 @@ namespace OpenMD { } } - idat.pot[ELECTROSTATIC_FAMILY] += epot; + (*(idat.pot))[ELECTROSTATIC_FAMILY] += epot; *(idat.f1) += dVdr; if (i_is_Dipole || i_is_Quadrupole) @@ -1020,7 +1022,7 @@ namespace OpenMD { } // accumulate the forces and torques resulting from the self term - idat.pot[ELECTROSTATIC_FAMILY] += myPot; + (*(idat.pot))[ELECTROSTATIC_FAMILY] += myPot; *(idat.f1) += dVdr; if (i_is_Dipole)