--- trunk/src/brains/SimInfo.cpp 2008/09/10 18:11:32 1287 +++ branches/development/src/brains/SimInfo.cpp 2010/10/02 19:54:41 1503 @@ -6,19 +6,10 @@ * redistribute this software in source and binary code form, provided * that the following conditions are met: * - * 1. Acknowledgement of the program authors must be made in any - * publication of scientific results based in part on use of the - * program. An acceptable form of acknowledgement is citation of - * the article in which the program was described (Matthew - * A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher - * J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented - * Parallel Simulation Engine for Molecular Dynamics," - * J. Comput. Chem. 26, pp. 252-271 (2005)) - * - * 2. Redistributions of source code must retain the above copyright + * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - * 3. Redistributions in binary form must reproduce the above copyright + * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. @@ -37,6 +28,15 @@ * arising out of the use of or inability to use software, even if the * University of Notre Dame has been advised of the possibility of * such damages. + * + * SUPPORT OPEN SCIENCE! If you use OpenMD or its source code in your + * research, please cite the appropriate papers when you publish your + * work. Good starting points are: + * + * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). + * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). + * [4] Vardeman & Gezelter, in progress (2009). */ /** @@ -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" @@ -74,7 +71,7 @@ #include "UseTheForce/DarkSide/simParallel_interface.h" #endif -namespace oopse { +namespace OpenMD { std::set getRigidSet(int index, std::map >& container) { std::map >::iterator i = container.find(index); std::set result; @@ -446,7 +443,7 @@ namespace oopse { b = torsion->getAtomB()->getGlobalIndex(); c = torsion->getAtomC()->getGlobalIndex(); d = torsion->getAtomD()->getGlobalIndex(); - + if (options_.havevdw12scale() || options_.haveelectrostatic12scale()) { oneTwoInteractions_.addPair(a, b); oneTwoInteractions_.addPair(b, c); @@ -763,6 +760,7 @@ namespace oopse { useRF = 0; useSF = 0; useSP = 0; + useBoxDipole = 0; if (simParams_->haveElectrostaticSummationMethod()) { @@ -949,15 +947,6 @@ namespace oopse { nOneTwo = oneTwoInteractions_.getSize(); nOneThree = oneThreeInteractions_.getSize(); nOneFour = oneFourInteractions_.getSize(); - - std::cerr << "exculdes:\n"; - std::cerr << excludedInteractions_; - std::cerr << "\noneTwo:\n"; - std::cerr << oneTwoInteractions_; - std::cerr << "\noneThree:\n"; - std::cerr << oneThreeInteractions_; - std::cerr << "\noneFour:\n"; - std::cerr << oneFourInteractions_; int* excludeList = excludedInteractions_.getPairList(); int* oneTwoList = oneTwoInteractions_.getPairList(); @@ -977,7 +966,7 @@ namespace oopse { sprintf( painCave.errMsg, "There was an error setting the simulation information in fortran.\n" ); painCave.isFatal = 1; - painCave.severity = OOPSE_ERROR; + painCave.severity = OPENMD_ERROR; simError(); } @@ -1061,8 +1050,8 @@ namespace oopse { int cp = TRADITIONAL_CUTOFF_POLICY; // Set to traditional by default // Set LJ shifting bools to false - ljsp_ = false; - ljsf_ = false; + ljsp_ = 0; + ljsf_ = 0; std::string myPolicy; if (forceFieldOptions_.haveCutoffPolicy()){ @@ -1113,7 +1102,7 @@ namespace oopse { rsw_ = 0.85 * rcut_; sprintf(painCave.errMsg, "SimCreator Warning: No value was set for the switchingRadius.\n" - "\tOOPSE will use a default value of 85 percent of the cutoffRadius.\n" + "\tOpenMD will use a default value of 85 percent of the cutoffRadius.\n" "\tswitchingRadius = %f. for this simulation\n", rsw_); painCave.isFatal = 0; simError(); @@ -1121,7 +1110,7 @@ namespace oopse { rsw_ = rcut_; sprintf(painCave.errMsg, "SimCreator Warning: No value was set for the switchingRadius.\n" - "\tOOPSE will use the same value as the cutoffRadius.\n" + "\tOpenMD will use the same value as the cutoffRadius.\n" "\tswitchingRadius = %f. for this simulation\n", rsw_); painCave.isFatal = 0; simError(); @@ -1133,11 +1122,12 @@ namespace oopse { toUpper(myMethod); if (myMethod == "SHIFTED_POTENTIAL") { - ljsp_ = true; + ljsp_ = 1; } else if (myMethod == "SHIFTED_FORCE") { - ljsf_ = true; + ljsf_ = 1; } } + notifyFortranCutoffs(&rcut_, &rsw_, &ljsp_, &ljsf_); } else { @@ -1146,7 +1136,7 @@ namespace oopse { if (fInfo_.SIM_uses_Charges | fInfo_.SIM_uses_Dipoles | fInfo_.SIM_uses_RF) { sprintf(painCave.errMsg, "SimCreator Warning: No value was set for the cutoffRadius.\n" - "\tOOPSE will use a default value of 15.0 angstroms" + "\tOpenMD will use a default value of 15.0 angstroms" "\tfor the cutoffRadius.\n"); painCave.isFatal = 0; simError(); @@ -1155,13 +1145,13 @@ namespace oopse { 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_ = true; + ljsp_ = 1; } else if (myMethod == "SHIFTED_FORCE") { - ljsf_ = true; + ljsf_ = 1; } if (myMethod == "SHIFTED_POTENTIAL" || myMethod == "SHIFTED_FORCE") { if (simParams_->haveSwitchingRadius()){ @@ -1180,13 +1170,14 @@ namespace oopse { } else { sprintf(painCave.errMsg, "SimCreator Warning: No value was set for switchingRadius.\n" - "\tOOPSE will use a default value of\n" + "\tOpenMD will use a default value of\n" "\t0.85 * cutoffRadius for the switchingRadius\n"); painCave.isFatal = 0; simError(); rsw_ = 0.85 * rcut_; } + Electrostatic::setElectrostaticCutoffRadius(rcut_, rsw_); notifyFortranCutoffs(&rcut_, &rsw_, &ljsp_, &ljsf_); } else { @@ -1202,8 +1193,8 @@ namespace oopse { void SimInfo::setupElectrostaticSummationMethod( int isError ) { int errorOut; - int esm = NONE; - int sm = UNDAMPED; + ElectrostaticSummationMethod esm = NONE; + ElectrostaticScreeningMethod sm = UNDAMPED; RealType alphaVal; RealType dielectric; @@ -1290,12 +1281,11 @@ namespace oopse { } } - // 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 ); } @@ -1641,5 +1631,5 @@ namespace oopse { return sdByGlobalIndex_.at(index); } */ -}//end namespace oopse +}//end namespace OpenMD