--- trunk/OOPSE/libmdtools/SimInfo.hpp 2003/06/30 22:04:01 568 +++ trunk/OOPSE/libmdtools/SimInfo.hpp 2003/08/11 18:29:46 674 @@ -1,16 +1,20 @@ #ifndef __SIMINFO_H__ #define __SIMINFO_H__ +#include +#include +#include - #include "Atom.hpp" #include "Molecule.hpp" #include "AbstractClasses.hpp" #include "MakeStamps.hpp" +#include "SimState.hpp" #define __C #include "fSimulation.h" #include "fortranWrapDefines.hpp" +#include "GenericData.hpp" @@ -19,7 +23,7 @@ class SimInfo{ (public) public: SimInfo(); - ~SimInfo(){} + ~SimInfo(); int n_atoms; // the number of atoms Atom **atoms; // the array of atom objects @@ -32,14 +36,13 @@ class SimInfo{ (public) unsigned int n_oriented; // number of of atoms with orientation unsigned int ndf; // number of actual degrees of freedom unsigned int ndfRaw; // number of settable degrees of freedom + unsigned int n_Zconstraints; // the number of zConstraints unsigned int setTemp; // boolean to set the temperature at each sampleTime unsigned int n_dipoles; // number of dipoles - double ecr; // the electrostatic cutoff radius - double est; // the electrostatic skin thickness - double dielectric; // the dielectric of the medium for reaction field + int n_exclude; // the # of pairs excluded from long range forces Exclude** excludes; // the pairs themselves @@ -56,28 +59,22 @@ class SimInfo{ (public) double lrPot; // the potential energy from the long range calculations. - double Hmat[9]; // the periodic boundry conditions. The Hmat is the - // column vectors of the x, y, and z box vectors. - // - // h1 h2 h3 - // [ Xx Yx Zx ] - // [ Xy Yy Zy ] - // [ Xz Yz Zz ] - // - // to preserve compatibility with Fortran the - // ordering in the array is as follows: - // - // [ 0 3 6 ] - // [ 1 4 7 ] - // [ 2 5 8 ] + double Hmat[3][3]; // the periodic boundry conditions. The Hmat is the + // column vectors of the x, y, and z box vectors. + // h1 h2 h3 + // [ Xx Yx Zx ] + // [ Xy Yy Zy ] + // [ Xz Yz Zz ] + // + double HmatInv[3][3]; - double HmatI[9]; // the inverted Hmat; - double boxLx, boxLy, boxLz; // the box Lengths + double boxL[3]; // The Lengths of the 3 column vectors of Hmat double boxVol; + int orthoRhombic; + double dielectric; // the dielectric of the medium for reaction field - double rList, rCut; // variables for the neighborlist int usePBC; // whether we use periodic boundry conditions. int useLJ; @@ -92,6 +89,7 @@ class SimInfo{ (public) double sampleTime, statusTime; // the position and energy dump frequencies double target_temp; // the target temperature of the system double thermalTime; // the temp kick interval + double currentTime; // Used primarily for correlation Functions int n_mol; // n_molecules; Molecule* molecules; // the array of molecules @@ -120,29 +118,80 @@ class SimInfo{ (public) // sets the internal function pointer to fortran. void setInternal( void (*fSetup) setFortranSimList, - void (*fBox) setFortranBoxList ){ + void (*fBox) setFortranBoxList, + void (*fCut) notifyFortranCutOffList ){ setFsimulation = fSetup; setFortranBoxSize = fBox; + notifyFortranCutOffs = fCut; } int getNDF(); int getNDFraw(); void setBox( double newBox[3] ); - void setBoxM( double newBox[9] ); - void getBoxM( double theBox[9] ); + void setBoxM( double newBox[3][3] ); + void getBoxM( double theBox[3][3] ); + void scaleBox( double scale ); + + void setRcut( double theRcut ); + void setEcr( double theEcr ); + void setEcr( double theEcr, double theEst ); + double getRcut( void ) { return rCut; } + double getRlist( void ) { return rList; } + double getEcr( void ) { return ecr; } + double getEst( void ) { return est; } + + void setTime( double theTime ) { currentTime = theTime; } + void incrTime( double dt ) { currentTime += dt; } + void decrTime( double dt ) { currentTime -= dt; } + double getTime( void ) { return currentTime; } + void wrapVector( double thePos[3] ); + void matMul3(double a[3][3], double b[3][3], double out[3][3]); + void matVecMul3(double m[3][3], double inVec[3], double outVec[3]); + void invertMat3(double in[3][3], double out[3][3]); + void transposeMat3(double in[3][3], double out[3][3]); + void printMat3(double A[3][3]); + void printMat9(double A[9]); + double matDet3(double m[3][3]); + + SimState* getConfiguration( void ) { return myConfiguration; } + + void addProperty(GenericData* prop); + GenericData* getProperty(const string& propName); + vector getProperties(); + private: + + SimState* myConfiguration; + + double origRcut, origEcr; + int boxIsInit, haveOrigRcut, haveOrigEcr; + + double oldEcr; + double oldRcut; + + double rList, rCut; // variables for the neighborlist + double ecr; // the electrostatic cutoff radius + double est; // the electrostatic skin thickness + double maxCutoff; - void calcHmatI( void ); + void calcHmatInv( void ); void calcBoxL(); + void checkCutOffs( void ); // private function to initialize the fortran side of the simulation void (*setFsimulation) setFortranSimList; void (*setFortranBoxSize) setFortranBoxList; + + void (*notifyFortranCutOffs) notifyFortranCutOffList; + + //Addtional Properties of SimInfo + map properties; + };