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