1 |
|
#ifndef __GLOBALS_H__ |
2 |
|
#define __GLOBALS_H__ |
3 |
|
|
4 |
< |
#include <cstdlib> |
4 |
> |
#include <iostream> |
5 |
|
|
6 |
+ |
#include <stdlib.h> |
7 |
+ |
#include <vector> |
8 |
+ |
|
9 |
|
#include "BASS_interface.h" |
10 |
|
#include "Component.hpp" |
11 |
|
#include "LinkedCommand.hpp" |
12 |
|
#include "MakeStamps.hpp" |
13 |
+ |
#include "ZconStamp.hpp" |
14 |
|
|
15 |
+ |
using namespace std; |
16 |
+ |
|
17 |
|
class Globals{ |
18 |
|
|
19 |
|
public: |
23 |
|
|
24 |
|
int newComponent( event* the_event ); |
25 |
|
int componentAssign( event* the_event ); |
20 |
– |
int componentStartIndex( event* the_event ); |
26 |
|
int componentEnd( event* the_event ); |
27 |
+ |
|
28 |
+ |
int newZconstraint( event* the_event ); |
29 |
+ |
int zConstraintAssign( event* the_event ); |
30 |
+ |
int zConstraintEnd( event* the_event ); |
31 |
|
|
32 |
|
int globalAssign( event* the_event ); |
33 |
|
int globalEnd( event* the_event ); |
35 |
|
char* getForceField( void ) { return force_field; } |
36 |
|
int getNComponents( void ) { return n_components; } |
37 |
|
double getTargetTemp( void ) { return target_temp; } |
38 |
+ |
double getTargetPressure( void ) { return target_pressure; } |
39 |
+ |
double getQmass( void ) { return q_mass; } |
40 |
+ |
double getTauThermostat( void ) { return tau_thermostat; } |
41 |
+ |
double getTauBarostat( void ) { return tau_barostat; } |
42 |
|
char* getEnsemble( void ) { return ensemble; } |
43 |
|
double getDt( void ) { return dt; } |
44 |
|
double getRunTime( void ) { return run_time; } |
45 |
|
|
46 |
+ |
|
47 |
+ |
int getNzConstraints( void ) { return n_zConstraints; } |
48 |
|
char* getInitialConfig( void ) { return initial_config; } |
49 |
|
char* getFinalConfig( void ) { return final_config; } |
50 |
|
int getNMol( void ) { return n_mol; } |
55 |
|
double getBoxZ( void ) { return box_z; } |
56 |
|
double getSampleTime( void ) { return sample_time; } |
57 |
|
double getStatusTime( void ) { return status_time; } |
58 |
+ |
double getResetTime( void ) { return resetTime; } |
59 |
|
double getThermalTime( void ) { return thermal_time; } |
60 |
|
double getDielectric( void ) { return dielectric; } |
61 |
|
double getECR( void) { return ecr; } |
62 |
|
double getEST( void) { return est; } |
63 |
|
int getTempSet( void ) { return tempSet; } |
64 |
+ |
int getUseInitTime( void ) { return useInitTime; } |
65 |
+ |
int getUseInitXSstate( void ) { return useInitXSstate; } |
66 |
+ |
double getOrthoBoxTolerance(void) { return orthoBoxTolerance; } |
67 |
|
int getPBC( void ) { return usePBC;} |
68 |
|
int getUseRF( void ) { return useRF;} |
69 |
|
char* getMixingRule( void) { return mixingRule;} |
70 |
+ |
double getZconsTime(void) { return zcons_time;} |
71 |
+ |
double getZconsTol(void) { return zcons_tol;} |
72 |
+ |
char* getZconsForcePolicy(void) { return zconsForcePolicy;} |
73 |
+ |
int getSeed(void) { return seed;} |
74 |
+ |
double getLJrcut(void) { return LJrcut;} |
75 |
+ |
|
76 |
+ |
char* getMinimizer(void) { return minimizer_name;} |
77 |
+ |
int getMinMaxIter(void) {return minimizer_maxiteration;} |
78 |
+ |
int getMinWriteFrq(void) {return minimizer_writefrq;} |
79 |
+ |
double getMinStepSize(void) {return minimizer_stepsize;} |
80 |
+ |
double getMinFTol(void) {return minimizer_ftol;} |
81 |
+ |
double getMinGTol(void) {return minimizer_gtol;} |
82 |
+ |
double getMinLSTol(void) {return minimizer_ls_tol;} |
83 |
+ |
int getMinLSMaxIter(void) {return minimizer_ls_maxiteration;} |
84 |
|
|
85 |
+ |
|
86 |
|
short int haveInitialConfig( void ) { return have_initial_config; } |
87 |
|
short int haveFinalConfig( void ) { return have_final_config; } |
88 |
|
short int haveNMol( void ) { return have_n_mol; } |
92 |
|
short int haveBoxY( void ) { return have_box_y; } |
93 |
|
short int haveBoxZ( void ) { return have_box_z; } |
94 |
|
short int haveSampleTime( void ) { return have_sample_time; } |
95 |
+ |
short int haveResetTime( void ) { return have_reset_time; } |
96 |
|
short int haveStatusTime( void ) { return have_status_time; } |
97 |
|
short int haveThermalTime( void ) { return have_thermal_time; } |
98 |
|
short int haveECR( void ) { return have_ecr; } |
99 |
|
short int haveEST( void ) { return have_est; } |
100 |
|
short int haveDielectric( void ) { return have_dielectric; } |
101 |
|
short int haveTempSet( void ) { return have_tempSet; } |
102 |
< |
|
102 |
> |
short int haveTargetPressure( void ){ return have_target_pressure; } |
103 |
> |
short int haveQmass( void ) { return have_q_mass; } |
104 |
> |
short int haveTauThermostat( void ) { return have_tau_thermostat;} |
105 |
> |
short int haveTauBarostat( void ) { return have_tau_barostat;} |
106 |
> |
short int haveZconstraintTime(void) { return have_zcons_time; } |
107 |
> |
short int haveZconstraints( void ) { return have_zConstraints;} |
108 |
> |
short int haveZconsTol(void) { return have_zcons_tol;} |
109 |
> |
short int haveZconsForcePolicy(void){ return have_zcons_force_policy;} |
110 |
> |
short int haveSeed(void) { return have_seed;} |
111 |
> |
short int haveLJrcut(void) { return have_ljrcut;} |
112 |
> |
short int haveMinimizer(void) { return have_minimizer;} |
113 |
> |
short int haveMinMaxIter(void) {return have_minimizer_maxiteration;} |
114 |
> |
short int haveMinWriteFrq(void) {return have_minimizer_writefrq;} |
115 |
> |
short int haveMinStepSize(void) {return have_minimizer_stepsize;} |
116 |
> |
short int haveMinFTol(void) {return have_minimizer_ftol;} |
117 |
> |
short int haveMinGTol(void) {return have_minimizer_gtol;} |
118 |
> |
short int haveMinLSTol(void) {return have_minimizer_ls_tol;} |
119 |
> |
short int haveMinLSMaxIter(void) {return have_minimizer_ls_maxiteration;} |
120 |
|
/* other accessors */ |
121 |
< |
Component** getComponents( void ) { return components; } |
121 |
> |
Component** getComponents( void ) { return components; } |
122 |
> |
ZconStamp** getZconStamp( void ) { return zConstraints; } |
123 |
|
|
124 |
|
private: |
125 |
|
|
126 |
< |
static const int hash_size = 23; |
127 |
< |
static const int hash_shift = 4; |
126 |
> |
int hash_size; |
127 |
> |
int hash_shift; |
128 |
|
int hash( char* text ); |
129 |
|
void addHash( char* text, int token ); |
130 |
|
LinkedCommand** command_table; |
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 force_field[100]; |
141 |
|
int n_components; |
142 |
+ |
int n_zConstraints; |
143 |
|
double target_temp; |
144 |
+ |
double target_pressure; |
145 |
|
char ensemble[100]; |
146 |
|
char mixingRule[100]; |
147 |
|
double dt; |
154 |
|
double box_x, box_y, box_z; |
155 |
|
double sample_time; |
156 |
|
double status_time; |
157 |
+ |
double resetTime; |
158 |
+ |
double orthoBoxTolerance; |
159 |
|
double thermal_time; |
160 |
|
double ecr; |
161 |
|
double est; |
162 |
|
double dielectric; |
163 |
|
int tempSet; |
164 |
+ |
int useInitTime; |
165 |
+ |
int useInitXSstate; |
166 |
|
int usePBC; |
167 |
|
int useRF; |
168 |
< |
|
168 |
> |
double q_mass; |
169 |
> |
double tau_thermostat; |
170 |
> |
double tau_barostat; |
171 |
> |
double zcons_time; |
172 |
> |
double zcons_tol; |
173 |
> |
char zconsForcePolicy[100]; |
174 |
> |
int seed; |
175 |
> |
double LJrcut; |
176 |
> |
char minimizer_name[100]; |
177 |
> |
int minimizer_maxiteration; |
178 |
> |
int minimizer_writefrq; |
179 |
> |
double minimizer_stepsize; |
180 |
> |
double minimizer_ftol; |
181 |
> |
double minimizer_gtol; |
182 |
> |
double minimizer_ls_tol; |
183 |
> |
int minimizer_ls_maxiteration; |
184 |
|
//required arguments |
185 |
|
short int have_force_field, have_n_components, have_target_temp; |
186 |
< |
short int have_ensemble, have_dt, have_run_time; |
186 |
> |
short int have_target_pressure, have_ensemble, have_dt, have_run_time; |
187 |
|
|
188 |
|
// optional arguments |
189 |
|
short int have_initial_config, have_final_config, have_n_mol; |
190 |
|
short int have_density, have_box, have_box_x, have_box_y, have_box_z; |
191 |
|
short int have_sample_time, have_status_time, have_ecr, have_dielectric; |
192 |
< |
short int have_tempSet, have_thermal_time, have_est; |
193 |
< |
|
194 |
< |
|
192 |
> |
short int have_tempSet, have_thermal_time, have_est, have_q_mass; |
193 |
> |
short int have_tau_thermostat, have_tau_barostat; |
194 |
> |
short int have_zcons_time, have_zConstraints, have_n_zConstraints; |
195 |
> |
short int have_zcons_tol, have_seed, have_ljrcut; |
196 |
> |
short int have_zcons_force_policy, have_reset_time; |
197 |
> |
short int have_minimizer, have_minimizer_maxiteration; |
198 |
> |
short int have_minimizer_writefrq, have_minimizer_stepsize; |
199 |
> |
short int have_minimizer_ftol, have_minimizer_gtol; |
200 |
> |
short int have_minimizer_ls_tol, have_minimizer_ls_maxiteration; |
201 |
|
}; |
202 |
|
|
203 |
|
#endif |