ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new-templateless/OOPSE/libmdtools/SimInfo.hpp
Revision: 851
Committed: Wed Nov 5 19:18:17 2003 UTC (21 years, 9 months ago) by mmeineke
File size: 6521 byte(s)
Log Message:
some work on trying to find the compression bug

File Contents

# User Rev Content
1 mmeineke 377 #ifndef __SIMINFO_H__
2     #define __SIMINFO_H__
3    
4     #include "Atom.hpp"
5     #include "Molecule.hpp"
6     #include "AbstractClasses.hpp"
7     #include "MakeStamps.hpp"
8 mmeineke 670 #include "SimState.hpp"
9 mmeineke 377
10     #define __C
11     #include "fSimulation.h"
12     #include "fortranWrapDefines.hpp"
13 tim 658 #include "GenericData.hpp"
14 mmeineke 377
15    
16    
17     class SimInfo{
18    
19     public:
20    
21     SimInfo();
22 tim 660 ~SimInfo();
23 mmeineke 377
24     int n_atoms; // the number of atoms
25     Atom **atoms; // the array of atom objects
26    
27     double tau[9]; // the stress tensor
28    
29 mmeineke 787 int n_bonds; // number of bends
30     int n_bends; // number of bends
31     int n_torsions; // number of torsions
32     int n_oriented; // number of of atoms with orientation
33     int ndf; // number of actual degrees of freedom
34     int ndfRaw; // number of settable degrees of freedom
35     int ndfTrans; // number of translational degrees of freedom
36     int nZconstraints; // the number of zConstraints
37 mmeineke 377
38 mmeineke 787 int setTemp; // boolean to set the temperature at each sampleTime
39     int resetIntegrator; // boolean to reset the integrator
40 mmeineke 377
41 mmeineke 787 int n_dipoles; // number of dipoles
42 mmeineke 377
43 mmeineke 626
44 mmeineke 377 int n_exclude; // the # of pairs excluded from long range forces
45 mmeineke 427 Exclude** excludes; // the pairs themselves
46 mmeineke 377
47     int nGlobalExcludes;
48     int* globalExcludes; // same as above, but these guys participate in
49     // no long range forces.
50    
51     int* identArray; // array of unique identifiers for the atoms
52 gezelter 483 int* molMembershipArray; // map of atom numbers onto molecule numbers
53 mmeineke 377
54     int n_constraints; // the number of constraints on the system
55    
56 mmeineke 787 int n_SRI; // the number of short range interactions
57 mmeineke 377
58     double lrPot; // the potential energy from the long range calculations.
59    
60 gezelter 588 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 mmeineke 568
69 gezelter 621 double boxL[3]; // The Lengths of the 3 column vectors of Hmat
70 mmeineke 572 double boxVol;
71     int orthoRhombic;
72 mmeineke 568
73    
74 mmeineke 626 double dielectric; // the dielectric of the medium for reaction field
75 mmeineke 568
76 mmeineke 377
77     int usePBC; // whether we use periodic boundry conditions.
78     int useLJ;
79     int useSticky;
80     int useDipole;
81     int useReactionField;
82     int useGB;
83     int useEAM;
84    
85    
86     double dt, run_time; // the time step and total time
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 gezelter 637 double currentTime; // Used primarily for correlation Functions
91 mmeineke 746 double resetTime; // Use to reset the integrator periodically
92 mmeineke 377
93     int n_mol; // n_molecules;
94     Molecule* molecules; // the array of molecules
95    
96 mmeineke 823 int nComponents; // the number of components in the system
97 mmeineke 377 int* componentsNmol; // the number of molecules of each component
98     MoleculeStamp** compStamps;// the stamps matching the components
99     LinkedMolStamp* headStamp; // list of stamps used in the simulation
100    
101    
102     char ensemble[100]; // the enesemble of the simulation (NVT, NVE, etc. )
103     char mixingRule[100]; // the mixing rules for Lennard jones/van der walls
104 mmeineke 542 BaseIntegrator *the_integrator; // the integrator of the simulation
105 mmeineke 377
106     char finalName[300]; // the name of the eor file to be written
107     char sampleName[300]; // the name of the dump file to be written
108     char statusName[300]; // the name of the stat file to be written
109    
110 tim 708 int seed; //seed for random number generator
111 mmeineke 377 // refreshes the sim if things get changed (load balanceing, volume
112     // adjustment, etc.)
113    
114     void refreshSim( void );
115    
116    
117     // sets the internal function pointer to fortran.
118    
119 mmeineke 836 void setInternal( setFortranSim_TD fSetup,
120     setFortranBox_TD fBox,
121     notifyFortranCutOff_TD fCut){
122 mmeineke 377 setFsimulation = fSetup;
123     setFortranBoxSize = fBox;
124 mmeineke 626 notifyFortranCutOffs = fCut;
125 mmeineke 377 }
126    
127 gezelter 458 int getNDF();
128     int getNDFraw();
129 tim 767 int getNDFtranslational();
130 gezelter 458
131 gezelter 457 void setBox( double newBox[3] );
132 gezelter 588 void setBoxM( double newBox[3][3] );
133     void getBoxM( double theBox[3][3] );
134 gezelter 574 void scaleBox( double scale );
135 mmeineke 626
136     void setRcut( double theRcut );
137 mmeineke 841 void setDefaultRcut( double theRcut );
138 mmeineke 626 void setEcr( double theEcr );
139 mmeineke 841 void setDefaultEcr( double theEcr );
140 mmeineke 626 void setEcr( double theEcr, double theEst );
141 mmeineke 841 void setDefaultEcr( double theEcr, double theEst );
142 gezelter 845 void checkCutOffs( void );
143 gezelter 457
144 mmeineke 626 double getRcut( void ) { return rCut; }
145     double getRlist( void ) { return rList; }
146     double getEcr( void ) { return ecr; }
147     double getEst( void ) { return est; }
148 mmeineke 797 double getMaxCutoff( void ) { return maxCutoff; }
149 mmeineke 626
150 mmeineke 644 void setTime( double theTime ) { currentTime = theTime; }
151 mmeineke 790 void incrTime( double the_dt ) { currentTime += the_dt; }
152     void decrTime( double the_dt ) { currentTime -= the_dt; }
153 mmeineke 644 double getTime( void ) { return currentTime; }
154 mmeineke 626
155 mmeineke 568 void wrapVector( double thePos[3] );
156    
157 gezelter 588 void matMul3(double a[3][3], double b[3][3], double out[3][3]);
158     void matVecMul3(double m[3][3], double inVec[3], double outVec[3]);
159     void invertMat3(double in[3][3], double out[3][3]);
160 mmeineke 597 void transposeMat3(double in[3][3], double out[3][3]);
161     void printMat3(double A[3][3]);
162     void printMat9(double A[9]);
163 gezelter 588 double matDet3(double m[3][3]);
164 tim 763 double matTrace3(double m[3][3]);
165 mmeineke 670
166 tim 781 void crossProduct3(double a[3],double b[3], double out[3]);
167     double dotProduct3(double a[3], double b[3]);
168     double length3(double a[3]);
169    
170 mmeineke 670 SimState* getConfiguration( void ) { return myConfiguration; }
171 gezelter 588
172 mmeineke 850 GenericData* getProperty(char* propName);
173     GenericData* getProperties() {return properties; }
174 mmeineke 670
175 tim 708 int getSeed(void) { return seed; }
176     void setSeed(int theSeed) { seed = theSeed;}
177    
178 mmeineke 377 private:
179 mmeineke 626
180 mmeineke 670 SimState* myConfiguration;
181    
182 mmeineke 626 double origRcut, origEcr;
183     int boxIsInit, haveOrigRcut, haveOrigEcr;
184    
185     double oldEcr;
186     double oldRcut;
187    
188     double rList, rCut; // variables for the neighborlist
189     double ecr; // the electrostatic cutoff radius
190     double est; // the electrostatic skin thickness
191     double maxCutoff;
192 tim 781
193     double distXY;
194     double distYZ;
195     double distZX;
196 mmeineke 377
197 gezelter 588 void calcHmatInv( void );
198 mmeineke 568 void calcBoxL();
199 tim 781 double calcMaxCutOff();
200 mmeineke 568
201 gezelter 845
202 mmeineke 377 // private function to initialize the fortran side of the simulation
203 mmeineke 836 setFortranSim_TD setFsimulation;
204 mmeineke 377
205 mmeineke 836 setFortranBox_TD setFortranBoxSize;
206 mmeineke 626
207 mmeineke 836 notifyFortranCutOff_TD notifyFortranCutOffs;
208 tim 658
209     //Addtional Properties of SimInfo
210 mmeineke 850 GenericData* properties;
211 mmeineke 626
212 mmeineke 377 };
213    
214    
215    
216     #endif