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 1064 by tim, Tue Feb 24 15:44:45 2004 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 + //#include "Minimizer.hpp"
19 + //#include "OOPSEMinimizer.hpp"
20  
21 <
16 <
21 > class OOPSEMinimizer;
22   class SimInfo{
23  
24   public:
25  
26    SimInfo();
27 <  ~SimInfo(){}
27 >  ~SimInfo();
28  
29    int n_atoms; // the number of atoms
30    Atom **atoms; // the array of atom objects
31    
32    double tau[9]; // the stress tensor
33  
34 <  unsigned int n_bonds;    // number of bends
35 <  unsigned int n_bends;    // number of bends
36 <  unsigned int n_torsions; // number of torsions
37 <  unsigned int n_oriented; // number of of atoms with orientation
38 <  unsigned int ndf;        // number of actual degrees of freedom
39 <  unsigned int ndfRaw;     // number of settable degrees of freedom
34 >  int n_bonds;    // number of bends
35 >  int n_bends;    // number of bends
36 >  int n_torsions; // number of torsions
37 >  int n_oriented; // number of of atoms with orientation
38 >  int ndf;        // number of actual degrees of freedom
39 >  int ndfRaw;     // number of settable degrees of freedom
40 >  int ndfTrans;   // number of translational degrees of freedom
41 >  int nZconstraints; // the number of zConstraints
42  
43 <  unsigned int setTemp;   // boolean to set the temperature at each sampleTime
43 >  int setTemp;   // boolean to set the temperature at each sampleTime
44 >  int resetIntegrator; // boolean to reset the integrator
45  
46 <  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 >  int n_dipoles; // number of dipoles
47  
48 +
49    int n_exclude;  // the # of pairs excluded from long range forces
50    Exclude** excludes;       // the pairs themselves
51  
# Line 52 | Line 58 | class SimInfo{ (public)
58  
59    int n_constraints; // the number of constraints on the system
60  
61 <  unsigned int n_SRI;   // the number of short range interactions
61 >  int n_SRI;   // the number of short range interactions
62  
63    double lrPot; // the potential energy from the long range calculations.
64  
65 <  double Hmat[9]; // the periodic boundry conditions. The Hmat is the
66 <                  // column vectors of the x, y, and z box vectors.
67 <                  //
68 <                  //   h1  h2  h3
69 <                  // [ Xx  Yx  Zx ]
70 <                  // [ Xy  Yy  Zy ]
71 <                  // [ Xz  Yz  Zz ]
72 <                  //  
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 ]
65 >  double Hmat[3][3];  // the periodic boundry conditions. The Hmat is the
66 >                      // column vectors of the x, y, and z box vectors.
67 >                      //   h1  h2  h3
68 >                      // [ Xx  Yx  Zx ]
69 >                      // [ Xy  Yy  Zy ]
70 >                      // [ Xz  Yz  Zz ]
71 >                      //  
72 >  double HmatInv[3][3];
73  
74 <  double HmatI[9]; // the inverted Hmat;
75 <  double boxLx, boxLy, boxLz; // the box Lengths
76 <  double boxVol, orthoRhombic;
74 >  double boxL[3]; // The Lengths of the 3 column vectors of Hmat
75 >  double boxVol;
76 >  int orthoRhombic;
77    
78  
79 +  double dielectric;      // the dielectric of the medium for reaction field
80  
80  double rList, rCut; // variables for the neighborlist
81    
82    int usePBC; // whether we use periodic boundry conditions.
83    int useLJ;
84    int useSticky;
85 <  int useDipole;
85 >  int useCharges;
86 >  int useDipoles;
87    int useReactionField;
88    int useGB;
89    int useEAM;
90    
91 +  bool useInitXSstate;
92 +  double orthoTolerance;
93  
94    double dt, run_time;           // the time step and total time
95    double sampleTime, statusTime; // the position and energy dump frequencies
96    double target_temp;            // the target temperature of the system
97    double thermalTime;            // the temp kick interval
98 +  double currentTime;            // Used primarily for correlation Functions
99 +  double resetTime;              // Use to reset the integrator periodically
100  
101    int n_mol;           // n_molecules;
102    Molecule* molecules; // the array of molecules
103    
104 <  int nComponents;           // the number of componentsin the system
104 >  int nComponents;           // the number of components in the system
105    int* componentsNmol;       // the number of molecules of each component
106    MoleculeStamp** compStamps;// the stamps matching the components
107    LinkedMolStamp* headStamp; // list of stamps used in the simulation
# Line 106 | Line 111 | class SimInfo{ (public)
111    char mixingRule[100]; // the mixing rules for Lennard jones/van der walls
112    BaseIntegrator *the_integrator; // the integrator of the simulation
113  
114 +  OOPSEMinimizer* the_minimizer; // the energy minimizer
115 +  bool has_minimizer;
116 +
117    char finalName[300];  // the name of the eor file to be written
118    char sampleName[300]; // the name of the dump file to be written
119    char statusName[300]; // the name of the stat file to be written
120  
121 <
121 >  int seed;                    //seed for random number generator
122    // refreshes the sim if things get changed (load balanceing, volume
123    // adjustment, etc.)
124  
# Line 119 | Line 127 | class SimInfo{ (public)
127  
128    // sets the internal function pointer to fortran.
129  
130 <  void setInternal( void (*fSetup) setFortranSimList,
131 <                    void (*fBox) setFortranBoxList ){
130 >  void setInternal( setFortranSim_TD fSetup,
131 >                    setFortranBox_TD fBox,
132 >                    notifyFortranCutOff_TD fCut){
133      setFsimulation = fSetup;
134      setFortranBoxSize = fBox;
135 +    notifyFortranCutOffs = fCut;
136    }
137  
138    int getNDF();
139    int getNDFraw();
140 +  int getNDFtranslational();
141  
142    void setBox( double newBox[3] );
143 <  void setBoxM( double newBox[9] );
144 <  void getBoxM( double theBox[9] );
143 >  void setBoxM( double newBox[3][3] );
144 >  void getBoxM( double theBox[3][3] );
145 >  void scaleBox( double scale );
146 >  
147 >  void setDefaultRcut( double theRcut );
148 >  void setDefaultEcr( double theEcr );
149 >  void setDefaultEcr( double theEcr, double theEst );
150 >  void checkCutOffs( void );
151  
152 +  double getRcut( void )  { return rCut; }
153 +  double getRlist( void ) { return rList; }
154 +  double getEcr( void )   { return ecr; }
155 +  double getEst( void )   { return est; }
156 +  double getMaxCutoff( void ) { return maxCutoff; }
157 +
158 +  void setTime( double theTime ) { currentTime = theTime; }
159 +  void incrTime( double the_dt ) { currentTime += the_dt; }
160 +  void decrTime( double the_dt ) { currentTime -= the_dt; }
161 +  double getTime( void ) { return currentTime; }
162 +
163    void wrapVector( double thePos[3] );
164  
165 +  void matMul3(double a[3][3], double b[3][3], double out[3][3]);
166 +  void matVecMul3(double m[3][3], double inVec[3], double outVec[3]);
167 +  void invertMat3(double in[3][3], double out[3][3]);
168 +  void transposeMat3(double in[3][3], double out[3][3]);
169 +  void printMat3(double A[3][3]);
170 +  void printMat9(double A[9]);
171 +  double matDet3(double m[3][3]);
172 +  double matTrace3(double m[3][3]);
173 +
174 +  void crossProduct3(double a[3],double b[3], double out[3]);
175 +  double dotProduct3(double a[3], double b[3]);
176 +  double length3(double a[3]);
177 +  
178 +  SimState* getConfiguration( void ) { return myConfiguration; }
179 +  
180 +  void addProperty(GenericData* prop);
181 +  GenericData* getProperty(const string& propName);
182 +  vector<GenericData*> getProperties();      
183 +
184 +  int getSeed(void) {  return seed; }
185 +  void setSeed(int theSeed) {  seed = theSeed;}
186 +
187   private:
188 +
189 +  SimState* myConfiguration;
190 +
191 +  int boxIsInit, haveRcut, haveEcr;
192 +
193 +  double rList, rCut; // variables for the neighborlist
194 +  double ecr;             // the electrostatic cutoff radius
195 +  double est;             // the electrostatic skin thickness
196 +  double maxCutoff;
197 +
198 +  double distXY;
199 +  double distYZ;
200 +  double distZX;
201 +
202 +
203    
204 <  void calcHmatI( void );
204 >  void calcHmatInv( void );
205    void calcBoxL();
206 +  double calcMaxCutOff();
207  
208 +
209    // private function to initialize the fortran side of the simulation
210 <  void (*setFsimulation) setFortranSimList;
210 >  setFortranSim_TD setFsimulation;
211  
212 <  void (*setFortranBoxSize) setFortranBoxList;
212 >  setFortranBox_TD setFortranBoxSize;
213 >  
214 >  notifyFortranCutOff_TD notifyFortranCutOffs;
215 >  
216 >  //Addtional Properties of SimInfo
217 >  map<string, GenericData*> properties;
218 >
219   };
220  
221  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines