| 1 | /* | 
| 2 | * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. | 
| 3 | * | 
| 4 | * The University of Notre Dame grants you ("Licensee") a | 
| 5 | * non-exclusive, royalty free, license to use, modify and | 
| 6 | * redistribute this software in source and binary code form, provided | 
| 7 | * that the following conditions are met: | 
| 8 | * | 
| 9 | * 1. Acknowledgement of the program authors must be made in any | 
| 10 | *    publication of scientific results based in part on use of the | 
| 11 | *    program.  An acceptable form of acknowledgement is citation of | 
| 12 | *    the article in which the program was described (Matthew | 
| 13 | *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher | 
| 14 | *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented | 
| 15 | *    Parallel Simulation Engine for Molecular Dynamics," | 
| 16 | *    J. Comput. Chem. 26, pp. 252-271 (2005)) | 
| 17 | * | 
| 18 | * 2. Redistributions of source code must retain the above copyright | 
| 19 | *    notice, this list of conditions and the following disclaimer. | 
| 20 | * | 
| 21 | * 3. Redistributions in binary form must reproduce the above copyright | 
| 22 | *    notice, this list of conditions and the following disclaimer in the | 
| 23 | *    documentation and/or other materials provided with the | 
| 24 | *    distribution. | 
| 25 | * | 
| 26 | * This software is provided "AS IS," without a warranty of any | 
| 27 | * kind. All express or implied conditions, representations and | 
| 28 | * warranties, including any implied warranty of merchantability, | 
| 29 | * fitness for a particular purpose or non-infringement, are hereby | 
| 30 | * excluded.  The University of Notre Dame and its licensors shall not | 
| 31 | * be liable for any damages suffered by licensee as a result of | 
| 32 | * using, modifying or distributing the software or its | 
| 33 | * derivatives. In no event will the University of Notre Dame or its | 
| 34 | * licensors be liable for any lost revenue, profit or data, or for | 
| 35 | * direct, indirect, special, consequential, incidental or punitive | 
| 36 | * damages, however caused and regardless of the theory of liability, | 
| 37 | * arising out of the use of or inability to use software, even if the | 
| 38 | * University of Notre Dame has been advised of the possibility of | 
| 39 | * such damages. | 
| 40 | */ | 
| 41 |  | 
| 42 | #ifndef IO_GLOBALS_HPP | 
| 43 | #define IO_GLOBALS_HPP | 
| 44 |  | 
| 45 | #include <iostream> | 
| 46 |  | 
| 47 | #include <stdlib.h> | 
| 48 | #include <vector> | 
| 49 | #include <string> | 
| 50 | #include <map> | 
| 51 |  | 
| 52 | #include "types/Component.hpp" | 
| 53 | #include "types/ZconsStamp.hpp" | 
| 54 | #include "types/MoleculeStamp.hpp" | 
| 55 | #include "utils/ParameterManager.hpp" | 
| 56 |  | 
| 57 | namespace oopse { | 
| 58 | class Globals : public DataHolder { | 
| 59 | public: | 
| 60 | typedef std::pair<int, int> intPair; | 
| 61 |  | 
| 62 | Globals(); | 
| 63 | virtual ~Globals(); | 
| 64 |  | 
| 65 | DeclareParameter(ForceField, std::string); | 
| 66 | DeclareParameter(TargetTemp, RealType); | 
| 67 | DeclareParameter(Ensemble, std::string); | 
| 68 | DeclareParameter(Dt, RealType); | 
| 69 | DeclareParameter(RunTime, RealType); | 
| 70 | DeclareParameter(FinalConfig, std::string); | 
| 71 | DeclareParameter(SampleTime, RealType); | 
| 72 | DeclareParameter(ResetTime, RealType); | 
| 73 | DeclareParameter(StatusTime, RealType); | 
| 74 | DeclareParameter(CutoffRadius, RealType); | 
| 75 | DeclareParameter(SwitchingRadius, RealType); | 
| 76 | DeclareParameter(TempSet, bool); | 
| 77 | DeclareParameter(ThermalTime, RealType); | 
| 78 | DeclareParameter(UsePeriodicBoundaryConditions, bool); | 
| 79 | DeclareParameter(TargetPressure, RealType); | 
| 80 | DeclareParameter(UseAtomicVirial, bool); | 
| 81 | DeclareParameter(TauThermostat, RealType); | 
| 82 | DeclareParameter(TauBarostat, RealType); | 
| 83 | DeclareParameter(ZconsTime, RealType); | 
| 84 | DeclareParameter(ZconsTol, RealType); | 
| 85 | DeclareParameter(ZconsForcePolicy, std::string); | 
| 86 | DeclareParameter(Seed, unsigned long int); | 
| 87 | DeclareParameter(UseInitalTime, bool); | 
| 88 | DeclareParameter(UseIntialExtendedSystemState, bool); | 
| 89 | DeclareParameter(OrthoBoxTolerance, RealType); | 
| 90 | DeclareParameter(Minimizer, std::string); | 
| 91 | DeclareParameter(MinimizerMaxIter, RealType); | 
| 92 | DeclareParameter(MinimizerWriteFrq, int); | 
| 93 | DeclareParameter(MinimizerStepSize, RealType); | 
| 94 | DeclareParameter(MinimizerFTol, RealType); | 
| 95 | DeclareParameter(MinimizerGTol, RealType); | 
| 96 | DeclareParameter(MinimizerLSTol, RealType); | 
| 97 | DeclareParameter(MinimizerLSMaxIter, int); | 
| 98 | DeclareParameter(ZconsGap, RealType); | 
| 99 | DeclareParameter(ZconsFixtime, RealType); | 
| 100 | DeclareParameter(ZconsUsingSMD, bool); | 
| 101 | DeclareParameter(UseSolidThermInt, bool); | 
| 102 | DeclareParameter(UseLiquidThermInt, bool); | 
| 103 | DeclareParameter(ThermodynamicIntegrationLambda, RealType); | 
| 104 | DeclareParameter(ThermodynamicIntegrationK, RealType); | 
| 105 | DeclareParameter(ForceFieldVariant, std::string); | 
| 106 | DeclareParameter(ForceFieldFileName, std::string); | 
| 107 | DeclareParameter(ThermIntDistSpringConst, RealType); | 
| 108 | DeclareParameter(ThermIntThetaSpringConst, RealType); | 
| 109 | DeclareParameter(ThermIntOmegaSpringConst, RealType); | 
| 110 | DeclareParameter(SurfaceTension, RealType); | 
| 111 | DeclareParameter(PrintPressureTensor, bool); | 
| 112 | DeclareParameter(TaggedAtomPair, intPair); | 
| 113 | DeclareParameter(PrintTaggedPairDistance, bool); | 
| 114 | DeclareParameter(ElectrostaticSummationMethod, std::string); | 
| 115 | DeclareParameter(ElectrostaticScreeningMethod, std::string); | 
| 116 | DeclareParameter(DampingAlpha, RealType); | 
| 117 | DeclareParameter(Dielectric, RealType); | 
| 118 | DeclareParameter(CutoffPolicy, std::string); | 
| 119 | DeclareParameter(SwitchingFunctionType, std::string); | 
| 120 | DeclareParameter(CompressDumpFile, bool); | 
| 121 | DeclareParameter(OutputForceVector, bool); | 
| 122 | DeclareParameter(SkinThickness, RealType); | 
| 123 | DeclareParameter(StatFileFormat, std::string); | 
| 124 | DeclareParameter(HydroPropFile, std::string); | 
| 125 | DeclareParameter(Viscosity, RealType); | 
| 126 | DeclareParameter(BeadSize, RealType); | 
| 127 | DeclareParameter(UseSphericalBoundaryConditions, bool); | 
| 128 | DeclareParameter(FrozenBufferRadius, RealType); | 
| 129 | DeclareParameter(LangevinBufferRadius, RealType); | 
| 130 | DeclareParameter(AccumulateBoxDipole, bool); | 
| 131 | DeclareParameter(NeighborListNeighbors, int); | 
| 132 | DeclareParameter(UseMultipleTemperatureMethod, bool); | 
| 133 | DeclareParameter(MTM_Ce, RealType); | 
| 134 | DeclareParameter(MTM_G, RealType); | 
| 135 | DeclareParameter(MTM_Io, RealType); | 
| 136 | DeclareParameter(MTM_Sigma, RealType); | 
| 137 | DeclareParameter(MTM_R, RealType); | 
| 138 | DeclareParameter(UseRNEMD, bool); | 
| 139 | DeclareParameter(RNEMD_swapTime, RealType); | 
| 140 | DeclareParameter(RNEMD_nBins, int); | 
| 141 | DeclareParameter(RNEMD_swapType, std::string); | 
| 142 | DeclareParameter(RNEMD_objectSelection, std::string); | 
| 143 | DeclareParameter(UseRestraints, bool); | 
| 144 | DeclareParameter(Restraint_objectSelection, std::string); | 
| 145 | DeclareParameter(Restraint_type, std::string); | 
| 146 | DeclareParameter(Restraint_file, std::string); | 
| 147 | DeclareParameter(Restraint_DisplacementSpringConstant, RealType); | 
| 148 | DeclareParameter(Restraint_RollSpringConstant, RealType);  // phi | 
| 149 | DeclareParameter(Restraint_PitchSpringConstant, RealType); // theta | 
| 150 | DeclareParameter(Restraint_YawSpringConstant, RealType);   // psi | 
| 151 |  | 
| 152 | public: | 
| 153 | bool addComponent(Component* comp); | 
| 154 | bool addZConsStamp(ZConsStamp* zcons); | 
| 155 | bool addMoleculeStamp(MoleculeStamp* molStamp); | 
| 156 | int getNComponents() {return components_.size();} | 
| 157 | std::vector<Component*> getComponents() {return components_;} | 
| 158 | Component* getComponentAt(int index) {return components_.at(index);} | 
| 159 |  | 
| 160 | int getNZconsStamps() {return zconstraints_.size();} | 
| 161 | std::vector<ZConsStamp*> getZconsStamps() {return zconstraints_;} | 
| 162 | ZConsStamp* getZconsStampAt(int index) {return zconstraints_.at(index);} | 
| 163 |  | 
| 164 | virtual void validate(); | 
| 165 | private: | 
| 166 |  | 
| 167 | std::vector<Component*> components_; | 
| 168 | std::vector<ZConsStamp*> zconstraints_; | 
| 169 | std::map<std::string, MoleculeStamp*> moleculeStamps_; | 
| 170 | std::pair<int, int> taggedAtomPair_; | 
| 171 | }; | 
| 172 | } | 
| 173 | #endif | 
| 174 |  |