175 |
|
|
176 |
|
NPTim ( SimInfo *theInfo, ForceFields* the_ff); |
177 |
|
virtual ~NPTim() {}; |
178 |
+ |
|
179 |
+ |
virtual void integrateStep( int calcPot, int calcStress ){ |
180 |
+ |
calcStress = 1; |
181 |
+ |
T::integrateStep( calcPot, calcStress ); |
182 |
+ |
} |
183 |
+ |
|
184 |
+ |
void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;} |
185 |
+ |
void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;} |
186 |
+ |
void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;} |
187 |
+ |
void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;} |
188 |
+ |
|
189 |
+ |
protected: |
190 |
+ |
|
191 |
+ |
virtual void moveA( void ); |
192 |
+ |
virtual void moveB( void ); |
193 |
+ |
|
194 |
+ |
virtual int readyCheck(); |
195 |
+ |
|
196 |
+ |
virtual void resetIntegrator( void ); |
197 |
+ |
|
198 |
+ |
Molecule* myMolecules; |
199 |
+ |
Atom** myAtoms; |
200 |
+ |
|
201 |
+ |
// chi and eta are the propagated degrees of freedom |
202 |
+ |
|
203 |
+ |
double chi; |
204 |
+ |
double eta; |
205 |
+ |
double NkBT; |
206 |
|
|
207 |
+ |
// targetTemp, targetPressure, and tauBarostat must be set. |
208 |
+ |
// One of qmass or tauThermostat must be set; |
209 |
+ |
|
210 |
+ |
double targetTemp; |
211 |
+ |
double targetPressure; |
212 |
+ |
double tauThermostat; |
213 |
+ |
double tauBarostat; |
214 |
+ |
|
215 |
+ |
short int have_tau_thermostat, have_tau_barostat, have_target_temp; |
216 |
+ |
short int have_target_pressure; |
217 |
+ |
|
218 |
+ |
}; |
219 |
+ |
|
220 |
+ |
template<typename T> class NPTzm : public T{ |
221 |
+ |
|
222 |
+ |
public: |
223 |
+ |
|
224 |
+ |
NPTzm ( SimInfo *theInfo, ForceFields* the_ff); |
225 |
+ |
virtual ~NPTzm() {}; |
226 |
+ |
|
227 |
|
virtual void integrateStep( int calcPot, int calcStress ){ |
228 |
|
calcStress = 1; |
229 |
|
T::integrateStep( calcPot, calcStress ); |
250 |
|
|
251 |
|
double chi; |
252 |
|
double eta; |
253 |
+ |
double etaZ; |
254 |
|
double NkBT; |
255 |
|
|
256 |
|
// targetTemp, targetPressure, and tauBarostat must be set. |
296 |
|
|
297 |
|
double chi; |
298 |
|
double eta[3][3]; |
299 |
+ |
double NkBT; |
300 |
+ |
|
301 |
+ |
// targetTemp, targetPressure, and tauBarostat must be set. |
302 |
+ |
// One of qmass or tauThermostat must be set; |
303 |
+ |
|
304 |
+ |
double targetTemp; |
305 |
+ |
double targetPressure; |
306 |
+ |
double tauThermostat; |
307 |
+ |
double tauBarostat; |
308 |
+ |
|
309 |
+ |
short int have_tau_thermostat, have_tau_barostat, have_target_temp; |
310 |
+ |
short int have_target_pressure; |
311 |
+ |
|
312 |
+ |
}; |
313 |
+ |
|
314 |
+ |
template<typename T> class NPTxym : public T{ |
315 |
+ |
|
316 |
+ |
public: |
317 |
+ |
|
318 |
+ |
NPTxym ( SimInfo *theInfo, ForceFields* the_ff); |
319 |
+ |
virtual ~NPTxym() {}; |
320 |
+ |
|
321 |
+ |
virtual void integrateStep( int calcPot, int calcStress ){ |
322 |
+ |
calcStress = 1; |
323 |
+ |
T::integrateStep( calcPot, calcStress ); |
324 |
+ |
} |
325 |
+ |
|
326 |
+ |
void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;} |
327 |
+ |
void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;} |
328 |
+ |
void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;} |
329 |
+ |
void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;} |
330 |
+ |
|
331 |
+ |
protected: |
332 |
+ |
|
333 |
+ |
virtual void moveA( void ); |
334 |
+ |
virtual void moveB( void ); |
335 |
+ |
|
336 |
+ |
virtual int readyCheck(); |
337 |
+ |
|
338 |
+ |
virtual void resetIntegrator( void ); |
339 |
+ |
|
340 |
+ |
Molecule* myMolecules; |
341 |
+ |
Atom** myAtoms; |
342 |
+ |
|
343 |
+ |
// chi and eta are the propagated degrees of freedom |
344 |
+ |
|
345 |
+ |
double chi; |
346 |
+ |
double eta; |
347 |
+ |
double etaX; |
348 |
+ |
double etaY; |
349 |
|
double NkBT; |
350 |
|
|
351 |
|
// targetTemp, targetPressure, and tauBarostat must be set. |
361 |
|
|
362 |
|
}; |
363 |
|
|
364 |
+ |
|
365 |
|
template<typename T> class NPTfm : public T{ |
366 |
|
|
367 |
|
public: |
475 |
|
}; |
476 |
|
|
477 |
|
class PolicyByNumber : public ForceSubtractionPolicy{ |
478 |
+ |
|
479 |
|
public: |
480 |
|
PolicyByNumber(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {} |
481 |
|
virtual void update(); |
489 |
|
}; |
490 |
|
|
491 |
|
class PolicyByMass : public ForceSubtractionPolicy{ |
492 |
+ |
|
493 |
|
public: |
494 |
|
PolicyByMass(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {} |
495 |
|
|
583 |
|
double calcSysCOMVel(); |
584 |
|
double calcTotalForce(); |
585 |
|
|
586 |
< |
ForceSubtractionPolicy* forcePolicy; //force substration policy |
586 |
> |
ForceSubtractionPolicy* forcePolicy; //force subtraction policy |
587 |
|
friend class ForceSubtractionPolicy; |
588 |
|
|
589 |
|
}; |