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

Comparing:
branches/mmeineke/OOPSE/libmdtools/Integrator.hpp (file contents), Revision 377 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
trunk/OOPSE/libmdtools/Integrator.hpp (file contents), Revision 559 by mmeineke, Thu Jun 19 22:02:44 2003 UTC

# Line 6 | Line 6
6   #include "AbstractClasses.hpp"
7   #include "SimInfo.hpp"
8   #include "ForceFields.hpp"
9 + #include "Thermo.hpp"
10 + #include "ReadWrite.hpp"
11  
12 < class Verlet : public Integrator {
12 > class Integrator : public BaseIntegrator {
13  
14   public:
15 <  Verlet( SimInfo &info, ForceFields* the_ff );
16 <  ~Verlet();
15 >  Integrator( SimInfo &theInfo, ForceFields* the_ff );
16 >  virtual ~Integrator();
17    void integrate( void );
18  
19 < private:
19 >
20 > protected:
21 >
22    
23 <  void move_a( double dt );
24 <  void move_b( double dt );
23 >  virtual void integrateStep( int calcPot, int calcStress );
24 >  virtual void preMove( void );
25 >  virtual void moveA( void );
26 >  virtual void moveB( void );
27 >  virtual void constrainA( void );
28 >  virtual void constrainB( void );
29 >  virtual int  readyCheck( void ) { return 1; }
30 >  
31 >  void checkConstraints( void );
32 >  void rotate( int axes1, int axes2, double angle, double j[3],
33 >               double A[3][3] );
34  
35 +
36    ForceFields* myFF;
37  
38 <  SimInfo *entry_plug; // all the info we'll ever need
39 <  int c_natoms;  /* the number of atoms */
40 <  Atom **c_atoms; /* array of atom pointers */
41 <  SRI **c_sr_interactions; /* array of SRI pointers */
42 <  int c_n_SRI; /* the number of short range interactions */
38 >  SimInfo *info; // all the info we'll ever need
39 >  int nAtoms;  /* the number of atoms */
40 >  int oldAtoms;
41 >  Atom **atoms; /* array of atom pointers */
42 >  Molecule* molecules;
43 >  int nMols;
44  
45 <  int c_is_constrained; /*boolean to know whether the systems contains
46 <                          constraints. */
47 <  int c_n_constrained; /*counter for number of constraints */
48 <  int *c_constrained_i; /* the i of a constraint pair */
49 <  int *c_constrained_j; /* the j of a constraint pair */
50 <  double *c_constrained_dsqr; /* the square of the constraint distance */
51 <  double *c_mass; /* the array of masses */
52 <  short is_first; /*boolean for the first time integrate is called */
53 <  double c_box_x;
54 <  double c_box_y;
40 <  double c_box_z;
41 < };
45 >  int isConstrained; // boolean to know whether the systems contains
46 >                     // constraints.
47 >  int nConstrained;  // counter for number of constraints
48 >  int *constrainedA; // the i of a constraint pair
49 >  int *constrainedB; // the j of a constraint pair
50 >  double *constrainedDsqr; // the square of the constraint distance
51 >  
52 >  int* moving; // tells whether we are moving atom i
53 >  int* moved;  // tells whether we have moved atom i
54 >  double* prePos; // pre constrained positions
55  
56 < class Symplectic : public Integrator {
56 >  short isFirst; /*boolean for the first time integrate is called */
57    
58 < public:
59 <  Symplectic( SimInfo* the_entry_plug,  ForceFields* the_ff );
60 <  ~Symplectic();
48 <  
49 <  void integrate( void );
58 >  double dt;
59 >  double dt2;
60 >  const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2
61  
62 < private:
62 >  const int maxIteration = 300;
63 >  const double tol = 1.0e-6;
64  
65 <  void rotate( int axes1, int axes2, double angle, double j[3],
66 <               double A[3][3] );
65 >  
66 >  double* pos;
67 >  double* vel;
68 >  double* frc;
69 >  double* trq;
70 >  double* Amat;
71 >  
72  
56  SimInfo* entry_plug;
57  ForceFields* myFF;
73  
74 <  int is_constrained; /*boolean to know whether the systems contains
75 <                          constraints. */
76 <  int n_constrained; /*counter for number of constraints */
77 <  int *constrained_i; /* the i of a constraint pair */
78 <  int *constrained_j; /* the j of a constraint pair */
64 <  double *constrained_dsqr; /* the square of the constraint distance */
65 <  double *mass; /* the array of masses */
74 >  Thermo *tStats;
75 >  StatWriter*  statOut;
76 >  DumpWriter*  dumpOut;
77 >  
78 > };
79  
80 <  short int isFirst;
80 > class NVE : public Integrator{
81  
82 <  SRI **srInteractions; /* array of SRI pointers */
83 <  int nSRI; /* the number of short range interactions */
82 >  NVE ( void ):
83 >    Integrator( theInfo, the_ff ){}
84 >  virtual ~NVE(){}
85 >
86    
87 +
88   };
89  
90 + class NVT : public Integrator{
91 +
92 +  NVT ( SimInfo &theInfo, ForceFields* the_ff ) :
93 +    Integrator( theInfo, the_ff );
94 +  virtual ~NVT();
95 +
96 + protected:
97 +  virtual moveA( void );
98 +  virtual moveB( void );
99 +
100 + };
101 +
102 +  
103 +
104 +
105   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines