--- trunk/src/brains/SimInfo.cpp 2005/10/13 22:26:47 665 +++ trunk/src/brains/SimInfo.cpp 2005/10/26 23:32:25 701 @@ -532,10 +532,14 @@ namespace oopse { // set the useRF logical useRF = 0; + + if (simParams_->haveElectrostaticSummationMethod()) { - myMethod = simParams_->getElectrostaticSummationMethod(); - if (myMethod == "REACTION_FIELD") - useRF = 1; + std::string myMethod = simParams_->getElectrostaticSummationMethod(); + toUpper(myMethod); + if (myMethod == "REACTION_FIELD") { + useRF=1; + } } //loop over all of the atom types @@ -618,8 +622,8 @@ namespace oopse { fInfo_.SIM_uses_FLARB = useFLARB; fInfo_.SIM_uses_RF = useRF; - if( fInfo_.SIM_uses_Dipoles && myMethod == "REACTION_FIELD") { - + if( myMethod == "REACTION_FIELD") { + if (simParams_->haveDielectric()) { fInfo_.dielect = simParams_->getDielectric(); } else { @@ -629,12 +633,8 @@ namespace oopse { "\tsetting a dielectric constant!\n"); painCave.isFatal = 1; simError(); - } - - } else { - fInfo_.dielect = 0.0; + } } - } void SimInfo::setupFortranSim() { @@ -824,10 +824,10 @@ namespace oopse { sprintf(painCave.errMsg, "SimCreator Warning: No value was set for switchingRadius.\n" "\tOOPSE will use a default value of\n" - "\t0.95 * cutoffRadius for the switchingRadius\n"); + "\t0.85 * cutoffRadius for the switchingRadius\n"); painCave.isFatal = 0; simError(); - rsw = 0.95 * rcut; + rsw = 0.85 * rcut; } else{ rsw = simParams_->getSwitchingRadius(); } @@ -888,7 +888,7 @@ namespace oopse { notifyFortranCutoffs(&rcut_, &rsw_, &rnblist, &cp); // also send cutoff notification to electrostatics - setElectrostaticCutoffRadius(&rcut_); + setElectrostaticCutoffRadius(&rcut_, &rsw_); } void SimInfo::setupElectrostaticSummationMethod( int isError ) { @@ -921,7 +921,7 @@ namespace oopse { simError(); } } else { - if (myMethod == "REACTION_FIELD") { + if (myMethod == "REACTION_FIELD") { esm = REACTION_FIELD; } else { // throw error