--- trunk/OOPSE/libmdtools/Integrator.hpp 2003/09/29 21:16:11 790 +++ trunk/OOPSE/libmdtools/Integrator.hpp 2003/10/22 21:17:32 812 @@ -253,61 +253,41 @@ template class NPTzm : public T{ double eta, oldEta, prevEta; }; -template class NPTzm : public T{ +template class NPTf : public T{ public: - NPTzm ( SimInfo *theInfo, ForceFields* the_ff); - virtual ~NPTzm() {}; - - virtual void integrateStep( int calcPot, int calcStress ){ - calcStress = 1; - T::integrateStep( calcPot, calcStress ); - } + NPTf ( SimInfo *theInfo, ForceFields* the_ff); + virtual ~NPTf(); - 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;} + virtual double getConservedQuantity(void); + virtual void resetIntegrator(void); protected: - virtual void moveA( void ); - virtual void moveB( void ); + virtual void evolveEtaA(void); + virtual void evolveEtaB(void); - virtual int readyCheck(); + virtual bool etaConverged( void ); - virtual void resetIntegrator( void ); + virtual void scaleSimBox( void ); - Molecule* myMolecules; - Atom** myAtoms; + virtual void getVelScaleA( double sc[3], double vel[3] ); + virtual void getVelScaleB( double sc[3], int index ); + virtual void getPosScale(double pos[3], double COM[3], + int index, double sc[3]); - // chi and eta are the propagated degrees of freedom - - double chi; - double eta; - double etaZ; - 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; - + double eta[3][3]; + double oldEta[3][3]; + double prevEta[3][3]; }; -template class NPTf : public T{ +template class NPTxyz : public T{ public: - NPTf ( SimInfo *theInfo, ForceFields* the_ff); - virtual ~NPTf(); + NPTxyz ( SimInfo *theInfo, ForceFields* the_ff); + virtual ~NPTxyz(); virtual double getConservedQuantity(void); virtual void resetIntegrator(void); @@ -331,56 +311,7 @@ template class NPTxym : public T{ double prevEta[3][3]; }; -template class NPTxym : public T{ -public: - - NPTxym ( SimInfo *theInfo, ForceFields* the_ff); - virtual ~NPTxym() {}; - - virtual void integrateStep( int calcPot, int calcStress ){ - calcStress = 1; - T::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(); - - virtual void resetIntegrator( void ); - - Molecule* myMolecules; - Atom** myAtoms; - - // chi and eta are the propagated degrees of freedom - - double chi; - double eta; - double etaX; - double etaY; - 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; - -}; - template class ZConstraint : public T { public: