| 6 |
|
#include "AbstractClasses.hpp" |
| 7 |
|
#include "SimInfo.hpp" |
| 8 |
|
#include "ForceFields.hpp" |
| 9 |
< |
#include "ExtendedSystem.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, ExtendedSystem* the_es ); |
| 16 |
< |
~Verlet(); |
| 15 |
> |
Symplectic( SimInfo &theInfo, ForceFields* the_ff ); |
| 16 |
> |
virtual ~Symplectic(); |
| 17 |
|
void integrate( void ); |
| 18 |
|
|
| 18 |
– |
private: |
| 19 |
– |
|
| 20 |
– |
void move_a( double dt ); |
| 21 |
– |
void move_b( double dt ); |
| 19 |
|
|
| 20 |
< |
ForceFields* myFF; |
| 24 |
< |
ExtendedSystem* myES; |
| 20 |
> |
protected: |
| 21 |
|
|
| 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 { |
| 22 |
|
|
| 23 |
< |
public: |
| 24 |
< |
Symplectic( SimInfo* the_entry_plug, |
| 25 |
< |
ForceFields* the_ff, |
| 26 |
< |
ExtendedSystem* the_es); |
| 27 |
< |
~Symplectic(); |
| 23 |
> |
virtual void integrateStep( int calcPot, int calcStress ); |
| 24 |
> |
virtual void moveA( void ); |
| 25 |
> |
virtual void moveB( void ); |
| 26 |
> |
virtual void constrainA( void ); |
| 27 |
> |
virtual void constrainB( void ); |
| 28 |
|
|
| 29 |
< |
void integrate( void ); |
| 30 |
< |
|
| 55 |
< |
private: |
| 56 |
< |
|
| 29 |
> |
|
| 30 |
> |
void checkConstraints( void ); |
| 31 |
|
void rotate( int axes1, int axes2, double angle, double j[3], |
| 32 |
|
double A[3][3] ); |
| 33 |
|
|
| 34 |
< |
SimInfo* entry_plug; |
| 34 |
> |
|
| 35 |
|
ForceFields* myFF; |
| 62 |
– |
ExtendedSystem* myES; |
| 36 |
|
|
| 37 |
+ |
SimInfo *info; // all the info we'll ever need |
| 38 |
+ |
int nAtoms; /* the number of atoms */ |
| 39 |
+ |
Atom **atoms; /* array of atom pointers */ |
| 40 |
|
Molecule* molecules; |
| 41 |
|
int nMols; |
| 42 |
|
|
| 43 |
< |
int is_constrained; /*boolean to know whether the systems contains |
| 44 |
< |
constraints. */ |
| 45 |
< |
int n_constrained; /*counter for number of constraints */ |
| 46 |
< |
int *constrained_i; /* the i of a constraint pair */ |
| 47 |
< |
int *constrained_j; /* the j of a constraint pair */ |
| 48 |
< |
double *constrained_dsqr; /* the square of the constraint distance */ |
| 49 |
< |
double *mass; /* the array of masses */ |
| 43 |
> |
int isConstrained; /*boolean to know whether the systems contains |
| 44 |
> |
constraints. */ |
| 45 |
> |
int nConstrained; /*counter for number of constraints */ |
| 46 |
> |
int *constrainedI; /* the i of a constraint pair */ |
| 47 |
> |
int *constrainedJ; /* the j of a constraint pair */ |
| 48 |
> |
double *constrainedDsqr; /* the square of the constraint distance */ |
| 49 |
> |
short isFirst; /*boolean for the first time integrate is called */ |
| 50 |
> |
|
| 51 |
> |
double dt; |
| 52 |
|
|
| 75 |
– |
short int isFirst; |
| 53 |
|
|
| 54 |
< |
SRI **srInteractions; /* array of SRI pointers */ |
| 55 |
< |
int nSRI; /* the number of short range interactions */ |
| 54 |
> |
Thermo *tStats; |
| 55 |
> |
StatWriter* statOut; |
| 56 |
> |
DumpWriter* dumpOut; |
| 57 |
|
|
| 58 |
|
}; |
| 59 |
|
|
| 60 |
+ |
|
| 61 |
+ |
class NVT : public Integrator{ |
| 62 |
+ |
|
| 63 |
+ |
NVT ( void ); |
| 64 |
+ |
virtual ~NVT(); |
| 65 |
+ |
|
| 66 |
+ |
protected: |
| 67 |
+ |
virtual moveA( void ); |
| 68 |
+ |
virtual moveB( void ); |
| 69 |
+ |
|
| 70 |
+ |
}; |
| 71 |
+ |
|
| 72 |
+ |
|
| 73 |
+ |
|
| 74 |
+ |
|
| 75 |
|
#endif |