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 |
Globals(); |
61 |
virtual ~Globals(); |
62 |
|
63 |
DeclareParameter(ForceField, std::string); |
64 |
DeclareParameter(TargetTemp, double); |
65 |
DeclareParameter(Ensemble, std::string); |
66 |
DeclareParameter(Dt, double); |
67 |
DeclareParameter(RunTime, double); |
68 |
DeclareParameter(InitialConfig, std::string); |
69 |
DeclareParameter(FinalConfig, std::string); |
70 |
DeclareParameter(SampleTime, double); |
71 |
DeclareParameter(ResetTime, double); |
72 |
DeclareParameter(StatusTime, double); |
73 |
DeclareParameter(CutoffRadius, double); |
74 |
DeclareParameter(SwitchingRadius, double); |
75 |
DeclareParameter(Dielectric, double); |
76 |
DeclareParameter(TempSet, bool); |
77 |
DeclareParameter(ThermalTime, double); |
78 |
DeclareParameter(UsePeriodicBoundaryConditions, bool); |
79 |
DeclareParameter(TargetPressure, double); |
80 |
DeclareParameter(TauThermostat, double); |
81 |
DeclareParameter(TauBarostat, double); |
82 |
DeclareParameter(ZconsTime, double); |
83 |
DeclareParameter(ZconsTol, double); |
84 |
DeclareParameter(ZconsForcePolicy, std::string); |
85 |
DeclareParameter(Seed, int); |
86 |
DeclareParameter(UseInitalTime, bool); |
87 |
DeclareParameter(UseIntialExtendedSystemState, bool); |
88 |
DeclareParameter(OrthoBoxTolerance, double); |
89 |
DeclareParameter(Minimizer, std::string); |
90 |
DeclareParameter(MinimizerMaxIter, double); |
91 |
DeclareParameter(MinimizerWriteFrq, int); |
92 |
DeclareParameter(MinimizerStepSize, double); |
93 |
DeclareParameter(MinimizerFTol, double); |
94 |
DeclareParameter(MinimizerGTol, double); |
95 |
DeclareParameter(MinimizerLSTol, double); |
96 |
DeclareParameter(MinimizerLSMaxIter, int); |
97 |
DeclareParameter(ZconsGap, double); |
98 |
DeclareParameter(ZconsFixtime, double); |
99 |
DeclareParameter(ZconsUsingSMD, bool); |
100 |
DeclareParameter(UseSolidThermInt, bool); |
101 |
DeclareParameter(UseLiquidThermInt, bool); |
102 |
DeclareParameter(ThermodynamicIntegrationLambda, double); |
103 |
DeclareParameter(ThermodynamicIntegrationK, double); |
104 |
DeclareParameter(ForceFieldVariant, std::string); |
105 |
DeclareParameter(ForceFieldFileName, std::string); |
106 |
DeclareParameter(ThermIntDistSpringConst, double); |
107 |
DeclareParameter(ThermIntThetaSpringConst, double); |
108 |
DeclareParameter(ThermIntOmegaSpringConst, double); |
109 |
DeclareParameter(SurfaceTension, double); |
110 |
DeclareParameter(PrintPressureTensor, bool); |
111 |
DeclareParameter(ElectrostaticSummationMethod, std::string); |
112 |
DeclareParameter(ElectrostaticScreeningMethod, std::string); |
113 |
DeclareParameter(DampingAlpha, double); |
114 |
DeclareParameter(CutoffPolicy, std::string); |
115 |
DeclareParameter(SwitchingFunctionType, std::string); |
116 |
DeclareParameter(CompressDumpFile, bool); |
117 |
DeclareParameter(OutputForceVector, bool); |
118 |
DeclareParameter(SkinThickness, double); |
119 |
DeclareParameter(StatFileFormat, std::string); |
120 |
DeclareParameter(HydroPropFile, std::string); |
121 |
DeclareParameter(Viscosity, double); |
122 |
DeclareParameter(BeadSize, double); |
123 |
DeclareParameter(UseSphericalBoundaryConditions, bool); |
124 |
DeclareParameter(FrozenBufferRadius, double); |
125 |
DeclareParameter(LangevinBufferRadius, double); |
126 |
|
127 |
public: |
128 |
bool addComponent(Component* comp); |
129 |
bool addZConsStamp(ZConsStamp* zcons); |
130 |
bool addMoleculeStamp(MoleculeStamp* molStamp); |
131 |
int getNComponents() {return components_.size();} |
132 |
std::vector<Component*> getComponents() {return components_;} |
133 |
Component* getComponentAt(int index) {return components_.at(index);} |
134 |
|
135 |
int getNZconsStamps() {return zconstraints_.size();} |
136 |
std::vector<ZConsStamp*> getZconsStamps() {return zconstraints_;} |
137 |
ZConsStamp* getZconsStampAt(int index) {return zconstraints_.at(index);} |
138 |
|
139 |
virtual void validate(); |
140 |
private: |
141 |
|
142 |
std::vector<Component*> components_; |
143 |
std::vector<ZConsStamp*> zconstraints_; |
144 |
std::map<std::string, MoleculeStamp*> moleculeStamps_; |
145 |
|
146 |
}; |
147 |
} |
148 |
#endif |
149 |
|