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

Comparing trunk/OOPSE/libmdtools/Integrator.hpp (file contents):
Revision 541 by mmeineke, Fri May 30 20:19:44 2003 UTC vs.
Revision 560 by gezelter, Fri Jun 20 16:49:33 2003 UTC

# Line 12 | Line 12 | class Integrator : public BaseIntegrator { (public)
12   class Integrator : public BaseIntegrator {
13  
14   public:
15 <  Symplectic( SimInfo &theInfo, ForceFields* the_ff );
16 <  virtual ~Symplectic();
15 >  Integrator( SimInfo &theInfo, ForceFields* the_ff );
16 >  virtual ~Integrator();
17    void integrate( void );
18  
19  
20   protected:
21
21    
22    virtual void integrateStep( int calcPot, int calcStress );
23 +  virtual void preMove( void );
24    virtual void moveA( void );
25    virtual void moveB( void );
26    virtual void constrainA( void );
27    virtual void constrainB( void );
28 +  virtual int  readyCheck( void ) { return 1; }
29    
29  
30    void checkConstraints( void );
31    void rotate( int axes1, int axes2, double angle, double j[3],
32                 double A[3][3] );
# Line 36 | Line 36 | class Integrator : public BaseIntegrator { (public)
36  
37    SimInfo *info; // all the info we'll ever need
38    int nAtoms;  /* the number of atoms */
39 +  int oldAtoms;
40    Atom **atoms; /* array of atom pointers */
41    Molecule* molecules;
42    int nMols;
43  
44 <  int isConstrained; /*boolean to know whether the systems contains
45 <                       constraints. */
46 <  int nConstrained; /*counter for number of constraints */
47 <  int *constrainedI; /* the i of a constraint pair */
48 <  int *constrainedJ; /* the j of a constraint pair */
49 <  double *constrainedDsqr; /* the square of the constraint distance */
44 >  int isConstrained; // boolean to know whether the systems contains
45 >                     // constraints.
46 >  int nConstrained;  // counter for number of constraints
47 >  int *constrainedA; // the i of a constraint pair
48 >  int *constrainedB; // the j of a constraint pair
49 >  double *constrainedDsqr; // the square of the constraint distance
50 >  
51 >  int* moving; // tells whether we are moving atom i
52 >  int* moved;  // tells whether we have moved atom i
53 >  double* prePos; // pre constrained positions
54 >
55    short isFirst; /*boolean for the first time integrate is called */
56    
57    double dt;
58    double dt2;
53  const double eConvert;
59  
60 +  const double kB = 8.31451e-7;     // boltzmann constant in amu*Ang^2*fs^-2/K
61 +  const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2
62 +  const int maxIteration = 300;
63 +  const double tol = 1.0e-6;
64    
65    double* pos;
66    double* vel;
67    double* frc;
68    double* trq;
69    double* Amat;
61  
70  
63
71    Thermo *tStats;
72    StatWriter*  statOut;
73    DumpWriter*  dumpOut;
74    
75   };
76  
77 + class NVE : public Integrator{
78  
79 +  NVE ( void ):
80 +    Integrator( theInfo, the_ff ){}
81 +  virtual ~NVE(){}
82 +
83 +  
84 +
85 + };
86 +
87   class NVT : public Integrator{
88  
89 <  NVT ( void );
89 > public:
90 >
91 >  NVT ( SimInfo &theInfo, ForceFields* the_ff) :
92 >    Integrator( theInfo, the_ff );
93    virtual ~NVT();
94  
95 +  void setQmass(double q) {qmass = q; have_qmass = 1;}
96 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
97 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
98 +
99   protected:
100 +
101    virtual moveA( void );
102    virtual moveB( void );
103  
104 +  int readyCheck();
105 +
106 +  Atom** atoms;
107 +
108 +  // zeta is a propagated degree of freedom.
109 +
110 +  double zeta;
111 +
112 +  // targetTemp must be set.  One of qmass or tauThermostat must be set;
113 +
114 +  double qmass;
115 +  double targetTemp;
116 +  double tauThermostat;
117 +
118 +  short int have_tau_thermostat, have_target_temp, have_qmass;
119 +
120   };
121  
82  
122  
123 + class NPT : public Integrator{
124  
125 + public:
126 +
127 +  NPT ( SimInfo &theInfo, ForceFields* the_ff) :
128 +    Integrator( theInfo, the_ff );
129 +  virtual ~NPT();
130 +
131 +  void setQmass(double q) {qmass = q; have_qmass = 1;}
132 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
133 +  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
134 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
135 +  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
136 +
137 + protected:
138 +
139 +  virtual moveA( void );
140 +  virtual moveB( void );
141 +
142 +  int readyCheck();
143 +
144 +  Atom** atoms;
145 +
146 +  // zeta and epsilonDot are the propagated degrees of freedom.
147 +
148 +  double zeta;
149 +  double epsilonDot;
150 +
151 +  // targetTemp, targetPressure, and tauBarostat must be set.  
152 +  // One of qmass or tauThermostat must be set;
153 +
154 +  double qmass;
155 +  double targetTemp;
156 +  double targetPressure;
157 +  double tauThermostat;
158 +  double tauBarostat;
159 +
160 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
161 +  short int have_target_pressure, have_qmass;
162 +
163 + };
164 +
165   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines