--- trunk/OOPSE/libmdtools/Integrator.hpp 2003/05/30 21:31:48 542 +++ trunk/OOPSE/libmdtools/Integrator.hpp 2003/06/19 22:02:44 559 @@ -12,8 +12,8 @@ class Integrator : public BaseIntegrator { (public) class Integrator : public BaseIntegrator { public: - Symplectic( SimInfo &theInfo, ForceFields* the_ff ); - virtual ~Symplectic(); + Integrator( SimInfo &theInfo, ForceFields* the_ff ); + virtual ~Integrator(); void integrate( void ); @@ -21,12 +21,13 @@ class Integrator : public BaseIntegrator { (public) virtual void integrateStep( int calcPot, int calcStress ); + virtual void preMove( void ); virtual void moveA( void ); virtual void moveB( void ); virtual void constrainA( void ); virtual void constrainB( void ); + virtual int readyCheck( void ) { return 1; } - void checkConstraints( void ); void rotate( int axes1, int axes2, double angle, double j[3], double A[3][3] ); @@ -36,22 +37,31 @@ class Integrator : public BaseIntegrator { (public) SimInfo *info; // all the info we'll ever need int nAtoms; /* the number of atoms */ + int oldAtoms; Atom **atoms; /* array of atom pointers */ Molecule* molecules; int nMols; - int isConstrained; /*boolean to know whether the systems contains - constraints. */ - int nConstrained; /*counter for number of constraints */ - int *constrainedI; /* the i of a constraint pair */ - int *constrainedJ; /* the j of a constraint pair */ - double *constrainedDsqr; /* the square of the constraint distance */ + 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* prePos; // pre constrained positions + short isFirst; /*boolean for the first time integrate is called */ double dt; double dt2; const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2 + const int maxIteration = 300; + const double tol = 1.0e-6; + double* pos; double* vel; @@ -67,10 +77,20 @@ class Integrator : public BaseIntegrator { (public) }; +class NVE : public Integrator{ + NVE ( void ): + Integrator( theInfo, the_ff ){} + virtual ~NVE(){} + + + +}; + class NVT : public Integrator{ - NVT ( void ); + NVT ( SimInfo &theInfo, ForceFields* the_ff ) : + Integrator( theInfo, the_ff ); virtual ~NVT(); protected: