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" |
13 |
|
#define __C |
14 |
|
#include "fSimulation.h" |
15 |
|
#include "fortranWrapDefines.hpp" |
16 |
+ |
#include "GenericData.hpp" |
17 |
|
|
18 |
|
|
19 |
|
|
39 |
|
unsigned int setTemp; // boolean to set the temperature at each sampleTime |
40 |
|
|
41 |
|
unsigned int n_dipoles; // number of dipoles |
39 |
– |
double ecr; // the electrostatic cutoff radius |
40 |
– |
double est; // the electrostatic skin thickness |
41 |
– |
double dielectric; // the dielectric of the medium for reaction field |
42 |
|
|
43 |
+ |
|
44 |
|
int n_exclude; // the # of pairs excluded from long range forces |
45 |
|
Exclude** excludes; // the pairs themselves |
46 |
|
|
57 |
|
|
58 |
|
double lrPot; // the potential energy from the long range calculations. |
59 |
|
|
60 |
< |
double Hmat[9]; // the periodic boundry conditions. The Hmat is the |
61 |
< |
// column vectors of the x, y, and z box vectors. |
62 |
< |
// |
63 |
< |
// h1 h2 h3 |
64 |
< |
// [ Xx Yx Zx ] |
65 |
< |
// [ Xy Yy Zy ] |
66 |
< |
// [ Xz Yz Zz ] |
67 |
< |
// |
67 |
< |
// to preserve compatibility with Fortran the |
68 |
< |
// ordering in the array is as follows: |
69 |
< |
// |
70 |
< |
// [ 0 3 6 ] |
71 |
< |
// [ 1 4 7 ] |
72 |
< |
// [ 2 5 8 ] |
60 |
> |
double Hmat[3][3]; // the periodic boundry conditions. The Hmat is the |
61 |
> |
// column vectors of the x, y, and z box vectors. |
62 |
> |
// h1 h2 h3 |
63 |
> |
// [ Xx Yx Zx ] |
64 |
> |
// [ Xy Yy Zy ] |
65 |
> |
// [ Xz Yz Zz ] |
66 |
> |
// |
67 |
> |
double HmatInv[3][3]; |
68 |
|
|
69 |
< |
double HmatI[9]; // the inverted Hmat; |
75 |
< |
double boxLx, boxLy, boxLz; // the box Lengths |
69 |
> |
double boxL[3]; // The Lengths of the 3 column vectors of Hmat |
70 |
|
double boxVol; |
71 |
|
int orthoRhombic; |
72 |
|
|
73 |
|
|
74 |
+ |
double dielectric; // the dielectric of the medium for reaction field |
75 |
|
|
81 |
– |
double rList, rCut; // variables for the neighborlist |
76 |
|
|
77 |
|
int usePBC; // whether we use periodic boundry conditions. |
78 |
|
int useLJ; |
87 |
|
double sampleTime, statusTime; // the position and energy dump frequencies |
88 |
|
double target_temp; // the target temperature of the system |
89 |
|
double thermalTime; // the temp kick interval |
90 |
+ |
double currentTime; // Used primarily for correlation Functions |
91 |
|
|
92 |
|
int n_mol; // n_molecules; |
93 |
|
Molecule* molecules; // the array of molecules |
116 |
|
// sets the internal function pointer to fortran. |
117 |
|
|
118 |
|
void setInternal( void (*fSetup) setFortranSimList, |
119 |
< |
void (*fBox) setFortranBoxList ){ |
119 |
> |
void (*fBox) setFortranBoxList, |
120 |
> |
void (*fCut) notifyFortranCutOffList ){ |
121 |
|
setFsimulation = fSetup; |
122 |
|
setFortranBoxSize = fBox; |
123 |
+ |
notifyFortranCutOffs = fCut; |
124 |
|
} |
125 |
|
|
126 |
|
int getNDF(); |
127 |
|
int getNDFraw(); |
128 |
|
|
129 |
|
void setBox( double newBox[3] ); |
130 |
< |
void setBoxM( double newBox[9] ); |
131 |
< |
void getBoxM( double theBox[9] ); |
130 |
> |
void setBoxM( double newBox[3][3] ); |
131 |
> |
void getBoxM( double theBox[3][3] ); |
132 |
|
void scaleBox( double scale ); |
133 |
+ |
|
134 |
+ |
void setRcut( double theRcut ); |
135 |
+ |
void setEcr( double theEcr ); |
136 |
+ |
void setEcr( double theEcr, double theEst ); |
137 |
|
|
138 |
+ |
double getRcut( void ) { return rCut; } |
139 |
+ |
double getRlist( void ) { return rList; } |
140 |
+ |
double getEcr( void ) { return ecr; } |
141 |
+ |
double getEst( void ) { return est; } |
142 |
+ |
|
143 |
+ |
void setTime( double theTime ) { currentTime = theTime; } |
144 |
+ |
void incrTime( double dt ) { currentTime += dt; } |
145 |
+ |
void decrTime( double dt ) { currentTime -= dt; } |
146 |
+ |
double getTime( void ) { return currentTime; } |
147 |
+ |
|
148 |
|
void wrapVector( double thePos[3] ); |
149 |
|
|
150 |
+ |
void matMul3(double a[3][3], double b[3][3], double out[3][3]); |
151 |
+ |
void matVecMul3(double m[3][3], double inVec[3], double outVec[3]); |
152 |
+ |
void invertMat3(double in[3][3], double out[3][3]); |
153 |
+ |
void transposeMat3(double in[3][3], double out[3][3]); |
154 |
+ |
void printMat3(double A[3][3]); |
155 |
+ |
void printMat9(double A[9]); |
156 |
+ |
double matDet3(double m[3][3]); |
157 |
+ |
|
158 |
+ |
|
159 |
+ |
void addProperty(GenericData* prop); |
160 |
+ |
GenericData* getProperty(const string& propName); |
161 |
+ |
vector<GenericData*> getProperties(); |
162 |
+ |
|
163 |
|
private: |
164 |
+ |
|
165 |
+ |
double origRcut, origEcr; |
166 |
+ |
int boxIsInit, haveOrigRcut, haveOrigEcr; |
167 |
+ |
|
168 |
+ |
double oldEcr; |
169 |
+ |
double oldRcut; |
170 |
+ |
|
171 |
+ |
double rList, rCut; // variables for the neighborlist |
172 |
+ |
double ecr; // the electrostatic cutoff radius |
173 |
+ |
double est; // the electrostatic skin thickness |
174 |
+ |
double maxCutoff; |
175 |
|
|
176 |
< |
void calcHmatI( void ); |
176 |
> |
void calcHmatInv( void ); |
177 |
|
void calcBoxL(); |
178 |
+ |
void checkCutOffs( void ); |
179 |
|
|
180 |
|
// private function to initialize the fortran side of the simulation |
181 |
|
void (*setFsimulation) setFortranSimList; |
182 |
|
|
183 |
|
void (*setFortranBoxSize) setFortranBoxList; |
184 |
+ |
|
185 |
+ |
void (*notifyFortranCutOffs) notifyFortranCutOffList; |
186 |
+ |
|
187 |
+ |
//Addtional Properties of SimInfo |
188 |
+ |
map<string, GenericData*> properties; |
189 |
+ |
|
190 |
|
}; |
191 |
|
|
192 |
|
|