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

Comparing trunk/OOPSE/libmdtools/ForceFields.hpp (file contents):
Revision 829 by gezelter, Tue Oct 28 16:03:37 2003 UTC vs.
Revision 1261 by gezelter, Fri Jun 11 14:14:10 2004 UTC

# Line 7 | Line 7
7  
8   #include <stdio.h>
9   #include <stdlib.h>
10 + #include <math.h>
11  
12   #include "Atom.hpp"
13   #include "SimInfo.hpp"
14 + #include "StuntDouble.hpp"
15  
16   #ifdef IS_MPI
17   #include "mpiForceField.h"
# Line 56 | Line 58 | class ForceFields{ (public)
58   class ForceFields{
59  
60   public:
61 <  ForceFields(){ frcFile = NULL; entry_plug = NULL; }
61 >  ForceFields(){ frcFile = NULL; entry_plug = NULL; has_variant=0;}
62 >  ForceFields(char * theVariant ){ frcFile = NULL; entry_plug = NULL; has_variant=1; strcpy(variant, theVariant); }
63    virtual ~ForceFields(){}
64    
65    void setSimInfo( SimInfo* the_entry_plug ) { entry_plug = the_entry_plug; }
66    
67    virtual void readParams( void ) = 0;
68 +  
69    virtual void cleanMe( void ) = 0;
70    
71  
# Line 73 | Line 77 | class ForceFields{ (public)
77    virtual void initializeTorsions( int nTorsions, Torsion** torsionArray,
78                                     torsion_set* the_torsions ) = 0;
79    virtual void initForceField( int ljMixRule ) = 0;
80 +  virtual void initRestraints();
81 +  virtual void dumpzAngle();
82  
83    virtual void calcRcut( void );
84 +  virtual void setRcut( double LJrcut );
85    virtual void doForces( int calcPot, int calcStress );
86  
87 <  void setFortranForceLoop( void (*fsub) doForceLoopList ){
87 >  void setFortranForceLoop( doForceLoop_TD fsub ){
88      fortranForceLoop = fsub;
89    }
90  
91   protected:
92    
93    void initFortran( int ljMixPolicy, int useReactionField );
94 <  void (*fortranForceLoop) doForceLoopList;
94 >  doForceLoop_TD fortranForceLoop;
95  
96    FILE *frcFile;
97    SimInfo* entry_plug;
# Line 92 | Line 99 | class ForceFields{ (public)
99    int lineNum;
100    char readLine[500];
101    char* eof_test;
102 +  char variant[100];
103 +  short int has_variant;
104    double bigSigma;
105  
106   };
# Line 151 | Line 160 | class EAM_FF : public ForceFields{ (public)
160  
161   public:
162    EAM_FF();
163 +  EAM_FF(char* the_variant);
164    virtual ~EAM_FF();
165    
166  
# Line 175 | Line 185 | class EAM_FF : public ForceFields{ (public)
185    double eamRcut;
186   };
187  
188 + class WATER : public ForceFields{
189 +
190 + public:
191 +  WATER();
192 +  virtual ~WATER();
193 +
194 +  void readParams();
195 +  void cleanMe( void );
196 +  void initializeAtoms( int nAtoms, Atom** atomArray );
197 +  void initializeBonds( int nBonds, Bond** bondArray,
198 +                        bond_pair* the_bonds );
199 +  void initializeBends( int nBends, Bend** bendArray,
200 +                        bend_set* the_bends );
201 +  void initializeTorsions( int nTorsions, Torsion** torsionArray,
202 +                           torsion_set* the_torsions );
203 +  void initForceField( int ljMixRule );
204 +
205 + private:
206 +  
207 +  void fastForward( char* stopText, char* searchOwner );
208 +  void sectionSearch( char* secHead, char* stopText, char* searchOwner );
209 +
210 + };
211 +
212   #endif
213  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines