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 561 by mmeineke, Fri Jun 20 20:29:36 2003 UTC vs.
Revision 596 by gezelter, Mon Jul 14 15:04:55 2003 UTC

# Line 11 | Line 11 | const int maxIteration = 300;
11  
12   const double kB = 8.31451e-7;// boltzmann constant amu*Ang^2*fs^-2/K
13   const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2
14 + const double p_convert = 1.63882576e8; //converts amu*fs^-2*Ang^-1 -> atm
15   const int maxIteration = 300;
16   const double tol = 1.0e-6;
17  
# Line 34 | Line 35 | class Integrator : public BaseIntegrator { (protected)
35    
36    void checkConstraints( void );
37    void rotate( int axes1, int axes2, double angle, double j[3],
38 <               double A[9] );
38 >               double A[3][3] );
39  
40  
41    ForceFields* myFF;
# Line 92 | Line 93 | class NVT : public Integrator{ (public)
93    NVT ( SimInfo *theInfo, ForceFields* the_ff);
94    virtual ~NVT() {}
95  
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  
# Line 103 | Line 103 | class NVT : public Integrator{ (public)
103  
104    virtual int readyCheck();
105  
106 <  // zeta is a propagated degree of freedom.
106 >  // chi is a propagated degree of freedom.
107  
108 <  double zeta;
108 >  double chi;
109  
110 <  // targetTemp must be set.  One of qmass or tauThermostat must be set;
110 >  // targetTemp must be set.  tauThermostat must also be set;
111  
112  double qmass;
112    double targetTemp;
113    double tauThermostat;
114 +  
115 +  short int have_tau_thermostat, have_target_temp;
116  
117 + };
118 +
119 +
120 + class NPTi : public Integrator{
121 +
122 + public:
123 +
124 +  NPTi ( SimInfo *theInfo, ForceFields* the_ff);
125 +  virtual ~NPTi() {};
126 +
127 +  virtual void integrateStep( int calcPot, int calcStress ){
128 +    calcStress = 1;
129 +    Integrator::integrateStep( calcPot, calcStress );
130 +  }
131 +
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 void  moveA( void );
140 +  virtual void moveB( void );
141 +
142 +  virtual int readyCheck();
143 +
144 +  // chi and eta are the propagated degrees of freedom
145 +
146 +  double chi;
147 +  double eta;
148    double NkBT;
117  
118  short int have_tau_thermostat, have_target_temp, have_qmass;
149  
150 +  // targetTemp, targetPressure, and tauBarostat must be set.  
151 +  // One of qmass or tauThermostat must be set;
152 +
153 +  double targetTemp;
154 +  double targetPressure;
155 +  double tauThermostat;
156 +  double tauBarostat;
157 +
158 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
159 +  short int have_target_pressure;
160 +
161   };
162  
163 + class NPTim : public Integrator{
164  
165 < class NPT : public Integrator{
165 > public:
166  
167 +  NPTim ( SimInfo *theInfo, ForceFields* the_ff);
168 +  virtual ~NPTim() {};
169 +
170 +  virtual void integrateStep( int calcPot, int calcStress ){
171 +    calcStress = 1;
172 +    Integrator::integrateStep( calcPot, calcStress );
173 +  }
174 +
175 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
176 +  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
177 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
178 +  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
179 +
180 + protected:
181 +
182 +  virtual void  moveA( void );
183 +  virtual void moveB( void );
184 +
185 +  virtual int readyCheck();
186 +
187 +  // chi and eta are the propagated degrees of freedom
188 +
189 +  double chi;
190 +  double eta;
191 +  double NkBT;
192 +
193 +  // targetTemp, targetPressure, and tauBarostat must be set.  
194 +  // One of qmass or tauThermostat must be set;
195 +
196 +  double targetTemp;
197 +  double targetPressure;
198 +  double tauThermostat;
199 +  double tauBarostat;
200 +
201 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
202 +  short int have_target_pressure;
203 +
204 + };
205 +
206 + class NPTf : public Integrator{
207 +
208   public:
209  
210 <  NPT ( SimInfo *theInfo, ForceFields* the_ff);
211 <  virtual ~NPT();
210 >  NPTf ( SimInfo *theInfo, ForceFields* the_ff);
211 >  virtual ~NPTf() {};
212  
213 <  void setQmass(double q) {qmass = q; have_qmass = 1;}
213 >  virtual void integrateStep( int calcPot, int calcStress ){
214 >    calcStress = 1;
215 >    Integrator::integrateStep( calcPot, calcStress );
216 >  }
217 >
218    void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
219    void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
220    void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
# Line 140 | Line 227 | class NPT : public Integrator{ (protected)
227  
228    virtual int readyCheck();
229  
230 <  Atom** atoms;
230 >  // chi and eta are the propagated degrees of freedom
231  
232 <  // zeta and epsilonDot are the propagated degrees of freedom.
232 >  double chi;
233 >  double eta[3][3];
234 >  double NkBT;
235  
236 <  double zeta;
237 <  double epsilonDot;
236 >  // targetTemp, targetPressure, and tauBarostat must be set.  
237 >  // One of qmass or tauThermostat must be set;
238  
239 +  double targetTemp;
240 +  double targetPressure;
241 +  double tauThermostat;
242 +  double tauBarostat;
243 +
244 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
245 +  short int have_target_pressure;
246 +
247 + };
248 +
249 + class NPTfm : public Integrator{
250 +
251 + public:
252 +
253 +  NPTfm ( SimInfo *theInfo, ForceFields* the_ff);
254 +  virtual ~NPTfm() {};
255 +
256 +  virtual void integrateStep( int calcPot, int calcStress ){
257 +    calcStress = 1;
258 +    Integrator::integrateStep( calcPot, calcStress );
259 +  }
260 +
261 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
262 +  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
263 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
264 +  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
265 +
266 + protected:
267 +
268 +  virtual void  moveA( void );
269 +  virtual void moveB( void );
270 +
271 +  virtual int readyCheck();
272 +
273 +  // chi and eta are the propagated degrees of freedom
274 +
275 +  double chi;
276 +  double eta[3][3];
277 +  double NkBT;
278 +
279    // targetTemp, targetPressure, and tauBarostat must be set.  
280    // One of qmass or tauThermostat must be set;
281  
153  double qmass;
282    double targetTemp;
283    double targetPressure;
284    double tauThermostat;
285    double tauBarostat;
286  
287    short int have_tau_thermostat, have_tau_barostat, have_target_temp;
288 <  short int have_target_pressure, have_qmass;
288 >  short int have_target_pressure;
289  
290   };
291  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines