15 |
|
#include "fSimulation.h" |
16 |
|
#include "fortranWrapDefines.hpp" |
17 |
|
#include "GenericData.hpp" |
18 |
+ |
#include "Minimizer.hpp" |
19 |
|
|
20 |
|
|
20 |
– |
|
21 |
|
class SimInfo{ |
22 |
|
|
23 |
|
public: |
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 |
39 |
< |
unsigned int ndfTrans; // number of translational degrees of freedom |
40 |
< |
unsigned int nZconstraints; // the number of zConstraints |
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 |
43 |
< |
unsigned int resetIntegrator; // boolean to reset the integrator |
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 |
|
|
81 |
|
int usePBC; // whether we use periodic boundry conditions. |
82 |
|
int useLJ; |
83 |
|
int useSticky; |
84 |
< |
int useDipole; |
84 |
> |
int useCharges; |
85 |
> |
int useDipoles; |
86 |
|
int useReactionField; |
87 |
|
int useGB; |
88 |
|
int useEAM; |
89 |
|
|
90 |
+ |
bool useInitXSstate; |
91 |
+ |
double orthoTolerance; |
92 |
|
|
93 |
|
double dt, run_time; // the time step and total time |
94 |
|
double sampleTime, statusTime; // the position and energy dump frequencies |
100 |
|
int n_mol; // n_molecules; |
101 |
|
Molecule* molecules; // the array of molecules |
102 |
|
|
103 |
< |
int nComponents; // the number of componentsin the system |
103 |
> |
int nComponents; // the number of components in the system |
104 |
|
int* componentsNmol; // the number of molecules of each component |
105 |
|
MoleculeStamp** compStamps;// the stamps matching the components |
106 |
|
LinkedMolStamp* headStamp; // list of stamps used in the simulation |
110 |
|
char mixingRule[100]; // the mixing rules for Lennard jones/van der walls |
111 |
|
BaseIntegrator *the_integrator; // the integrator of the simulation |
112 |
|
|
113 |
+ |
Minimizer* the_minimizer; // the energy minimizer |
114 |
+ |
bool has_minimizer; |
115 |
+ |
|
116 |
|
char finalName[300]; // the name of the eor file to be written |
117 |
|
char sampleName[300]; // the name of the dump file to be written |
118 |
|
char statusName[300]; // the name of the stat file to be written |
126 |
|
|
127 |
|
// sets the internal function pointer to fortran. |
128 |
|
|
129 |
< |
void setInternal( void (*fSetup) setFortranSimList, |
130 |
< |
void (*fBox) setFortranBoxList, |
131 |
< |
void (*fCut) notifyFortranCutOffList ){ |
129 |
> |
void setInternal( setFortranSim_TD fSetup, |
130 |
> |
setFortranBox_TD fBox, |
131 |
> |
notifyFortranCutOff_TD fCut){ |
132 |
|
setFsimulation = fSetup; |
133 |
|
setFortranBoxSize = fBox; |
134 |
|
notifyFortranCutOffs = fCut; |
143 |
|
void getBoxM( double theBox[3][3] ); |
144 |
|
void scaleBox( double scale ); |
145 |
|
|
146 |
< |
void setRcut( double theRcut ); |
147 |
< |
void setEcr( double theEcr ); |
148 |
< |
void setEcr( double theEcr, double theEst ); |
146 |
> |
void setDefaultRcut( double theRcut ); |
147 |
> |
void setDefaultEcr( double theEcr ); |
148 |
> |
void setDefaultEcr( double theEcr, double theEst ); |
149 |
> |
void checkCutOffs( void ); |
150 |
|
|
151 |
|
double getRcut( void ) { return rCut; } |
152 |
|
double getRlist( void ) { return rList; } |
153 |
|
double getEcr( void ) { return ecr; } |
154 |
|
double getEst( void ) { return est; } |
155 |
+ |
double getMaxCutoff( void ) { return maxCutoff; } |
156 |
|
|
157 |
|
void setTime( double theTime ) { currentTime = theTime; } |
158 |
< |
void incrTime( double dt ) { currentTime += dt; } |
159 |
< |
void decrTime( double dt ) { currentTime -= dt; } |
158 |
> |
void incrTime( double the_dt ) { currentTime += the_dt; } |
159 |
> |
void decrTime( double the_dt ) { currentTime -= the_dt; } |
160 |
|
double getTime( void ) { return currentTime; } |
161 |
|
|
162 |
|
void wrapVector( double thePos[3] ); |
170 |
|
double matDet3(double m[3][3]); |
171 |
|
double matTrace3(double m[3][3]); |
172 |
|
|
173 |
+ |
void crossProduct3(double a[3],double b[3], double out[3]); |
174 |
+ |
double dotProduct3(double a[3], double b[3]); |
175 |
+ |
double length3(double a[3]); |
176 |
+ |
|
177 |
|
SimState* getConfiguration( void ) { return myConfiguration; } |
178 |
|
|
179 |
|
void addProperty(GenericData* prop); |
187 |
|
|
188 |
|
SimState* myConfiguration; |
189 |
|
|
190 |
< |
double origRcut, origEcr; |
179 |
< |
int boxIsInit, haveOrigRcut, haveOrigEcr; |
190 |
> |
int boxIsInit, haveRcut, haveEcr; |
191 |
|
|
181 |
– |
double oldEcr; |
182 |
– |
double oldRcut; |
183 |
– |
|
192 |
|
double rList, rCut; // variables for the neighborlist |
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 |
+ |
|
202 |
|
|
203 |
|
void calcHmatInv( void ); |
204 |
|
void calcBoxL(); |
205 |
< |
void checkCutOffs( void ); |
205 |
> |
double calcMaxCutOff(); |
206 |
|
|
207 |
+ |
|
208 |
|
// private function to initialize the fortran side of the simulation |
209 |
< |
void (*setFsimulation) setFortranSimList; |
209 |
> |
setFortranSim_TD setFsimulation; |
210 |
|
|
211 |
< |
void (*setFortranBoxSize) setFortranBoxList; |
211 |
> |
setFortranBox_TD setFortranBoxSize; |
212 |
|
|
213 |
< |
void (*notifyFortranCutOffs) notifyFortranCutOffList; |
213 |
> |
notifyFortranCutOff_TD notifyFortranCutOffs; |
214 |
|
|
215 |
|
//Addtional Properties of SimInfo |
216 |
|
map<string, GenericData*> properties; |