1 |
#ifndef _ABSTRACT_CLASSES_H_ |
2 |
#define _ABSTRACT_CLASSES_H_ |
3 |
|
4 |
#include "Atom.hpp" |
5 |
#ifdef IS_MPI |
6 |
|
7 |
#include "mpi.h" |
8 |
#endif |
9 |
class Constraint{ |
10 |
|
11 |
public: |
12 |
Constraint(){} |
13 |
~Constraint(){} |
14 |
|
15 |
int get_a() {return a;} |
16 |
void set_a(int index) {a = index;} |
17 |
int get_b() {return b;} |
18 |
void set_b(int index) {b = index;} |
19 |
double get_dsqr() {return dsqr;} |
20 |
void set_dsqr(double ds) {dsqr = ds;} |
21 |
|
22 |
private: |
23 |
int a; /* index of constrained atom a */ |
24 |
int b; /* index of constrained atom b */ |
25 |
double dsqr; /* the square of the constraint distance */ |
26 |
}; |
27 |
|
28 |
class SRI{ |
29 |
|
30 |
public: |
31 |
SRI(){ c_potential_E = 0.0; } |
32 |
virtual ~SRI() {} |
33 |
|
34 |
virtual void calc_forces() = 0; |
35 |
|
36 |
double get_potential(){ return c_potential_E; } |
37 |
virtual int is_constrained() = 0; |
38 |
virtual Constraint *get_constraint() = 0; |
39 |
virtual void constrain(double bond_distance) = 0; |
40 |
|
41 |
virtual void printMe( void ) = 0; |
42 |
|
43 |
protected: |
44 |
double c_potential_E; |
45 |
}; |
46 |
|
47 |
|
48 |
class BaseIntegrator{ |
49 |
|
50 |
public: |
51 |
BaseIntegrator(){} |
52 |
virtual ~BaseIntegrator(){} |
53 |
|
54 |
virtual void integrate( void ) = 0; |
55 |
virtual double getConservedQuantity(void) = 0; |
56 |
}; |
57 |
|
58 |
#endif |