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 843 by mmeineke, Wed Oct 29 20:41:39 2003 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 178 | Line 179 | template<typename T> class NPT : public T{ (protected)
179    virtual void getVelScaleB( double sc[3], int index ) = 0;
180    virtual void getPosScale(double pos[3], double COM[3],
181                             int index, double sc[3]) = 0;
182 +
183 +  virtual void calcVelScale( void ) = 0;
184  
185    virtual bool chiConverged( void );
186    virtual bool etaConverged( void ) = 0;
# Line 256 | Line 259 | template<typename T> class NPTi : public T{ (protected
259    virtual void getPosScale(double pos[3], double COM[3],
260                             int index, double sc[3]);
261  
262 +  virtual void calcVelScale( void );
263 +
264    double eta, oldEta, prevEta;
265 +  double vScale;
266   };
267  
268   template<typename T> class NPTf : public T{
# Line 283 | Line 289 | template<typename T> class NPTf : public T{ (protected
289    virtual void getVelScaleB( double sc[3], int index );
290    virtual void getPosScale(double pos[3], double COM[3],
291                             int index, double sc[3]);
292 +
293 +  virtual void calcVelScale( void );
294  
295    double eta[3][3];
296    double oldEta[3][3];
297    double prevEta[3][3];
298 +  double vScale[3][3];
299   };
300  
301   template<typename T> class NPTxyz : public T{
# Line 314 | Line 323 | template<typename T> class NPTxyz : public T{ (protect
323    virtual void getPosScale(double pos[3], double COM[3],
324                             int index, double sc[3]);
325  
326 +  virtual void calcVelScale( void );
327 +
328    double eta[3][3];
329    double oldEta[3][3];
330    double prevEta[3][3];
331 +  double vScale[3][3];
332   };
333  
334  
# Line 407 | 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 438 | 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;
444 <
453 >  vector<int> indexOfZConsMols;                   //index of local Z-Constraint Molecules
454 >  vector<double> fz;
455 >  vector<double> curZPos;
456  
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 456 | 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 + //Steered Molecular Dynamics
488 + template<typename T> class SMD : public T{
489 +  public:
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   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines