ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libBASS/Globals.hpp
Revision: 706
Committed: Wed Aug 20 19:41:37 2003 UTC (20 years, 10 months ago) by mmeineke
File size: 5836 byte(s)
Log Message:
updated the Changelog.

added some bug fixes for setting the random number generator seed value.

File Contents

# Content
1 #ifndef __GLOBALS_H__
2 #define __GLOBALS_H__
3
4 #include <iostream>
5
6 #include <cstdlib>
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:
20
21 Globals();
22 ~Globals();
23
24 int newComponent( event* the_event );
25 int componentAssign( 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 );
34
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; }
51 double getDensity( void ) { return density; }
52 double getBox( void ) { return box; }
53 double getBoxX( void ) { return box_x; }
54 double getBoxY( void ) { return box_y; }
55 double getBoxZ( void ) { return box_z; }
56 double getSampleTime( void ) { return sample_time; }
57 double getStatusTime( void ) { return status_time; }
58 double getThermalTime( void ) { return thermal_time; }
59 double getDielectric( void ) { return dielectric; }
60 double getECR( void) { return ecr; }
61 double getEST( void) { return est; }
62 int getTempSet( void ) { return tempSet; }
63 int getPBC( void ) { return usePBC;}
64 int getUseRF( void ) { return useRF;}
65 char* getMixingRule( void) { return mixingRule;}
66 double getZconsTime(void) { return zcons_time;}
67 double getZconsTol(void) { return zcons_tol;}
68 char* getZconsForcePolicy(void) { return zconsForcePolicy;}
69
70 short int haveInitialConfig( void ) { return have_initial_config; }
71 short int haveFinalConfig( void ) { return have_final_config; }
72 short int haveNMol( void ) { return have_n_mol; }
73 short int haveDensity( void ) { return have_density; }
74 short int haveBox( void ) { return have_box; }
75 short int haveBoxX( void ) { return have_box_x; }
76 short int haveBoxY( void ) { return have_box_y; }
77 short int haveBoxZ( void ) { return have_box_z; }
78 short int haveSampleTime( void ) { return have_sample_time; }
79 short int haveStatusTime( void ) { return have_status_time; }
80 short int haveThermalTime( void ) { return have_thermal_time; }
81 short int haveECR( void ) { return have_ecr; }
82 short int haveEST( void ) { return have_est; }
83 short int haveDielectric( void ) { return have_dielectric; }
84 short int haveTempSet( void ) { return have_tempSet; }
85 short int haveTargetPressure( void ){ return have_target_pressure; }
86 short int haveQmass( void ) { return have_q_mass; }
87 short int haveTauThermostat( void ) { return have_tau_thermostat;}
88 short int haveTauBarostat( void ) { return have_tau_barostat;}
89 short int haveZconstraintTime(void) { return have_zcons_time; }
90 short int haveZconstraints( void ) { return have_zConstraints;}
91 short int haveZconsTol(void) {return have_zcons_tol;}
92 short int haveZconsForcePolicy(void) { return have_zcons_force_policy;}
93
94 /* other accessors */
95 Component** getComponents( void ) { return components; }
96 ZconStamp** getZconStamp( void ) { return zConstraints; }
97
98 private:
99
100 static const int hash_size = 23;
101 static const int hash_shift = 4;
102 int hash( char* text );
103 void addHash( char* text, int token );
104 LinkedCommand** command_table;
105
106 char* checkMe( void );
107
108 Component* current_component;
109 Component** components; // the array of components
110
111 ZconStamp* current_zConstraint;
112 ZconStamp** zConstraints; // the array of zConstraints
113
114 char force_field[100];
115 int n_components;
116 int n_zConstraints;
117 double target_temp;
118 double target_pressure;
119 char ensemble[100];
120 char mixingRule[100];
121 double dt;
122 double run_time;
123 char initial_config[120];
124 char final_config[120];
125 int n_mol;
126 double density;
127 double box;
128 double box_x, box_y, box_z;
129 double sample_time;
130 double status_time;
131 double thermal_time;
132 double ecr;
133 double est;
134 double dielectric;
135 int tempSet;
136 int usePBC;
137 int useRF;
138 double q_mass;
139 double tau_thermostat;
140 double tau_barostat;
141 double zcons_time;
142 double zcons_tol;
143 char zconsForcePolicy[100];
144 int seed;
145
146
147 //required arguments
148 short int have_force_field, have_n_components, have_target_temp;
149 short int have_target_pressure, have_ensemble, have_dt, have_run_time;
150
151 // optional arguments
152 short int have_initial_config, have_final_config, have_n_mol;
153 short int have_density, have_box, have_box_x, have_box_y, have_box_z;
154 short int have_sample_time, have_status_time, have_ecr, have_dielectric;
155 short int have_tempSet, have_thermal_time, have_est, have_q_mass;
156 short int have_tau_thermostat, have_tau_barostat;
157 short int have_zcons_time, have_zConstraints, have_n_zConstraints;
158 short int have_zcons_tol, have_seed;
159 short int have_zcons_force_policy;
160
161 };
162
163 #endif