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 738 by tim, Tue Sep 2 14:30:12 2003 UTC vs.
Revision 755 by mmeineke, Tue Sep 9 20:35:25 2003 UTC

# Line 39 | Line 39 | template<typename T = BaseIntegrator> class Integrator
39    virtual void constrainB( void );
40    virtual int  readyCheck( void ) { return 1; }
41  
42 +  virtual void resetIntegrator( void ) { }
43 +
44    virtual void calcForce( int calcPot, int calcStress );  
45    virtual void thermalize();
46    
# Line 105 | Line 107 | template<typename T> class NVT : public T { (protected
107  
108    virtual int readyCheck();
109  
110 +  virtual void resetIntegrator( void );
111 +
112    // chi is a propagated degree of freedom.
113  
114    double chi;
# Line 144 | Line 148 | template<typename T> class NPTi : public T{ (protected
148  
149    virtual int readyCheck();
150  
151 +  virtual void resetIntegrator( void );
152 +
153    // chi and eta are the propagated degrees of freedom
154  
155    double chi;
# Line 187 | Line 193 | template<typename T> class NPTim : public T{ (protecte
193  
194    virtual int readyCheck();
195  
196 +  virtual void resetIntegrator( void );
197 +
198    Molecule* myMolecules;
199    Atom** myAtoms;
200  
# Line 209 | Line 217 | template<typename T> class NPTf : public T{
217  
218   };
219  
220 + template<typename T> class NPTzm : public T{
221 +
222 + public:
223 +
224 +  NPTzm ( SimInfo *theInfo, ForceFields* the_ff);
225 +  virtual ~NPTzm() {};
226 +
227 +  virtual void integrateStep( int calcPot, int calcStress ){
228 +    calcStress = 1;
229 +    T::integrateStep( calcPot, calcStress );
230 +  }
231 +
232 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
233 +  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
234 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
235 +  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
236 +
237 + protected:
238 +
239 +  virtual void moveA( void );
240 +  virtual void moveB( void );
241 +
242 +  virtual int readyCheck();
243 +
244 +  virtual void resetIntegrator( void );
245 +
246 +  Molecule* myMolecules;
247 +  Atom** myAtoms;
248 +
249 +  // chi and eta are the propagated degrees of freedom
250 +
251 +  double chi;
252 +  double eta;
253 +  double etaZ;
254 +  double NkBT;
255 +
256 +  // targetTemp, targetPressure, and tauBarostat must be set.  
257 +  // One of qmass or tauThermostat must be set;
258 +
259 +  double targetTemp;
260 +  double targetPressure;
261 +  double tauThermostat;
262 +  double tauBarostat;
263 +
264 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
265 +  short int have_target_pressure;
266 +
267 + };
268 +
269   template<typename T> class NPTf : public T{
270  
271   public:
# Line 230 | Line 287 | template<typename T> class NPTf : public T{ (protected
287  
288    virtual void  moveA( void );
289    virtual void moveB( void );
290 +
291 +  virtual void resetIntegrator( void );
292  
293    virtual int readyCheck();
294  
# Line 252 | Line 311 | template<typename T> class NPTfm : public T{
311  
312   };
313  
314 + template<typename T> class NPTxym : public T{
315 +
316 + public:
317 +
318 +  NPTxym ( SimInfo *theInfo, ForceFields* the_ff);
319 +  virtual ~NPTxym() {};
320 +
321 +  virtual void integrateStep( int calcPot, int calcStress ){
322 +    calcStress = 1;
323 +    T::integrateStep( calcPot, calcStress );
324 +  }
325 +
326 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
327 +  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
328 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
329 +  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
330 +
331 + protected:
332 +
333 +  virtual void moveA( void );
334 +  virtual void moveB( void );
335 +
336 +  virtual int readyCheck();
337 +
338 +  virtual void resetIntegrator( void );
339 +
340 +  Molecule* myMolecules;
341 +  Atom** myAtoms;
342 +
343 +  // chi and eta are the propagated degrees of freedom
344 +
345 +  double chi;
346 +  double eta;
347 +  double etaX;
348 +  double etaY;
349 +  double NkBT;
350 +
351 +  // targetTemp, targetPressure, and tauBarostat must be set.  
352 +  // One of qmass or tauThermostat must be set;
353 +
354 +  double targetTemp;
355 +  double targetPressure;
356 +  double tauThermostat;
357 +  double tauBarostat;
358 +
359 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
360 +  short int have_target_pressure;
361 +
362 + };
363 +
364 +
365   template<typename T> class NPTfm : public T{
366  
367   public:
# Line 274 | Line 384 | template<typename T> class NPTfm : public T{ (protecte
384    virtual void  moveA( void );
385    virtual void moveB( void );
386  
387 +  virtual void resetIntegrator( void );
388 +
389    virtual int readyCheck();
390  
391    Molecule* myMolecules;
# Line 323 | Line 435 | template<typename T> class NPTpr : public T{ (protecte
435  
436    virtual int readyCheck();
437  
438 +  virtual void resetIntegrator( void );
439 +
440    // chi and eta are the propagated degrees of freedom
441  
442    double chi;
# Line 361 | Line 475 | template<typename T> class ZConstraint : public T {
475    };
476  
477    class PolicyByNumber : public ForceSubtractionPolicy{
478 +
479      public:
480        PolicyByNumber(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {}    
481        virtual void update();    
# Line 374 | Line 489 | template<typename T> class ZConstraint : public T {
489    };
490  
491    class PolicyByMass : public ForceSubtractionPolicy{
492 +
493      public:
494        PolicyByMass(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {}  
495        
# Line 467 | Line 583 | template<typename T> class ZConstraint : public T {
583    double calcSysCOMVel();
584    double calcTotalForce();
585    
586 <  ForceSubtractionPolicy* forcePolicy; //force substration policy
586 >  ForceSubtractionPolicy* forcePolicy; //force subtraction policy
587    friend class ForceSubtractionPolicy;
588  
589   };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines