ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/AbstractClasses.hpp
Revision: 540
Committed: Fri May 30 19:07:45 2003 UTC (21 years, 1 month ago) by mmeineke
File size: 1100 byte(s)
Log Message:
changed how NVT is now derived from Integrator

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 424 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 mmeineke 540 class BaseIntegrator{
49 mmeineke 377
50     public:
51 mmeineke 540 BaseIntegrator(){}
52     virtual ~BaseIntegrator(){}
53 mmeineke 377
54     virtual void integrate( void ) = 0;
55     };
56    
57    
58     #endif