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 701 by tim, Wed Aug 20 14:34:04 2003 UTC vs.
Revision 738 by tim, Tue Sep 2 14:30:12 2003 UTC

# Line 297 | Line 297 | template<typename T> class NPTfm : public T{ (protecte
297    short int have_target_pressure;
298  
299   };
300 +
301 +
302 + template<typename T> class NPTpr : public T{
303 +
304 + public:
305 +
306 +  NPTpr ( SimInfo *theInfo, ForceFields* the_ff);
307 +  virtual ~NPTpr() {};
308 +
309 +  virtual void integrateStep( int calcPot, int calcStress ){
310 +    calcStress = 1;
311 +    T::integrateStep( calcPot, calcStress );
312 +  }
313  
314 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
315 +  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
316 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
317 +  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
318 +
319 + protected:
320 +
321 +  virtual void  moveA( void );
322 +  virtual void moveB( void );
323 +
324 +  virtual int readyCheck();
325 +
326 +  // chi and eta are the propagated degrees of freedom
327 +
328 +  double chi;
329 +  double eta[3][3];
330 +  double NkBT;
331 +
332 +  // targetTemp, targetPressure, and tauBarostat must be set.  
333 +  // One of qmass or tauThermostat must be set;
334 +
335 +  double targetTemp;
336 +  double targetPressure;
337 +  double tauThermostat;
338 +  double tauBarostat;
339 +
340 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
341 +  short int have_target_pressure;
342 +
343 + };
344 +
345 +
346   template<typename T> class ZConstraint : public T {
347    
348    public:
349 <  class ForceSubstractionPolicy{
349 >  class ForceSubtractionPolicy{
350      public:
351 <      ForceSubstractionPolicy(ZConstraint<T>* integrator) {zconsIntegrator = integrator;}
351 >      ForceSubtractionPolicy(ZConstraint<T>* integrator) {zconsIntegrator = integrator;}
352  
353        virtual void update() = 0;    
354        virtual double getZFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) = 0;
# Line 315 | Line 360 | template<typename T> class ZConstraint : public T {
360       ZConstraint<T>* zconsIntegrator;;
361    };
362  
363 <  class PolicyByNumber : ForceSubstractionPolicy{
363 >  class PolicyByNumber : public ForceSubtractionPolicy{
364      public:
365 <      PolicyByNumber(ZConstraint<T>* integrator) :ForceSubstractionPolicy(integrator) {}    
365 >      PolicyByNumber(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {}    
366        virtual void update();    
367        virtual double getZFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) ;
368        virtual double getZFOfMovingMols(Atom* atom, double totalForce) ;
# Line 328 | Line 373 | template<typename T> class ZConstraint : public T {
373      int totNumOfMovingAtoms;
374    };
375  
376 <  class PolicyByMass :ForceSubstractionPolicy{
376 >  class PolicyByMass : public ForceSubtractionPolicy{
377      public:
378 <      PolicyByMass(ZConstraint<T>* integrator) :ForceSubstractionPolicy(integrator) {}  
378 >      PolicyByMass(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {}  
379        
380        virtual void update();    
381        virtual double getZFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) ;
# Line 422 | Line 467 | template<typename T> class ZConstraint : public T {
467    double calcSysCOMVel();
468    double calcTotalForce();
469    
470 <  ForceSubstractionPolicy* forcePolicy; //force substration policy
471 <  friend class ForceSubstractionPolicy;
470 >  ForceSubtractionPolicy* forcePolicy; //force substration policy
471 >  friend class ForceSubtractionPolicy;
472  
473   };
474  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines