| 1 | gezelter | 507 | /* | 
| 2 | gezelter | 246 | * 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 | 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 "io/BASS_interface.h" | 
| 53 |  |  | #include "types/Component.hpp" | 
| 54 |  |  | #include "types/MakeStamps.hpp" | 
| 55 |  |  | #include "types/ZconStamp.hpp" | 
| 56 | gezelter | 2 |  | 
| 57 | chuckv | 748 | #include "utils/ParameterManager.hpp" | 
| 58 | gezelter | 2 |  | 
| 59 | tim | 665 | class Globals { | 
| 60 |  |  | public: | 
| 61 |  |  | Globals(); | 
| 62 |  |  |  | 
| 63 |  |  | DeclareParameter(ForceField, std::string); | 
| 64 |  |  | DeclareParameter(NComponents, int); | 
| 65 |  |  | DeclareParameter(TargetTemp, double); | 
| 66 |  |  | DeclareParameter(Ensemble, std::string); | 
| 67 |  |  | DeclareParameter(Dt, double); | 
| 68 |  |  | DeclareParameter(RunTime, double); | 
| 69 |  |  | DeclareParameter(InitialConfig, std::string); | 
| 70 |  |  | DeclareParameter(FinalConfig, std::string); | 
| 71 |  |  | DeclareParameter(NMol, int); | 
| 72 |  |  | DeclareParameter(Density, double); | 
| 73 |  |  | DeclareParameter(Box, double); | 
| 74 |  |  | DeclareParameter(BoxX, double); | 
| 75 |  |  | DeclareParameter(BoxY, double); | 
| 76 |  |  | DeclareParameter(BoxZ, double); | 
| 77 |  |  | DeclareParameter(SampleTime, double); | 
| 78 |  |  | DeclareParameter(ResetTime, double); | 
| 79 |  |  | DeclareParameter(StatusTime, double); | 
| 80 |  |  | DeclareParameter(CutoffRadius, double); | 
| 81 |  |  | DeclareParameter(SwitchingRadius, double); | 
| 82 |  |  | DeclareParameter(Dielectric, double); | 
| 83 |  |  | DeclareParameter(TempSet, bool); | 
| 84 |  |  | DeclareParameter(ThermalTime, double); | 
| 85 |  |  | DeclareParameter(MixingRule, std::string); | 
| 86 |  |  | DeclareParameter(UsePeriodicBoundaryConditions, bool); | 
| 87 |  |  | DeclareParameter(TargetPressure, double); | 
| 88 |  |  | DeclareParameter(TauThermostat, double); | 
| 89 |  |  | DeclareParameter(TauBarostat, double); | 
| 90 |  |  | DeclareParameter(ZconsTime, double); | 
| 91 |  |  | DeclareParameter(NZconstraints, int); | 
| 92 |  |  | DeclareParameter(ZconsTol, double); | 
| 93 |  |  | DeclareParameter(ZconsForcePolicy, std::string); | 
| 94 |  |  | DeclareParameter(Seed, int); | 
| 95 |  |  | DeclareParameter(UseInitalTime, bool); | 
| 96 |  |  | DeclareParameter(UseIntialExtendedSystemState, bool); | 
| 97 |  |  | DeclareParameter(OrthoBoxTolerance, double); | 
| 98 |  |  | DeclareParameter(Minimizer, std::string); | 
| 99 |  |  | DeclareParameter(MinimizerMaxIter, double); | 
| 100 |  |  | DeclareParameter(MinimizerWriteFrq, int); | 
| 101 |  |  | DeclareParameter(MinimizerStepSize, double); | 
| 102 |  |  | DeclareParameter(MinimizerFTol, double); | 
| 103 |  |  | DeclareParameter(MinimizerGTol, double); | 
| 104 |  |  | DeclareParameter(MinimizerLSTol, double); | 
| 105 |  |  | DeclareParameter(MinimizerLSMaxIter, int); | 
| 106 |  |  | DeclareParameter(ZconsGap, double); | 
| 107 |  |  | DeclareParameter(ZconsFixtime, double); | 
| 108 |  |  | DeclareParameter(ZconsUsingSMD, bool); | 
| 109 |  |  | DeclareParameter(UseSolidThermInt, bool); | 
| 110 |  |  | DeclareParameter(UseLiquidThermInt, bool); | 
| 111 |  |  | DeclareParameter(ThermodynamicIntegrationLambda, double); | 
| 112 |  |  | DeclareParameter(ThermodynamicIntegrationK, double); | 
| 113 |  |  | DeclareParameter(ForceFieldVariant, std::string); | 
| 114 |  |  | DeclareParameter(ForceFieldFileName, std::string); | 
| 115 |  |  | DeclareParameter(ThermIntDistSpringConst, double); | 
| 116 |  |  | DeclareParameter(ThermIntThetaSpringConst, double); | 
| 117 |  |  | DeclareParameter(ThermIntOmegaSpringConst, double); | 
| 118 |  |  | DeclareParameter(SurfaceTension, double); | 
| 119 |  |  | DeclareParameter(PrintPressureTensor, bool); | 
| 120 |  |  | DeclareParameter(ElectrostaticSummationMethod, std::string); | 
| 121 | chrisfen | 716 | DeclareParameter(ElectrostaticScreeningMethod, std::string); | 
| 122 | tim | 665 | DeclareParameter(DampingAlpha, double); | 
| 123 |  |  | DeclareParameter(CutoffPolicy, std::string); | 
| 124 | chrisfen | 726 | DeclareParameter(SwitchingFunctionType, std::string); | 
| 125 | tim | 665 | DeclareParameter(CompressDumpFile, bool); | 
| 126 | chrisfen | 726 | DeclareParameter(OutputForceVector, bool); | 
| 127 | tim | 665 | DeclareParameter(SkinThickness, double); | 
| 128 |  |  | DeclareParameter(StatFileFormat, std::string); | 
| 129 |  |  |  | 
| 130 |  |  | private: | 
| 131 |  |  | typedef std::map<std::string, ParameterBase*> ParamMap; | 
| 132 |  |  | ParamMap parameters_; | 
| 133 |  |  |  | 
| 134 |  |  | Component* current_component; | 
| 135 |  |  | Component** components; // the array of components | 
| 136 |  |  |  | 
| 137 |  |  | ZconStamp* current_zConstraint; | 
| 138 |  |  | ZconStamp** zConstraints; // the array of zConstraints | 
| 139 |  |  |  | 
| 140 |  |  | char* checkMe(); | 
| 141 |  |  |  | 
| 142 |  |  | public: | 
| 143 |  |  | int newComponent( event* the_event ); | 
| 144 |  |  | int componentAssign( event* the_event ); | 
| 145 |  |  | int componentEnd( event* the_event ); | 
| 146 |  |  |  | 
| 147 |  |  | int newZconstraint( event* the_event ); | 
| 148 |  |  | int zConstraintAssign( event* the_event ); | 
| 149 |  |  | int zConstraintEnd( event* the_event ); | 
| 150 | gezelter | 2 |  | 
| 151 | tim | 665 | int globalAssign( event* the_event ); | 
| 152 |  |  | int globalEnd( event* the_event ); | 
| 153 |  |  |  | 
| 154 |  |  | ZconStamp** getZconStamp() {return zConstraints;} | 
| 155 |  |  | Component** getComponents() {return components;} | 
| 156 | gezelter | 2 | }; | 
| 157 | tim | 665 | #endif | 
| 158 | gezelter | 2 |  |