ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/brains/SimInfo.hpp
Revision: 1772
Committed: Tue Nov 23 22:48:31 2004 UTC (19 years, 7 months ago) by chrisfen
File size: 6819 byte(s)
Log Message:
Improvements to restraints

File Contents

# User Rev Content
1 gezelter 1490 #ifndef __SIMINFO_H__
2     #define __SIMINFO_H__
3    
4     #include <map>
5     #include <string>
6     #include <vector>
7    
8 tim 1492 #include "primitives/Atom.hpp"
9     #include "primitives/RigidBody.hpp"
10     #include "primitives/Molecule.hpp"
11     #include "brains/Exclude.hpp"
12     #include "brains/SkipList.hpp"
13     #include "primitives/AbstractClasses.hpp"
14     #include "types/MakeStamps.hpp"
15     #include "brains/SimState.hpp"
16     #include "restraints/Restraints.hpp"
17 gezelter 1490
18     #define __C
19 tim 1492 #include "brains/fSimulation.h"
20     #include "utils/GenericData.hpp"
21 gezelter 1490
22    
23     //#include "Minimizer.hpp"
24 tim 1492 //#include "minimizers/OOPSEMinimizer.hpp"
25 gezelter 1490
26    
27     double roundMe( double x );
28     class OOPSEMinimizer;
29     class SimInfo{
30    
31     public:
32    
33     SimInfo();
34     ~SimInfo();
35    
36     int n_atoms; // the number of atoms
37     Atom **atoms; // the array of atom objects
38    
39     vector<RigidBody*> rigidBodies; // A vector of rigid bodies
40     vector<StuntDouble*> integrableObjects;
41    
42     double tau[9]; // the stress tensor
43    
44     int n_bonds; // number of bends
45     int n_bends; // number of bends
46     int n_torsions; // number of torsions
47     int n_oriented; // number of of atoms with orientation
48     int ndf; // number of actual degrees of freedom
49     int ndfRaw; // number of settable degrees of freedom
50     int ndfTrans; // number of translational degrees of freedom
51     int nZconstraints; // the number of zConstraints
52    
53     int setTemp; // boolean to set the temperature at each sampleTime
54     int resetIntegrator; // boolean to reset the integrator
55    
56     int n_dipoles; // number of dipoles
57    
58     int n_exclude;
59     Exclude* excludes; // the exclude list for ignoring pairs in fortran
60     int nGlobalExcludes;
61     int* globalExcludes; // same as above, but these guys participate in
62     // no long range forces.
63    
64     int* identArray; // array of unique identifiers for the atoms
65     int* molMembershipArray; // map of atom numbers onto molecule numbers
66    
67     int n_constraints; // the number of constraints on the system
68    
69     int n_SRI; // the number of short range interactions
70    
71     double lrPot; // the potential energy from the long range calculations.
72    
73     double Hmat[3][3]; // the periodic boundry conditions. The Hmat is the
74     // column vectors of the x, y, and z box vectors.
75     // h1 h2 h3
76     // [ Xx Yx Zx ]
77     // [ Xy Yy Zy ]
78     // [ Xz Yz Zz ]
79     //
80     double HmatInv[3][3];
81    
82     double boxL[3]; // The Lengths of the 3 column vectors of Hmat
83     double boxVol;
84     int orthoRhombic;
85    
86    
87     double dielectric; // the dielectric of the medium for reaction field
88    
89    
90     int usePBC; // whether we use periodic boundry conditions.
91 chrisfen 1636 int useDirectionalAtoms;
92     int useLennardJones;
93     int useElectrostatics;
94 gezelter 1490 int useCharges;
95     int useDipoles;
96 chrisfen 1636 int useSticky;
97     int useGayBerne;
98     int useEAM;
99     int useShapes;
100     int useFLARB;
101 gezelter 1490 int useReactionField;
102     bool haveCutoffGroups;
103     bool useInitXSstate;
104     double orthoTolerance;
105    
106     double dt, run_time; // the time step and total time
107     double sampleTime, statusTime; // the position and energy dump frequencies
108     double target_temp; // the target temperature of the system
109     double thermalTime; // the temp kick interval
110     double currentTime; // Used primarily for correlation Functions
111     double resetTime; // Use to reset the integrator periodically
112     short int have_target_temp;
113    
114     int n_mol; // n_molecules;
115     Molecule* molecules; // the array of molecules
116    
117     int nComponents; // the number of components in the system
118     int* componentsNmol; // the number of molecules of each component
119     MoleculeStamp** compStamps;// the stamps matching the components
120     LinkedMolStamp* headStamp; // list of stamps used in the simulation
121    
122    
123     char ensemble[100]; // the enesemble of the simulation (NVT, NVE, etc. )
124     char mixingRule[100]; // the mixing rules for Lennard jones/van der walls
125     BaseIntegrator *the_integrator; // the integrator of the simulation
126    
127     OOPSEMinimizer* the_minimizer; // the energy minimizer
128     Restraints* restraint;
129     bool has_minimizer;
130    
131     string finalName; // the name of the eor file to be written
132     string sampleName; // the name of the dump file to be written
133     string statusName; // the name of the stat file to be written
134 chrisfen 1772 string zAngleName; // the name of the ang file to be written
135 gezelter 1490
136     int seed; //seed for random number generator
137    
138     int useSolidThermInt; // is solid-state thermodynamic integration being used
139     int useLiquidThermInt; // is liquid thermodynamic integration being used
140     double thermIntLambda; // lambda for TI
141     double thermIntK; // power of lambda for TI
142     double vRaw; // unperturbed potential for TI
143     double vHarm; // harmonic potential for TI
144     int i; // just an int
145    
146     vector<double> mfact;
147     vector<int> FglobalGroupMembership;
148     int ngroup;
149     int* globalGroupMembership;
150    
151     // refreshes the sim if things get changed (load balanceing, volume
152     // adjustment, etc.)
153    
154     void refreshSim( void );
155    
156    
157     // sets the internal function pointer to fortran.
158    
159    
160     int getNDF();
161     int getNDFraw();
162     int getNDFtranslational();
163     int getTotIntegrableObjects();
164     void setBox( double newBox[3] );
165     void setBoxM( double newBox[3][3] );
166     void getBoxM( double theBox[3][3] );
167     void scaleBox( double scale );
168    
169     void setDefaultRcut( double theRcut );
170     void setDefaultRcut( double theRcut, double theRsw );
171     void checkCutOffs( void );
172    
173     double getRcut( void ) { return rCut; }
174     double getRlist( void ) { return rList; }
175     double getRsw( void ) { return rSw; }
176     double getMaxCutoff( void ) { return maxCutoff; }
177    
178     void setTime( double theTime ) { currentTime = theTime; }
179     void incrTime( double the_dt ) { currentTime += the_dt; }
180     void decrTime( double the_dt ) { currentTime -= the_dt; }
181     double getTime( void ) { return currentTime; }
182    
183     void wrapVector( double thePos[3] );
184    
185     SimState* getConfiguration( void ) { return myConfiguration; }
186    
187     void addProperty(GenericData* prop);
188     GenericData* getProperty(const string& propName);
189     //vector<GenericData*>& getProperties() {return properties;}
190    
191     int getSeed(void) { return seed; }
192     void setSeed(int theSeed) { seed = theSeed;}
193    
194     private:
195    
196     SimState* myConfiguration;
197    
198     int boxIsInit, haveRcut, haveRsw;
199    
200     double rList, rCut; // variables for the neighborlist
201     double rSw; // the switching radius
202    
203     double maxCutoff;
204    
205     double distXY;
206     double distYZ;
207     double distZX;
208    
209     void calcHmatInv( void );
210     void calcBoxL();
211     double calcMaxCutOff();
212    
213    
214     //Addtional Properties of SimInfo
215     map<string, GenericData*> properties;
216     void getFortranGroupArrays(SimInfo* info,
217     vector<int>& FglobalGroupMembership,
218     vector<double>& mfact);
219    
220    
221     };
222    
223    
224     #endif