--- trunk/OOPSE/libmdtools/Integrator.hpp 2004/05/20 20:24:07 1180 +++ trunk/OOPSE/libmdtools/Integrator.hpp 2004/06/04 03:15:31 1234 @@ -22,6 +22,7 @@ template class Integrator const int maxIteration = 300; const double tol = 1.0e-6; +class RattleFramework; 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,16 +65,17 @@ 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 + RattleFramework* rattle; - 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 */ @@ -84,7 +86,6 @@ template class Integrator StatWriter* statOut; DumpWriter* dumpOut; - int i; // just an int }; typedef Integrator RealIntegrator; @@ -488,64 +489,7 @@ template class ZConstraint : public T { (p ForceSubtractionPolicy* forcePolicy; //force subtraction policy friend class ForceSubtractionPolicy; - -}; - -/* -template class SingleZConstrain : public T{ - - -}; -*/ - -template class NonEquMD : public T { - public: - - - -}; - -// -template class SingleZConstraint : public T{ - public: - SingleZConstraint(SimInfo *theInfo, ForceFields* the_ff); - ~SingleZConstraint(); - - bool stopIntegrator(); - - protected: - }; -//Steered Molecular Dynamics, curret implement only support one steered molecule - template class SMD : public T{ - public: - SMD( SimInfo *theInfo, ForceFields* the_ff); - ~SMD(); - - virtual void integrate(); - virtual void calcForce( int calcPot, int calcStress ); - bool stopIntegrator(); - private: - -}; - -//By using state pattern, Coordinate Drive is responsible for switching back and forth between -//Driven Molecular Dynamics and ZConstraint Method. -template class CoordinateDriver : public T { - public: - typedef T ParentIntegrator; - - CoordinateDriver(SimInfo*, ForceFields*, BaseIntegrator*, BaseIntegrator*); - ~CoordinateDriver(); - - virtual void integrate(); - - private: - BaseIntegrator* zconsIntegrator; - BaseIntegrator* drivenIntegrator; - -}; - #endif