--- trunk/OOPSE/libmdtools/Integrator.hpp 2003/07/11 22:34:48 594 +++ trunk/OOPSE/libmdtools/Integrator.hpp 2003/07/14 15:04:55 596 @@ -160,6 +160,49 @@ class NPTf : public Integrator{ }; +class NPTim : public Integrator{ + +public: + + NPTim ( SimInfo *theInfo, ForceFields* the_ff); + virtual ~NPTim() {}; + + virtual void integrateStep( int calcPot, int calcStress ){ + calcStress = 1; + Integrator::integrateStep( calcPot, calcStress ); + } + + 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 void moveA( void ); + virtual void moveB( void ); + + virtual int readyCheck(); + + // chi and eta are the propagated degrees of freedom + + double chi; + double eta; + double NkBT; + + // targetTemp, targetPressure, and tauBarostat must be set. + // One of qmass or tauThermostat must be set; + + double targetTemp; + double targetPressure; + double tauThermostat; + double tauBarostat; + + short int have_tau_thermostat, have_tau_barostat, have_target_temp; + short int have_target_pressure; + +}; + class NPTf : public Integrator{ public: @@ -203,4 +246,47 @@ class NPTf : public Integrator{ (protected) }; +class NPTfm : public Integrator{ + +public: + + NPTfm ( SimInfo *theInfo, ForceFields* the_ff); + virtual ~NPTfm() {}; + + virtual void integrateStep( int calcPot, int calcStress ){ + calcStress = 1; + Integrator::integrateStep( calcPot, calcStress ); + } + + 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 void moveA( void ); + virtual void moveB( void ); + + virtual int readyCheck(); + + // chi and eta are the propagated degrees of freedom + + double chi; + double eta[3][3]; + double NkBT; + + // targetTemp, targetPressure, and tauBarostat must be set. + // One of qmass or tauThermostat must be set; + + double targetTemp; + double targetPressure; + double tauThermostat; + double tauBarostat; + + short int have_tau_thermostat, have_tau_barostat, have_target_temp; + short int have_target_pressure; + +}; + #endif