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 "RigidBody.hpp" |
10 |
|
#include "Molecule.hpp" |
11 |
+ |
#include "Exclude.hpp" |
12 |
+ |
#include "SkipList.hpp" |
13 |
|
#include "AbstractClasses.hpp" |
14 |
|
#include "MakeStamps.hpp" |
15 |
+ |
#include "SimState.hpp" |
16 |
+ |
#include "Restraints.hpp" |
17 |
|
|
18 |
|
#define __C |
19 |
|
#include "fSimulation.h" |
20 |
|
#include "fortranWrapDefines.hpp" |
21 |
+ |
#include "GenericData.hpp" |
22 |
|
|
23 |
|
|
24 |
+ |
//#include "Minimizer.hpp" |
25 |
+ |
//#include "OOPSEMinimizer.hpp" |
26 |
|
|
27 |
+ |
|
28 |
+ |
double roundMe( double x ); |
29 |
+ |
class OOPSEMinimizer; |
30 |
+ |
class ConstraintManager; |
31 |
|
class SimInfo{ |
32 |
|
|
33 |
|
public: |
34 |
|
|
35 |
|
SimInfo(); |
36 |
< |
~SimInfo(){} |
36 |
> |
~SimInfo(); |
37 |
|
|
38 |
|
int n_atoms; // the number of atoms |
39 |
|
Atom **atoms; // the array of atom objects |
40 |
+ |
|
41 |
+ |
vector<RigidBody*> rigidBodies; // A vector of rigid bodies |
42 |
+ |
vector<StuntDouble*> integrableObjects; |
43 |
|
|
44 |
|
double tau[9]; // the stress tensor |
45 |
|
|
46 |
< |
unsigned int n_bonds; // number of bends |
47 |
< |
unsigned int n_bends; // number of bends |
48 |
< |
unsigned int n_torsions; // number of torsions |
49 |
< |
unsigned int n_oriented; // number of of atoms with orientation |
50 |
< |
unsigned int ndf; // number of actual degrees of freedom |
51 |
< |
unsigned int ndfRaw; // number of settable degrees of freedom |
46 |
> |
int n_bonds; // number of bends |
47 |
> |
int n_bends; // number of bends |
48 |
> |
int n_torsions; // number of torsions |
49 |
> |
int n_oriented; // number of of atoms with orientation |
50 |
> |
int ndf; // number of actual degrees of freedom |
51 |
> |
int ndfRaw; // number of settable degrees of freedom |
52 |
> |
int ndfTrans; // number of translational degrees of freedom |
53 |
> |
int nZconstraints; // the number of zConstraints |
54 |
|
|
55 |
< |
unsigned int setTemp; // boolean to set the temperature at each sampleTime |
55 |
> |
int setTemp; // boolean to set the temperature at each sampleTime |
56 |
> |
int resetIntegrator; // boolean to reset the integrator |
57 |
|
|
58 |
< |
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 |
58 |
> |
int n_dipoles; // number of dipoles |
59 |
|
|
60 |
< |
int n_exclude; // the # of pairs excluded from long range forces |
61 |
< |
Exclude** excludes; // the pairs themselves |
45 |
< |
|
60 |
> |
int n_exclude; |
61 |
> |
Exclude* excludes; // the exclude list for ignoring pairs in fortran |
62 |
|
int nGlobalExcludes; |
63 |
|
int* globalExcludes; // same as above, but these guys participate in |
64 |
|
// no long range forces. |
65 |
|
|
66 |
|
int* identArray; // array of unique identifiers for the atoms |
67 |
+ |
int* molMembershipArray; // map of atom numbers onto molecule numbers |
68 |
|
|
69 |
|
int n_constraints; // the number of constraints on the system |
70 |
|
|
71 |
< |
unsigned int n_SRI; // the number of short range interactions |
71 |
> |
int n_SRI; // the number of short range interactions |
72 |
|
|
73 |
|
double lrPot; // the potential energy from the long range calculations. |
74 |
|
|
75 |
< |
double box_x, box_y, box_z; // the periodic boundry conditions |
76 |
< |
double rList, rCut; // variables for the neighborlist |
75 |
> |
double Hmat[3][3]; // the periodic boundry conditions. The Hmat is the |
76 |
> |
// column vectors of the x, y, and z box vectors. |
77 |
> |
// h1 h2 h3 |
78 |
> |
// [ Xx Yx Zx ] |
79 |
> |
// [ Xy Yy Zy ] |
80 |
> |
// [ Xz Yz Zz ] |
81 |
> |
// |
82 |
> |
double HmatInv[3][3]; |
83 |
> |
|
84 |
> |
double boxL[3]; // The Lengths of the 3 column vectors of Hmat |
85 |
> |
double boxVol; |
86 |
> |
int orthoRhombic; |
87 |
|
|
88 |
+ |
|
89 |
+ |
double dielectric; // the dielectric of the medium for reaction field |
90 |
+ |
|
91 |
+ |
|
92 |
|
int usePBC; // whether we use periodic boundry conditions. |
93 |
|
int useLJ; |
94 |
|
int useSticky; |
95 |
< |
int useDipole; |
95 |
> |
int useCharges; |
96 |
> |
int useDipoles; |
97 |
|
int useReactionField; |
98 |
|
int useGB; |
99 |
|
int useEAM; |
100 |
< |
|
100 |
> |
bool haveCutoffGroups; |
101 |
> |
bool useInitXSstate; |
102 |
> |
double orthoTolerance; |
103 |
|
|
104 |
|
double dt, run_time; // the time step and total time |
105 |
|
double sampleTime, statusTime; // the position and energy dump frequencies |
106 |
|
double target_temp; // the target temperature of the system |
107 |
|
double thermalTime; // the temp kick interval |
108 |
+ |
double currentTime; // Used primarily for correlation Functions |
109 |
+ |
double resetTime; // Use to reset the integrator periodically |
110 |
|
|
111 |
|
int n_mol; // n_molecules; |
112 |
|
Molecule* molecules; // the array of molecules |
113 |
|
|
114 |
< |
int nComponents; // the number of componentsin the system |
114 |
> |
int nComponents; // the number of components in the system |
115 |
|
int* componentsNmol; // the number of molecules of each component |
116 |
|
MoleculeStamp** compStamps;// the stamps matching the components |
117 |
|
LinkedMolStamp* headStamp; // list of stamps used in the simulation |
119 |
|
|
120 |
|
char ensemble[100]; // the enesemble of the simulation (NVT, NVE, etc. ) |
121 |
|
char mixingRule[100]; // the mixing rules for Lennard jones/van der walls |
122 |
< |
Integrator *the_integrator; // the integrator of the simulation |
122 |
> |
BaseIntegrator *the_integrator; // the integrator of the simulation |
123 |
|
|
124 |
+ |
OOPSEMinimizer* the_minimizer; // the energy minimizer |
125 |
+ |
Restraints* restraint; |
126 |
+ |
bool has_minimizer; |
127 |
+ |
|
128 |
|
char finalName[300]; // the name of the eor file to be written |
129 |
|
char sampleName[300]; // the name of the dump file to be written |
130 |
|
char statusName[300]; // the name of the stat file to be written |
131 |
+ |
char rawPotName[300]; // the name of the raw file to be written |
132 |
|
|
133 |
+ |
int seed; //seed for random number generator |
134 |
|
|
135 |
+ |
int useSolidThermInt; // is solid-state thermodynamic integration being used |
136 |
+ |
int useLiquidThermInt; // is liquid thermodynamic integration being used |
137 |
+ |
double thermIntLambda; // lambda for TI |
138 |
+ |
double thermIntK; // power of lambda for TI |
139 |
+ |
double vRaw; // unperturbed potential for TI |
140 |
+ |
double vHarm; // harmonic potential for TI |
141 |
+ |
int i; // just an int |
142 |
+ |
|
143 |
+ |
vector<double> mfact; |
144 |
+ |
vector<int> FglobalGroupMembership; |
145 |
+ |
int ngroup; |
146 |
+ |
int* globalGroupMembership; |
147 |
+ |
|
148 |
+ |
ConstraintManager* consMan; //constraint manager holding the constraint pairs |
149 |
+ |
|
150 |
|
// refreshes the sim if things get changed (load balanceing, volume |
151 |
|
// adjustment, etc.) |
152 |
|
|
155 |
|
|
156 |
|
// sets the internal function pointer to fortran. |
157 |
|
|
158 |
< |
void setInternal( void (*fSetup) setFortranSimList, |
159 |
< |
void (*fBox) setFortranBoxList ){ |
158 |
> |
void setInternal( setFortranSim_TD fSetup, |
159 |
> |
setFortranBox_TD fBox, |
160 |
> |
notifyFortranCutOff_TD fCut){ |
161 |
|
setFsimulation = fSetup; |
162 |
|
setFortranBoxSize = fBox; |
163 |
+ |
notifyFortranCutOffs = fCut; |
164 |
|
} |
165 |
|
|
166 |
|
int getNDF(); |
167 |
|
int getNDFraw(); |
168 |
< |
|
168 |
> |
int getNDFtranslational(); |
169 |
> |
int getTotIntegrableObjects(); |
170 |
|
void setBox( double newBox[3] ); |
171 |
< |
void getBox( double theBox[3] ); |
171 |
> |
void setBoxM( double newBox[3][3] ); |
172 |
> |
void getBoxM( double theBox[3][3] ); |
173 |
> |
void scaleBox( double scale ); |
174 |
> |
|
175 |
> |
void setDefaultRcut( double theRcut ); |
176 |
> |
void setDefaultRcut( double theRcut, double theRsw ); |
177 |
> |
void checkCutOffs( void ); |
178 |
|
|
179 |
+ |
double getRcut( void ) { return rCut; } |
180 |
+ |
double getRlist( void ) { return rList; } |
181 |
+ |
double getRsw( void ) { return rSw; } |
182 |
+ |
double getMaxCutoff( void ) { return maxCutoff; } |
183 |
+ |
|
184 |
+ |
void setTime( double theTime ) { currentTime = theTime; } |
185 |
+ |
void incrTime( double the_dt ) { currentTime += the_dt; } |
186 |
+ |
void decrTime( double the_dt ) { currentTime -= the_dt; } |
187 |
+ |
double getTime( void ) { return currentTime; } |
188 |
+ |
|
189 |
+ |
void wrapVector( double thePos[3] ); |
190 |
+ |
|
191 |
+ |
SimState* getConfiguration( void ) { return myConfiguration; } |
192 |
+ |
|
193 |
+ |
void addProperty(GenericData* prop); |
194 |
+ |
GenericData* getProperty(const string& propName); |
195 |
+ |
//vector<GenericData*>& getProperties() {return properties;} |
196 |
+ |
|
197 |
+ |
int getSeed(void) { return seed; } |
198 |
+ |
void setSeed(int theSeed) { seed = theSeed;} |
199 |
+ |
|
200 |
|
private: |
201 |
+ |
|
202 |
+ |
SimState* myConfiguration; |
203 |
+ |
|
204 |
+ |
int boxIsInit, haveRcut, haveRsw; |
205 |
+ |
|
206 |
+ |
double rList, rCut; // variables for the neighborlist |
207 |
+ |
double rSw; // the switching radius |
208 |
+ |
|
209 |
+ |
double maxCutoff; |
210 |
+ |
|
211 |
+ |
double distXY; |
212 |
+ |
double distYZ; |
213 |
+ |
double distZX; |
214 |
|
|
215 |
+ |
void calcHmatInv( void ); |
216 |
+ |
void calcBoxL(); |
217 |
+ |
double calcMaxCutOff(); |
218 |
+ |
|
219 |
|
// private function to initialize the fortran side of the simulation |
220 |
< |
void (*setFsimulation) setFortranSimList; |
220 |
> |
setFortranSim_TD setFsimulation; |
221 |
|
|
222 |
< |
void (*setFortranBoxSize) setFortranBoxList; |
223 |
< |
}; |
222 |
> |
setFortranBox_TD setFortranBoxSize; |
223 |
> |
|
224 |
> |
notifyFortranCutOff_TD notifyFortranCutOffs; |
225 |
> |
|
226 |
> |
//Addtional Properties of SimInfo |
227 |
> |
map<string, GenericData*> properties; |
228 |
> |
void getFortranGroupArrays(SimInfo* info, |
229 |
> |
vector<int>& FglobalGroupMembership, |
230 |
> |
vector<double>& mfact); |
231 |
|
|
232 |
|
|
233 |
+ |
}; |
234 |
|
|
235 |
+ |
|
236 |
|
#endif |