ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimInfo.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimInfo.hpp (file contents):
Revision 569 by mmeineke, Tue Jul 1 21:33:45 2003 UTC vs.
Revision 781 by tim, Mon Sep 22 23:07:57 2003 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines