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 117 by mmeineke, Tue Sep 24 22:10:55 2002 UTC vs.
Revision 249 by chuckv, Mon Jan 27 21:28:19 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 37 | Line 41 | class torsion_set{ (public)
41    int d;
42   };
43  
40 // typedef struct{
41 //   int a, b;
42 // } bond_pair;
44  
44 // typedef struct{
45 //   int a, b, c;
46 // } bend_set;
45  
48 // typedef struct{
49 //   int a, b, c, d;
50 // } torsion_set;
51
52
46   class ForceFields{
47  
48   public:
# Line 61 | Line 54 | class ForceFields{ (public)
54    virtual void initializeBonds( bond_pair* the_bonds ) = 0;
55    virtual void initializeBends( bend_set* the_bends ) = 0;
56    virtual void initializeTorsions( torsion_set* the_torsions ) = 0;
57 +  virtual void doForces( void ) = 0;
58  
59   protected:
60    
61    FILE *frcFile;
62    SimInfo* entry_plug;
63 +  
64 +  int lineNum;
65 +  char readLine[500];
66 +  char* eof_test;
67  
68   };
69  
# Line 79 | Line 77 | class TraPPEFF : public ForceFields{ (public)
77    void initializeBonds( bond_pair* the_bonds );
78    void initializeBends( bend_set* the_bends );
79    void initializeTorsions( torsion_set* the_torsions );
80 +  void doForces( void ) {}
81   };
82  
83  
# Line 92 | Line 91 | class DipoleTestFF : public ForceFields{ (public)
91    void initializeBonds( bond_pair* the_bonds );
92    void initializeBends( bend_set* the_bends );
93    void initializeTorsions( torsion_set* the_torsions );
94 +  void doForces( void ) {}
95   };
96  
97   class TraPPE_ExFF : public ForceFields{
# Line 104 | Line 104 | class TraPPE_ExFF : public ForceFields{ (public)
104    void initializeBonds( bond_pair* the_bonds );
105    void initializeBends( bend_set* the_bends );
106    void initializeTorsions( torsion_set* the_torsions );
107 +  void doForces( void ) {}
108   };
109  
110 + class LJ_FF : public ForceFields{
111 +
112 + public:
113 +  LJ_FF();
114 +  virtual ~LJ_FF();
115 +  
116 +  void initializeAtoms( void );
117 +  void initializeBonds( bond_pair* the_bonds );
118 +  void initializeBends( bend_set* the_bends );
119 +  void initializeTorsions( torsion_set* the_torsions );
120 +  void setLJfortran( void (*fortranSub)( double* positionArray,
121 +                                         double* forceArray,
122 +                                         double* potentialEnergy,
123 +                                         short int* doPotentialCalc ) ){
124 +    doLJfortran = fortranSub;
125 +  }
126 +  void doForces( void );
127 +
128 + private:
129 +
130 +  void fastForward( char* stopText, char* searchOwner );
131 +  
132 +  // set our sister fortran module's function to be our own.
133 +  void wrapMe( void );
134 +  void (*doLJfortran)( double* positionArray,
135 +                       double* forceArray,
136 +                       double* potentialEnergy,
137 +                       short int* doPotentialCalc );
138 +  void initFortran( void );
139 + };
140 +
141   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines