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 561 by mmeineke, Fri Jun 20 20:29:36 2003 UTC vs.
Revision 600 by gezelter, Mon Jul 14 22:38:13 2003 UTC

# Line 11 | Line 11 | const int maxIteration = 300;
11  
12   const double kB = 8.31451e-7;// boltzmann constant amu*Ang^2*fs^-2/K
13   const double eConvert = 4.184e-4; // converts kcal/mol -> amu*A^2/fs^2
14 + const double p_convert = 1.63882576e8; //converts amu*fs^-2*Ang^-1 -> atm
15   const int maxIteration = 300;
16   const double tol = 1.0e-6;
17  
# Line 34 | Line 35 | class Integrator : public BaseIntegrator { (protected)
35    
36    void checkConstraints( void );
37    void rotate( int axes1, int axes2, double angle, double j[3],
38 <               double A[9] );
38 >               double A[3][3] );
39  
40  
41    ForceFields* myFF;
# Line 62 | Line 63 | class Integrator : public BaseIntegrator { (protected)
63    double dt;
64    double dt2;
65  
65  double* pos;
66  double* vel;
67  double* frc;
68  double* trq;
69  double* Amat;
70
66    Thermo *tStats;
67    StatWriter*  statOut;
68    DumpWriter*  dumpOut;
# Line 92 | Line 87 | class NVT : public Integrator{ (public)
87    NVT ( SimInfo *theInfo, ForceFields* the_ff);
88    virtual ~NVT() {}
89  
95  void setQmass(double q) {qmass = q; have_qmass = 1;}
90    void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
91    void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
92  
# Line 103 | Line 97 | class NVT : public Integrator{ (public)
97  
98    virtual int readyCheck();
99  
100 <  // zeta is a propagated degree of freedom.
100 >  // chi is a propagated degree of freedom.
101  
102 <  double zeta;
102 >  double chi;
103  
104 <  // targetTemp must be set.  One of qmass or tauThermostat must be set;
104 >  // targetTemp must be set.  tauThermostat must also be set;
105  
112  double qmass;
106    double targetTemp;
107    double tauThermostat;
108 +  
109 +  short int have_tau_thermostat, have_target_temp;
110  
111 + };
112 +
113 +
114 + class NPTi : public Integrator{
115 +
116 + public:
117 +
118 +  NPTi ( SimInfo *theInfo, ForceFields* the_ff);
119 +  virtual ~NPTi() {};
120 +
121 +  virtual void integrateStep( int calcPot, int calcStress ){
122 +    calcStress = 1;
123 +    Integrator::integrateStep( calcPot, calcStress );
124 +  }
125 +
126 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
127 +  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
128 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
129 +  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
130 +
131 + protected:
132 +
133 +  virtual void  moveA( void );
134 +  virtual void moveB( void );
135 +
136 +  virtual int readyCheck();
137 +
138 +  // chi and eta are the propagated degrees of freedom
139 +
140 +  double chi;
141 +  double eta;
142    double NkBT;
117  
118  short int have_tau_thermostat, have_target_temp, have_qmass;
143  
144 +  // targetTemp, targetPressure, and tauBarostat must be set.  
145 +  // One of qmass or tauThermostat must be set;
146 +
147 +  double targetTemp;
148 +  double targetPressure;
149 +  double tauThermostat;
150 +  double tauBarostat;
151 +
152 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
153 +  short int have_target_pressure;
154 +
155   };
156  
157 + class NPTim : public Integrator{
158  
159 < class NPT : public Integrator{
159 > public:
160  
161 +  NPTim ( SimInfo *theInfo, ForceFields* the_ff);
162 +  virtual ~NPTim() {};
163 +
164 +  virtual void integrateStep( int calcPot, int calcStress ){
165 +    calcStress = 1;
166 +    Integrator::integrateStep( calcPot, calcStress );
167 +  }
168 +
169 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
170 +  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
171 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
172 +  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
173 +
174 + protected:
175 +
176 +  virtual void  moveA( void );
177 +  virtual void moveB( void );
178 +
179 +  virtual int readyCheck();
180 +
181 +  // chi and eta are the propagated degrees of freedom
182 +
183 +  double chi;
184 +  double eta;
185 +  double NkBT;
186 +
187 +  // targetTemp, targetPressure, and tauBarostat must be set.  
188 +  // One of qmass or tauThermostat must be set;
189 +
190 +  double targetTemp;
191 +  double targetPressure;
192 +  double tauThermostat;
193 +  double tauBarostat;
194 +
195 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
196 +  short int have_target_pressure;
197 +
198 + };
199 +
200 + class NPTf : public Integrator{
201 +
202   public:
203  
204 <  NPT ( SimInfo *theInfo, ForceFields* the_ff);
205 <  virtual ~NPT();
204 >  NPTf ( SimInfo *theInfo, ForceFields* the_ff);
205 >  virtual ~NPTf() {};
206  
207 <  void setQmass(double q) {qmass = q; have_qmass = 1;}
207 >  virtual void integrateStep( int calcPot, int calcStress ){
208 >    calcStress = 1;
209 >    Integrator::integrateStep( calcPot, calcStress );
210 >  }
211 >
212    void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
213    void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
214    void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
# Line 140 | Line 221 | class NPT : public Integrator{ (protected)
221  
222    virtual int readyCheck();
223  
224 <  Atom** atoms;
224 >  // chi and eta are the propagated degrees of freedom
225  
226 <  // zeta and epsilonDot are the propagated degrees of freedom.
226 >  double chi;
227 >  double eta[3][3];
228 >  double NkBT;
229  
230 <  double zeta;
231 <  double epsilonDot;
230 >  // targetTemp, targetPressure, and tauBarostat must be set.  
231 >  // One of qmass or tauThermostat must be set;
232  
233 +  double targetTemp;
234 +  double targetPressure;
235 +  double tauThermostat;
236 +  double tauBarostat;
237 +
238 +  short int have_tau_thermostat, have_tau_barostat, have_target_temp;
239 +  short int have_target_pressure;
240 +
241 + };
242 +
243 + class NPTfm : public Integrator{
244 +
245 + public:
246 +
247 +  NPTfm ( SimInfo *theInfo, ForceFields* the_ff);
248 +  virtual ~NPTfm() {};
249 +
250 +  virtual void integrateStep( int calcPot, int calcStress ){
251 +    calcStress = 1;
252 +    Integrator::integrateStep( calcPot, calcStress );
253 +  }
254 +
255 +  void setTauThermostat(double tt) {tauThermostat = tt; have_tau_thermostat=1;}
256 +  void setTauBarostat(double tb) {tauBarostat = tb; have_tau_barostat=1;}
257 +  void setTargetTemp(double tt) {targetTemp = tt; have_target_temp = 1;}
258 +  void setTargetPressure(double tp) {targetPressure = tp; have_target_pressure = 1;}
259 +
260 + protected:
261 +
262 +  virtual void  moveA( void );
263 +  virtual void moveB( void );
264 +
265 +  virtual int readyCheck();
266 +
267 +  // chi and eta are the propagated degrees of freedom
268 +
269 +  double chi;
270 +  double eta[3][3];
271 +  double NkBT;
272 +
273    // targetTemp, targetPressure, and tauBarostat must be set.  
274    // One of qmass or tauThermostat must be set;
275  
153  double qmass;
276    double targetTemp;
277    double targetPressure;
278    double tauThermostat;
279    double tauBarostat;
280  
281    short int have_tau_thermostat, have_tau_barostat, have_target_temp;
282 <  short int have_target_pressure, have_qmass;
282 >  short int have_target_pressure;
283  
284   };
285  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines