| 366 |  | double eta; | 
| 367 |  | double etaX; | 
| 368 |  | double etaY; | 
| 369 | – | double NkBT; | 
| 370 | – |  | 
| 371 | – | // targetTemp, targetPressure, and tauBarostat must be set. | 
| 372 | – | // One of qmass or tauThermostat must be set; | 
| 373 | – |  | 
| 374 | – | double targetTemp; | 
| 375 | – | double targetPressure; | 
| 376 | – | double tauThermostat; | 
| 377 | – | double tauBarostat; | 
| 378 | – |  | 
| 379 | – | short int have_tau_thermostat, have_tau_barostat, have_target_temp; | 
| 380 | – | short int have_target_pressure; | 
| 381 | – |  | 
| 382 | – | }; | 
| 383 | – |  | 
| 384 | – |  | 
| 385 | – | template<typename T> class NPTfm : public T{ | 
| 386 | – |  | 
| 387 | – | public: | 
| 388 | – |  | 
| 389 | – | NPTfm ( SimInfo *theInfo, ForceFields* the_ff); | 
| 390 | – | virtual ~NPTfm() {}; | 
| 391 | – |  | 
| 392 | – | virtual void integrateStep( int calcPot, int calcStress ){ | 
| 393 | – | calcStress = 1; | 
| 394 | – | T::integrateStep( calcPot, calcStress ); | 
| 395 | – | accIntegralOfChidt(); | 
| 396 | – | } | 
| 397 | – |  | 
| 398 | – | virtual double getConservedQuantity(void); | 
| 399 | – |  | 
| 400 | – | void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;} | 
| 401 | – | void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;} | 
| 402 | – | void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;} | 
| 403 | – | void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;} | 
| 404 | – | void setChiTolerance(double tol) {chiTolerance = tol;} | 
| 405 | – | void setPosIterTolerance(double tol) {posIterTolerance = tol;} | 
| 406 | – |  | 
| 407 | – | protected: | 
| 408 | – |  | 
| 409 | – | virtual void  moveA( void ); | 
| 410 | – | virtual void moveB( void ); | 
| 411 | – |  | 
| 412 | – | virtual void resetIntegrator( void ); | 
| 413 | – |  | 
| 414 | – | virtual int readyCheck(); | 
| 415 | – |  | 
| 416 | – | void accIntegralOfChidt(void) { integralOfChidt += dt * chi;} | 
| 417 | – |  | 
| 418 | – | Molecule* myMolecules; | 
| 419 | – | Atom** myAtoms; | 
| 420 | – |  | 
| 421 | – | // chi and eta are the propagated degrees of freedom | 
| 422 | – |  | 
| 423 | – | double chi; | 
| 424 | – | double eta[3][3]; | 
| 425 | – | double NkBT; | 
| 426 | – | double integralOfChidt; | 
| 427 | – |  | 
| 428 | – | // targetTemp, targetPressure, and tauBarostat must be set. | 
| 429 | – | // One of qmass or tauThermostat must be set; | 
| 430 | – |  | 
| 431 | – | double targetTemp; | 
| 432 | – | double targetPressure; | 
| 433 | – | double tauThermostat; | 
| 434 | – | double tauBarostat; | 
| 435 | – |  | 
| 436 | – | short int have_tau_thermostat, have_tau_barostat, have_target_temp; | 
| 437 | – | short int have_target_pressure; | 
| 438 | – | double chiTolerance; | 
| 439 | – | short int have_chi_tolerance; | 
| 440 | – | double posIterTolerance; | 
| 441 | – | short int have_pos_iter_tolerance; | 
| 442 | – |  | 
| 443 | – | }; | 
| 444 | – |  | 
| 445 | – |  | 
| 446 | – | template<typename T> class NPTpr : public T{ | 
| 447 | – |  | 
| 448 | – | public: | 
| 449 | – |  | 
| 450 | – | NPTpr ( SimInfo *theInfo, ForceFields* the_ff); | 
| 451 | – | virtual ~NPTpr() {}; | 
| 452 | – |  | 
| 453 | – | virtual void integrateStep( int calcPot, int calcStress ){ | 
| 454 | – | calcStress = 1; | 
| 455 | – | T::integrateStep( calcPot, calcStress ); | 
| 456 | – | } | 
| 457 | – |  | 
| 458 | – | void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;} | 
| 459 | – | void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;} | 
| 460 | – | void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;} | 
| 461 | – | void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;} | 
| 462 | – | void setChiTolerance(double tol) {chiTolerance = tol;} | 
| 463 | – | void setPosIterTolerance(double tol) {posIterTolerance = tol;} | 
| 464 | – |  | 
| 465 | – | protected: | 
| 466 | – |  | 
| 467 | – | virtual void  moveA( void ); | 
| 468 | – | virtual void moveB( void ); | 
| 469 | – |  | 
| 470 | – | virtual int readyCheck(); | 
| 471 | – |  | 
| 472 | – | virtual void resetIntegrator( void ); | 
| 473 | – |  | 
| 474 | – | // chi and eta are the propagated degrees of freedom | 
| 475 | – |  | 
| 476 | – | double chi; | 
| 477 | – | double eta[3][3]; | 
| 369 |  | double NkBT; | 
| 370 |  |  | 
| 371 |  | // targetTemp, targetPressure, and tauBarostat must be set. | 
| 378 |  |  | 
| 379 |  | short int have_tau_thermostat, have_tau_barostat, have_target_temp; | 
| 380 |  | short int have_target_pressure; | 
| 490 | – | double chiTolerance; | 
| 491 | – | short int have_chi_tolerance; | 
| 492 | – | double posIterTolerance; | 
| 493 | – | short int have_pos_iter_tolerance; | 
| 381 |  |  | 
| 382 |  | }; | 
| 383 |  |  | 
| 497 | – |  | 
| 384 |  | template<typename T> class ZConstraint : public T { | 
| 385 |  |  | 
| 386 |  | public: |