13 |
|
#include "Thermo.hpp" |
14 |
|
#include "ReadWrite.hpp" |
15 |
|
#include "ZConsWriter.hpp" |
16 |
+ |
#include "Restraints.hpp" |
17 |
|
|
18 |
|
using namespace std; |
19 |
|
const double kB = 8.31451e-7;// boltzmann constant amu*Ang^2*fs^-2/K |
46 |
|
virtual void calcForce( int calcPot, int calcStress ); |
47 |
|
virtual void thermalize(); |
48 |
|
|
49 |
+ |
virtual bool stopIntegrator() {return false;} |
50 |
+ |
|
51 |
|
virtual void rotationPropagation( StuntDouble* sd, double ji[3] ); |
52 |
|
|
53 |
|
void checkConstraints( void ); |
88 |
|
|
89 |
|
typedef Integrator<BaseIntegrator> RealIntegrator; |
90 |
|
|
91 |
+ |
// ansi instantiation |
92 |
+ |
template class Integrator<BaseIntegrator>; |
93 |
+ |
|
94 |
|
template<typename T> class NVE : public T { |
95 |
|
|
96 |
|
public: |
461 |
|
vector<double> curZPos; |
462 |
|
|
463 |
|
bool usingSMD; |
464 |
+ |
vector<double> prevCantPos; |
465 |
|
vector<double> cantPos; |
466 |
|
vector<double> cantVel; |
467 |
|
|
491 |
|
}; |
492 |
|
|
493 |
|
/* |
494 |
< |
//Steered Molecular Dynamics |
494 |
> |
template<typename T> class SingleZConstrain : public T{ |
495 |
> |
|
496 |
> |
|
497 |
> |
}; |
498 |
> |
*/ |
499 |
> |
|
500 |
> |
template<typename T> class NonEquMD : public T { |
501 |
> |
public: |
502 |
> |
|
503 |
> |
|
504 |
> |
|
505 |
> |
}; |
506 |
> |
|
507 |
> |
|
508 |
> |
// |
509 |
> |
template<typename T> class SingleZConstraint : public T{ |
510 |
> |
public: |
511 |
> |
SingleZConstraint(SimInfo *theInfo, ForceFields* the_ff); |
512 |
> |
~SingleZConstraint(); |
513 |
> |
|
514 |
> |
bool stopIntegrator(); |
515 |
> |
|
516 |
> |
protected: |
517 |
> |
|
518 |
> |
}; |
519 |
> |
|
520 |
> |
//Steered Molecular Dynamics, curret implement only support one steered molecule |
521 |
|
template<typename T> class SMD : public T{ |
522 |
|
public: |
523 |
|
SMD( SimInfo *theInfo, ForceFields* the_ff); |
524 |
|
~SMD(); |
525 |
|
|
526 |
< |
virtual void integrate(); |
527 |
< |
virtual void calcForce( int calcPot, int calcStress ); |
526 |
> |
virtual void integrate(); |
527 |
> |
virtual void calcForce( int calcPot, int calcStress ); |
528 |
> |
bool stopIntegrator(); |
529 |
> |
private: |
530 |
> |
|
531 |
|
}; |
532 |
< |
*/ |
532 |
> |
|
533 |
> |
//By using state pattern, Coordinate Drive is responsible for switching back and forth between |
534 |
> |
//Driven Molecular Dynamics and ZConstraint Method. |
535 |
> |
template<typename T> class CoordinateDriver : public T { |
536 |
> |
public: |
537 |
> |
typedef T ParentIntegrator; |
538 |
> |
|
539 |
> |
CoordinateDriver(SimInfo*, ForceFields*, BaseIntegrator*, BaseIntegrator*); |
540 |
> |
~CoordinateDriver(); |
541 |
> |
|
542 |
> |
virtual void integrate(); |
543 |
> |
|
544 |
> |
private: |
545 |
> |
BaseIntegrator* zconsIntegrator; |
546 |
> |
BaseIntegrator* drivenIntegrator; |
547 |
> |
|
548 |
> |
}; |
549 |
> |
|
550 |
|
#endif |