1 |
|
#ifndef __SIMINFO_H__ |
2 |
|
#define __SIMINFO_H__ |
3 |
|
|
4 |
+ |
#include <map> |
5 |
+ |
#include <string> |
6 |
+ |
#include <vector> |
7 |
|
|
5 |
– |
|
8 |
|
#include "Atom.hpp" |
9 |
|
#include "Molecule.hpp" |
10 |
|
#include "AbstractClasses.hpp" |
11 |
|
#include "MakeStamps.hpp" |
12 |
+ |
#include "SimState.hpp" |
13 |
|
|
14 |
|
#define __C |
15 |
|
#include "fSimulation.h" |
16 |
|
#include "fortranWrapDefines.hpp" |
17 |
+ |
#include "GenericData.hpp" |
18 |
|
|
19 |
|
|
20 |
|
|
23 |
|
public: |
24 |
|
|
25 |
|
SimInfo(); |
26 |
< |
~SimInfo(){} |
26 |
> |
~SimInfo(); |
27 |
|
|
28 |
|
int n_atoms; // the number of atoms |
29 |
|
Atom **atoms; // the array of atom objects |
30 |
|
|
31 |
|
double tau[9]; // the stress tensor |
32 |
|
|
33 |
< |
unsigned int n_bonds; // number of bends |
34 |
< |
unsigned int n_bends; // number of bends |
35 |
< |
unsigned int n_torsions; // number of torsions |
36 |
< |
unsigned int n_oriented; // number of of atoms with orientation |
37 |
< |
unsigned int ndf; // number of actual degrees of freedom |
38 |
< |
unsigned int ndfRaw; // number of settable degrees of freedom |
33 |
> |
int n_bonds; // number of bends |
34 |
> |
int n_bends; // number of bends |
35 |
> |
int n_torsions; // number of torsions |
36 |
> |
int n_oriented; // number of of atoms with orientation |
37 |
> |
int ndf; // number of actual degrees of freedom |
38 |
> |
int ndfRaw; // number of settable degrees of freedom |
39 |
> |
int ndfTrans; // number of translational degrees of freedom |
40 |
> |
int nZconstraints; // the number of zConstraints |
41 |
|
|
42 |
< |
unsigned int setTemp; // boolean to set the temperature at each sampleTime |
42 |
> |
int setTemp; // boolean to set the temperature at each sampleTime |
43 |
> |
int resetIntegrator; // boolean to reset the integrator |
44 |
|
|
45 |
< |
unsigned int n_dipoles; // number of dipoles |
45 |
> |
int n_dipoles; // number of dipoles |
46 |
|
|
47 |
|
|
48 |
|
int n_exclude; // the # of pairs excluded from long range forces |
57 |
|
|
58 |
|
int n_constraints; // the number of constraints on the system |
59 |
|
|
60 |
< |
unsigned int n_SRI; // the number of short range interactions |
60 |
> |
int n_SRI; // the number of short range interactions |
61 |
|
|
62 |
|
double lrPot; // the potential energy from the long range calculations. |
63 |
|
|
92 |
|
double target_temp; // the target temperature of the system |
93 |
|
double thermalTime; // the temp kick interval |
94 |
|
double currentTime; // Used primarily for correlation Functions |
95 |
+ |
double resetTime; // Use to reset the integrator periodically |
96 |
|
|
97 |
|
int n_mol; // n_molecules; |
98 |
|
Molecule* molecules; // the array of molecules |
99 |
|
|
100 |
< |
int nComponents; // the number of componentsin the system |
100 |
> |
int nComponents; // the number of components in the system |
101 |
|
int* componentsNmol; // the number of molecules of each component |
102 |
|
MoleculeStamp** compStamps;// the stamps matching the components |
103 |
|
LinkedMolStamp* headStamp; // list of stamps used in the simulation |
111 |
|
char sampleName[300]; // the name of the dump file to be written |
112 |
|
char statusName[300]; // the name of the stat file to be written |
113 |
|
|
114 |
< |
|
114 |
> |
int seed; //seed for random number generator |
115 |
|
// refreshes the sim if things get changed (load balanceing, volume |
116 |
|
// adjustment, etc.) |
117 |
|
|
120 |
|
|
121 |
|
// sets the internal function pointer to fortran. |
122 |
|
|
123 |
< |
void setInternal( void (*fSetup) setFortranSimList, |
124 |
< |
void (*fBox) setFortranBoxList, |
125 |
< |
void (*fCut) notifyFortranCutOffList ){ |
123 |
> |
void setInternal( setFortranSim_TD fSetup, |
124 |
> |
setFortranBox_TD fBox, |
125 |
> |
notifyFortranCutOff_TD fCut){ |
126 |
|
setFsimulation = fSetup; |
127 |
|
setFortranBoxSize = fBox; |
128 |
|
notifyFortranCutOffs = fCut; |
130 |
|
|
131 |
|
int getNDF(); |
132 |
|
int getNDFraw(); |
133 |
+ |
int getNDFtranslational(); |
134 |
|
|
135 |
|
void setBox( double newBox[3] ); |
136 |
|
void setBoxM( double newBox[3][3] ); |
138 |
|
void scaleBox( double scale ); |
139 |
|
|
140 |
|
void setRcut( double theRcut ); |
141 |
+ |
void setDefaultRcut( double theRcut ); |
142 |
|
void setEcr( double theEcr ); |
143 |
+ |
void setDefaultEcr( double theEcr ); |
144 |
|
void setEcr( double theEcr, double theEst ); |
145 |
+ |
void setDefaultEcr( double theEcr, double theEst ); |
146 |
|
|
147 |
|
double getRcut( void ) { return rCut; } |
148 |
|
double getRlist( void ) { return rList; } |
149 |
|
double getEcr( void ) { return ecr; } |
150 |
|
double getEst( void ) { return est; } |
151 |
+ |
double getMaxCutoff( void ) { return maxCutoff; } |
152 |
|
|
153 |
< |
void setTime( double theTime ) { currentTime = theTime }; |
154 |
< |
double getTime( void ) { return currentTime }; |
153 |
> |
void setTime( double theTime ) { currentTime = theTime; } |
154 |
> |
void incrTime( double the_dt ) { currentTime += the_dt; } |
155 |
> |
void decrTime( double the_dt ) { currentTime -= the_dt; } |
156 |
> |
double getTime( void ) { return currentTime; } |
157 |
|
|
158 |
|
void wrapVector( double thePos[3] ); |
159 |
|
|
164 |
|
void printMat3(double A[3][3]); |
165 |
|
void printMat9(double A[9]); |
166 |
|
double matDet3(double m[3][3]); |
167 |
+ |
double matTrace3(double m[3][3]); |
168 |
+ |
|
169 |
+ |
void crossProduct3(double a[3],double b[3], double out[3]); |
170 |
+ |
double dotProduct3(double a[3], double b[3]); |
171 |
+ |
double length3(double a[3]); |
172 |
|
|
173 |
+ |
SimState* getConfiguration( void ) { return myConfiguration; } |
174 |
+ |
|
175 |
+ |
void addProperty(GenericData* prop); |
176 |
+ |
GenericData* getProperty(const string& propName); |
177 |
+ |
vector<GenericData*> getProperties(); |
178 |
+ |
|
179 |
+ |
int getSeed(void) { return seed; } |
180 |
+ |
void setSeed(int theSeed) { seed = theSeed;} |
181 |
+ |
|
182 |
|
private: |
183 |
|
|
184 |
+ |
SimState* myConfiguration; |
185 |
+ |
|
186 |
|
double origRcut, origEcr; |
187 |
|
int boxIsInit, haveOrigRcut, haveOrigEcr; |
188 |
|
|
193 |
|
double ecr; // the electrostatic cutoff radius |
194 |
|
double est; // the electrostatic skin thickness |
195 |
|
double maxCutoff; |
196 |
+ |
|
197 |
+ |
double distXY; |
198 |
+ |
double distYZ; |
199 |
+ |
double distZX; |
200 |
|
|
201 |
|
void calcHmatInv( void ); |
202 |
|
void calcBoxL(); |
203 |
+ |
double calcMaxCutOff(); |
204 |
|
void checkCutOffs( void ); |
205 |
|
|
206 |
|
// private function to initialize the fortran side of the simulation |
207 |
< |
void (*setFsimulation) setFortranSimList; |
207 |
> |
setFortranSim_TD setFsimulation; |
208 |
|
|
209 |
< |
void (*setFortranBoxSize) setFortranBoxList; |
209 |
> |
setFortranBox_TD setFortranBoxSize; |
210 |
|
|
211 |
< |
void (*notifyFortranCutOffs) notifyFortranCutOffList; |
211 |
> |
notifyFortranCutOff_TD notifyFortranCutOffs; |
212 |
> |
|
213 |
> |
//Addtional Properties of SimInfo |
214 |
> |
map<string, GenericData*> properties; |
215 |
|
|
216 |
|
}; |
217 |
|
|