| 1 | 
gezelter | 
507 | 
/* | 
| 2 | 
chuckv | 
1402 | 
 * Copyright (c) 2005, 2010 The University of Notre Dame. All Rights Reserved. | 
| 3 | 
gezelter | 
246 | 
 * | 
| 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 | 
gezelter | 
1390 | 
 * 1. Redistributions of source code must retain the above copyright | 
| 10 | 
gezelter | 
246 | 
 *    notice, this list of conditions and the following disclaimer. | 
| 11 | 
  | 
  | 
 * | 
| 12 | 
gezelter | 
1390 | 
 * 2. Redistributions in binary form must reproduce the above copyright | 
| 13 | 
gezelter | 
246 | 
 *    notice, this list of conditions and the following disclaimer in the | 
| 14 | 
  | 
  | 
 *    documentation and/or other materials provided with the | 
| 15 | 
  | 
  | 
 *    distribution. | 
| 16 | 
  | 
  | 
 * | 
| 17 | 
  | 
  | 
 * This software is provided "AS IS," without a warranty of any | 
| 18 | 
  | 
  | 
 * kind. All express or implied conditions, representations and | 
| 19 | 
  | 
  | 
 * warranties, including any implied warranty of merchantability, | 
| 20 | 
  | 
  | 
 * fitness for a particular purpose or non-infringement, are hereby | 
| 21 | 
  | 
  | 
 * excluded.  The University of Notre Dame and its licensors shall not | 
| 22 | 
  | 
  | 
 * be liable for any damages suffered by licensee as a result of | 
| 23 | 
  | 
  | 
 * using, modifying or distributing the software or its | 
| 24 | 
  | 
  | 
 * derivatives. In no event will the University of Notre Dame or its | 
| 25 | 
  | 
  | 
 * licensors be liable for any lost revenue, profit or data, or for | 
| 26 | 
  | 
  | 
 * direct, indirect, special, consequential, incidental or punitive | 
| 27 | 
  | 
  | 
 * damages, however caused and regardless of the theory of liability, | 
| 28 | 
  | 
  | 
 * arising out of the use of or inability to use software, even if the | 
| 29 | 
  | 
  | 
 * University of Notre Dame has been advised of the possibility of | 
| 30 | 
  | 
  | 
 * such damages. | 
| 31 | 
gezelter | 
1390 | 
 * | 
| 32 | 
  | 
  | 
 * SUPPORT OPEN SCIENCE!  If you use OpenMD or its source code in your | 
| 33 | 
  | 
  | 
 * research, please cite the appropriate papers when you publish your | 
| 34 | 
  | 
  | 
 * work.  Good starting points are: | 
| 35 | 
  | 
  | 
 *                                                                       | 
| 36 | 
  | 
  | 
 * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).              | 
| 37 | 
  | 
  | 
 * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).           | 
| 38 | 
  | 
  | 
 * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).           | 
| 39 | 
  | 
  | 
 * [4]  Vardeman & Gezelter, in progress (2009).                         | 
| 40 | 
gezelter | 
246 | 
 */ | 
| 41 | 
  | 
  | 
  | 
| 42 | 
  | 
  | 
#ifndef IO_GLOBALS_HPP | 
| 43 | 
  | 
  | 
#define IO_GLOBALS_HPP | 
| 44 | 
gezelter | 
2 | 
 | 
| 45 | 
  | 
  | 
#include <iostream> | 
| 46 | 
  | 
  | 
 | 
| 47 | 
  | 
  | 
#include <stdlib.h> | 
| 48 | 
  | 
  | 
#include <vector> | 
| 49 | 
tim | 
425 | 
#include <string> | 
| 50 | 
  | 
  | 
#include <map> | 
| 51 | 
gezelter | 
2 | 
 | 
| 52 | 
tim | 
3 | 
#include "types/Component.hpp" | 
| 53 | 
tim | 
770 | 
#include "types/ZconsStamp.hpp" | 
| 54 | 
cli2 | 
1360 | 
#include "types/RestraintStamp.hpp" | 
| 55 | 
tim | 
770 | 
#include "types/MoleculeStamp.hpp" | 
| 56 | 
chuckv | 
748 | 
#include "utils/ParameterManager.hpp" | 
| 57 | 
gezelter | 
2 | 
 | 
| 58 | 
gezelter | 
1390 | 
namespace OpenMD { | 
| 59 | 
gezelter | 
1291 | 
  class Globals : public DataHolder { | 
| 60 | 
tim | 
665 | 
  public: | 
| 61 | 
gezelter | 
1291 | 
    typedef std::pair<int, int> intPair; | 
| 62 | 
  | 
  | 
 | 
| 63 | 
tim | 
665 | 
    Globals(); | 
| 64 | 
tim | 
770 | 
    virtual ~Globals(); | 
| 65 | 
tim | 
665 | 
     | 
| 66 | 
gezelter | 
1291 | 
    DeclareParameter(ForceField, std::string); | 
| 67 | 
  | 
  | 
    DeclareParameter(TargetTemp, RealType); | 
| 68 | 
  | 
  | 
    DeclareParameter(Ensemble, std::string); | 
| 69 | 
  | 
  | 
    DeclareParameter(Dt, RealType); | 
| 70 | 
  | 
  | 
    DeclareParameter(RunTime, RealType); | 
| 71 | 
  | 
  | 
    DeclareParameter(FinalConfig, std::string); | 
| 72 | 
  | 
  | 
    DeclareParameter(SampleTime, RealType); | 
| 73 | 
  | 
  | 
    DeclareParameter(ResetTime, RealType); | 
| 74 | 
  | 
  | 
    DeclareParameter(StatusTime, RealType); | 
| 75 | 
  | 
  | 
    DeclareParameter(CutoffRadius, RealType); | 
| 76 | 
  | 
  | 
    DeclareParameter(SwitchingRadius, RealType); | 
| 77 | 
  | 
  | 
    DeclareParameter(TempSet, bool); | 
| 78 | 
  | 
  | 
    DeclareParameter(ThermalTime, RealType); | 
| 79 | 
  | 
  | 
    DeclareParameter(UsePeriodicBoundaryConditions, bool); | 
| 80 | 
  | 
  | 
    DeclareParameter(TargetPressure, RealType); | 
| 81 | 
  | 
  | 
    DeclareParameter(UseAtomicVirial, bool); | 
| 82 | 
  | 
  | 
    DeclareParameter(TauThermostat, RealType); | 
| 83 | 
  | 
  | 
    DeclareParameter(TauBarostat, RealType); | 
| 84 | 
  | 
  | 
    DeclareParameter(ZconsTime, RealType); | 
| 85 | 
  | 
  | 
    DeclareParameter(ZconsTol, RealType); | 
| 86 | 
  | 
  | 
    DeclareParameter(ZconsForcePolicy, std::string); | 
| 87 | 
gezelter | 
1313 | 
    DeclareParameter(Seed, unsigned long int); | 
| 88 | 
gezelter | 
1291 | 
    DeclareParameter(UseInitalTime, bool); | 
| 89 | 
  | 
  | 
    DeclareParameter(UseIntialExtendedSystemState, bool); | 
| 90 | 
  | 
  | 
    DeclareParameter(OrthoBoxTolerance, RealType); | 
| 91 | 
  | 
  | 
    DeclareParameter(Minimizer, std::string); | 
| 92 | 
  | 
  | 
    DeclareParameter(MinimizerMaxIter, RealType); | 
| 93 | 
gezelter | 
1423 | 
    DeclareParameter(MinimizerWriteFreq, int); | 
| 94 | 
gezelter | 
1291 | 
    DeclareParameter(MinimizerStepSize, RealType); | 
| 95 | 
  | 
  | 
    DeclareParameter(MinimizerFTol, RealType); | 
| 96 | 
  | 
  | 
    DeclareParameter(MinimizerGTol, RealType); | 
| 97 | 
  | 
  | 
    DeclareParameter(MinimizerLSTol, RealType); | 
| 98 | 
  | 
  | 
    DeclareParameter(MinimizerLSMaxIter, int); | 
| 99 | 
  | 
  | 
    DeclareParameter(ZconsGap, RealType); | 
| 100 | 
  | 
  | 
    DeclareParameter(ZconsFixtime, RealType); | 
| 101 | 
  | 
  | 
    DeclareParameter(ZconsUsingSMD, bool); | 
| 102 | 
cli2 | 
1360 | 
    DeclareParameter(UseThermodynamicIntegration, bool); | 
| 103 | 
gezelter | 
1291 | 
    DeclareParameter(ThermodynamicIntegrationLambda, RealType); | 
| 104 | 
  | 
  | 
    DeclareParameter(ThermodynamicIntegrationK, RealType); | 
| 105 | 
  | 
  | 
    DeclareParameter(ForceFieldVariant, std::string); | 
| 106 | 
  | 
  | 
    DeclareParameter(ForceFieldFileName, std::string); | 
| 107 | 
  | 
  | 
    DeclareParameter(SurfaceTension, RealType); | 
| 108 | 
  | 
  | 
    DeclareParameter(PrintPressureTensor, bool); | 
| 109 | 
  | 
  | 
    DeclareParameter(TaggedAtomPair, intPair); | 
| 110 | 
  | 
  | 
    DeclareParameter(PrintTaggedPairDistance, bool); | 
| 111 | 
  | 
  | 
    DeclareParameter(ElectrostaticSummationMethod, std::string); | 
| 112 | 
  | 
  | 
    DeclareParameter(ElectrostaticScreeningMethod, std::string); | 
| 113 | 
  | 
  | 
    DeclareParameter(DampingAlpha, RealType); | 
| 114 | 
  | 
  | 
    DeclareParameter(Dielectric, RealType); | 
| 115 | 
gezelter | 
1528 | 
    DeclareParameter(CutoffMethod, std::string); | 
| 116 | 
gezelter | 
1576 | 
    DeclareParameter(CutoffPolicy, std::string); | 
| 117 | 
gezelter | 
1291 | 
    DeclareParameter(SwitchingFunctionType, std::string); | 
| 118 | 
  | 
  | 
    DeclareParameter(CompressDumpFile, bool); | 
| 119 | 
  | 
  | 
    DeclareParameter(OutputForceVector, bool); | 
| 120 | 
gezelter | 
1629 | 
    DeclareParameter(OutputParticlePotential, bool); | 
| 121 | 
gezelter | 
1291 | 
    DeclareParameter(SkinThickness, RealType); | 
| 122 | 
  | 
  | 
    DeclareParameter(StatFileFormat, std::string);     | 
| 123 | 
  | 
  | 
    DeclareParameter(HydroPropFile, std::string); | 
| 124 | 
  | 
  | 
    DeclareParameter(Viscosity, RealType); | 
| 125 | 
  | 
  | 
    DeclareParameter(BeadSize, RealType);   | 
| 126 | 
  | 
  | 
    DeclareParameter(UseSphericalBoundaryConditions, bool); | 
| 127 | 
  | 
  | 
    DeclareParameter(FrozenBufferRadius, RealType); | 
| 128 | 
  | 
  | 
    DeclareParameter(LangevinBufferRadius, RealType); | 
| 129 | 
  | 
  | 
    DeclareParameter(AccumulateBoxDipole, bool); | 
| 130 | 
  | 
  | 
    DeclareParameter(NeighborListNeighbors, int); | 
| 131 | 
chuckv | 
1306 | 
    DeclareParameter(UseMultipleTemperatureMethod, bool); | 
| 132 | 
  | 
  | 
    DeclareParameter(MTM_Ce, RealType); | 
| 133 | 
  | 
  | 
    DeclareParameter(MTM_G, RealType); | 
| 134 | 
  | 
  | 
    DeclareParameter(MTM_Io, RealType); | 
| 135 | 
  | 
  | 
    DeclareParameter(MTM_Sigma, RealType);     | 
| 136 | 
  | 
  | 
    DeclareParameter(MTM_R, RealType);     | 
| 137 | 
gezelter | 
1327 | 
    DeclareParameter(UseRNEMD, bool); | 
| 138 | 
skuang | 
1367 | 
    DeclareParameter(RNEMD_exchangeTime, RealType); | 
| 139 | 
gezelter | 
1327 | 
    DeclareParameter(RNEMD_nBins, int); | 
| 140 | 
skuang | 
1367 | 
    DeclareParameter(RNEMD_logWidth, int); | 
| 141 | 
  | 
  | 
    DeclareParameter(RNEMD_exchangeType, std::string); | 
| 142 | 
gezelter | 
1331 | 
    DeclareParameter(RNEMD_objectSelection, std::string); | 
| 143 | 
skuang | 
1367 | 
    DeclareParameter(RNEMD_targetFlux, RealType); | 
| 144 | 
gezelter | 
1629 | 
    DeclareParameter(RNEMD_binShift, bool); | 
| 145 | 
  | 
  | 
    DeclareParameter(RNEMD_outputDimensionalTemperature, bool); | 
| 146 | 
gezelter | 
1354 | 
    DeclareParameter(UseRestraints, bool); | 
| 147 | 
  | 
  | 
    DeclareParameter(Restraint_file, std::string); | 
| 148 | 
chuckv | 
1402 | 
    DeclareParameter(HULL_Method, std::string); | 
| 149 | 
  | 
  | 
    DeclareParameter(Alpha, RealType); | 
| 150 | 
gezelter | 
1613 | 
    DeclareAlterableParameter(MDfileVersion, int); | 
| 151 | 
gezelter | 
1291 | 
     | 
| 152 | 
tim | 
770 | 
  public: | 
| 153 | 
  | 
  | 
    bool addComponent(Component* comp); | 
| 154 | 
  | 
  | 
    bool addZConsStamp(ZConsStamp* zcons); | 
| 155 | 
cli2 | 
1360 | 
    bool addRestraintStamp(RestraintStamp* rest); | 
| 156 | 
tim | 
770 | 
    bool addMoleculeStamp(MoleculeStamp* molStamp); | 
| 157 | 
  | 
  | 
    int getNComponents() {return components_.size();} | 
| 158 | 
  | 
  | 
    std::vector<Component*> getComponents() {return components_;} | 
| 159 | 
  | 
  | 
    Component* getComponentAt(int index) {return components_.at(index);}     | 
| 160 | 
gezelter | 
1291 | 
     | 
| 161 | 
tim | 
770 | 
    int getNZconsStamps() {return zconstraints_.size();} | 
| 162 | 
  | 
  | 
    std::vector<ZConsStamp*> getZconsStamps() {return zconstraints_;} | 
| 163 | 
  | 
  | 
    ZConsStamp* getZconsStampAt(int index) {return zconstraints_.at(index);}     | 
| 164 | 
cli2 | 
1360 | 
 | 
| 165 | 
  | 
  | 
    int getNRestraintStamps() {return restraints_.size();} | 
| 166 | 
  | 
  | 
    std::vector<RestraintStamp*> getRestraintStamps() {return restraints_;} | 
| 167 | 
  | 
  | 
    RestraintStamp* getRestraintStampAt(int index) {return restraints_.at(index);}     | 
| 168 | 
gezelter | 
1291 | 
     | 
| 169 | 
tim | 
770 | 
    virtual void validate(); | 
| 170 | 
  | 
  | 
  private: | 
| 171 | 
tim | 
895 | 
     | 
| 172 | 
tim | 
770 | 
    std::vector<Component*> components_; | 
| 173 | 
  | 
  | 
    std::vector<ZConsStamp*> zconstraints_;     | 
| 174 | 
cli2 | 
1360 | 
    std::vector<RestraintStamp*> restraints_;     | 
| 175 | 
tim | 
770 | 
    std::map<std::string, MoleculeStamp*> moleculeStamps_; | 
| 176 | 
gezelter | 
1291 | 
    std::pair<int, int> taggedAtomPair_; | 
| 177 | 
gezelter | 
2 | 
}; | 
| 178 | 
tim | 
770 | 
} | 
| 179 | 
tim | 
665 | 
#endif |