| 1 |
< |
#ifndef __GLOBALS_H__ |
| 2 |
< |
#define __GLOBALS_H__ |
| 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 "BASS_interface.h" |
| 53 |
< |
#include "Component.hpp" |
| 54 |
< |
#include "LinkedCommand.hpp" |
| 55 |
< |
#include "MakeStamps.hpp" |
| 56 |
< |
#include "ZconStamp.hpp" |
| 52 |
> |
#include "io/BASS_interface.h" |
| 53 |
> |
#include "types/Component.hpp" |
| 54 |
> |
#include "types/MakeStamps.hpp" |
| 55 |
> |
#include "types/ZconStamp.hpp" |
| 56 |
> |
#include "utils/CaseConversion.hpp" |
| 57 |
|
|
| 58 |
< |
using namespace std; |
| 58 |
> |
template<typename T> |
| 59 |
> |
struct ParameterTraits; |
| 60 |
|
|
| 61 |
< |
class Globals{ |
| 62 |
< |
|
| 63 |
< |
public: |
| 64 |
< |
|
| 21 |
< |
Globals(); |
| 22 |
< |
~Globals(); |
| 61 |
> |
//string |
| 62 |
> |
template<> |
| 63 |
> |
struct ParameterTraits<std::string>{ |
| 64 |
> |
typedef std::string RepType; // Representation type of the value |
| 65 |
|
|
| 66 |
< |
void initalize(); |
| 67 |
< |
|
| 68 |
< |
int newComponent( event* the_event ); |
| 69 |
< |
int componentAssign( event* the_event ); |
| 70 |
< |
int componentEnd( event* the_event ); |
| 66 |
> |
template<typename T> static bool convert(T v, RepType& r){return false;} // !NB everything is ok |
| 67 |
> |
template<typename T> static RepType convert(T v) {RepType tmp; convert(v,tmp);return tmp;} |
| 68 |
> |
static bool convert(RepType v, RepType& r) { r = v; return true;} |
| 69 |
> |
static std::string getParamType() { return "string";} |
| 70 |
> |
}; |
| 71 |
> |
//bool |
| 72 |
> |
template<> |
| 73 |
> |
struct ParameterTraits<bool>{ |
| 74 |
> |
typedef bool RepType; |
| 75 |
> |
template<typename T> static bool convert(T, RepType&){return false;} |
| 76 |
> |
template<typename T> static RepType convert(T v) {RepType tmp; convert(v,tmp);return tmp;} |
| 77 |
> |
static bool convert(std::string v, RepType& r) { |
| 78 |
> |
oopse::toLower(v); |
| 79 |
> |
bool result = false; |
| 80 |
> |
if (v == "true") { |
| 81 |
> |
r = true; |
| 82 |
> |
result = true; |
| 83 |
> |
} else if (v == "false") { |
| 84 |
> |
r = false; |
| 85 |
> |
result = true; |
| 86 |
> |
} |
| 87 |
> |
|
| 88 |
> |
return result; |
| 89 |
> |
} |
| 90 |
> |
static std::string getParamType() { return "bool";} |
| 91 |
> |
}; |
| 92 |
|
|
| 93 |
< |
int newZconstraint( event* the_event ); |
| 94 |
< |
int zConstraintAssign( event* the_event ); |
| 95 |
< |
int zConstraintEnd( event* the_event ); |
| 96 |
< |
|
| 97 |
< |
int globalAssign( event* the_event ); |
| 98 |
< |
int globalEnd( event* the_event ); |
| 99 |
< |
|
| 100 |
< |
char* getForceField( void ) { return force_field; } |
| 101 |
< |
int getNComponents( void ) { return n_components; } |
| 39 |
< |
double getTargetTemp( void ) { return target_temp; } |
| 40 |
< |
double getTargetPressure( void ) { return target_pressure; } |
| 41 |
< |
double getQmass( void ) { return q_mass; } |
| 42 |
< |
double getTauThermostat( void ) { return tau_thermostat; } |
| 43 |
< |
double getTauBarostat( void ) { return tau_barostat; } |
| 44 |
< |
char* getEnsemble( void ) { return ensemble; } |
| 45 |
< |
double getDt( void ) { return dt; } |
| 46 |
< |
double getRunTime( void ) { return run_time; } |
| 47 |
< |
|
| 48 |
< |
int getNzConstraints( void ) { return n_zConstraints; } |
| 49 |
< |
char* getInitialConfig( void ) { return initial_config; } |
| 50 |
< |
char* getFinalConfig( void ) { return final_config; } |
| 51 |
< |
int getNMol( void ) { return n_mol; } |
| 52 |
< |
double getDensity( void ) { return density; } |
| 53 |
< |
double getBox( void ) { return box; } |
| 54 |
< |
double getBoxX( void ) { return box_x; } |
| 55 |
< |
double getBoxY( void ) { return box_y; } |
| 56 |
< |
double getBoxZ( void ) { return box_z; } |
| 57 |
< |
double getSampleTime( void ) { return sample_time; } |
| 58 |
< |
double getStatusTime( void ) { return status_time; } |
| 59 |
< |
double getResetTime( void ) { return resetTime; } |
| 60 |
< |
double getThermalTime( void ) { return thermal_time; } |
| 61 |
< |
double getDielectric( void ) { return dielectric; } |
| 62 |
< |
double getRcut( void ) { return rcut; } |
| 63 |
< |
double getRsw( void ) { return rsw; } |
| 64 |
< |
int getTempSet( void ) { return tempSet; } |
| 65 |
< |
int getUseInitTime( void ) { return useInitTime; } |
| 66 |
< |
int getUseInitXSstate( void ) { return useInitXSstate; } |
| 67 |
< |
double getOrthoBoxTolerance(void) { return orthoBoxTolerance; } |
| 68 |
< |
int getPBC( void ) { return usePBC; } |
| 69 |
< |
int getUseRF( void ) { return useRF; } |
| 70 |
< |
char* getMixingRule( void) { return mixingRule; } |
| 71 |
< |
double getZconsTime(void) { return zcons_time; } |
| 72 |
< |
double getZconsTol(void) { return zcons_tol; } |
| 73 |
< |
char* getZconsForcePolicy(void) { return zconsForcePolicy; } |
| 74 |
< |
double getZconsGap(void) { return zcons_gap; } |
| 75 |
< |
double getZconsFixtime(void) { return zcons_fixtime; } |
| 76 |
< |
int getZconsUsingSMD(void) { return zcons_using_smd; } |
| 77 |
< |
int getSeed(void) { return seed; } |
| 78 |
< |
char* getMinimizer(void) { return minimizer_name; } |
| 79 |
< |
int getMinMaxIter(void) { return minimizer_maxiteration; } |
| 80 |
< |
int getMinWriteFrq(void) { return minimizer_writefrq; } |
| 81 |
< |
double getMinStepSize(void) { return minimizer_stepsize; } |
| 82 |
< |
double getMinFTol(void) { return minimizer_ftol; } |
| 83 |
< |
double getMinGTol(void) { return minimizer_gtol; } |
| 84 |
< |
double getMinLSTol(void) { return minimizer_ls_tol; } |
| 85 |
< |
int getMinLSMaxIter(void) { return minimizer_ls_maxiteration; } |
| 86 |
< |
int getUseSolidThermInt(void) { return useSolidThermInt; } |
| 87 |
< |
int getUseLiquidThermInt(void) { return useLiquidThermInt; } |
| 88 |
< |
double getThermIntLambda(void) { return thermodynamic_integration_lambda; } |
| 89 |
< |
double getThermIntK(void) { return thermodynamic_integration_k; } |
| 90 |
< |
char* getForceFieldVariant( void ) { return forcefield_variant; } |
| 93 |
> |
//int |
| 94 |
> |
template<> |
| 95 |
> |
struct ParameterTraits<int>{ |
| 96 |
> |
typedef int RepType; |
| 97 |
> |
template<typename T> static bool convert(T, RepType&){return false;} |
| 98 |
> |
template<typename T> static RepType convert(T v) {RepType tmp; convert(v,tmp);return tmp;} |
| 99 |
> |
static bool convert(RepType v, RepType& r) { r=v; return true;} |
| 100 |
> |
static std::string getParamType() { return "int";} |
| 101 |
> |
}; |
| 102 |
|
|
| 103 |
< |
short int haveDt( void ) { return have_dt; } |
| 104 |
< |
short int haveRunTime( void ) { return have_run_time; } |
| 105 |
< |
short int haveEnsemble( void ) { return have_ensemble; } |
| 106 |
< |
short int haveTargetTemp( void ) { return have_target_temp; } |
| 107 |
< |
short int haveInitialConfig( void ) { return have_initial_config; } |
| 108 |
< |
short int haveFinalConfig( void ) { return have_final_config; } |
| 109 |
< |
short int haveNMol( void ) { return have_n_mol; } |
| 110 |
< |
short int haveDensity( void ) { return have_density; } |
| 111 |
< |
short int haveBox( void ) { return have_box; } |
| 112 |
< |
short int haveBoxX( void ) { return have_box_x; } |
| 102 |
< |
short int haveBoxY( void ) { return have_box_y; } |
| 103 |
< |
short int haveBoxZ( void ) { return have_box_z; } |
| 104 |
< |
short int haveSampleTime( void ) { return have_sample_time; } |
| 105 |
< |
short int haveResetTime( void ) { return have_reset_time; } |
| 106 |
< |
short int haveStatusTime( void ) { return have_status_time; } |
| 107 |
< |
short int haveThermalTime( void ) { return have_thermal_time; } |
| 108 |
< |
short int haveRcut( void ) { return have_rcut; } |
| 109 |
< |
short int haveRsw( void ) { return have_rsw; } |
| 110 |
< |
short int haveDielectric( void ) { return have_dielectric; } |
| 111 |
< |
short int haveTempSet( void ) { return have_tempSet; } |
| 112 |
< |
short int haveTargetPressure( void ){ return have_target_pressure; } |
| 113 |
< |
short int haveQmass( void ) { return have_q_mass; } |
| 114 |
< |
short int haveTauThermostat( void ) { return have_tau_thermostat; } |
| 115 |
< |
short int haveTauBarostat( void ) { return have_tau_barostat; } |
| 116 |
< |
short int haveZconstraintTime(void) { return have_zcons_time; } |
| 117 |
< |
short int haveZconstraints( void ) { return have_zConstraints; } |
| 118 |
< |
short int haveZconsTol(void) { return have_zcons_tol; } |
| 119 |
< |
short int haveZconsForcePolicy(void){ return have_zcons_force_policy; } |
| 120 |
< |
short int haveZConsGap(void) { return have_zcons_gap; } |
| 121 |
< |
short int haveZConsFixTime(void) { return have_zcons_fixtime; } |
| 122 |
< |
short int haveZConsUsingSMD(void) { return have_zcons_using_smd; } |
| 123 |
< |
short int haveSeed(void) { return have_seed; } |
| 124 |
< |
short int haveMinimizer(void) { return have_minimizer; } |
| 125 |
< |
short int haveMinMaxIter(void) { return have_minimizer_maxiteration; } |
| 126 |
< |
short int haveMinWriteFrq(void) { return have_minimizer_writefrq; } |
| 127 |
< |
short int haveMinStepSize(void) { return have_minimizer_stepsize; } |
| 128 |
< |
short int haveMinFTol(void) { return have_minimizer_ftol; } |
| 129 |
< |
short int haveMinGTol(void) { return have_minimizer_gtol; } |
| 130 |
< |
short int haveMinLSTol(void) { return have_minimizer_ls_tol; } |
| 131 |
< |
short int haveMinLSMaxIter(void) { return have_minimizer_ls_maxiteration;} |
| 132 |
< |
short int haveThermIntLambda(void) { return have_thermodynamic_integration_lambda; } |
| 133 |
< |
short int haveThermIntK(void) { return have_thermodynamic_integration_k; } |
| 134 |
< |
short int haveForceFieldVariant(void) { return have_forcefield_variant; } |
| 103 |
> |
//double |
| 104 |
> |
template<> |
| 105 |
> |
struct ParameterTraits<double>{ |
| 106 |
> |
typedef double RepType; |
| 107 |
> |
template<typename T> static bool convert(T, RepType&){return false;} |
| 108 |
> |
template<typename T> static RepType convert(T v) {RepType tmp; convert(v,tmp);return tmp;} |
| 109 |
> |
static bool convert(RepType v, RepType& r) {r=v; return true;} |
| 110 |
> |
static bool convert(int v, RepType& r) {r = static_cast<double>(v); return true;} |
| 111 |
> |
static std::string getParamType() { return "double";} |
| 112 |
> |
}; |
| 113 |
|
|
| 136 |
– |
/* other accessors */ |
| 137 |
– |
Component** getComponents( void ) { return components; } |
| 138 |
– |
ZconStamp** getZconStamp( void ) { return zConstraints; } |
| 139 |
– |
|
| 140 |
– |
private: |
| 141 |
– |
|
| 142 |
– |
int hash_size; |
| 143 |
– |
int hash_shift; |
| 144 |
– |
int hash( char* text ); |
| 145 |
– |
void addHash( char* text, int token ); |
| 146 |
– |
LinkedCommand** command_table; |
| 147 |
– |
|
| 148 |
– |
char* checkMe( void ); |
| 149 |
– |
|
| 150 |
– |
Component* current_component; |
| 151 |
– |
Component** components; // the array of components |
| 114 |
|
|
| 115 |
< |
ZconStamp* current_zConstraint; |
| 116 |
< |
ZconStamp** zConstraints; // the array of zConstraints |
| 115 |
> |
class ParameterBase { |
| 116 |
> |
public: |
| 117 |
> |
ParameterBase() : keyword_(), optional_(false), defaultValue_(false), empty_(true) {} |
| 118 |
> |
virtual ~ParameterBase() {} |
| 119 |
> |
bool isOptional() {return optional_;} |
| 120 |
> |
void setOptional(bool optional) {optional_ = optional;} |
| 121 |
> |
bool hasDefaultValue() {return defaultValue_;} |
| 122 |
> |
virtual bool isValid() { return true;} |
| 123 |
> |
const std::string& getKeyword() {return keyword_;} |
| 124 |
> |
void setKeyword(const std::string& keyword) { keyword_ = keyword;} |
| 125 |
> |
bool empty() {return empty_;} |
| 126 |
> |
virtual bool setData(std::string) = 0; |
| 127 |
> |
virtual bool setData(int) = 0; |
| 128 |
> |
virtual bool setData(double) = 0; |
| 129 |
> |
virtual std::string getParamType() = 0; |
| 130 |
> |
protected: |
| 131 |
> |
std::string keyword_; |
| 132 |
> |
bool optional_; |
| 133 |
> |
bool defaultValue_; |
| 134 |
> |
bool empty_; |
| 135 |
> |
}; |
| 136 |
|
|
| 137 |
< |
char force_field[100]; |
| 138 |
< |
int n_components; |
| 139 |
< |
int n_zConstraints; |
| 140 |
< |
double target_temp; |
| 141 |
< |
double target_pressure; |
| 142 |
< |
char ensemble[100]; |
| 162 |
< |
char mixingRule[100]; |
| 163 |
< |
double dt; |
| 164 |
< |
double run_time; |
| 165 |
< |
char initial_config[120]; |
| 166 |
< |
char final_config[120]; |
| 167 |
< |
int n_mol; |
| 168 |
< |
double density; |
| 169 |
< |
double box; |
| 170 |
< |
double box_x, box_y, box_z; |
| 171 |
< |
double sample_time; |
| 172 |
< |
double status_time; |
| 173 |
< |
double resetTime; |
| 174 |
< |
double orthoBoxTolerance; |
| 175 |
< |
double thermal_time; |
| 176 |
< |
double rcut; |
| 177 |
< |
double rsw; |
| 178 |
< |
double dielectric; |
| 179 |
< |
int tempSet; |
| 180 |
< |
int useInitTime; |
| 181 |
< |
int useInitXSstate; |
| 182 |
< |
int usePBC; |
| 183 |
< |
int useRF; |
| 184 |
< |
double q_mass; |
| 185 |
< |
double tau_thermostat; |
| 186 |
< |
double tau_barostat; |
| 187 |
< |
double zcons_time; |
| 188 |
< |
double zcons_tol; |
| 189 |
< |
char zconsForcePolicy[100]; |
| 190 |
< |
double zcons_gap; |
| 191 |
< |
double zcons_fixtime; |
| 192 |
< |
int zcons_using_smd; |
| 193 |
< |
|
| 194 |
< |
int seed; |
| 195 |
< |
char minimizer_name[100]; |
| 196 |
< |
int minimizer_maxiteration; |
| 197 |
< |
int minimizer_writefrq; |
| 198 |
< |
double minimizer_stepsize; |
| 199 |
< |
double minimizer_ftol; |
| 200 |
< |
double minimizer_gtol; |
| 201 |
< |
double minimizer_ls_tol; |
| 202 |
< |
int minimizer_ls_maxiteration; |
| 203 |
< |
int useSolidThermInt; |
| 204 |
< |
int useLiquidThermInt; |
| 205 |
< |
double thermodynamic_integration_lambda; |
| 206 |
< |
double thermodynamic_integration_k; |
| 207 |
< |
char forcefield_variant[100]; |
| 137 |
> |
template<class ParamType> |
| 138 |
> |
class Parameter : public ParameterBase{ |
| 139 |
> |
public: |
| 140 |
> |
typedef ParameterTraits<ParamType> ValueType; |
| 141 |
> |
void setDefaultValue(const ParamType& value) {data_ = value; defaultValue_ = true;} |
| 142 |
> |
ParamType getData() { return data_;} |
| 143 |
|
|
| 144 |
< |
//required arguments |
| 145 |
< |
short int have_force_field, have_n_components, have_target_temp; |
| 146 |
< |
short int have_target_pressure, have_ensemble, have_dt, have_run_time; |
| 147 |
< |
|
| 148 |
< |
// optional arguments |
| 149 |
< |
short int have_initial_config, have_final_config, have_n_mol; |
| 150 |
< |
short int have_density, have_box, have_box_x, have_box_y, have_box_z; |
| 151 |
< |
short int have_sample_time, have_status_time, have_rcut, have_dielectric; |
| 152 |
< |
short int have_tempSet, have_thermal_time, have_rsw, have_q_mass; |
| 153 |
< |
short int have_tau_thermostat, have_tau_barostat; |
| 154 |
< |
short int have_zcons_time, have_zConstraints, have_n_zConstraints; |
| 155 |
< |
short int have_zcons_tol, have_seed; |
| 156 |
< |
short int have_zcons_force_policy, have_reset_time; |
| 157 |
< |
short int have_zcons_gap, have_zcons_fixtime; |
| 158 |
< |
short int have_zcons_using_smd; |
| 159 |
< |
short int have_minimizer, have_minimizer_maxiteration; |
| 160 |
< |
short int have_minimizer_writefrq, have_minimizer_stepsize; |
| 161 |
< |
short int have_minimizer_ftol, have_minimizer_gtol; |
| 162 |
< |
short int have_minimizer_ls_tol, have_minimizer_ls_maxiteration; |
| 163 |
< |
short int have_thermodynamic_integration_lambda; |
| 164 |
< |
short int have_thermodynamic_integration_k; |
| 165 |
< |
short int have_forcefield_variant; |
| 144 |
> |
virtual bool setData(std::string sval) { |
| 145 |
> |
return internalSetData<std::string>(sval); |
| 146 |
> |
} |
| 147 |
> |
virtual bool setData(int ival) { |
| 148 |
> |
return internalSetData<int>(ival); |
| 149 |
> |
} |
| 150 |
> |
|
| 151 |
> |
virtual bool setData(double dval) { |
| 152 |
> |
return internalSetData<double>(dval); |
| 153 |
> |
} |
| 154 |
> |
|
| 155 |
> |
virtual std::string getParamType() { return ParameterTraits<ParamType>::getParamType();} |
| 156 |
> |
private: |
| 157 |
> |
template<class T> bool internalSetData(T data) { |
| 158 |
> |
ParamType tmp; |
| 159 |
> |
bool result = ValueType::convert(data, tmp); |
| 160 |
> |
if (result) { |
| 161 |
> |
empty_ = false; |
| 162 |
> |
data_ = tmp; |
| 163 |
> |
} |
| 164 |
> |
return result; |
| 165 |
> |
} |
| 166 |
> |
|
| 167 |
> |
private: |
| 168 |
> |
ParamType data_; |
| 169 |
> |
|
| 170 |
|
}; |
| 171 |
|
|
| 172 |
+ |
#define DeclareParameter(NAME, TYPE) \ |
| 173 |
+ |
private: \ |
| 174 |
+ |
Parameter<TYPE> NAME; \ |
| 175 |
+ |
public: \ |
| 176 |
+ |
bool have##NAME() { return !NAME.empty();} \ |
| 177 |
+ |
TYPE get##NAME() { return NAME.getData();} |
| 178 |
+ |
|
| 179 |
+ |
|
| 180 |
+ |
class Globals { |
| 181 |
+ |
public: |
| 182 |
+ |
Globals(); |
| 183 |
+ |
|
| 184 |
+ |
DeclareParameter(ForceField, std::string); |
| 185 |
+ |
DeclareParameter(NComponents, int); |
| 186 |
+ |
DeclareParameter(TargetTemp, double); |
| 187 |
+ |
DeclareParameter(Ensemble, std::string); |
| 188 |
+ |
DeclareParameter(Dt, double); |
| 189 |
+ |
DeclareParameter(RunTime, double); |
| 190 |
+ |
DeclareParameter(InitialConfig, std::string); |
| 191 |
+ |
DeclareParameter(FinalConfig, std::string); |
| 192 |
+ |
DeclareParameter(NMol, int); |
| 193 |
+ |
DeclareParameter(Density, double); |
| 194 |
+ |
DeclareParameter(Box, double); |
| 195 |
+ |
DeclareParameter(BoxX, double); |
| 196 |
+ |
DeclareParameter(BoxY, double); |
| 197 |
+ |
DeclareParameter(BoxZ, double); |
| 198 |
+ |
DeclareParameter(SampleTime, double); |
| 199 |
+ |
DeclareParameter(ResetTime, double); |
| 200 |
+ |
DeclareParameter(StatusTime, double); |
| 201 |
+ |
DeclareParameter(CutoffRadius, double); |
| 202 |
+ |
DeclareParameter(SwitchingRadius, double); |
| 203 |
+ |
DeclareParameter(Dielectric, double); |
| 204 |
+ |
DeclareParameter(TempSet, bool); |
| 205 |
+ |
DeclareParameter(ThermalTime, double); |
| 206 |
+ |
DeclareParameter(MixingRule, std::string); |
| 207 |
+ |
DeclareParameter(UsePeriodicBoundaryConditions, bool); |
| 208 |
+ |
DeclareParameter(TargetPressure, double); |
| 209 |
+ |
DeclareParameter(TauThermostat, double); |
| 210 |
+ |
DeclareParameter(TauBarostat, double); |
| 211 |
+ |
DeclareParameter(ZconsTime, double); |
| 212 |
+ |
DeclareParameter(NZconstraints, int); |
| 213 |
+ |
DeclareParameter(ZconsTol, double); |
| 214 |
+ |
DeclareParameter(ZconsForcePolicy, std::string); |
| 215 |
+ |
DeclareParameter(Seed, int); |
| 216 |
+ |
DeclareParameter(UseInitalTime, bool); |
| 217 |
+ |
DeclareParameter(UseIntialExtendedSystemState, bool); |
| 218 |
+ |
DeclareParameter(OrthoBoxTolerance, double); |
| 219 |
+ |
DeclareParameter(Minimizer, std::string); |
| 220 |
+ |
DeclareParameter(MinimizerMaxIter, double); |
| 221 |
+ |
DeclareParameter(MinimizerWriteFrq, int); |
| 222 |
+ |
DeclareParameter(MinimizerStepSize, double); |
| 223 |
+ |
DeclareParameter(MinimizerFTol, double); |
| 224 |
+ |
DeclareParameter(MinimizerGTol, double); |
| 225 |
+ |
DeclareParameter(MinimizerLSTol, double); |
| 226 |
+ |
DeclareParameter(MinimizerLSMaxIter, int); |
| 227 |
+ |
DeclareParameter(ZconsGap, double); |
| 228 |
+ |
DeclareParameter(ZconsFixtime, double); |
| 229 |
+ |
DeclareParameter(ZconsUsingSMD, bool); |
| 230 |
+ |
DeclareParameter(UseSolidThermInt, bool); |
| 231 |
+ |
DeclareParameter(UseLiquidThermInt, bool); |
| 232 |
+ |
DeclareParameter(ThermodynamicIntegrationLambda, double); |
| 233 |
+ |
DeclareParameter(ThermodynamicIntegrationK, double); |
| 234 |
+ |
DeclareParameter(ForceFieldVariant, std::string); |
| 235 |
+ |
DeclareParameter(ForceFieldFileName, std::string); |
| 236 |
+ |
DeclareParameter(ThermIntDistSpringConst, double); |
| 237 |
+ |
DeclareParameter(ThermIntThetaSpringConst, double); |
| 238 |
+ |
DeclareParameter(ThermIntOmegaSpringConst, double); |
| 239 |
+ |
DeclareParameter(SurfaceTension, double); |
| 240 |
+ |
DeclareParameter(PrintPressureTensor, bool); |
| 241 |
+ |
DeclareParameter(ElectrostaticSummationMethod, std::string); |
| 242 |
+ |
DeclareParameter(ElectrostaticScreeningMethod, std::string); |
| 243 |
+ |
DeclareParameter(DampingAlpha, double); |
| 244 |
+ |
DeclareParameter(CutoffPolicy, std::string); |
| 245 |
+ |
DeclareParameter(SwitchingFunctionType, std::string); |
| 246 |
+ |
DeclareParameter(CompressDumpFile, bool); |
| 247 |
+ |
DeclareParameter(OutputForceVector, bool); |
| 248 |
+ |
DeclareParameter(SkinThickness, double); |
| 249 |
+ |
DeclareParameter(StatFileFormat, std::string); |
| 250 |
+ |
|
| 251 |
+ |
private: |
| 252 |
+ |
typedef std::map<std::string, ParameterBase*> ParamMap; |
| 253 |
+ |
ParamMap parameters_; |
| 254 |
+ |
|
| 255 |
+ |
Component* current_component; |
| 256 |
+ |
Component** components; // the array of components |
| 257 |
+ |
|
| 258 |
+ |
ZconStamp* current_zConstraint; |
| 259 |
+ |
ZconStamp** zConstraints; // the array of zConstraints |
| 260 |
+ |
|
| 261 |
+ |
char* checkMe(); |
| 262 |
+ |
|
| 263 |
+ |
public: |
| 264 |
+ |
int newComponent( event* the_event ); |
| 265 |
+ |
int componentAssign( event* the_event ); |
| 266 |
+ |
int componentEnd( event* the_event ); |
| 267 |
+ |
|
| 268 |
+ |
int newZconstraint( event* the_event ); |
| 269 |
+ |
int zConstraintAssign( event* the_event ); |
| 270 |
+ |
int zConstraintEnd( event* the_event ); |
| 271 |
+ |
|
| 272 |
+ |
int globalAssign( event* the_event ); |
| 273 |
+ |
int globalEnd( event* the_event ); |
| 274 |
+ |
|
| 275 |
+ |
ZconStamp** getZconStamp() {return zConstraints;} |
| 276 |
+ |
Component** getComponents() {return components;} |
| 277 |
+ |
}; |
| 278 |
|
#endif |
| 279 |
+ |
|