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 |
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 |
39 |
+ |
unsigned int nZconstraints; // the number of zConstraints |
40 |
|
|
41 |
|
unsigned int setTemp; // boolean to set the temperature at each sampleTime |
42 |
|
|
43 |
|
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 |
44 |
|
|
45 |
+ |
|
46 |
|
int n_exclude; // the # of pairs excluded from long range forces |
47 |
|
Exclude** excludes; // the pairs themselves |
48 |
|
|
59 |
|
|
60 |
|
double lrPot; // the potential energy from the long range calculations. |
61 |
|
|
62 |
< |
double Hmat[9]; // the periodic boundry conditions. The Hmat is the |
63 |
< |
// column vectors of the x, y, and z box vectors. |
64 |
< |
// |
65 |
< |
// h1 h2 h3 |
66 |
< |
// [ Xx Yx Zx ] |
67 |
< |
// [ Xy Yy Zy ] |
68 |
< |
// [ Xz Yz Zz ] |
69 |
< |
// |
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 ] |
62 |
> |
double Hmat[3][3]; // the periodic boundry conditions. The Hmat is the |
63 |
> |
// column vectors of the x, y, and z box vectors. |
64 |
> |
// h1 h2 h3 |
65 |
> |
// [ Xx Yx Zx ] |
66 |
> |
// [ Xy Yy Zy ] |
67 |
> |
// [ Xz Yz Zz ] |
68 |
> |
// |
69 |
> |
double HmatInv[3][3]; |
70 |
|
|
71 |
< |
double HmatI[9]; // the inverted Hmat; |
75 |
< |
double boxLx, boxLy, boxLz; // the box Lengths |
71 |
> |
double boxL[3]; // The Lengths of the 3 column vectors of Hmat |
72 |
|
double boxVol; |
73 |
+ |
int orthoRhombic; |
74 |
|
|
75 |
|
|
76 |
+ |
double dielectric; // the dielectric of the medium for reaction field |
77 |
|
|
80 |
– |
double rList, rCut; // variables for the neighborlist |
78 |
|
|
79 |
|
int usePBC; // whether we use periodic boundry conditions. |
80 |
|
int useLJ; |
89 |
|
double sampleTime, statusTime; // the position and energy dump frequencies |
90 |
|
double target_temp; // the target temperature of the system |
91 |
|
double thermalTime; // the temp kick interval |
92 |
+ |
double currentTime; // Used primarily for correlation Functions |
93 |
|
|
94 |
|
int n_mol; // n_molecules; |
95 |
|
Molecule* molecules; // the array of molecules |
108 |
|
char sampleName[300]; // the name of the dump file to be written |
109 |
|
char statusName[300]; // the name of the stat file to be written |
110 |
|
|
111 |
< |
|
111 |
> |
int seed; //seed for random number generator |
112 |
|
// refreshes the sim if things get changed (load balanceing, volume |
113 |
|
// adjustment, etc.) |
114 |
|
|
118 |
|
// sets the internal function pointer to fortran. |
119 |
|
|
120 |
|
void setInternal( void (*fSetup) setFortranSimList, |
121 |
< |
void (*fBox) setFortranBoxList ){ |
121 |
> |
void (*fBox) setFortranBoxList, |
122 |
> |
void (*fCut) notifyFortranCutOffList ){ |
123 |
|
setFsimulation = fSetup; |
124 |
|
setFortranBoxSize = fBox; |
125 |
+ |
notifyFortranCutOffs = fCut; |
126 |
|
} |
127 |
|
|
128 |
|
int getNDF(); |
129 |
|
int getNDFraw(); |
130 |
|
|
131 |
|
void setBox( double newBox[3] ); |
132 |
< |
void setBoxM( double newBox[9] ); |
133 |
< |
void getBoxM( double theBox[9] ); |
132 |
> |
void setBoxM( double newBox[3][3] ); |
133 |
> |
void getBoxM( double theBox[3][3] ); |
134 |
> |
void scaleBox( double scale ); |
135 |
> |
|
136 |
> |
void setRcut( double theRcut ); |
137 |
> |
void setEcr( double theEcr ); |
138 |
> |
void setEcr( double theEcr, double theEst ); |
139 |
|
|
140 |
+ |
double getRcut( void ) { return rCut; } |
141 |
+ |
double getRlist( void ) { return rList; } |
142 |
+ |
double getEcr( void ) { return ecr; } |
143 |
+ |
double getEst( void ) { return est; } |
144 |
+ |
|
145 |
+ |
void setTime( double theTime ) { currentTime = theTime; } |
146 |
+ |
void incrTime( double dt ) { currentTime += dt; } |
147 |
+ |
void decrTime( double dt ) { currentTime -= dt; } |
148 |
+ |
double getTime( void ) { return currentTime; } |
149 |
+ |
|
150 |
|
void wrapVector( double thePos[3] ); |
151 |
|
|
152 |
+ |
void matMul3(double a[3][3], double b[3][3], double out[3][3]); |
153 |
+ |
void matVecMul3(double m[3][3], double inVec[3], double outVec[3]); |
154 |
+ |
void invertMat3(double in[3][3], double out[3][3]); |
155 |
+ |
void transposeMat3(double in[3][3], double out[3][3]); |
156 |
+ |
void printMat3(double A[3][3]); |
157 |
+ |
void printMat9(double A[9]); |
158 |
+ |
double matDet3(double m[3][3]); |
159 |
+ |
|
160 |
+ |
SimState* getConfiguration( void ) { return myConfiguration; } |
161 |
+ |
|
162 |
+ |
void addProperty(GenericData* prop); |
163 |
+ |
GenericData* getProperty(const string& propName); |
164 |
+ |
vector<GenericData*> getProperties(); |
165 |
+ |
|
166 |
+ |
int getSeed(void) { return seed; } |
167 |
+ |
void setSeed(int theSeed) { seed = theSeed;} |
168 |
+ |
|
169 |
|
private: |
170 |
+ |
|
171 |
+ |
SimState* myConfiguration; |
172 |
+ |
|
173 |
+ |
double origRcut, origEcr; |
174 |
+ |
int boxIsInit, haveOrigRcut, haveOrigEcr; |
175 |
+ |
|
176 |
+ |
double oldEcr; |
177 |
+ |
double oldRcut; |
178 |
+ |
|
179 |
+ |
double rList, rCut; // variables for the neighborlist |
180 |
+ |
double ecr; // the electrostatic cutoff radius |
181 |
+ |
double est; // the electrostatic skin thickness |
182 |
+ |
double maxCutoff; |
183 |
|
|
184 |
< |
void calcHmatI( void ); |
184 |
> |
void calcHmatInv( void ); |
185 |
|
void calcBoxL(); |
186 |
+ |
void checkCutOffs( void ); |
187 |
|
|
188 |
|
// private function to initialize the fortran side of the simulation |
189 |
|
void (*setFsimulation) setFortranSimList; |
190 |
|
|
191 |
|
void (*setFortranBoxSize) setFortranBoxList; |
192 |
+ |
|
193 |
+ |
void (*notifyFortranCutOffs) notifyFortranCutOffList; |
194 |
+ |
|
195 |
+ |
//Addtional Properties of SimInfo |
196 |
+ |
map<string, GenericData*> properties; |
197 |
+ |
|
198 |
|
}; |
199 |
|
|
200 |
|
|