ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/integrators/NPT.cpp
(Generate patch)

Comparing:
trunk/src/integrators/NPT.cpp (file contents), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/integrators/NPT.cpp (file contents), Revision 1759 by gezelter, Thu Jun 21 18:55:33 2012 UTC

# Line 36 | Line 36
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38   * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   #include <math.h>
# Line 117 | Line 118 | namespace OpenMD {
118        tt2 = tauThermostat * tauThermostat;
119        tb2 = tauBarostat * tauBarostat;
120  
121 <      update();
121 >      updateSizes();
122      }
123  
124    NPT::~NPT() {
125    }
126  
127 <  void NPT::doUpdate() {
127 >  void NPT::doUpdateSizes() {
128  
129      oldPos.resize(info_->getNIntegrableObjects());
130      oldVel.resize(info_->getNIntegrableObjects());
# Line 188 | Line 189 | namespace OpenMD {
189            //ji[j] += dt2 * (Tb[j] * PhysicalConstants::energyConvert - ji[j]*chi);
190            ji += dt2*PhysicalConstants::energyConvert * Tb - dt2*chi* ji;
191                  
192 <          rotAlgo->rotate(integrableObject, ji, dt);
192 >          rotAlgo_->rotate(integrableObject, ji, dt);
193  
194            integrableObject->setJ(ji);
195          }
# Line 204 | Line 205 | namespace OpenMD {
205      //calculate the integral of chidt
206      integralOfChidt += dt2 * chi;
207      
208 +    flucQ_->moveA();
209 +
210 +
211      index = 0;
212      for (mol = info_->beginMolecule(i); mol != NULL; mol = info_->nextMolecule(i)) {
213        for (integrableObject = mol->beginIntegrableObject(j); integrableObject != NULL;
# Line 232 | Line 236 | namespace OpenMD {
236          }
237        }
238  
239 <      rattle->constraintA();
239 >      rattle_->constraintA();
240      }
241  
242      // Scale the box after all the positions have been moved:
# Line 273 | Line 277 | namespace OpenMD {
277             integrableObject = mol->nextIntegrableObject(j)) {
278                  
279          oldVel[index] = integrableObject->getVel();
280 <        oldJi[index] = integrableObject->getJ();
280 >
281 >        if (integrableObject->isDirectional())
282 >           oldJi[index] = integrableObject->getJ();
283 >
284          ++index;
285        }
286      }
# Line 323 | Line 330 | namespace OpenMD {
330          }
331        }
332          
333 <      rattle->constraintB();
333 >      rattle_->constraintB();
334  
335        if ((fabs(prevChi - chi) <= chiTolerance) && this->etaConverged())
336          break;
# Line 335 | Line 342 | namespace OpenMD {
342      currentSnapshot_->setChi(chi);
343      currentSnapshot_->setIntegralOfChiDt(integralOfChidt);    
344  
345 +    flucQ_->moveB();
346      saveEta();
347    }
348  

Comparing:
trunk/src/integrators/NPT.cpp (property svn:keywords), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/integrators/NPT.cpp (property svn:keywords), Revision 1759 by gezelter, Thu Jun 21 18:55:33 2012 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines