--- trunk/src/brains/SimInfo.cpp 2005/10/13 22:26:47 665 +++ trunk/src/brains/SimInfo.cpp 2005/11/01 19:14:27 705 @@ -528,14 +528,24 @@ namespace oopse { //usePBC and useRF are from simParams int usePBC = simParams_->getUsePeriodicBoundaryConditions(); int useRF; + int useDW; std::string myMethod; // set the useRF logical useRF = 0; + useDW = 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; + } else { + if (myMethod == "DAMPED_WOLF") { + useDW = 1; + } + } } //loop over all of the atom types @@ -602,6 +612,9 @@ namespace oopse { temp = useRF; MPI_Allreduce(&temp, &useRF, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); + temp = useDW; + MPI_Allreduce(&temp, &useDW, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); + #endif fInfo_.SIM_uses_PBC = usePBC; @@ -617,9 +630,10 @@ namespace oopse { fInfo_.SIM_uses_Shapes = useShape; fInfo_.SIM_uses_FLARB = useFLARB; fInfo_.SIM_uses_RF = useRF; + fInfo_.SIM_uses_DampedWolf = useDW; - if( fInfo_.SIM_uses_Dipoles && myMethod == "REACTION_FIELD") { - + if( myMethod == "REACTION_FIELD") { + if (simParams_->haveDielectric()) { fInfo_.dielect = simParams_->getDielectric(); } else { @@ -629,10 +643,7 @@ namespace oopse { "\tsetting a dielectric constant!\n"); painCave.isFatal = 1; simError(); - } - - } else { - fInfo_.dielect = 0.0; + } } } @@ -824,10 +835,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 +899,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 +932,7 @@ namespace oopse { simError(); } } else { - if (myMethod == "REACTION_FIELD") { + if (myMethod == "REACTION_FIELD") { esm = REACTION_FIELD; } else { // throw error