49 |
|
#include <string> |
50 |
|
#include <map> |
51 |
|
|
52 |
– |
#include "io/BASS_interface.h" |
52 |
|
#include "types/Component.hpp" |
53 |
< |
#include "types/MakeStamps.hpp" |
54 |
< |
#include "types/ZconStamp.hpp" |
56 |
< |
|
53 |
> |
#include "types/ZconsStamp.hpp" |
54 |
> |
#include "types/MoleculeStamp.hpp" |
55 |
|
#include "utils/ParameterManager.hpp" |
56 |
|
|
57 |
< |
class Globals { |
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(NComponents, int); |
67 |
< |
DeclareParameter(TargetTemp, double); |
68 |
< |
DeclareParameter(Ensemble, std::string); |
69 |
< |
DeclareParameter(Dt, double); |
70 |
< |
DeclareParameter(RunTime, double); |
71 |
< |
DeclareParameter(InitialConfig, std::string); |
72 |
< |
DeclareParameter(FinalConfig, std::string); |
73 |
< |
DeclareParameter(NMol, int); |
74 |
< |
DeclareParameter(Density, double); |
75 |
< |
DeclareParameter(Box, double); |
76 |
< |
DeclareParameter(BoxX, double); |
77 |
< |
DeclareParameter(BoxY, double); |
78 |
< |
DeclareParameter(BoxZ, double); |
79 |
< |
DeclareParameter(SampleTime, double); |
80 |
< |
DeclareParameter(ResetTime, double); |
81 |
< |
DeclareParameter(StatusTime, double); |
82 |
< |
DeclareParameter(CutoffRadius, double); |
83 |
< |
DeclareParameter(SwitchingRadius, double); |
84 |
< |
DeclareParameter(Dielectric, double); |
85 |
< |
DeclareParameter(TempSet, bool); |
86 |
< |
DeclareParameter(ThermalTime, double); |
87 |
< |
DeclareParameter(MixingRule, std::string); |
88 |
< |
DeclareParameter(UsePeriodicBoundaryConditions, bool); |
89 |
< |
DeclareParameter(TargetPressure, double); |
90 |
< |
DeclareParameter(TauThermostat, double); |
91 |
< |
DeclareParameter(TauBarostat, double); |
92 |
< |
DeclareParameter(ZconsTime, double); |
93 |
< |
DeclareParameter(NZconstraints, int); |
94 |
< |
DeclareParameter(ZconsTol, double); |
95 |
< |
DeclareParameter(ZconsForcePolicy, std::string); |
96 |
< |
DeclareParameter(Seed, int); |
97 |
< |
DeclareParameter(UseInitalTime, bool); |
98 |
< |
DeclareParameter(UseIntialExtendedSystemState, bool); |
99 |
< |
DeclareParameter(OrthoBoxTolerance, double); |
100 |
< |
DeclareParameter(Minimizer, std::string); |
101 |
< |
DeclareParameter(MinimizerMaxIter, double); |
102 |
< |
DeclareParameter(MinimizerWriteFrq, int); |
103 |
< |
DeclareParameter(MinimizerStepSize, double); |
104 |
< |
DeclareParameter(MinimizerFTol, double); |
105 |
< |
DeclareParameter(MinimizerGTol, double); |
106 |
< |
DeclareParameter(MinimizerLSTol, double); |
107 |
< |
DeclareParameter(MinimizerLSMaxIter, int); |
108 |
< |
DeclareParameter(ZconsGap, double); |
109 |
< |
DeclareParameter(ZconsFixtime, double); |
110 |
< |
DeclareParameter(ZconsUsingSMD, bool); |
111 |
< |
DeclareParameter(UseSolidThermInt, bool); |
112 |
< |
DeclareParameter(UseLiquidThermInt, bool); |
113 |
< |
DeclareParameter(ThermodynamicIntegrationLambda, double); |
114 |
< |
DeclareParameter(ThermodynamicIntegrationK, double); |
115 |
< |
DeclareParameter(ForceFieldVariant, std::string); |
116 |
< |
DeclareParameter(ForceFieldFileName, std::string); |
117 |
< |
DeclareParameter(ThermIntDistSpringConst, double); |
118 |
< |
DeclareParameter(ThermIntThetaSpringConst, double); |
119 |
< |
DeclareParameter(ThermIntOmegaSpringConst, double); |
120 |
< |
DeclareParameter(SurfaceTension, double); |
121 |
< |
DeclareParameter(PrintPressureTensor, bool); |
122 |
< |
DeclareParameter(ElectrostaticSummationMethod, std::string); |
123 |
< |
DeclareParameter(ElectrostaticScreeningMethod, std::string); |
124 |
< |
DeclareParameter(DampingAlpha, double); |
125 |
< |
DeclareParameter(CutoffPolicy, std::string); |
126 |
< |
DeclareParameter(SwitchingFunctionType, std::string); |
127 |
< |
DeclareParameter(CompressDumpFile, bool); |
128 |
< |
DeclareParameter(OutputForceVector, bool); |
129 |
< |
DeclareParameter(SkinThickness, double); |
130 |
< |
DeclareParameter(StatFileFormat, std::string); |
131 |
< |
|
132 |
< |
private: |
133 |
< |
typedef std::map<std::string, ParameterBase*> ParamMap; |
134 |
< |
ParamMap parameters_; |
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 |
|
|
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 |
– |
|
144 |
|
public: |
145 |
< |
int newComponent( event* the_event ); |
146 |
< |
int componentAssign( event* the_event ); |
147 |
< |
int componentEnd( event* the_event ); |
148 |
< |
|
149 |
< |
int newZconstraint( event* the_event ); |
150 |
< |
int zConstraintAssign( event* the_event ); |
151 |
< |
int zConstraintEnd( event* the_event ); |
152 |
< |
|
153 |
< |
int globalAssign( event* the_event ); |
154 |
< |
int globalEnd( event* the_event ); |
155 |
< |
|
156 |
< |
ZconStamp** getZconStamp() {return zConstraints;} |
157 |
< |
Component** getComponents() {return components;} |
145 |
> |
bool addComponent(Component* comp); |
146 |
> |
bool addZConsStamp(ZConsStamp* zcons); |
147 |
> |
bool addMoleculeStamp(MoleculeStamp* molStamp); |
148 |
> |
int getNComponents() {return components_.size();} |
149 |
> |
std::vector<Component*> getComponents() {return components_;} |
150 |
> |
Component* getComponentAt(int index) {return components_.at(index);} |
151 |
> |
|
152 |
> |
int getNZconsStamps() {return zconstraints_.size();} |
153 |
> |
std::vector<ZConsStamp*> getZconsStamps() {return zconstraints_;} |
154 |
> |
ZConsStamp* getZconsStampAt(int index) {return zconstraints_.at(index);} |
155 |
> |
|
156 |
> |
virtual void validate(); |
157 |
> |
private: |
158 |
> |
|
159 |
> |
std::vector<Component*> components_; |
160 |
> |
std::vector<ZConsStamp*> zconstraints_; |
161 |
> |
std::map<std::string, MoleculeStamp*> moleculeStamps_; |
162 |
> |
std::pair<int, int> taggedAtomPair_; |
163 |
|
}; |
164 |
+ |
} |
165 |
|
#endif |
166 |
|
|