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