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