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

Comparing:
trunk/src/integrators/VelocityVerletIntegrator.cpp (file contents), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/integrators/VelocityVerletIntegrator.cpp (file contents), Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 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   /**
# Line 50 | Line 51
51   #include "integrators/VelocityVerletIntegrator.hpp"
52   #include "integrators/DLM.hpp"
53   #include "utils/StringUtils.hpp"
54 + #include "utils/ProgressBar.hpp"
55  
56   namespace OpenMD {
57    VelocityVerletIntegrator::VelocityVerletIntegrator(SimInfo *info) : Integrator(info), rotAlgo(NULL) {
# Line 65 | Line 67 | namespace OpenMD {
67    
68    void VelocityVerletIntegrator::initialize(){
69      
70 <    forceMan_->init();
70 >    forceMan_->initialize();
71      
72      // remove center of mass drift velocity (in case we passed in a
73      // configuration that was drifting)
74      velocitizer_->removeComDrift();
75      
76      // initialize the forces before the first step
77 <    calcForce(true, true);
77 >    calcForce();
78      
79      // execute the constraint algorithm to make sure that the system is
80      // constrained at the very beginning  
81      if (info_->getNGlobalConstraints() > 0) {
82        rattle->constraintA();
83 <      calcForce(true, true);
83 >      calcForce();
84        rattle->constraintB();      
85        //copy the current snapshot to previous snapshot
86        info_->getSnapshotManager()->advance();
# Line 94 | Line 96 | namespace OpenMD {
96  
97      dumpWriter->writeDumpAndEor();
98  
99 +    progressBar = new ProgressBar();
100 +
101      //save statistics, before writeStat,  we must save statistics
102      thermo.saveStat();
103      saveConservedQuantity();
# Line 115 | Line 119 | namespace OpenMD {
119      needStress = false;      
120      
121    }
122 <
122 >
123    void VelocityVerletIntegrator::doIntegrate() {
124    
125    
# Line 128 | Line 132 | namespace OpenMD {
132        integrateStep();
133      
134        postStep();
135 <    
135 >      
136      }
137    
138      finalize();
# Line 160 | Line 164 | namespace OpenMD {
164        }
165      }
166      if (useRNEMD) {
163      rnemd_->collectData();
167        if (currentSnapshot_->getTime() >= currRNEMD) {
168          rnemd_->doRNEMD();
169          currRNEMD += RNEMD_exchangeTime;
170        }
171 +      rnemd_->collectData();
172      }
173      
174      if (currentSnapshot_->getTime() >= currSample) {
# Line 183 | Line 187 | namespace OpenMD {
187        }
188  
189        statWriter->writeStat(currentSnapshot_->statData);
190 <      
190 >
191 >      progressBar->setStatus(currentSnapshot_->getTime(), runTime);
192 >      progressBar->update();
193 >
194        needPotential = false;
195        needStress = false;
196        currStatus += statusTime;
# Line 210 | Line 217 | namespace OpenMD {
217    void VelocityVerletIntegrator::integrateStep() {
218    
219      moveA();
220 <    calcForce(needPotential, needStress);
220 >    calcForce();
221      moveB();
222    }
223  
224  
225 <  void VelocityVerletIntegrator::calcForce(bool needPotential,
226 <                                           bool needStress) {
220 <    forceMan_->calcForces(needPotential, needStress);
225 >  void VelocityVerletIntegrator::calcForce() {
226 >    forceMan_->calcForces();
227    }
228  
229    DumpWriter* VelocityVerletIntegrator::createDumpWriter() {

Comparing:
trunk/src/integrators/VelocityVerletIntegrator.cpp (property svn:keywords), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/integrators/VelocityVerletIntegrator.cpp (property svn:keywords), Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines