ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimInfo.hpp
Revision: 588
Committed: Thu Jul 10 17:10:56 2003 UTC (21 years ago) by gezelter
File size: 4443 byte(s)
Log Message:
Bunch of 1-d array -> 2-d array stuff

File Contents

# User Rev Content
1 mmeineke 377 #ifndef __SIMINFO_H__
2     #define __SIMINFO_H__
3    
4    
5    
6     #include "Atom.hpp"
7     #include "Molecule.hpp"
8     #include "AbstractClasses.hpp"
9     #include "MakeStamps.hpp"
10    
11     #define __C
12     #include "fSimulation.h"
13     #include "fortranWrapDefines.hpp"
14    
15    
16    
17     class SimInfo{
18    
19     public:
20    
21     SimInfo();
22     ~SimInfo(){}
23    
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     unsigned int n_bonds; // number of bends
30     unsigned int n_bends; // number of bends
31     unsigned int n_torsions; // number of torsions
32     unsigned int n_oriented; // number of of atoms with orientation
33 gezelter 458 unsigned int ndf; // number of actual degrees of freedom
34     unsigned int ndfRaw; // number of settable degrees of freedom
35 mmeineke 377
36     unsigned int setTemp; // boolean to set the temperature at each sampleTime
37    
38     unsigned int n_dipoles; // number of dipoles
39 gezelter 394 double ecr; // the electrostatic cutoff radius
40     double est; // the electrostatic skin thickness
41 mmeineke 377 double dielectric; // the dielectric of the medium for reaction field
42    
43     int n_exclude; // the # of pairs excluded from long range forces
44 mmeineke 427 Exclude** excludes; // the pairs themselves
45 mmeineke 377
46     int nGlobalExcludes;
47     int* globalExcludes; // same as above, but these guys participate in
48     // no long range forces.
49    
50     int* identArray; // array of unique identifiers for the atoms
51 gezelter 483 int* molMembershipArray; // map of atom numbers onto molecule numbers
52 mmeineke 377
53     int n_constraints; // the number of constraints on the system
54    
55     unsigned int n_SRI; // the number of short range interactions
56    
57     double lrPot; // the potential energy from the long range calculations.
58    
59 gezelter 588 double Hmat[3][3]; // the periodic boundry conditions. The Hmat is the
60     // column vectors of the x, y, and z box vectors.
61     // h1 h2 h3
62     // [ Xx Yx Zx ]
63     // [ Xy Yy Zy ]
64     // [ Xz Yz Zz ]
65     //
66     double HmatInv[3][3];
67 mmeineke 568
68     double boxLx, boxLy, boxLz; // the box Lengths
69 mmeineke 572 double boxVol;
70     int orthoRhombic;
71 mmeineke 568
72    
73    
74 mmeineke 377 double rList, rCut; // variables for the neighborlist
75    
76     int usePBC; // whether we use periodic boundry conditions.
77     int useLJ;
78     int useSticky;
79     int useDipole;
80     int useReactionField;
81     int useGB;
82     int useEAM;
83    
84    
85     double dt, run_time; // the time step and total time
86     double sampleTime, statusTime; // the position and energy dump frequencies
87     double target_temp; // the target temperature of the system
88     double thermalTime; // the temp kick interval
89    
90     int n_mol; // n_molecules;
91     Molecule* molecules; // the array of molecules
92    
93     int nComponents; // the number of componentsin the system
94     int* componentsNmol; // the number of molecules of each component
95     MoleculeStamp** compStamps;// the stamps matching the components
96     LinkedMolStamp* headStamp; // list of stamps used in the simulation
97    
98    
99     char ensemble[100]; // the enesemble of the simulation (NVT, NVE, etc. )
100     char mixingRule[100]; // the mixing rules for Lennard jones/van der walls
101 mmeineke 542 BaseIntegrator *the_integrator; // the integrator of the simulation
102 mmeineke 377
103     char finalName[300]; // the name of the eor file to be written
104     char sampleName[300]; // the name of the dump file to be written
105     char statusName[300]; // the name of the stat file to be written
106    
107    
108     // refreshes the sim if things get changed (load balanceing, volume
109     // adjustment, etc.)
110    
111     void refreshSim( void );
112    
113    
114     // sets the internal function pointer to fortran.
115    
116     void setInternal( void (*fSetup) setFortranSimList,
117     void (*fBox) setFortranBoxList ){
118     setFsimulation = fSetup;
119     setFortranBoxSize = fBox;
120     }
121    
122 gezelter 458 int getNDF();
123     int getNDFraw();
124    
125 gezelter 457 void setBox( double newBox[3] );
126 gezelter 588 void setBoxM( double newBox[3][3] );
127     void getBoxM( double theBox[3][3] );
128 gezelter 574 void scaleBox( double scale );
129 gezelter 457
130 mmeineke 568 void wrapVector( double thePos[3] );
131    
132 gezelter 588 void matMul3(double a[3][3], double b[3][3], double out[3][3]);
133     void matVecMul3(double m[3][3], double inVec[3], double outVec[3]);
134     void invertMat3(double in[3][3], double out[3][3]);
135     double matDet3(double m[3][3]);
136    
137 mmeineke 377 private:
138    
139 gezelter 588 void calcHmatInv( void );
140 mmeineke 568 void calcBoxL();
141    
142 mmeineke 377 // private function to initialize the fortran side of the simulation
143     void (*setFsimulation) setFortranSimList;
144    
145     void (*setFortranBoxSize) setFortranBoxList;
146     };
147    
148    
149    
150     #endif