ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/AbstractClasses.hpp
Revision: 270
Committed: Fri Feb 14 17:08:46 2003 UTC (21 years, 6 months ago) by mmeineke
File size: 1127 byte(s)
Log Message:
added libmdCode and a couple help scripts

File Contents

# User Rev Content
1 mmeineke 270 #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    
53     class Integrator{
54    
55     public:
56     Integrator(){}
57     virtual ~Integrator(){}
58    
59     virtual void integrate( void ) = 0;
60     };
61    
62    
63     #endif