--- trunk/OOPSE/libmdtools/Integrator.hpp 2004/05/27 00:48:12 1198 +++ trunk/OOPSE/libmdtools/Integrator.hpp 2004/07/14 20:11:29 1323 @@ -22,6 +22,7 @@ template class Integrator const int maxIteration = 300; const double tol = 1.0e-6; +class VelVerletConsFramework; template class Integrator : public T { public: @@ -34,11 +35,11 @@ template class Integrator protected: virtual void integrateStep( int calcPot, int calcStress ); - virtual void preMove( void ); + //virtual void preMove( void ); virtual void moveA( void ); virtual void moveB( void ); - virtual void constrainA( void ); - virtual void constrainB( void ); + //virtual void constrainA( void ); + //virtual void constrainB( void ); virtual int readyCheck( void ) { return 1; } virtual void resetIntegrator( void ) { } @@ -50,7 +51,7 @@ template class Integrator virtual void rotationPropagation( StuntDouble* sd, double ji[3] ); - void checkConstraints( void ); + //void checkConstraints( void ); void rotate( int axes1, int axes2, double angle, double j[3], double A[3][3] ); @@ -64,17 +65,18 @@ template class Integrator Molecule* molecules; int nMols; - int isConstrained; // boolean to know whether the systems contains - // constraints. - int nConstrained; // counter for number of constraints - int *constrainedA; // the i of a constraint pair - int *constrainedB; // the j of a constraint pair - double *constrainedDsqr; // the square of the constraint distance + VelVerletConsFramework* consFramework; - int* moving; // tells whether we are moving atom i - int* moved; // tells whether we have moved atom i - double* oldPos; // pre constrained positions + //int isConstrained; // boolean to know whether the systems contains constraints. + //int nConstrained; // counter for number of constraints + //int *constrainedA; // the i of a constraint pair + //int *constrainedB; // the j of a constraint pair + //double *constrainedDsqr; // the square of the constraint distance + //int* moving; // tells whether we are moving atom i + //int* moved; // tells whether we have moved atom i + //double* oldPos; // pre constrained positions + short isFirst; /*boolean for the first time integrate is called */ double dt; @@ -89,7 +91,7 @@ template class Integrator; typedef Integrator RealIntegrator; // ansi instantiation -template class Integrator; +// template class Integrator; template class NVE : public T { @@ -490,4 +492,19 @@ template class ZConstraint : public T { (p }; + +//Sympletic quaternion Scheme Integrator +//Reference: +// T.F. Miller, M. Eleftheriou, P. Pattnaik, A. Ndirango, D. Newns and G.J. Martyna +//Symplectic quaternion Scheme for biophysical molecular dynamics +//116(20), 8649, J. Chem. Phys. (2002) +template class SQSIntegrator : public T{ + public: + virtual void moveA(); + virtual void moveB(); + protected: + void freeRotor(); + void rotate(int k, double dt); + +}; #endif