ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/AbstractClasses.hpp
Revision: 423
Committed: Thu Mar 27 20:12:15 2003 UTC (21 years, 3 months ago) by mmeineke
File size: 1089 byte(s)
Log Message:
I have implemeted Molecules everywhere I could remember to.
will now attempt to compile.

File Contents

# User Rev Content
1 mmeineke 377 #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 mmeineke 423 0 double get_dsqr() {return dsqr;}
20 mmeineke 377 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 Integrator{
49    
50     public:
51     Integrator(){}
52     virtual ~Integrator(){}
53    
54     virtual void integrate( void ) = 0;
55     };
56    
57    
58     #endif