--- trunk/OOPSE/libmdtools/Integrator.hpp 2004/02/24 15:44:45 1064 +++ trunk/OOPSE/libmdtools/Integrator.hpp 2004/04/12 20:32:20 1097 @@ -4,6 +4,7 @@ #include #include #include "Atom.hpp" +#include "StuntDouble.hpp" #include "Molecule.hpp" #include "SRI.hpp" #include "AbstractClasses.hpp" @@ -20,7 +21,6 @@ const double tol = 1.0e-6; const int maxIteration = 300; const double tol = 1.0e-6; - template class Integrator : public T { public: @@ -45,7 +45,7 @@ template class Integrator virtual void calcForce( int calcPot, int calcStress ); virtual void thermalize(); - virtual void rotationPropagation( DirectionalAtom* dAtom, double ji[3] ); + virtual void rotationPropagation( StuntDouble* sd, double ji[3] ); void checkConstraints( void ); void rotate( int axes1, int axes2, double angle, double j[3], @@ -54,6 +54,7 @@ template class Integrator ForceFields* myFF; SimInfo *info; // all the info we'll ever need + vector integrableObjects; int nAtoms; /* the number of atoms */ int oldAtoms; Atom **atoms; /* array of atom pointers */ @@ -418,7 +419,7 @@ template class ZConstraint : public T { (p void zeroOutVel(); void doZconstraintForce(); - void doHarmonic(); + void doHarmonic(vector& resPos); bool checkZConsState(); bool haveFixedZMols(); @@ -449,12 +450,19 @@ template class ZConstraint : public T { (p vector indexOfAllZConsMols; //index of All Z-Constraint Molecuels - int* indexOfZConsMols; //index of local Z-Constraint Molecules - double* fz; - double* curZPos; + vector indexOfZConsMols; //index of local Z-Constraint Molecules + vector fz; + vector curZPos; - + bool usingSMD; + vector cantPos; + vector cantVel; + double zconsFixTime; + double zconsGap; + bool hasZConsGap; + vector endFixTime; + int whichDirection; //constraint direction private: @@ -467,36 +475,23 @@ template class ZConstraint : public T { (p double calcMovingMolsCOMVel(); double calcSysCOMVel(); double calcTotalForce(); - + void updateZPos(); + void updateCantPos(); + ForceSubtractionPolicy* forcePolicy; //force subtraction policy friend class ForceSubtractionPolicy; }; /* -class OOPSEMinimizerBase : public RealIntegrator { +//Steered Molecular Dynamics + template class SMD : public T{ public: - - OOPSEMinimizerBase ( SimInfo *theInfo, ForceFields* the_ff ); - virtual ~OOPSEMinimizerBase(); - - double calcGradient(vector& x, vector& grad); - void setCoor(vector& x); - vector getCoor(); - void output(vector& x, int iteration); - int getDim() {return dim;} - void constraintMove(); - void shakeF(); - void shakeR(); - protected: - - int dim; - void calcDim(); + SMD( SimInfo *theInfo, ForceFields* the_ff); + ~SMD(); + + virtual void integrate(); + virtual void calcForce( int calcPot, int calcStress ); }; - -//template class OOPSEMinimizer : public OOPSEMinimizerBase, TMinimizer{ -// public: -// void writeOutput(); -//}; -*/ +*/ #endif