| 18 |  |  | 
| 19 |  |  | 
| 20 |  | protected: | 
| 21 | – |  | 
| 21 |  |  | 
| 22 |  | virtual void integrateStep( int calcPot, int calcStress ); | 
| 23 |  | virtual void preMove( void ); | 
| 56 |  |  | 
| 57 |  | double dt; | 
| 58 |  | double dt2; | 
| 60 | – | const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2 | 
| 59 |  |  | 
| 60 | + | const double kB = 8.31451e-7;     // boltzmann constant in amu*Ang^2*fs^-2/K | 
| 61 | + | const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2 | 
| 62 |  | const int maxIteration = 300; | 
| 63 |  | const double tol = 1.0e-6; | 
| 64 | – |  | 
| 64 |  |  | 
| 65 |  | double* pos; | 
| 66 |  | double* vel; | 
| 67 |  | double* frc; | 
| 68 |  | double* trq; | 
| 69 |  | double* Amat; | 
| 71 | – |  | 
| 70 |  |  | 
| 73 | – |  | 
| 71 |  | Thermo *tStats; | 
| 72 |  | StatWriter*  statOut; | 
| 73 |  | DumpWriter*  dumpOut; | 
| 86 |  |  | 
| 87 |  | class NVT : public Integrator{ | 
| 88 |  |  | 
| 89 | < | NVT ( SimInfo &theInfo, ForceFields* the_ff ) : | 
| 89 | > | public: | 
| 90 | > |  | 
| 91 | > | NVT ( SimInfo &theInfo, ForceFields* the_ff) : | 
| 92 |  | Integrator( theInfo, the_ff ); | 
| 93 |  | virtual ~NVT(); | 
| 94 |  |  | 
| 95 | + | void setQmass(double q) {qmass = q; have_qmass = 1;} | 
| 96 | + | void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;} | 
| 97 | + | void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;} | 
| 98 | + |  | 
| 99 |  | protected: | 
| 100 | + |  | 
| 101 |  | virtual moveA( void ); | 
| 102 |  | virtual moveB( void ); | 
| 103 |  |  | 
| 104 | + | int readyCheck(); | 
| 105 | + |  | 
| 106 | + | Atom** atoms; | 
| 107 | + |  | 
| 108 | + | // zeta is a propagated degree of freedom. | 
| 109 | + |  | 
| 110 | + | double zeta; | 
| 111 | + |  | 
| 112 | + | // targetTemp must be set.  One of qmass or tauThermostat must be set; | 
| 113 | + |  | 
| 114 | + | double qmass; | 
| 115 | + | double targetTemp; | 
| 116 | + | double tauThermostat; | 
| 117 | + |  | 
| 118 | + | short int have_tau_thermostat, have_target_temp, have_qmass; | 
| 119 | + |  | 
| 120 |  | }; | 
| 121 |  |  | 
| 102 | – |  | 
| 122 |  |  | 
| 123 | + | class NPT : public Integrator{ | 
| 124 |  |  | 
| 125 | + | public: | 
| 126 | + |  | 
| 127 | + | NPT ( SimInfo &theInfo, ForceFields* the_ff) : | 
| 128 | + | Integrator( theInfo, the_ff ); | 
| 129 | + | virtual ~NPT(); | 
| 130 | + |  | 
| 131 | + | void setQmass(double q) {qmass = q; have_qmass = 1;} | 
| 132 | + | void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;} | 
| 133 | + | void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;} | 
| 134 | + | void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;} | 
| 135 | + | void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;} | 
| 136 | + |  | 
| 137 | + | protected: | 
| 138 | + |  | 
| 139 | + | virtual moveA( void ); | 
| 140 | + | virtual moveB( void ); | 
| 141 | + |  | 
| 142 | + | int readyCheck(); | 
| 143 | + |  | 
| 144 | + | Atom** atoms; | 
| 145 | + |  | 
| 146 | + | // zeta and epsilonDot are the propagated degrees of freedom. | 
| 147 | + |  | 
| 148 | + | double zeta; | 
| 149 | + | double epsilonDot; | 
| 150 | + |  | 
| 151 | + | // targetTemp, targetPressure, and tauBarostat must be set. | 
| 152 | + | // One of qmass or tauThermostat must be set; | 
| 153 | + |  | 
| 154 | + | double qmass; | 
| 155 | + | double targetTemp; | 
| 156 | + | double targetPressure; | 
| 157 | + | double tauThermostat; | 
| 158 | + | double tauBarostat; | 
| 159 | + |  | 
| 160 | + | short int have_tau_thermostat, have_tau_barostat, have_target_temp; | 
| 161 | + | short int have_target_pressure, have_qmass; | 
| 162 | + |  | 
| 163 | + | }; | 
| 164 | + |  | 
| 165 |  | #endif |