--- trunk/OOPSE/libmdtools/Integrator.hpp 2003/06/19 22:02:44 559 +++ trunk/OOPSE/libmdtools/Integrator.hpp 2003/06/20 16:49:33 560 @@ -18,7 +18,6 @@ class Integrator : public BaseIntegrator { (protected) protected: - virtual void integrateStep( int calcPot, int calcStress ); virtual void preMove( void ); @@ -57,20 +56,18 @@ class Integrator : public BaseIntegrator { (protected) double dt; double dt2; - const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2 + 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; double* trq; double* Amat; - - Thermo *tStats; StatWriter* statOut; DumpWriter* dumpOut; @@ -89,17 +86,80 @@ class NVT : public Integrator{ class NVT : public Integrator{ - NVT ( SimInfo &theInfo, ForceFields* the_ff ) : +public: + + NVT ( SimInfo &theInfo, ForceFields* the_ff) : Integrator( theInfo, the_ff ); virtual ~NVT(); + void setQmass(double q) {qmass = q; have_qmass = 1;} + void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;} + void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;} + protected: + virtual moveA( void ); virtual moveB( void ); + int readyCheck(); + + Atom** atoms; + + // zeta is a propagated degree of freedom. + + double zeta; + + // targetTemp must be set. One of qmass or tauThermostat must be set; + + double qmass; + double targetTemp; + double tauThermostat; + + short int have_tau_thermostat, have_target_temp, have_qmass; + }; - +class NPT : public Integrator{ +public: + + NPT ( SimInfo &theInfo, ForceFields* the_ff) : + Integrator( theInfo, the_ff ); + virtual ~NPT(); + + void setQmass(double q) {qmass = q; have_qmass = 1;} + void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;} + void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;} + void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;} + void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;} + +protected: + + virtual moveA( void ); + virtual moveB( void ); + + int readyCheck(); + + Atom** atoms; + + // zeta and epsilonDot are the propagated degrees of freedom. + + double zeta; + double epsilonDot; + + // targetTemp, targetPressure, and tauBarostat must be set. + // One of qmass or tauThermostat must be set; + + double qmass; + double targetTemp; + double targetPressure; + double tauThermostat; + double tauBarostat; + + short int have_tau_thermostat, have_tau_barostat, have_target_temp; + short int have_target_pressure, have_qmass; + +}; + #endif