--- trunk/src/io/Globals.cpp 2009/03/09 14:03:31 1327 +++ trunk/src/io/Globals.cpp 2009/10/19 13:35:42 1367 @@ -88,9 +88,6 @@ Globals::Globals() { DefineOptionalParameter(ForceFieldVariant, "forceFieldVariant"); DefineOptionalParameter(ForceFieldFileName, "forceFieldFileName"); DefineOptionalParameter(DampingAlpha, "dampingAlpha"); - DefineOptionalParameter(ThermIntDistSpringConst, "thermIntDistSpringConst"); - DefineOptionalParameter(ThermIntThetaSpringConst, "thermIntThetaSpringConst"); - DefineOptionalParameter(ThermIntOmegaSpringConst, "thermIntOmegaSpringConst"); DefineOptionalParameter(SurfaceTension, "surfaceTension"); DefineOptionalParameter(PrintPressureTensor, "printPressureTensor"); DefineOptionalParameter(TaggedAtomPair, "taggedAtomPair"); @@ -102,6 +99,8 @@ Globals::Globals() { DefineOptionalParameter(BeadSize, "beadSize"); DefineOptionalParameter(FrozenBufferRadius, "frozenBufferRadius"); DefineOptionalParameter(LangevinBufferRadius, "langevinBufferRadius"); + DefineOptionalParameter(ThermalConductivity, "thermalConductivity"); + DefineOptionalParameter(ThermalLength, "thermalLength"); DefineOptionalParameter(NeighborListNeighbors,"NeighborListNeighbors"); DefineOptionalParameter(UseMultipleTemperatureMethod, "useMultipleTemperatureMethod"); DefineOptionalParameter(MTM_Ce, "MTM_Ce"); @@ -117,11 +116,6 @@ Globals::Globals() { DefineOptionalParameterWithDefaultValue(UseInitalTime, "useInitialTime", false); DefineOptionalParameterWithDefaultValue(UseIntialExtendedSystemState, "useInitialExtendedSystemState", false); DefineOptionalParameterWithDefaultValue(OrthoBoxTolerance, "orthoBoxTolerance", 1E-6); - DefineOptionalParameterWithDefaultValue(UseSolidThermInt, "useSolidThermInt", false); - DefineOptionalParameterWithDefaultValue(UseLiquidThermInt, "useLiquidThermInt", false); - DefineOptionalParameterWithDefaultValue(ThermIntDistSpringConst, "thermIntDistSpringConst", 6.0); - DefineOptionalParameterWithDefaultValue(ThermIntThetaSpringConst, "thermIntThetaSpringConst", 7.5); - DefineOptionalParameterWithDefaultValue(ThermIntOmegaSpringConst, "thermIntOmegaSpringConst", 13.5); DefineOptionalParameterWithDefaultValue(ElectrostaticSummationMethod, "electrostaticSummationMethod", "SHIFTED_FORCE"); DefineOptionalParameterWithDefaultValue(ElectrostaticScreeningMethod, "electrostaticScreeningMethod", "DAMPED"); DefineOptionalParameterWithDefaultValue(Dielectric, "dielectric", 78.5); @@ -133,20 +127,32 @@ Globals::Globals() { DefineOptionalParameterWithDefaultValue(AccumulateBoxDipole, "accumulateBoxDipole", false); DefineOptionalParameterWithDefaultValue(UseRNEMD, "useRNEMD", false); - DefineOptionalParameterWithDefaultValue(RNEMD_swapTime, "RNEMD_swapTime", 100.0); - DefineOptionalParameterWithDefaultValue(RNEMD_nBins, "RNEMD_nBins", 15); - DefineOptionalParameterWithDefaultValue(RNEMD_swapType, "RNEMD_swapType", "Kinetic"); - + DefineOptionalParameterWithDefaultValue(RNEMD_exchangeTime, "RNEMD_exchangeTime", 100.0); + DefineOptionalParameterWithDefaultValue(RNEMD_nBins, "RNEMD_nBins", 16); + DefineOptionalParameterWithDefaultValue(RNEMD_logWidth, "RNEMD_logWidth", 16); + DefineOptionalParameterWithDefaultValue(RNEMD_exchangeType, "RNEMD_exchangeType", "KineticScale"); + DefineOptionalParameterWithDefaultValue(RNEMD_targetFlux, "RNEMD_targetFlux", 0.0); + DefineOptionalParameterWithDefaultValue(RNEMD_objectSelection, "RNEMD_objectSelection", "select all"); + DefineOptionalParameterWithDefaultValue(UseRestraints, "useRestraints", false); + DefineOptionalParameterWithDefaultValue(Restraint_file, "Restraint_file", "idealCrystal.in"); + DefineOptionalParameterWithDefaultValue(UseThermodynamicIntegration, "useThermodynamicIntegration", false); + deprecatedKeywords_.insert("nComponents"); deprecatedKeywords_.insert("nZconstraints"); deprecatedKeywords_.insert("initialConfig"); + deprecatedKeywords_.insert("thermIntDistSpringConst"); + deprecatedKeywords_.insert("thermIntThetaSpringConst"); + deprecatedKeywords_.insert("thermIntOmegaSpringConst"); + deprecatedKeywords_.insert("useSolidThermInt"); + deprecatedKeywords_.insert("useLiquidThermInt"); } Globals::~Globals() { MemoryUtils::deletePointers(components_); MemoryUtils::deletePointers(zconstraints_); + MemoryUtils::deletePointers(restraints_); } void Globals::validate() { @@ -184,28 +190,25 @@ void Globals::validate() { CheckParameter(ThermodynamicIntegrationK, isPositive()); CheckParameter(ForceFieldVariant, isNotEmpty()); CheckParameter(ForceFieldFileName, isNotEmpty()); - CheckParameter(ThermIntDistSpringConst, isPositive()); - CheckParameter(ThermIntThetaSpringConst, isPositive()); - CheckParameter(ThermIntOmegaSpringConst, isPositive()); CheckParameter(ElectrostaticSummationMethod, isEqualIgnoreCase("NONE") || isEqualIgnoreCase("SHIFTED_POTENTIAL") || isEqualIgnoreCase("SHIFTED_FORCE") || isEqualIgnoreCase("REACTION_FIELD")); CheckParameter(ElectrostaticScreeningMethod, isEqualIgnoreCase("UNDAMPED") || isEqualIgnoreCase("DAMPED")); CheckParameter(CutoffPolicy, isEqualIgnoreCase("MIX") || isEqualIgnoreCase("MAX") || isEqualIgnoreCase("TRADITIONAL")); CheckParameter(SwitchingFunctionType, isEqualIgnoreCase("CUBIC") || isEqualIgnoreCase("FIFTH_ORDER_POLYNOMIAL")); //CheckParameter(StatFileFormat,); CheckParameter(OrthoBoxTolerance, isPositive()); - CheckParameter(ThermIntDistSpringConst, isPositive()); - CheckParameter(ThermIntThetaSpringConst, isPositive()); - CheckParameter(ThermIntOmegaSpringConst, isPositive()); CheckParameter(DampingAlpha,isNonNegative()); CheckParameter(SkinThickness, isPositive()); CheckParameter(Viscosity, isNonNegative()); + CheckParameter(ThermalConductivity, isNonNegative()); + CheckParameter(ThermalLength, isNonNegative()); CheckParameter(BeadSize, isPositive()); CheckParameter(FrozenBufferRadius, isPositive()); CheckParameter(LangevinBufferRadius, isPositive()); CheckParameter(NeighborListNeighbors, isPositive()); - CheckParameter(RNEMD_swapTime, isPositive()); - CheckParameter(RNEMD_nBins, isPositive()); - CheckParameter(RNEMD_swapType, isEqualIgnoreCase("Kinetic") || isEqualIgnoreCase("Px") || isEqualIgnoreCase("Py") || isEqualIgnoreCase("Pz")); + CheckParameter(RNEMD_exchangeTime, isPositive()); + CheckParameter(RNEMD_nBins, isPositive() && isEven()); + CheckParameter(RNEMD_exchangeType, isEqualIgnoreCase("KineticSwap") || isEqualIgnoreCase("KineticScale") || isEqualIgnoreCase("Px") || isEqualIgnoreCase("Py") || isEqualIgnoreCase("Pz") || isEqualIgnoreCase("PxScale") || isEqualIgnoreCase("PyScale") || isEqualIgnoreCase("PzScale")); + CheckParameter(RNEMD_targetFlux, isNonNegative()); for(std::vector::iterator i = components_.begin(); i != components_.end(); ++i) { if (!(*i)->findMoleculeStamp(moleculeStamps_)) { @@ -215,7 +218,7 @@ void Globals::validate() { } } } - + bool Globals::addComponent(Component* comp) { components_.push_back(comp); return true; @@ -226,6 +229,11 @@ bool Globals::addZConsStamp(ZConsStamp* zcons) { return true; } +bool Globals::addRestraintStamp(RestraintStamp* rest) { + restraints_.push_back(rest); + return true; +} + bool Globals::addMoleculeStamp(MoleculeStamp* molStamp) { std::string molStampName = molStamp->getName(); std::map::iterator i;