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 ); |
84 |
|
StatWriter* statOut; |
85 |
|
DumpWriter* dumpOut; |
86 |
|
|
87 |
+ |
int i; // just an int |
88 |
|
}; |
89 |
|
|
90 |
|
typedef Integrator<BaseIntegrator> RealIntegrator; |
91 |
+ |
|
92 |
+ |
// ansi instantiation |
93 |
+ |
template class Integrator<BaseIntegrator>; |
94 |
|
|
95 |
|
template<typename T> class NVE : public T { |
96 |
|
|
462 |
|
vector<double> curZPos; |
463 |
|
|
464 |
|
bool usingSMD; |
465 |
+ |
vector<double> prevCantPos; |
466 |
|
vector<double> cantPos; |
467 |
|
vector<double> cantVel; |
468 |
|
|
492 |
|
}; |
493 |
|
|
494 |
|
/* |
495 |
< |
//Steered Molecular Dynamics |
495 |
> |
template<typename T> class SingleZConstrain : public T{ |
496 |
> |
|
497 |
> |
|
498 |
> |
}; |
499 |
> |
*/ |
500 |
> |
|
501 |
> |
template<typename T> class NonEquMD : public T { |
502 |
> |
public: |
503 |
> |
|
504 |
> |
|
505 |
> |
|
506 |
> |
}; |
507 |
> |
|
508 |
> |
|
509 |
> |
// |
510 |
> |
template<typename T> class SingleZConstraint : public T{ |
511 |
> |
public: |
512 |
> |
SingleZConstraint(SimInfo *theInfo, ForceFields* the_ff); |
513 |
> |
~SingleZConstraint(); |
514 |
> |
|
515 |
> |
bool stopIntegrator(); |
516 |
> |
|
517 |
> |
protected: |
518 |
> |
|
519 |
> |
}; |
520 |
> |
|
521 |
> |
//Steered Molecular Dynamics, curret implement only support one steered molecule |
522 |
|
template<typename T> class SMD : public T{ |
523 |
|
public: |
524 |
|
SMD( SimInfo *theInfo, ForceFields* the_ff); |
525 |
|
~SMD(); |
526 |
|
|
527 |
< |
virtual void integrate(); |
528 |
< |
virtual void calcForce( int calcPot, int calcStress ); |
527 |
> |
virtual void integrate(); |
528 |
> |
virtual void calcForce( int calcPot, int calcStress ); |
529 |
> |
bool stopIntegrator(); |
530 |
> |
private: |
531 |
> |
|
532 |
|
}; |
533 |
< |
*/ |
533 |
> |
|
534 |
> |
//By using state pattern, Coordinate Drive is responsible for switching back and forth between |
535 |
> |
//Driven Molecular Dynamics and ZConstraint Method. |
536 |
> |
template<typename T> class CoordinateDriver : public T { |
537 |
> |
public: |
538 |
> |
typedef T ParentIntegrator; |
539 |
> |
|
540 |
> |
CoordinateDriver(SimInfo*, ForceFields*, BaseIntegrator*, BaseIntegrator*); |
541 |
> |
~CoordinateDriver(); |
542 |
> |
|
543 |
> |
virtual void integrate(); |
544 |
> |
|
545 |
> |
private: |
546 |
> |
BaseIntegrator* zconsIntegrator; |
547 |
> |
BaseIntegrator* drivenIntegrator; |
548 |
> |
|
549 |
> |
}; |
550 |
> |
|
551 |
|
#endif |