ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Integrator.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/Integrator.hpp (file contents):
Revision 1064 by tim, Tue Feb 24 15:44:45 2004 UTC vs.
Revision 1097 by gezelter, Mon Apr 12 20:32:20 2004 UTC

# Line 4 | Line 4
4   #include <string>
5   #include <vector>
6   #include "Atom.hpp"
7 + #include "StuntDouble.hpp"
8   #include "Molecule.hpp"
9   #include "SRI.hpp"
10   #include "AbstractClasses.hpp"
# Line 20 | Line 21 | const double tol = 1.0e-6;
21   const int maxIteration = 300;
22   const double tol = 1.0e-6;
23  
23
24   template<typename T = BaseIntegrator> class Integrator : public T {
25  
26   public:
# Line 45 | Line 45 | template<typename T = BaseIntegrator> class Integrator
45    virtual void calcForce( int calcPot, int calcStress );
46    virtual void thermalize();
47  
48 <  virtual void rotationPropagation( DirectionalAtom* dAtom, double ji[3] );
48 >  virtual void rotationPropagation( StuntDouble* sd, double ji[3] );
49  
50    void checkConstraints( void );
51    void rotate( int axes1, int axes2, double angle, double j[3],
# Line 54 | Line 54 | template<typename T = BaseIntegrator> class Integrator
54    ForceFields* myFF;
55  
56    SimInfo *info; // all the info we'll ever need
57 +  vector<StuntDouble*> integrableObjects;
58    int nAtoms;  /* the number of atoms */
59    int oldAtoms;
60    Atom **atoms; /* array of atom pointers */
# Line 418 | Line 419 | template<typename T> class ZConstraint : public T { (p
419  
420    void zeroOutVel();
421    void doZconstraintForce();
422 <  void doHarmonic();
422 >  void doHarmonic(vector<double>& resPos);
423    bool checkZConsState();
424  
425    bool haveFixedZMols();
# Line 449 | Line 450 | template<typename T> class ZConstraint : public T { (p
450  
451    vector<int> indexOfAllZConsMols;     //index of All Z-Constraint Molecuels
452  
453 <  int* indexOfZConsMols;                   //index of local Z-Constraint Molecules
454 <  double* fz;
455 <  double* curZPos;
453 >  vector<int> indexOfZConsMols;                   //index of local Z-Constraint Molecules
454 >  vector<double> fz;
455 >  vector<double> curZPos;
456  
457 <
457 >  bool usingSMD;
458 >  vector<double> cantPos;
459 >  vector<double> cantVel;
460  
461 +  double zconsFixTime;  
462 +  double zconsGap;
463 +  bool hasZConsGap;
464 +  vector<double> endFixTime;
465 +  
466    int whichDirection;                           //constraint direction
467  
468   private:
# Line 467 | Line 475 | template<typename T> class ZConstraint : public T { (p
475    double calcMovingMolsCOMVel();
476    double calcSysCOMVel();
477    double calcTotalForce();
478 <
478 >  void updateZPos();
479 >  void updateCantPos();
480 >  
481    ForceSubtractionPolicy* forcePolicy; //force subtraction policy
482    friend class ForceSubtractionPolicy;
483  
484   };
485  
486   /*
487 < class OOPSEMinimizerBase : public RealIntegrator {
487 > //Steered Molecular Dynamics
488 > template<typename T> class SMD : public T{
489    public:
490 <
491 <    OOPSEMinimizerBase ( SimInfo *theInfo, ForceFields* the_ff );
492 <    virtual ~OOPSEMinimizerBase();
493 <    
494 <    double calcGradient(vector<double>& x, vector<double>& grad);
484 <    void setCoor(vector<double>& x);
485 <    vector<double> getCoor();
486 <    void output(vector<double>& x, int iteration);
487 <    int getDim() {return dim;}
488 <    void constraintMove();
489 <    void shakeF();
490 <    void shakeR();
491 <  protected:
492 <    
493 <    int dim;
494 <    void calcDim();
490 >    SMD( SimInfo *theInfo, ForceFields* the_ff);
491 >    ~SMD();
492 >  
493 >   virtual void integrate();
494 >  virtual void calcForce( int calcPot, int calcStress );  
495   };
496 <
497 < //template<typename TMinimizer> class OOPSEMinimizer : public OOPSEMinimizerBase, TMinimizer{
498 < //  public:
499 < //    void writeOutput();
500 < //};
501 < */  
496 > */
497   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines