| 39 |
|
virtual void constrainB( void ); |
| 40 |
|
virtual int readyCheck( void ) { return 1; } |
| 41 |
|
|
| 42 |
+ |
virtual void resetIntegrator( void ) { } |
| 43 |
+ |
|
| 44 |
|
virtual void calcForce( int calcPot, int calcStress ); |
| 45 |
|
virtual void thermalize(); |
| 46 |
|
|
| 107 |
|
|
| 108 |
|
virtual int readyCheck(); |
| 109 |
|
|
| 110 |
+ |
virtual void resetIntegrator( void ); |
| 111 |
+ |
|
| 112 |
|
// chi is a propagated degree of freedom. |
| 113 |
|
|
| 114 |
|
double chi; |
| 148 |
|
|
| 149 |
|
virtual int readyCheck(); |
| 150 |
|
|
| 151 |
+ |
virtual void resetIntegrator( void ); |
| 152 |
+ |
|
| 153 |
|
// chi and eta are the propagated degrees of freedom |
| 154 |
|
|
| 155 |
|
double chi; |
| 193 |
|
|
| 194 |
|
virtual int readyCheck(); |
| 195 |
|
|
| 196 |
+ |
virtual void resetIntegrator( void ); |
| 197 |
+ |
|
| 198 |
|
Molecule* myMolecules; |
| 199 |
|
Atom** myAtoms; |
| 200 |
|
|
| 238 |
|
|
| 239 |
|
virtual void moveA( void ); |
| 240 |
|
virtual void moveB( void ); |
| 241 |
+ |
|
| 242 |
+ |
virtual void resetIntegrator( void ); |
| 243 |
|
|
| 244 |
|
virtual int readyCheck(); |
| 245 |
|
|
| 284 |
|
virtual void moveA( void ); |
| 285 |
|
virtual void moveB( void ); |
| 286 |
|
|
| 287 |
+ |
virtual void resetIntegrator( void ); |
| 288 |
+ |
|
| 289 |
|
virtual int readyCheck(); |
| 290 |
|
|
| 291 |
|
Molecule* myMolecules; |
| 309 |
|
short int have_target_pressure; |
| 310 |
|
|
| 311 |
|
}; |
| 312 |
+ |
|
| 313 |
+ |
|
| 314 |
+ |
template<typename T> class NPTpr : public T{ |
| 315 |
+ |
|
| 316 |
+ |
public: |
| 317 |
+ |
|
| 318 |
+ |
NPTpr ( SimInfo *theInfo, ForceFields* the_ff); |
| 319 |
+ |
virtual ~NPTpr() {}; |
| 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 |
+ |
// chi and eta are the propagated degrees of freedom |
| 341 |
+ |
|
| 342 |
+ |
double chi; |
| 343 |
+ |
double eta[3][3]; |
| 344 |
+ |
double NkBT; |
| 345 |
+ |
|
| 346 |
+ |
// targetTemp, targetPressure, and tauBarostat must be set. |
| 347 |
+ |
// One of qmass or tauThermostat must be set; |
| 348 |
+ |
|
| 349 |
+ |
double targetTemp; |
| 350 |
+ |
double targetPressure; |
| 351 |
+ |
double tauThermostat; |
| 352 |
+ |
double tauBarostat; |
| 353 |
+ |
|
| 354 |
+ |
short int have_tau_thermostat, have_tau_barostat, have_target_temp; |
| 355 |
+ |
short int have_target_pressure; |
| 356 |
+ |
|
| 357 |
+ |
}; |
| 358 |
+ |
|
| 359 |
+ |
|
| 360 |
|
template<typename T> class ZConstraint : public T { |
| 361 |
|
|
| 362 |
|
public: |
| 363 |
< |
class ForceSubstractionPolicy{ |
| 363 |
> |
class ForceSubtractionPolicy{ |
| 364 |
|
public: |
| 365 |
< |
ForceSubstractionPolicy(ZConstraint<T>* integrator) {zconsIntegrator = integrator;} |
| 365 |
> |
ForceSubtractionPolicy(ZConstraint<T>* integrator) {zconsIntegrator = integrator;} |
| 366 |
|
|
| 367 |
|
virtual void update() = 0; |
| 368 |
|
virtual double getZFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) = 0; |
| 374 |
|
ZConstraint<T>* zconsIntegrator;; |
| 375 |
|
}; |
| 376 |
|
|
| 377 |
< |
class PolicyByNumber : ForceSubstractionPolicy{ |
| 377 |
> |
class PolicyByNumber : public ForceSubtractionPolicy{ |
| 378 |
|
public: |
| 379 |
< |
PolicyByNumber(ZConstraint<T>* integrator) :ForceSubstractionPolicy(integrator) {} |
| 379 |
> |
PolicyByNumber(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {} |
| 380 |
|
virtual void update(); |
| 381 |
|
virtual double getZFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) ; |
| 382 |
|
virtual double getZFOfMovingMols(Atom* atom, double totalForce) ; |
| 387 |
|
int totNumOfMovingAtoms; |
| 388 |
|
}; |
| 389 |
|
|
| 390 |
< |
class PolicyByMass :ForceSubstractionPolicy{ |
| 390 |
> |
class PolicyByMass : public ForceSubtractionPolicy{ |
| 391 |
|
public: |
| 392 |
< |
PolicyByMass(ZConstraint<T>* integrator) :ForceSubstractionPolicy(integrator) {} |
| 392 |
> |
PolicyByMass(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {} |
| 393 |
|
|
| 394 |
|
virtual void update(); |
| 395 |
|
virtual double getZFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) ; |
| 481 |
|
double calcSysCOMVel(); |
| 482 |
|
double calcTotalForce(); |
| 483 |
|
|
| 484 |
< |
ForceSubstractionPolicy* forcePolicy; //force substration policy |
| 485 |
< |
friend class ForceSubstractionPolicy; |
| 484 |
> |
ForceSubtractionPolicy* forcePolicy; //force substration policy |
| 485 |
> |
friend class ForceSubtractionPolicy; |
| 486 |
|
|
| 487 |
|
}; |
| 488 |
|
|