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