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 763 by tim, Mon Sep 15 16:52:02 2003 UTC vs.
Revision 1064 by tim, Tue Feb 24 15:44:45 2004 UTC

# Line 28 | Line 28 | template<typename T = BaseIntegrator> class Integrator
28    virtual ~Integrator();
29    void integrate( void );
30    virtual double  getConservedQuantity(void);
31 +  virtual string getAdditionalParameters(void);
32  
33   protected:
34 <  
34 >
35    virtual void integrateStep( int calcPot, int calcStress );
36    virtual void preMove( void );
37    virtual void moveA( void );
# Line 40 | Line 41 | template<typename T = BaseIntegrator> class Integrator
41    virtual int  readyCheck( void ) { return 1; }
42  
43    virtual void resetIntegrator( void ) { }
44 <
45 <  virtual void calcForce( int calcPot, int calcStress );  
44 >
45 >  virtual void calcForce( int calcPot, int calcStress );
46    virtual void thermalize();
47 <  
47 >
48 >  virtual void rotationPropagation( DirectionalAtom* dAtom, double ji[3] );
49 >
50    void checkConstraints( void );
51 <  void rotate( int axes1, int axes2, double angle, double j[3],
51 >  void rotate( int axes1, int axes2, double angle, double j[3],
52           double A[3][3] );
53 <        
53 >
54    ForceFields* myFF;
55  
56    SimInfo *info; // all the info we'll ever need
# Line 59 | Line 62 | template<typename T = BaseIntegrator> class Integrator
62  
63    int isConstrained; // boolean to know whether the systems contains
64           // constraints.
65 <  int nConstrained;  // counter for number of constraints
66 <  int *constrainedA; // the i of a constraint pair
67 <  int *constrainedB; // the j of a constraint pair
68 <  double *constrainedDsqr; // the square of the constraint distance
69 <  
65 >  int nConstrained;  // counter for number of constraints
66 >  int *constrainedA; // the i of a constraint pair
67 >  int *constrainedB; // the j of a constraint pair
68 >  double *constrainedDsqr; // the square of the constraint distance
69 >
70    int* moving; // tells whether we are moving atom i
71    int* moved;  // tells whether we have moved atom i
72 <  double* oldPos; // pre constrained positions
72 >  double* oldPos; // pre constrained positions
73  
74    short isFirst; /*boolean for the first time integrate is called */
75 <  
75 >
76    double dt;
77    double dt2;
78  
79    Thermo *tStats;
80    StatWriter*  statOut;
81    DumpWriter*  dumpOut;
82 <  
82 >
83   };
84  
85   typedef Integrator<BaseIntegrator> RealIntegrator;
# Line 86 | Line 89 | template<typename T> class NVE : public T { (public)
89   public:
90    NVE ( SimInfo *theInfo, ForceFields* the_ff ):
91      T( theInfo, the_ff ){}
92 <  virtual ~NVE(){}  
92 >  virtual ~NVE(){}
93   };
94  
95  
# Line 101 | Line 104 | template<typename T> class NVT : public T { (public)
104    void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
105    void setChiTolerance(double tol) {chiTolerance = tol;}
106    virtual double  getConservedQuantity(void);
107 +  virtual string getAdditionalParameters(void);
108  
109   protected:
110  
# Line 122 | Line 126 | template<typename T> class NVT : public T { (public)
126  
127    double targetTemp;
128    double tauThermostat;
129 <  
129 >
130    short int have_tau_thermostat, have_target_temp;
131  
132    double *oldVel;
# Line 135 | Line 139 | template<typename T> class NPTi : public T{
139  
140  
141  
142 < template<typename T> class NPTi : public T{
142 > template<typename T> class NPT : public T{
143  
144   public:
145  
146 <  NPTi ( SimInfo *theInfo, ForceFields* the_ff);
147 <  virtual ~NPTi();
148 <  
146 >  NPT ( SimInfo *theInfo, ForceFields* the_ff);
147 >  virtual ~NPT();
148 >
149    virtual void integrateStep( int calcPot, int calcStress ){
150      calcStress = 1;
151      T::integrateStep( calcPot, calcStress );
148    /* accIntegralOfChidt(); */
152    }
153  
154 <  virtual double getConservedQuantity(void);
154 >  virtual double getConservedQuantity(void) = 0;
155 >  virtual string getAdditionalParameters(void) = 0;
156 >  
157 >  double myTauThermo( void ) { return tauThermostat; }
158 >  double myTauBaro( void ) { return tauBarostat; }
159  
160    void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
161    void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
# Line 167 | Line 174 | template<typename T> class NPTi : public T{ (protected
174  
175    virtual void resetIntegrator( void );
176  
177 +  virtual void getVelScaleA( double sc[3], double vel[3] ) = 0;
178 +  virtual void getVelScaleB( double sc[3], int index ) = 0;
179 +  virtual void getPosScale(double pos[3], double COM[3],
180 +                           int index, double sc[3]) = 0;
181 +
182 +  virtual void calcVelScale( void ) = 0;
183 +
184 +  virtual bool chiConverged( void );
185 +  virtual bool etaConverged( void ) = 0;
186 +
187 +  virtual void evolveChiA( void );
188 +  virtual void evolveEtaA( void ) = 0;
189 +  virtual void evolveChiB( void );
190 +  virtual void evolveEtaB( void ) = 0;
191 +
192 +  virtual void scaleSimBox( void ) = 0;
193 +
194    void accIntegralOfChidt(void) { integralOfChidt += dt * chi;}
195  
196    // chi and eta are the propagated degrees of freedom
197  
198 +  double oldChi;
199 +  double prevChi;
200    double chi;
175  double eta;
201    double NkBT;
202    double fkBT;
203  
204 +  double tt2, tb2;
205 +  double instaTemp, instaPress, instaVol;
206 +  double press[3][3];
207 +
208    int Nparticles;
209  
210    double integralOfChidt;
211  
212 <  // targetTemp, targetPressure, and tauBarostat must be set.  
212 >  // targetTemp, targetPressure, and tauBarostat must be set.
213    // One of qmass or tauThermostat must be set;
214  
215    double targetTemp;
# Line 201 | Line 230 | template<typename T> class NPTi : public T{ (protected
230    short int have_pos_iter_tolerance;
231    double etaTolerance;
232    short int have_eta_tolerance;
204
205  double volume;
233  
234   };
235  
236 < template<typename T> class NPTim : public T{
236 > template<typename T> class NPTi : public T{
237  
238   public:
239 +  NPTi( SimInfo *theInfo, ForceFields* the_ff);
240 +  ~NPTi();
241  
213  NPTim ( SimInfo *theInfo, ForceFields* the_ff);
214  virtual ~NPTim() {}
215
216  virtual void integrateStep( int calcPot, int calcStress ){
217    calcStress = 1;
218    T::integrateStep( calcPot, calcStress );
219    accIntegralOfChidt();  
220  }
221
242    virtual double getConservedQuantity(void);
243 <
244 <  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
225 <  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
226 <  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
227 <  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
228 <  void setChiTolerance(double tol) {chiTolerance = tol;}
229 <  void setPosIterTolerance(double tol) {posIterTolerance = tol;}
230 <
243 >  virtual void resetIntegrator(void);
244 >  virtual string getAdditionalParameters(void);
245   protected:
246  
233  virtual void moveA( void );
234  virtual void moveB( void );
247  
236  virtual int readyCheck();
248  
249 <  virtual void resetIntegrator( void );
249 >  virtual void evolveEtaA(void);
250 >  virtual void evolveEtaB(void);
251  
252 <  void accIntegralOfChidt(void) { integralOfChidt += dt * chi;}
241 <  
242 <  Molecule* myMolecules;
243 <  Atom** myAtoms;
252 >  virtual bool etaConverged( void );
253  
254 <  // chi and eta are the propagated degrees of freedom
254 >  virtual void scaleSimBox( void );
255  
256 <  double chi;
257 <  double eta;
258 <  double NkBT;
259 <  double integralOfChidt;
256 >  virtual void getVelScaleA( double sc[3], double vel[3] );
257 >  virtual void getVelScaleB( double sc[3], int index );
258 >  virtual void getPosScale(double pos[3], double COM[3],
259 >                           int index, double sc[3]);
260  
261 <  // targetTemp, targetPressure, and tauBarostat must be set.  
253 <  // One of qmass or tauThermostat must be set;
254 <
255 <  double targetTemp;
256 <  double targetPressure;
257 <  double tauThermostat;
258 <  double tauBarostat;
259 <
260 <  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
261 <  short int have_target_pressure;
262 <  double chiTolerance;
263 <  short int have_chi_tolerance;
264 <  double posIterTolerance;
265 <  short int have_pos_iter_tolerance;
266 <
267 < };
268 <
269 < template<typename T> class NPTzm : public T{
270 <
271 < public:
272 <
273 <  NPTzm ( SimInfo *theInfo, ForceFields* the_ff);
274 <  virtual ~NPTzm() {};
261 >  virtual void calcVelScale( void );
262  
263 <  virtual void integrateStep( int calcPot, int calcStress ){
264 <    calcStress = 1;
278 <    T::integrateStep( calcPot, calcStress );
279 <  }
280 <
281 <  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
282 <  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
283 <  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
284 <  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
285 <
286 < protected:
287 <
288 <  virtual void moveA( void );
289 <  virtual void moveB( void );
290 <
291 <  virtual int readyCheck();
292 <
293 <  virtual void resetIntegrator( void );
294 <
295 <  Molecule* myMolecules;
296 <  Atom** myAtoms;
297 <
298 <  // chi and eta are the propagated degrees of freedom
299 <
300 <  double chi;
301 <  double eta;
302 <  double etaZ;
303 <  double NkBT;
304 <
305 <  // targetTemp, targetPressure, and tauBarostat must be set.  
306 <  // One of qmass or tauThermostat must be set;
307 <
308 <  double targetTemp;
309 <  double targetPressure;
310 <  double tauThermostat;
311 <  double tauBarostat;
312 <
313 <  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
314 <  short int have_target_pressure;
315 <
263 >  double eta, oldEta, prevEta;
264 >  double vScale;
265   };
266  
267   template<typename T> class NPTf : public T{
# Line 320 | Line 269 | template<typename T> class NPTf : public T{ (public)
269   public:
270  
271    NPTf ( SimInfo *theInfo, ForceFields* the_ff);
272 <  virtual ~NPTf() {};
272 >  virtual ~NPTf();
273  
325  virtual void integrateStep( int calcPot, int calcStress ){
326    calcStress = 1;
327    T::integrateStep( calcPot, calcStress );
328    accIntegralOfChidt();
329  }
330  
274    virtual double getConservedQuantity(void);
275 +  virtual string getAdditionalParameters(void);
276 +  virtual void resetIntegrator(void);
277  
333  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
334  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
335  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
336  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
337  void setChiTolerance(double tol) {chiTolerance = tol;}
338  void setPosIterTolerance(double tol) {posIterTolerance = tol;}
339
278   protected:
279  
280 <  virtual void  moveA( void );
281 <  virtual void moveB( void );
280 >  virtual void evolveEtaA(void);
281 >  virtual void evolveEtaB(void);
282  
283 <  virtual void resetIntegrator( void );
283 >  virtual bool etaConverged( void );
284  
285 <  virtual int readyCheck();
285 >  virtual void scaleSimBox( void );
286  
287 <  void accIntegralOfChidt(void) { integralOfChidt += dt * chi;}
287 >  virtual void getVelScaleA( double sc[3], double vel[3] );
288 >  virtual void getVelScaleB( double sc[3], int index );
289 >  virtual void getPosScale(double pos[3], double COM[3],
290 >                           int index, double sc[3]);
291  
292 <  // chi and eta are the propagated degrees of freedom
292 >  virtual void calcVelScale( void );
293  
353  double chi;
294    double eta[3][3];
295 <  double NkBT;
296 <
297 <  double integralOfChidt;
358 <  
359 <  // targetTemp, targetPressure, and tauBarostat must be set.  
360 <  // One of qmass or tauThermostat must be set;
361 <
362 <  double targetTemp;
363 <  double targetPressure;
364 <  double tauThermostat;
365 <  double tauBarostat;
366 <
367 <  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
368 <  short int have_target_pressure;
369 <  double chiTolerance;
370 <  short int have_chi_tolerance;
371 <  double posIterTolerance;
372 <  short int have_pos_iter_tolerance;
373 <
295 >  double oldEta[3][3];
296 >  double prevEta[3][3];
297 >  double vScale[3][3];
298   };
299  
300 < template<typename T> class NPTxym : public T{
300 > template<typename T> class NPTxyz : public T{
301  
302   public:
303  
304 <  NPTxym ( SimInfo *theInfo, ForceFields* the_ff);
305 <  virtual ~NPTxym() {};
304 >  NPTxyz ( SimInfo *theInfo, ForceFields* the_ff);
305 >  virtual ~NPTxyz();
306  
307 <  virtual void integrateStep( int calcPot, int calcStress ){
308 <    calcStress = 1;
309 <    T::integrateStep( calcPot, calcStress );
386 <  }
307 >  virtual double getConservedQuantity(void);
308 >  virtual string getAdditionalParameters(void);
309 >  virtual void resetIntegrator(void);
310  
388  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
389  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
390  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
391  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
392
311   protected:
312  
313 <  virtual void moveA( void );
314 <  virtual void moveB( void );
313 >  virtual void evolveEtaA(void);
314 >  virtual void evolveEtaB(void);
315  
316 <  virtual int readyCheck();
316 >  virtual bool etaConverged( void );
317  
318 <  virtual void resetIntegrator( void );
318 >  virtual void scaleSimBox( void );
319  
320 <  Molecule* myMolecules;
321 <  Atom** myAtoms;
320 >  virtual void getVelScaleA( double sc[3], double vel[3] );
321 >  virtual void getVelScaleB( double sc[3], int index );
322 >  virtual void getPosScale(double pos[3], double COM[3],
323 >                           int index, double sc[3]);
324  
325 <  // chi and eta are the propagated degrees of freedom
325 >  virtual void calcVelScale( void );
326  
407  double chi;
408  double eta;
409  double etaX;
410  double etaY;
411  double NkBT;
412
413  // targetTemp, targetPressure, and tauBarostat must be set.  
414  // One of qmass or tauThermostat must be set;
415
416  double targetTemp;
417  double targetPressure;
418  double tauThermostat;
419  double tauBarostat;
420
421  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
422  short int have_target_pressure;
423
424 };
425
426
427 template<typename T> class NPTfm : public T{
428
429 public:
430
431  NPTfm ( SimInfo *theInfo, ForceFields* the_ff);
432  virtual ~NPTfm() {};
433
434  virtual void integrateStep( int calcPot, int calcStress ){
435    calcStress = 1;
436    T::integrateStep( calcPot, calcStress );
437    accIntegralOfChidt();
438  }
439
440  virtual double getConservedQuantity(void);
441  
442  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
443  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
444  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
445  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
446  void setChiTolerance(double tol) {chiTolerance = tol;}
447  void setPosIterTolerance(double tol) {posIterTolerance = tol;}
448
449 protected:
450
451  virtual void  moveA( void );
452  virtual void moveB( void );
453
454  virtual void resetIntegrator( void );
455
456  virtual int readyCheck();
457
458  void accIntegralOfChidt(void) { integralOfChidt += dt * chi;}
459
460  Molecule* myMolecules;
461  Atom** myAtoms;
462
463  // chi and eta are the propagated degrees of freedom
464
465  double chi;
327    double eta[3][3];
328 <  double NkBT;
329 <  double integralOfChidt;
330 <
470 <  // targetTemp, targetPressure, and tauBarostat must be set.  
471 <  // One of qmass or tauThermostat must be set;
472 <
473 <  double targetTemp;
474 <  double targetPressure;
475 <  double tauThermostat;
476 <  double tauBarostat;
477 <
478 <  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
479 <  short int have_target_pressure;
480 <  double chiTolerance;
481 <  short int have_chi_tolerance;
482 <  double posIterTolerance;
483 <  short int have_pos_iter_tolerance;
484 <
328 >  double oldEta[3][3];
329 >  double prevEta[3][3];
330 >  double vScale[3][3];
331   };
332  
333  
488 template<typename T> class NPTpr : public T{
489
490 public:
491
492  NPTpr ( SimInfo *theInfo, ForceFields* the_ff);
493  virtual ~NPTpr() {};
494
495  virtual void integrateStep( int calcPot, int calcStress ){
496    calcStress = 1;
497    T::integrateStep( calcPot, calcStress );
498  }
499
500  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
501  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
502  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
503  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
504  void setChiTolerance(double tol) {chiTolerance = tol;}
505  void setPosIterTolerance(double tol) {posIterTolerance = tol;}
506
507 protected:
508
509  virtual void  moveA( void );
510  virtual void moveB( void );
511
512  virtual int readyCheck();
513
514  virtual void resetIntegrator( void );
515
516  // chi and eta are the propagated degrees of freedom
517
518  double chi;
519  double eta[3][3];
520  double NkBT;
521
522  // targetTemp, targetPressure, and tauBarostat must be set.  
523  // One of qmass or tauThermostat must be set;
524
525  double targetTemp;
526  double targetPressure;
527  double tauThermostat;
528  double tauBarostat;
529
530  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
531  short int have_target_pressure;
532  double chiTolerance;
533  short int have_chi_tolerance;
534  double posIterTolerance;
535  short int have_pos_iter_tolerance;
536
537 };
538
539
334   template<typename T> class ZConstraint : public T {
335 <  
336 <  public:
335 >
336 >  public:
337    class ForceSubtractionPolicy{
338      public:
339        ForceSubtractionPolicy(ZConstraint<T>* integrator) {zconsIntegrator = integrator;}
340  
341 <      virtual void update() = 0;    
341 >      virtual void update() = 0;
342        virtual double getZFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) = 0;
343        virtual double getZFOfMovingMols(Atom* atom, double totalForce) = 0;
344        virtual double getHFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) = 0;
345        virtual double getHFOfUnconsMols(Atom* atom, double totalForce) = 0;
346 <    
346 >
347     protected:
348 <     ZConstraint<T>* zconsIntegrator;;
348 >     ZConstraint<T>* zconsIntegrator;
349    };
350  
351    class PolicyByNumber : public ForceSubtractionPolicy{
352  
353      public:
354 <      PolicyByNumber(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {}    
355 <      virtual void update();    
354 >      PolicyByNumber(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {}
355 >      virtual void update();
356        virtual double getZFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) ;
357        virtual double getZFOfMovingMols(Atom* atom, double totalForce) ;
358        virtual double getHFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce);
359        virtual double getHFOfUnconsMols(Atom* atom, double totalForce);
360 <    
360 >
361      private:
362        int totNumOfMovingAtoms;
363    };
# Line 571 | Line 365 | template<typename T> class ZConstraint : public T {
365    class PolicyByMass : public ForceSubtractionPolicy{
366  
367      public:
368 <      PolicyByMass(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {}  
369 <      
370 <      virtual void update();    
368 >      PolicyByMass(ZConstraint<T>* integrator) :ForceSubtractionPolicy(integrator) {}
369 >
370 >      virtual void update();
371        virtual double getZFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce) ;
372        virtual double getZFOfMovingMols(Atom* atom, double totalForce) ;
373        virtual double getHFOfFixedZMols(Molecule* mol, Atom* atom, double totalForce);
# Line 587 | Line 381 | template<typename T> class ZConstraint : public T {
381  
382    ZConstraint( SimInfo *theInfo, ForceFields* the_ff);
383    ~ZConstraint();
384 <    
384 >
385    void setZConsTime(double time)                  {this->zconsTime = time;}
386    void getZConsTime()                             {return zconsTime;}
387 <  
387 >
388    void setIndexOfAllZConsMols(vector<int> index) {indexOfAllZConsMols = index;}
389    void getIndexOfAllZConsMols()                  {return indexOfAllZConsMols;}
390 <  
390 >
391    void setZConsOutput(const char * fileName)          {zconsOutput = fileName;}
392    string getZConsOutput()                         {return zconsOutput;}
393 <  
393 >
394    virtual void integrate();
601  
395  
396 +
397   #ifdef IS_MPI
398    virtual void update();                      //which is called to indicate the molecules' migration
399   #endif
400  
401 +  enum ZConsState {zcsMoving, zcsFixed};
402 +
403 +  vector<Molecule*> zconsMols;              //z-constraint molecules array
404 +  vector<ZConsState> states;                 //state of z-constraint molecules
405 +
406 +
407 +
408 +  int totNumOfUnconsAtoms;              //total number of uncontraint atoms
409 +  double totalMassOfUncons;                //total mas of unconstraint molecules
410 +
411 +
412   protected:
413  
414 <  enum ZConsState {zcsMoving, zcsFixed};  
415 <
416 <  virtual void calcForce( int calcPot, int calcStress );
414 >
415 >
416 >  virtual void calcForce( int calcPot, int calcStress );
417    virtual void thermalize(void);
418 <  
418 >
419    void zeroOutVel();
420    void doZconstraintForce();
421    void doHarmonic();
# Line 628 | Line 433 | template<typename T> class ZConstraint : public T {
433    double zconsTol;                                 //tolerance of z-contratint
434    double zForceConst;                           //base force constant term
435                                                            //which is estimate by OOPSE
436 <  
437 <  vector<Molecule*> zconsMols;              //z-constraint molecules array
438 <  vector<double> massOfZConsMols;       //mass of z-constraint molecule
436 >
437 >
438 >  vector<double> massOfZConsMols;       //mass of z-constraint molecule
439    vector<double> kz;                              //force constant array
440 <  vector<ZConsState> states;                 //state of z-constraint molecules
440 >
441    vector<double> zPos;                          //
442 <  
443 <  
442 >
443 >
444    vector<Molecule*> unconsMols;           //unconstraint molecules array
445    vector<double> massOfUnconsMols;    //mass array of unconstraint molecules
641  double totalMassOfUncons;                //total mas of unconstraint molecules
446  
447 +
448    vector<ZConsParaItem>* parameters; //
449 <  
449 >
450    vector<int> indexOfAllZConsMols;     //index of All Z-Constraint Molecuels
451  
452 <  int* indexOfZConsMols;                   //index of local Z-Constraint Molecules  
452 >  int* indexOfZConsMols;                   //index of local Z-Constraint Molecules
453    double* fz;
454    double* curZPos;
650  
651  int totNumOfUnconsAtoms;              //total number of uncontraint atoms
455  
456 <  int whichDirection;                           //constraint direction
457 <  
456 >
457 >
458 >  int whichDirection;                           //constraint direction
459 >
460   private:
461 <  
461 >
462    string zconsOutput;                         //filename of zconstraint output
463    ZConsWriter* fzOut;                         //z-constraint writer
464  
465 <  double curZconsTime;                      
465 >  double curZconsTime;
466  
467    double calcMovingMolsCOMVel();
468    double calcSysCOMVel();
469    double calcTotalForce();
470 <  
470 >
471    ForceSubtractionPolicy* forcePolicy; //force subtraction policy
472    friend class ForceSubtractionPolicy;
473  
474   };
475  
476 + /*
477 + class OOPSEMinimizerBase : public RealIntegrator {
478 +  public:
479 +
480 +    OOPSEMinimizerBase ( SimInfo *theInfo, ForceFields* the_ff );
481 +    virtual ~OOPSEMinimizerBase();
482 +    
483 +    double calcGradient(vector<double>& x, vector<double>& grad);
484 +    void setCoor(vector<double>& x);
485 +    vector<double> getCoor();
486 +    void output(vector<double>& x, int iteration);
487 +    int getDim() {return dim;}
488 +    void constraintMove();
489 +    void shakeF();
490 +    void shakeR();
491 +  protected:
492 +    
493 +    int dim;
494 +    void calcDim();
495 + };
496 +
497 + //template<typename TMinimizer> class OOPSEMinimizer : public OOPSEMinimizerBase, TMinimizer{
498 + //  public:
499 + //    void writeOutput();
500 + //};
501 + */  
502   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines