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 778 by mmeineke, Fri Sep 19 20:00:27 2003 UTC vs.
Revision 780 by mmeineke, Mon Sep 22 21:23:25 2003 UTC

# Line 195 | Line 195 | template<typename T> class NPT : public T{ (protected)
195  
196    double tt2, tb2;
197    double instaTemp, instaPress, instaVol;
198 +  double press[3][3];
199  
200    int Nparticles;
201  
# Line 251 | Line 252 | template<typename T> class NPTi : public T{ (protected
252  
253    double eta, oldEta, prevEta;
254   };
254
255
256 template<typename T> class NPTim : public T{
257
258 public:
259
260  NPTim ( SimInfo *theInfo, ForceFields* the_ff);
261  virtual ~NPTim() {}
262
263  virtual void integrateStep( int calcPot, int calcStress ){
264    calcStress = 1;
265    T::integrateStep( calcPot, calcStress );
266    accIntegralOfChidt();  
267  }
268
269  virtual double getConservedQuantity(void);
255  
271  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
272  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
273  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
274  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
275  void setChiTolerance(double tol) {chiTolerance = tol;}
276  void setPosIterTolerance(double tol) {posIterTolerance = tol;}
277
278 protected:
279
280  virtual void moveA( void );
281  virtual void moveB( void );
282
283  virtual int readyCheck();
284
285  virtual void resetIntegrator( void );
286
287  void accIntegralOfChidt(void) { integralOfChidt += dt * chi;}
288  
289  Molecule* myMolecules;
290  Atom** myAtoms;
291
292  // chi and eta are the propagated degrees of freedom
293
294  double chi;
295  double eta;
296  double NkBT;
297  double integralOfChidt;
298
299  // targetTemp, targetPressure, and tauBarostat must be set.  
300  // One of qmass or tauThermostat must be set;
301
302  double targetTemp;
303  double targetPressure;
304  double tauThermostat;
305  double tauBarostat;
306
307  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
308  short int have_target_pressure;
309  double chiTolerance;
310  short int have_chi_tolerance;
311  double posIterTolerance;
312  short int have_pos_iter_tolerance;
313
314 };
315
256   template<typename T> class NPTzm : public T{
257  
258   public:
# Line 369 | Line 309 | template<typename T> class NPTf : public T{ (public)
309    NPTf ( SimInfo *theInfo, ForceFields* the_ff);
310    virtual ~NPTf();
311  
372  virtual void integrateStep( int calcPot, int calcStress ){
373    calcStress = 1;
374    T::integrateStep( calcPot, calcStress );
375  }
376  
312    virtual double getConservedQuantity(void);
313 +  virtual void resetIntegrator(void);
314  
379  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
380  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
381  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
382  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
383  void setChiTolerance(double tol) {chiTolerance = tol;}
384  void setPosIterTolerance(double tol) {posIterTolerance = tol;}
385
315   protected:
316  
317 <  virtual void  moveA( void );
318 <  virtual void moveB( void );
317 >  virtual void evolveEtaA(void);
318 >  virtual void evolveEtaB(void);
319  
320 <  virtual void resetIntegrator( void );
320 >  virtual bool etaConverged( void );
321  
322 <  virtual int readyCheck();
322 >  virtual void scaleSimBox( void );
323  
324 +  virtual void getVelScaleA( double sc[3], double vel[3] );
325 +  virtual void getVelScaleB( double sc[3], int index );
326 +  virtual void getPosScale(double pos[3], double COM[3],
327 +                           int index, double sc[3]);
328  
396  // chi and eta are the propagated degrees of freedom
397
398  double chi;
329    double eta[3][3];
330 <  double NkBT;
331 <  double fkBT;
402 <
403 <  int Nparticles;
404 <
405 <  double *oldPos;
406 <  double *oldVel;
407 <  double *oldJi;
408 <
409 <  double integralOfChidt;
410 <  
411 <  // targetTemp, targetPressure, and tauBarostat must be set.  
412 <  // One of qmass or tauThermostat must be set;
413 <
414 <  double targetTemp;
415 <  double targetPressure;
416 <  double tauThermostat;
417 <  double tauBarostat;
418 <
419 <  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
420 <  short int have_target_pressure;
421 <  double chiTolerance;
422 <  short int have_chi_tolerance;
423 <  double posIterTolerance;
424 <  short int have_pos_iter_tolerance;
425 <  double etaTolerance;
426 <  short int have_eta_tolerance;
330 >  double oldEta[3][3];
331 >  double prevEta[3][3];
332   };
333  
334   template<typename T> class NPTxym : public T{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines