--- trunk/OOPSE/libmdtools/Integrator.hpp 2003/06/20 16:49:33 560 +++ trunk/OOPSE/libmdtools/Integrator.hpp 2003/06/20 20:29:36 561 @@ -9,10 +9,15 @@ class Integrator : public BaseIntegrator { #include "Thermo.hpp" #include "ReadWrite.hpp" +const double kB = 8.31451e-7;// boltzmann constant amu*Ang^2*fs^-2/K +const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2 +const int maxIteration = 300; +const double tol = 1.0e-6; + class Integrator : public BaseIntegrator { public: - Integrator( SimInfo &theInfo, ForceFields* the_ff ); + Integrator( SimInfo *theInfo, ForceFields* the_ff ); virtual ~Integrator(); void integrate( void ); @@ -29,7 +34,7 @@ class Integrator : public BaseIntegrator { (protected) void checkConstraints( void ); void rotate( int axes1, int axes2, double angle, double j[3], - double A[3][3] ); + double A[9] ); ForceFields* myFF; @@ -50,18 +55,13 @@ class Integrator : public BaseIntegrator { (protected) int* moving; // tells whether we are moving atom i int* moved; // tells whether we have moved atom i - double* prePos; // pre constrained positions + double* oldPos; // pre constrained positions short isFirst; /*boolean for the first time integrate is called */ double dt; double dt2; - const double kB = 8.31451e-7; // boltzmann constant in amu*Ang^2*fs^-2/K - const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2 - const int maxIteration = 300; - const double tol = 1.0e-6; - double* pos; double* vel; double* frc; @@ -76,7 +76,8 @@ class NVE : public Integrator{ class NVE : public Integrator{ - NVE ( void ): +public: + NVE ( SimInfo *theInfo, ForceFields* the_ff ): Integrator( theInfo, the_ff ){} virtual ~NVE(){} @@ -88,9 +89,8 @@ class NVT : public Integrator{ (public) public: - NVT ( SimInfo &theInfo, ForceFields* the_ff) : - Integrator( theInfo, the_ff ); - virtual ~NVT(); + NVT ( SimInfo *theInfo, ForceFields* the_ff); + virtual ~NVT() {} void setQmass(double q) {qmass = q; have_qmass = 1;} void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;} @@ -98,13 +98,11 @@ class NVT : public Integrator{ (public) protected: - virtual moveA( void ); - virtual moveB( void ); + virtual void moveA( void ); + virtual void moveB( void ); - int readyCheck(); + virtual int readyCheck(); - Atom** atoms; - // zeta is a propagated degree of freedom. double zeta; @@ -115,6 +113,8 @@ class NVT : public Integrator{ (public) double targetTemp; double tauThermostat; + double NkBT; + short int have_tau_thermostat, have_target_temp, have_qmass; }; @@ -124,8 +124,7 @@ class NPT : public Integrator{ (public) public: - NPT ( SimInfo &theInfo, ForceFields* the_ff) : - Integrator( theInfo, the_ff ); + NPT ( SimInfo *theInfo, ForceFields* the_ff); virtual ~NPT(); void setQmass(double q) {qmass = q; have_qmass = 1;} @@ -136,10 +135,10 @@ class NPT : public Integrator{ (public) protected: - virtual moveA( void ); - virtual moveB( void ); + virtual void moveA( void ); + virtual void moveB( void ); - int readyCheck(); + virtual int readyCheck(); Atom** atoms;