ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Integrator.hpp
Revision: 466
Committed: Mon Apr 7 14:30:36 2003 UTC (21 years, 3 months ago) by gezelter
File size: 2106 byte(s)
Log Message:
Added ExtendedSystem infrastructure for NPT and NVT calculations

File Contents

# Content
1 #ifndef _INTEGRATOR_H_
2 #define _INTEGRATOR_H_
3
4 #include "Atom.hpp"
5 #include "SRI.hpp"
6 #include "AbstractClasses.hpp"
7 #include "SimInfo.hpp"
8 #include "ForceFields.hpp"
9 #include "ExtendedSystem.hpp"
10
11 class Verlet : public Integrator {
12
13 public:
14 Verlet( SimInfo &info, ForceFields* the_ff, ExtendedSystem* the_es );
15 ~Verlet();
16 void integrate( void );
17
18 private:
19
20 void move_a( double dt );
21 void move_b( double dt );
22
23 ForceFields* myFF;
24 ExtendedSystem* myES;
25
26 SimInfo *entry_plug; // all the info we'll ever need
27 int c_natoms; /* the number of atoms */
28 Atom **c_atoms; /* array of atom pointers */
29 Molecule* molecules;
30 int nMols;
31
32 int c_is_constrained; /*boolean to know whether the systems contains
33 constraints. */
34 int c_n_constrained; /*counter for number of constraints */
35 int *c_constrained_i; /* the i of a constraint pair */
36 int *c_constrained_j; /* the j of a constraint pair */
37 double *c_constrained_dsqr; /* the square of the constraint distance */
38 double *c_mass; /* the array of masses */
39 short is_first; /*boolean for the first time integrate is called */
40 double c_box_x;
41 double c_box_y;
42 double c_box_z;
43 };
44
45 class Symplectic : public Integrator {
46
47 public:
48 Symplectic( SimInfo* the_entry_plug,
49 ForceFields* the_ff,
50 ExtendedSystem* the_es);
51 ~Symplectic();
52
53 void integrate( void );
54
55 private:
56
57 void rotate( int axes1, int axes2, double angle, double j[3],
58 double A[3][3] );
59
60 SimInfo* entry_plug;
61 ForceFields* myFF;
62 ExtendedSystem* myES;
63
64 Molecule* molecules;
65 int nMols;
66
67 int is_constrained; /*boolean to know whether the systems contains
68 constraints. */
69 int n_constrained; /*counter for number of constraints */
70 int *constrained_i; /* the i of a constraint pair */
71 int *constrained_j; /* the j of a constraint pair */
72 double *constrained_dsqr; /* the square of the constraint distance */
73 double *mass; /* the array of masses */
74
75 short int isFirst;
76
77 SRI **srInteractions; /* array of SRI pointers */
78 int nSRI; /* the number of short range interactions */
79
80 };
81
82 #endif