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 674 by mmeineke, Mon Aug 11 18:29:46 2003 UTC vs.
Revision 1214 by gezelter, Tue Jun 1 18:42:58 2004 UTC

# Line 6 | Line 6
6   #include <vector>
7  
8   #include "Atom.hpp"
9 + #include "RigidBody.hpp"
10   #include "Molecule.hpp"
11 + #include "Exclude.hpp"
12 + #include "SkipList.hpp"
13   #include "AbstractClasses.hpp"
14   #include "MakeStamps.hpp"
15   #include "SimState.hpp"
16 + #include "Restraints.hpp"
17  
18   #define __C
19   #include "fSimulation.h"
20   #include "fortranWrapDefines.hpp"
21   #include "GenericData.hpp"
22 + //#include "Minimizer.hpp"
23 + //#include "OOPSEMinimizer.hpp"
24  
25  
26 <
26 > double roundMe( double x );
27 > class OOPSEMinimizer;
28   class SimInfo{
29  
30   public:
# Line 27 | Line 34 | class SimInfo{ (public)
34  
35    int n_atoms; // the number of atoms
36    Atom **atoms; // the array of atom objects
37 +
38 +  vector<RigidBody*> rigidBodies;  // A vector of rigid bodies
39 +  vector<StuntDouble*> integrableObjects;
40    
41    double tau[9]; // the stress tensor
42  
43 <  unsigned int n_bonds;    // number of bends
44 <  unsigned int n_bends;    // number of bends
45 <  unsigned int n_torsions; // number of torsions
46 <  unsigned int n_oriented; // number of of atoms with orientation
47 <  unsigned int ndf;        // number of actual degrees of freedom
48 <  unsigned int ndfRaw;     // number of settable degrees of freedom
49 <  unsigned int n_Zconstraints; // the number of zConstraints
43 >  int n_bonds;    // number of bends
44 >  int n_bends;    // number of bends
45 >  int n_torsions; // number of torsions
46 >  int n_oriented; // number of of atoms with orientation
47 >  int ndf;        // number of actual degrees of freedom
48 >  int ndfRaw;     // number of settable degrees of freedom
49 >  int ndfTrans;   // number of translational degrees of freedom
50 >  int nZconstraints; // the number of zConstraints
51  
52 <  unsigned int setTemp;   // boolean to set the temperature at each sampleTime
52 >  int setTemp;   // boolean to set the temperature at each sampleTime
53 >  int resetIntegrator; // boolean to reset the integrator
54  
55 <  unsigned int n_dipoles; // number of dipoles
55 >  int n_dipoles; // number of dipoles
56  
57 <
58 <  int n_exclude;  // the # of pairs excluded from long range forces
47 <  Exclude** excludes;       // the pairs themselves
48 <
57 >  int n_exclude;
58 >  Exclude* excludes;  // the exclude list for ignoring pairs in fortran
59    int nGlobalExcludes;
60    int* globalExcludes; // same as above, but these guys participate in
61                         // no long range forces.
# Line 55 | Line 65 | class SimInfo{ (public)
65  
66    int n_constraints; // the number of constraints on the system
67  
68 <  unsigned int n_SRI;   // the number of short range interactions
68 >  int n_SRI;   // the number of short range interactions
69  
70    double lrPot; // the potential energy from the long range calculations.
71  
# Line 79 | Line 89 | class SimInfo{ (public)
89    int usePBC; // whether we use periodic boundry conditions.
90    int useLJ;
91    int useSticky;
92 <  int useDipole;
92 >  int useCharges;
93 >  int useDipoles;
94    int useReactionField;
95    int useGB;
96    int useEAM;
97 <  
97 >  bool haveCutoffGroups;
98 >  bool useInitXSstate;
99 >  double orthoTolerance;
100  
101    double dt, run_time;           // the time step and total time
102    double sampleTime, statusTime; // the position and energy dump frequencies
103    double target_temp;            // the target temperature of the system
104    double thermalTime;            // the temp kick interval
105    double currentTime;            // Used primarily for correlation Functions
106 +  double resetTime;              // Use to reset the integrator periodically
107  
108    int n_mol;           // n_molecules;
109    Molecule* molecules; // the array of molecules
110    
111 <  int nComponents;           // the number of componentsin the system
111 >  int nComponents;           // the number of components in the system
112    int* componentsNmol;       // the number of molecules of each component
113    MoleculeStamp** compStamps;// the stamps matching the components
114    LinkedMolStamp* headStamp; // list of stamps used in the simulation
# Line 104 | Line 118 | class SimInfo{ (public)
118    char mixingRule[100]; // the mixing rules for Lennard jones/van der walls
119    BaseIntegrator *the_integrator; // the integrator of the simulation
120  
121 +  OOPSEMinimizer* the_minimizer; // the energy minimizer
122 +  Restraints* restraint;
123 +  bool has_minimizer;
124 +
125    char finalName[300];  // the name of the eor file to be written
126    char sampleName[300]; // the name of the dump file to be written
127    char statusName[300]; // the name of the stat file to be written
128 +  char rawPotName[300];  // the name of the raw file to be written
129  
130 +  int seed;                    //seed for random number generator
131  
132 +  int useSolidThermInt;  // is solid-state thermodynamic integration being used
133 +  int useLiquidThermInt; // is liquid thermodynamic integration being used
134 +  double thermIntLambda; // lambda for TI
135 +  double thermIntK;      // power of lambda for TI
136 +  double vRaw;           // unperturbed potential for TI
137 +  double vHarm;          // harmonic potential for TI
138 +  int i;                 // just an int
139 +
140 +  vector<double> mfact;
141 +  vector<int> FglobalGroupMembership;
142 +  int ngroup;
143 +  int* globalGroupMembership;
144 +  
145    // refreshes the sim if things get changed (load balanceing, volume
146    // adjustment, etc.)
147  
# Line 117 | Line 150 | class SimInfo{ (public)
150  
151    // sets the internal function pointer to fortran.
152  
153 <  void setInternal( void (*fSetup) setFortranSimList,
154 <                    void (*fBox) setFortranBoxList,
155 <                    void (*fCut) notifyFortranCutOffList ){
153 >  void setInternal( setFortranSim_TD fSetup,
154 >                    setFortranBox_TD fBox,
155 >                    notifyFortranCutOff_TD fCut){
156      setFsimulation = fSetup;
157      setFortranBoxSize = fBox;
158      notifyFortranCutOffs = fCut;
# Line 127 | Line 160 | class SimInfo{ (public)
160  
161    int getNDF();
162    int getNDFraw();
163 <
163 >  int getNDFtranslational();
164 >  int getTotIntegrableObjects();
165    void setBox( double newBox[3] );
166    void setBoxM( double newBox[3][3] );
167    void getBoxM( double theBox[3][3] );
168    void scaleBox( double scale );
169    
170 <  void setRcut( double theRcut );
171 <  void setEcr( double theEcr );
172 <  void setEcr( double theEcr, double theEst );
170 >  void setDefaultRcut( double theRcut );
171 >  void setDefaultRcut( double theRcut, double theRsw );
172 >  void checkCutOffs( void );
173  
174    double getRcut( void )  { return rCut; }
175    double getRlist( void ) { return rList; }
176 <  double getEcr( void )   { return ecr; }
177 <  double getEst( void )   { return est; }
178 <
176 >  double getRsw( void )   { return rSw; }
177 >  double getMaxCutoff( void ) { return maxCutoff; }
178 >  
179    void setTime( double theTime ) { currentTime = theTime; }
180 <  void incrTime( double dt ) { currentTime += dt; }
181 <  void decrTime( double dt ) { currentTime -= dt; }
180 >  void incrTime( double the_dt ) { currentTime += the_dt; }
181 >  void decrTime( double the_dt ) { currentTime -= the_dt; }
182    double getTime( void ) { return currentTime; }
183  
184    void wrapVector( double thePos[3] );
185  
152  void matMul3(double a[3][3], double b[3][3], double out[3][3]);
153  void matVecMul3(double m[3][3], double inVec[3], double outVec[3]);
154  void invertMat3(double in[3][3], double out[3][3]);
155  void transposeMat3(double in[3][3], double out[3][3]);
156  void printMat3(double A[3][3]);
157  void printMat9(double A[9]);
158  double matDet3(double m[3][3]);
159
186    SimState* getConfiguration( void ) { return myConfiguration; }
187    
188    void addProperty(GenericData* prop);
189    GenericData* getProperty(const string& propName);
190 <  vector<GenericData*> getProperties();      
190 >  //vector<GenericData*>& getProperties()  {return properties;}    
191  
192 +  int getSeed(void) {  return seed; }
193 +  void setSeed(int theSeed) {  seed = theSeed;}
194 +
195   private:
196  
197    SimState* myConfiguration;
198  
199 <  double origRcut, origEcr;
171 <  int boxIsInit, haveOrigRcut, haveOrigEcr;
199 >  int boxIsInit, haveRcut, haveRsw;
200  
173  double oldEcr;
174  double oldRcut;
175
201    double rList, rCut; // variables for the neighborlist
202 <  double ecr;             // the electrostatic cutoff radius
203 <  double est;             // the electrostatic skin thickness
202 >  double rSw;         // the switching radius
203 >
204    double maxCutoff;
205 +
206 +  double distXY;
207 +  double distYZ;
208 +  double distZX;
209    
210    void calcHmatInv( void );
211    void calcBoxL();
212 <  void checkCutOffs( void );
212 >  double calcMaxCutOff();
213  
214    // private function to initialize the fortran side of the simulation
215 <  void (*setFsimulation) setFortranSimList;
215 >  setFortranSim_TD setFsimulation;
216  
217 <  void (*setFortranBoxSize) setFortranBoxList;
217 >  setFortranBox_TD setFortranBoxSize;
218    
219 <  void (*notifyFortranCutOffs) notifyFortranCutOffList;
219 >  notifyFortranCutOff_TD notifyFortranCutOffs;
220    
221    //Addtional Properties of SimInfo
222    map<string, GenericData*> properties;
223 +  void getFortranGroupArrays(SimInfo* info,
224 +                             vector<int>& FglobalGroupMembership,
225 +                             vector<double>& mfact);
226  
227 +
228   };
229  
230  
198
231   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines