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

Comparing branches/development/src/brains/Stats.cpp (file contents):
Revision 1813 by gezelter, Fri Nov 16 21:39:55 2012 UTC vs.
Revision 1874 by gezelter, Wed May 15 15:09:35 2013 UTC

# Line 35 | Line 35
35   *                                                                      
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).          
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39   * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40   * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
# Line 195 | Line 195 | namespace OpenMD {
195  
196      StatsData hydrogenbonding_potential;
197      hydrogenbonding_potential.units =  "kcal/mol";
198 <    hydrogenbonding_potential.title =  "Metallic Potential";    
198 >    hydrogenbonding_potential.title =  "Hydrogen Bonding Potential";    
199      hydrogenbonding_potential.dataType = "RealType";
200      hydrogenbonding_potential.accumulator = new Accumulator();
201      data_[HYDROGENBONDING_POTENTIAL] = hydrogenbonding_potential;
# Line 312 | Line 312 | namespace OpenMD {
312      electronic_temperature.accumulator = new Accumulator();
313      data_[ELECTRONIC_TEMPERATURE] = electronic_temperature;
314      statsMap_["ELECTRONIC_TEMPERATURE"] = ELECTRONIC_TEMPERATURE;
315 +
316 +    StatsData com;
317 +    com.units =  "A";
318 +    com.title =  "Center of Mass";
319 +    com.dataType = "Vector3d";
320 +    com.accumulator = new VectorAccumulator();
321 +    data_[COM] = com;
322 +    statsMap_["COM"] =  COM;
323 +
324 +    StatsData comVel;
325 +    comVel.units =  "A/fs";
326 +    comVel.title =  "Center of Mass Velocity";
327 +    comVel.dataType = "Vector3d";
328 +    comVel.accumulator = new VectorAccumulator();
329 +    data_[COM_VELOCITY] = comVel;
330 +    statsMap_["COM_VELOCITY"] =  COM_VELOCITY;
331 +
332 +    StatsData angMom;
333 +    angMom.units =  "amu A^2/fs";
334 +    angMom.title =  "Angular Momentum";
335 +    angMom.dataType = "Vector3d";
336 +    angMom.accumulator = new VectorAccumulator();
337 +    data_[ANGULAR_MOMENTUM] = angMom;
338 +    statsMap_["ANGULAR_MOMENTUM"] =  ANGULAR_MOMENTUM;
339  
340      // Now, set some defaults in the mask:
341  
# Line 379 | Line 403 | namespace OpenMD {
403      }  
404    }
405  
406 +  Stats::~Stats() {
407 +    data_.clear();
408 +    statsMap_.clear();
409 +  }
410  
411    std::string Stats::getTitle(int index) {
412      assert(index >=0 && index < ENDINDEX);
# Line 396 | Line 424 | namespace OpenMD {
424    }
425  
426    void Stats::collectStats(){
399    Globals* simParams = info_->getSimParams();
427      Snapshot* snap = info_->getSnapshotManager()->getCurrentSnapshot();
428      Thermo thermo(info_);
429    
# Line 487 | Line 514 | namespace OpenMD {
514          case TAGGED_PAIR_DISTANCE:
515            dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getTaggedAtomPairDistance());
516            break;
517 +        case ELECTRONIC_TEMPERATURE:
518 +          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getElectronicTemperature());
519 +          break;
520 +        case COM:
521 +          dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getCom());
522 +          break;
523 +        case COM_VELOCITY:
524 +          dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getComVel());
525 +          break;
526 +        case ANGULAR_MOMENTUM:
527 +          dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getAngularMomentum());
528 +          break;
529            /*
530          case SHADOWH:
531            dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getShadowHamiltionian());
# Line 495 | Line 534 | namespace OpenMD {
534            dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getHelfandMoment());
535            break;
536            */
498        case ELECTRONIC_TEMPERATURE:
499          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getElectronicTemperature());
500          break;
537          }
538        }
539      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines