ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/headers/ForceFields.hpp
(Generate patch)

Comparing trunk/mdtools/headers/ForceFields.hpp (file contents):
Revision 11 by mmeineke, Tue Jul 9 18:40:59 2002 UTC vs.
Revision 240 by chuckv, Wed Jan 22 21:45:20 2003 UTC

# Line 7 | Line 7 | class bond_pair{
7   #include "Atom.hpp"
8   #include "SimInfo.hpp"
9  
10 + #ifdef IS_MPI
11 + #include "mpiForceField.h"
12 + #endif
13 +
14   class bond_pair{
15   public:
16    bond_pair(){}
# Line 54 | Line 58 | class ForceFields{ (public)
58  
59   public:
60    ForceFields(){ frcFile = NULL; entry_plug = NULL; }
61 <  ~ForceFields(){}
61 >  virtual ~ForceFields(){}
62    
63    void setSimInfo( SimInfo* the_entry_plug ) { entry_plug = the_entry_plug; }
64    virtual void initializeAtoms( void ) = 0;
65    virtual void initializeBonds( bond_pair* the_bonds ) = 0;
66    virtual void initializeBends( bend_set* the_bends ) = 0;
67    virtual void initializeTorsions( torsion_set* the_torsions ) = 0;
68 +  virtual void doForces( void ) = 0;
69  
70   protected:
71    
72    FILE *frcFile;
73    SimInfo* entry_plug;
74 +  
75 +  int lineNum;
76 +  char readLine[500];
77 +  char* eof_test;
78  
79   };
80  
# Line 73 | Line 82 | class TraPPEFF : public ForceFields{ (public)
82  
83   public:
84    TraPPEFF();
85 <  ~TraPPEFF();
85 >  virtual ~TraPPEFF();
86    
87    void initializeAtoms( void );
88    void initializeBonds( bond_pair* the_bonds );
89    void initializeBends( bend_set* the_bends );
90    void initializeTorsions( torsion_set* the_torsions );
91 +  void doForces( void ) {}
92   };
93  
94  
# Line 86 | Line 96 | class DipoleTestFF : public ForceFields{ (public)
96  
97   public:
98    DipoleTestFF();
99 <  ~DipoleTestFF();
99 >  virtual ~DipoleTestFF();
100    
101    void initializeAtoms( void );
102    void initializeBonds( bond_pair* the_bonds );
103    void initializeBends( bend_set* the_bends );
104    void initializeTorsions( torsion_set* the_torsions );
105 +  void doForces( void ) {}
106   };
107  
108   class TraPPE_ExFF : public ForceFields{
109  
110   public:
111    TraPPE_ExFF();
112 <  ~TraPPE_ExFF();
112 >  virtual ~TraPPE_ExFF();
113    
114    void initializeAtoms( void );
115    void initializeBonds( bond_pair* the_bonds );
116    void initializeBends( bend_set* the_bends );
117    void initializeTorsions( torsion_set* the_torsions );
118 +  void doForces( void ) {}
119   };
120  
121 + class LJ_FF : public ForceFields{
122 +
123 + public:
124 +  LJ_FF();
125 +  virtual ~LJ_FF();
126 +  
127 +  void initializeAtoms( void );
128 +  void initializeBonds( bond_pair* the_bonds );
129 +  void initializeBends( bend_set* the_bends );
130 +  void initializeTorsions( torsion_set* the_torsions );
131 +  void setLJfortran( void (*fortranSub)( double* positionArray,
132 +                                         double* forceArray,
133 +                                         double* potentialEnergy,
134 +                                         short int* doPotentialCalc ) ){
135 +    doLJfortran = fortranSub;
136 +  }
137 +  void doForces( void );
138 +
139 + private:
140 +
141 +  void fastForward( char* stopText, char* searchOwner );
142 +  
143 +  // set our sister fortran module's function to be our own.
144 +  void wrapMe( void );
145 +  void (*doLJfortran)( double* positionArray,
146 +                       double* forceArray,
147 +                       double* potentialEnergy,
148 +                       short int* doPotentialCalc );
149 +  void initFortran( void );
150 + };
151 +
152   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines