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 151 by mmeineke, Mon Oct 21 22:02:53 2002 UTC vs.
Revision 253 by chuckv, Thu Jan 30 15:20:21 2003 UTC

# Line 41 | Line 41 | class torsion_set{ (public)
41    int d;
42   };
43  
44 // typedef struct{
45 //   int a, b;
46 // } bond_pair;
44  
48 // typedef struct{
49 //   int a, b, c;
50 // } bend_set;
45  
52 // typedef struct{
53 //   int a, b, c, d;
54 // } torsion_set;
55
56
46   class ForceFields{
47  
48   public:
# Line 65 | 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( int calcPot ) = 0;
58  
59   protected:
70
71  void ffError( char* errMsg ){
72
73 #ifdef IS_MPI
74    ffInterfaceExit( errMsg );
75 #else
76    fprintf( stderr, "%s\n", errMsg );
77    exit(0);
78 #endif
79  }
80    
60    
61    FILE *frcFile;
62    SimInfo* entry_plug;
63 +  
64 +  int lineNum;
65 +  char readLine[500];
66 +  char* eof_test;
67  
68   };
69  
# Line 94 | 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( int ) {}
81   };
82  
83  
# Line 107 | 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( int ) {}
95   };
96  
97   class TraPPE_ExFF : public ForceFields{
# Line 119 | 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( int ) {}
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( int );
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