--- branches/development/src/brains/SimInfo.cpp 2010/07/09 23:08:25 1465 +++ branches/development/src/brains/SimInfo.cpp 2010/10/03 22:18:59 1505 @@ -55,12 +55,9 @@ #include "primitives/Molecule.hpp" #include "primitives/StuntDouble.hpp" #include "UseTheForce/fCutoffPolicy.h" -#include "UseTheForce/DarkSide/fElectrostaticSummationMethod.h" -#include "UseTheForce/DarkSide/fElectrostaticScreeningMethod.h" #include "UseTheForce/DarkSide/fSwitchingFunctionType.h" #include "UseTheForce/doForces_interface.h" #include "UseTheForce/DarkSide/neighborLists_interface.h" -#include "UseTheForce/DarkSide/electrostatic_interface.h" #include "UseTheForce/DarkSide/switcheroo_interface.h" #include "utils/MemoryUtils.hpp" #include "utils/simError.h" @@ -765,7 +762,6 @@ namespace OpenMD { useSP = 0; useBoxDipole = 0; - if (simParams_->haveElectrostaticSummationMethod()) { std::string myMethod = simParams_->getElectrostaticSummationMethod(); toUpper(myMethod); @@ -865,7 +861,6 @@ namespace OpenMD { MPI_Allreduce(&temp, &useAtomicVirial_, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); #endif - fInfo_.SIM_uses_PBC = usePBC; fInfo_.SIM_uses_DirectionalAtoms = useDirectionalAtom; fInfo_.SIM_uses_LennardJones = useLennardJones; @@ -1148,9 +1143,9 @@ namespace OpenMD { if (simParams_->haveElectrostaticSummationMethod()) { std::string myMethod = simParams_->getElectrostaticSummationMethod(); toUpper(myMethod); - - // For the time being, we're tethering the LJ shifted behavior to the - // electrostaticSummationMethod keyword options + + // For the time being, we're tethering the LJ shifted behavior to the + // electrostaticSummationMethod keyword options if (myMethod == "SHIFTED_POTENTIAL") { ljsp_ = 1; } else if (myMethod == "SHIFTED_FORCE") { @@ -1180,6 +1175,7 @@ namespace OpenMD { rsw_ = 0.85 * rcut_; } + Electrostatic::setElectrostaticCutoffRadius(rcut_, rsw_); notifyFortranCutoffs(&rcut_, &rsw_, &ljsp_, &ljsf_); } else { @@ -1195,8 +1191,8 @@ namespace OpenMD { void SimInfo::setupElectrostaticSummationMethod( int isError ) { int errorOut; - int esm = NONE; - int sm = UNDAMPED; + ElectrostaticSummationMethod esm = NONE; + ElectrostaticScreeningMethod sm = UNDAMPED; RealType alphaVal; RealType dielectric; @@ -1283,12 +1279,11 @@ namespace OpenMD { } } - // let's pass some summation method variables to fortran - setElectrostaticSummationMethod( &esm ); - setFortranElectrostaticMethod( &esm ); - setScreeningMethod( &sm ); - setDampingAlpha( &alphaVal ); - setReactionFieldDielectric( &dielectric ); + + Electrostatic::setElectrostaticSummationMethod( esm ); + Electrostatic::setElectrostaticScreeningMethod( sm ); + Electrostatic::setDampingAlpha( alphaVal ); + Electrostatic::setReactionFieldDielectric( dielectric ); initFortranFF( &errorOut ); } @@ -1475,7 +1470,7 @@ namespace OpenMD { [ Ixx -Ixy -Ixz ] - J =| -Iyx Iyy -Iyz | + J =| -Iyx Iyy -Iyz | [ -Izx -Iyz Izz ] */