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 |
|
|
|
10 |
|
|
class Verlet : public Integrator { |
11 |
|
|
|
12 |
|
|
public: |
13 |
|
|
Verlet( SimInfo &info ); |
14 |
|
|
~Verlet(); |
15 |
|
|
void integrate( void ); |
16 |
|
|
void integrate_b( double time_length, double dt, |
17 |
|
|
int n_bond_0, int n_bond_f, |
18 |
|
|
int n_bend_0, int n_bend_f, |
19 |
|
|
int n_torsion_0, int n_trosion_f, |
20 |
|
|
bool do_bonds, bool do_bends, bool do_torsions, |
21 |
|
|
bool do_LRI ); |
22 |
|
|
|
23 |
|
|
private: |
24 |
|
|
|
25 |
|
|
void move_a( double dt ); |
26 |
|
|
void move_b( double dt ); |
27 |
|
|
|
28 |
|
|
SimInfo *entry_plug; // all the info we'll ever need |
29 |
|
|
int c_natoms; /* the number of atoms */ |
30 |
|
|
Atom **c_atoms; /* array of atom pointers */ |
31 |
|
|
SRI **c_sr_interactions; /* array of SRI pointers */ |
32 |
|
|
int c_n_SRI; /* the number of short range interactions */ |
33 |
|
|
|
34 |
|
|
int c_is_constrained; /*boolean to know whether the systems contains |
35 |
|
|
constraints. */ |
36 |
|
|
int c_n_constrained; /*counter for number of constraints */ |
37 |
|
|
int *c_constrained_i; /* the i of a constraint pair */ |
38 |
|
|
int *c_constrained_j; /* the j of a constraint pair */ |
39 |
|
|
double *c_constrained_dsqr; /* the square of the constraint distance */ |
40 |
|
|
double *c_mass; /* the array of masses */ |
41 |
|
|
short is_first; /*boolean for the first time integrate is called */ |
42 |
|
|
double c_box_x; |
43 |
|
|
double c_box_y; |
44 |
|
|
double c_box_z; |
45 |
|
|
}; |
46 |
|
|
|
47 |
|
|
class Symplectic : public Integrator { |
48 |
|
|
|
49 |
|
|
public: |
50 |
|
|
Symplectic( SimInfo* the_entry_plug ); |
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 |
|
|
|
62 |
|
|
|
63 |
|
|
int is_constrained; /*boolean to know whether the systems contains |
64 |
|
|
constraints. */ |
65 |
|
|
int n_constrained; /*counter for number of constraints */ |
66 |
|
|
int *constrained_i; /* the i of a constraint pair */ |
67 |
|
|
int *constrained_j; /* the j of a constraint pair */ |
68 |
|
|
double *constrained_dsqr; /* the square of the constraint distance */ |
69 |
|
|
double *mass; /* the array of masses */ |
70 |
|
|
|
71 |
|
|
short int isFirst; |
72 |
|
|
SRI **srInteractions; /* array of SRI pointers */ |
73 |
|
|
LRI *longRange; /* the long range forces */ |
74 |
|
|
int nSRI; /* the number of short range interactions */ |
75 |
|
|
|
76 |
|
|
}; |
77 |
|
|
|
78 |
|
|
#endif |