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 645 by tim, Tue Jul 22 19:54:52 2003 UTC vs.
Revision 658 by tim, Thu Jul 31 15:35:07 2003 UTC

# Line 1 | Line 1
1   #ifndef _INTEGRATOR_H_
2   #define _INTEGRATOR_H_
3  
4 + #include <string>
5 + #include <vector>
6   #include "Atom.hpp"
7   #include "Molecule.hpp"
8   #include "SRI.hpp"
# Line 9 | Line 11
11   #include "ForceFields.hpp"
12   #include "Thermo.hpp"
13   #include "ReadWrite.hpp"
14 + #include "ZConsWriter.hpp"
15  
16 + using namespace std;
17   const double kB = 8.31451e-7;// boltzmann constant amu*Ang^2*fs^-2/K
18   const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2
19   const double p_convert = 1.63882576e8; //converts amu*fs^-2*Ang^-1 -> atm
# Line 292 | Line 296 | template<typename T> class NPTfm : public T{ (protecte
296  
297   };
298  
299 + template<typename T> class ZConstraint : public T {
300 +
301 + public:
302 +
303 +  ZConstraint( SimInfo *theInfo, ForceFields* the_ff);
304 +  ~ZConstraint();
305 +
306 +  virtual void integrateStep( int calcPot, int calcStress );
307 +  
308 +  
309 +  void setZConsTime(double time)                  {this->zconsTime = time;}
310 +  void getZConsTime()                             {return zconsTime;}
311 +  
312 +  void setIndexOfAllZConsMols(vector<int> index)  {indexOfAllZConsMols = index;}
313 +  void getIndexOfAllZConsMols()                   {return indexOfAllZConsMols;}
314 +  
315 +  void setZConsOutput(const char * fileName)      {zconsOutput = fileName;}
316 +  string getZConsOutput()                         {return zconsOutput;}
317 +
318 + #ifdef IS_MPI
319 +  virtual void update(); //which is called to indicate the molecules' migration
320   #endif
321 +
322 + protected:
323 +
324 +  double zconsTime;
325 +  
326 +  void resetZ(void);
327 +  
328 +  vector<Molecule*> zconsMols;
329 +  vector<double> massOfZConsMols;
330 +  
331 +  vector<Molecule*> unconsMols;
332 +  vector<double> massOfUnconsMols;
333 +  double totalMassOfUncons;
334 +
335 +  vector<double> allRefZ;    
336 +  vector<double> refZ;
337 +  
338 +  vector<int> indexOfAllZConsMols;     //index of All Z-Constraint Molecuels
339 +  int* indexOfZConsMols;               //index of local Z-Constraint Molecules
340 +    
341 +  double* fz;
342 +  
343 + private:
344 +
345 +  int isZConstraintMol(Molecule* mol);
346 +  string zconsOutput;
347 +  ZConsWriter* fzOut;
348 + };
349 +
350 + #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines