1 |
#ifndef __GLOBALS_H__ |
2 |
#define __GLOBALS_H__ |
3 |
|
4 |
#include <cstdlib> |
5 |
|
6 |
#include "BASS_interface.h" |
7 |
#include "Component.hpp" |
8 |
#include "LinkedCommand.hpp" |
9 |
#include "MakeStamps.hpp" |
10 |
|
11 |
class Globals{ |
12 |
|
13 |
public: |
14 |
|
15 |
Globals(); |
16 |
~Globals(); |
17 |
|
18 |
int newComponent( event* the_event ); |
19 |
int componentAssign( event* the_event ); |
20 |
int componentStartIndex( event* the_event ); |
21 |
int componentEnd( event* the_event ); |
22 |
|
23 |
int globalAssign( event* the_event ); |
24 |
int globalEnd( event* the_event ); |
25 |
|
26 |
char* getForceField( void ) { return force_field; } |
27 |
int getNComponents( void ) { return n_components; } |
28 |
double getTargetTemp( void ) { return target_temp; } |
29 |
double getTargetPressure( void ) { return target_pressure; } |
30 |
char* getEnsemble( void ) { return ensemble; } |
31 |
double getDt( void ) { return dt; } |
32 |
double getRunTime( void ) { return run_time; } |
33 |
|
34 |
char* getInitialConfig( void ) { return initial_config; } |
35 |
char* getFinalConfig( void ) { return final_config; } |
36 |
int getNMol( void ) { return n_mol; } |
37 |
double getDensity( void ) { return density; } |
38 |
double getBox( void ) { return box; } |
39 |
double getBoxX( void ) { return box_x; } |
40 |
double getBoxY( void ) { return box_y; } |
41 |
double getBoxZ( void ) { return box_z; } |
42 |
double getSampleTime( void ) { return sample_time; } |
43 |
double getStatusTime( void ) { return status_time; } |
44 |
double getThermalTime( void ) { return thermal_time; } |
45 |
double getDielectric( void ) { return dielectric; } |
46 |
double getECR( void) { return ecr; } |
47 |
double getEST( void) { return est; } |
48 |
int getTempSet( void ) { return tempSet; } |
49 |
int getPBC( void ) { return usePBC;} |
50 |
int getUseRF( void ) { return useRF;} |
51 |
char* getMixingRule( void) { return mixingRule;} |
52 |
|
53 |
short int haveInitialConfig( void ) { return have_initial_config; } |
54 |
short int haveFinalConfig( void ) { return have_final_config; } |
55 |
short int haveNMol( void ) { return have_n_mol; } |
56 |
short int haveDensity( void ) { return have_density; } |
57 |
short int haveBox( void ) { return have_box; } |
58 |
short int haveBoxX( void ) { return have_box_x; } |
59 |
short int haveBoxY( void ) { return have_box_y; } |
60 |
short int haveBoxZ( void ) { return have_box_z; } |
61 |
short int haveSampleTime( void ) { return have_sample_time; } |
62 |
short int haveStatusTime( void ) { return have_status_time; } |
63 |
short int haveThermalTime( void ) { return have_thermal_time; } |
64 |
short int haveECR( void ) { return have_ecr; } |
65 |
short int haveEST( void ) { return have_est; } |
66 |
short int haveDielectric( void ) { return have_dielectric; } |
67 |
short int haveTempSet( void ) { return have_tempSet; } |
68 |
|
69 |
/* other accessors */ |
70 |
Component** getComponents( void ) { return components; } |
71 |
|
72 |
private: |
73 |
|
74 |
static const int hash_size = 23; |
75 |
static const int hash_shift = 4; |
76 |
int hash( char* text ); |
77 |
void addHash( char* text, int token ); |
78 |
LinkedCommand** command_table; |
79 |
|
80 |
char* checkMe( void ); |
81 |
|
82 |
Component* current_component; |
83 |
Component** components; // the array of components |
84 |
char force_field[100]; |
85 |
int n_components; |
86 |
double target_temp; |
87 |
double target_pressure; |
88 |
char ensemble[100]; |
89 |
char mixingRule[100]; |
90 |
double dt; |
91 |
double run_time; |
92 |
char initial_config[120]; |
93 |
char final_config[120]; |
94 |
int n_mol; |
95 |
double density; |
96 |
double box; |
97 |
double box_x, box_y, box_z; |
98 |
double sample_time; |
99 |
double status_time; |
100 |
double thermal_time; |
101 |
double ecr; |
102 |
double est; |
103 |
double dielectric; |
104 |
int tempSet; |
105 |
int usePBC; |
106 |
int useRF; |
107 |
|
108 |
//required arguments |
109 |
short int have_force_field, have_n_components, have_target_temp; |
110 |
short int have_target_pressure, have_ensemble, have_dt, have_run_time; |
111 |
|
112 |
// optional arguments |
113 |
short int have_initial_config, have_final_config, have_n_mol; |
114 |
short int have_density, have_box, have_box_x, have_box_y, have_box_z; |
115 |
short int have_sample_time, have_status_time, have_ecr, have_dielectric; |
116 |
short int have_tempSet, have_thermal_time, have_est; |
117 |
|
118 |
|
119 |
}; |
120 |
|
121 |
#endif |