ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/headers/AbstractClasses.hpp
Revision: 131
Committed: Wed Oct 9 22:29:40 2002 UTC (21 years, 9 months ago) by chuckv
File size: 1252 byte(s)
Log Message:
*** empty log message ***

File Contents

# Content
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 struct ex_pair {
48 int i;
49 int j;
50 };
51
52 class LRI{
53 public:
54 LRI() {}
55 virtual ~LRI() {}
56 virtual void calc_forces() = 0;
57 virtual double get_potential() = 0;
58 };
59
60 class Integrator{
61
62 public:
63 Integrator(){}
64 virtual ~Integrator(){}
65
66 virtual void integrate( void ) = 0;
67 };
68
69
70 #endif