| 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 | 
  | 
 */ | 
| 201 | 
  | 
    data_[HYDROGENBONDING_POTENTIAL] = hydrogenbonding_potential; | 
| 202 | 
  | 
    statsMap_["HYDROGENBONDING_POTENTIAL"] =  HYDROGENBONDING_POTENTIAL; | 
| 203 | 
  | 
 | 
| 204 | 
+ | 
    StatsData reciprocal_potential; | 
| 205 | 
+ | 
    reciprocal_potential.units =  "kcal/mol"; | 
| 206 | 
+ | 
    reciprocal_potential.title =  "Reciprocal Space Potential";     | 
| 207 | 
+ | 
    reciprocal_potential.dataType = "RealType"; | 
| 208 | 
+ | 
    reciprocal_potential.accumulator = new Accumulator(); | 
| 209 | 
+ | 
    data_[RECIPROCAL_POTENTIAL] = reciprocal_potential; | 
| 210 | 
+ | 
    statsMap_["RECIPROCAL_POTENTIAL"] =  RECIPROCAL_POTENTIAL; | 
| 211 | 
+ | 
 | 
| 212 | 
  | 
    StatsData short_range_potential; | 
| 213 | 
  | 
    short_range_potential.units =  "kcal/mol"; | 
| 214 | 
  | 
    short_range_potential.title =  "Short Range Potential"; | 
| 281 | 
  | 
    data_[SYSTEM_DIPOLE] = system_dipole; | 
| 282 | 
  | 
    statsMap_["SYSTEM_DIPOLE"] =  SYSTEM_DIPOLE; | 
| 283 | 
  | 
 | 
| 284 | 
+ | 
    StatsData system_quadrupole; | 
| 285 | 
+ | 
    system_quadrupole.units =  "C*m*m"; | 
| 286 | 
+ | 
    system_quadrupole.title =  "System Quadrupole"; | 
| 287 | 
+ | 
    system_quadrupole.dataType = "Mat3x3d"; | 
| 288 | 
+ | 
    system_quadrupole.accumulator = new MatrixAccumulator(); | 
| 289 | 
+ | 
    data_[SYSTEM_QUADRUPOLE] = system_quadrupole; | 
| 290 | 
+ | 
    statsMap_["SYSTEM_QUADRUPOLE"] =  SYSTEM_QUADRUPOLE; | 
| 291 | 
+ | 
 | 
| 292 | 
  | 
    StatsData tagged_pair_distance; | 
| 293 | 
  | 
    tagged_pair_distance.units =  "Ang"; | 
| 294 | 
  | 
    tagged_pair_distance.title =  "Tagged_Pair_Distance"; | 
| 328 | 
  | 
    electronic_temperature.accumulator = new Accumulator(); | 
| 329 | 
  | 
    data_[ELECTRONIC_TEMPERATURE] = electronic_temperature; | 
| 330 | 
  | 
    statsMap_["ELECTRONIC_TEMPERATURE"] = ELECTRONIC_TEMPERATURE; | 
| 331 | 
+ | 
 | 
| 332 | 
+ | 
    StatsData com; | 
| 333 | 
+ | 
    com.units =  "A"; | 
| 334 | 
+ | 
    com.title =  "Center of Mass"; | 
| 335 | 
+ | 
    com.dataType = "Vector3d"; | 
| 336 | 
+ | 
    com.accumulator = new VectorAccumulator(); | 
| 337 | 
+ | 
    data_[COM] = com; | 
| 338 | 
+ | 
    statsMap_["COM"] =  COM; | 
| 339 | 
+ | 
 | 
| 340 | 
+ | 
    StatsData comVel; | 
| 341 | 
+ | 
    comVel.units =  "A/fs"; | 
| 342 | 
+ | 
    comVel.title =  "Center of Mass Velocity"; | 
| 343 | 
+ | 
    comVel.dataType = "Vector3d"; | 
| 344 | 
+ | 
    comVel.accumulator = new VectorAccumulator(); | 
| 345 | 
+ | 
    data_[COM_VELOCITY] = comVel; | 
| 346 | 
+ | 
    statsMap_["COM_VELOCITY"] =  COM_VELOCITY; | 
| 347 | 
+ | 
 | 
| 348 | 
+ | 
    StatsData angMom; | 
| 349 | 
+ | 
    angMom.units =  "amu A^2/fs"; | 
| 350 | 
+ | 
    angMom.title =  "Angular Momentum"; | 
| 351 | 
+ | 
    angMom.dataType = "Vector3d"; | 
| 352 | 
+ | 
    angMom.accumulator = new VectorAccumulator(); | 
| 353 | 
+ | 
    data_[ANGULAR_MOMENTUM] = angMom; | 
| 354 | 
+ | 
    statsMap_["ANGULAR_MOMENTUM"] =  ANGULAR_MOMENTUM; | 
| 355 | 
  | 
 | 
| 356 | 
  | 
    // Now, set some defaults in the mask: | 
| 357 | 
  | 
 | 
| 384 | 
  | 
      statsMask_.set(SYSTEM_DIPOLE); | 
| 385 | 
  | 
    } | 
| 386 | 
  | 
 | 
| 387 | 
+ | 
    // Why do we have both of these? | 
| 388 | 
+ | 
    if (simParams->getAccumulateBoxQuadrupole()) { | 
| 389 | 
+ | 
      statsMask_.set(SYSTEM_QUADRUPOLE); | 
| 390 | 
+ | 
    } | 
| 391 | 
+ | 
    if (info_->getCalcBoxQuadrupole()){ | 
| 392 | 
+ | 
      statsMask_.set(SYSTEM_QUADRUPOLE); | 
| 393 | 
+ | 
    } | 
| 394 | 
+ | 
 | 
| 395 | 
  | 
    if (simParams->havePrintHeatFlux()) { | 
| 396 | 
  | 
      if (simParams->getPrintHeatFlux()){ | 
| 397 | 
  | 
        statsMask_.set(HEATFLUX); | 
| 427 | 
  | 
    }    | 
| 428 | 
  | 
  } | 
| 429 | 
  | 
 | 
| 430 | 
+ | 
  Stats::~Stats() { | 
| 431 | 
+ | 
    data_.clear(); | 
| 432 | 
+ | 
    statsMap_.clear(); | 
| 433 | 
+ | 
  } | 
| 434 | 
  | 
 | 
| 435 | 
  | 
  std::string Stats::getTitle(int index) { | 
| 436 | 
  | 
    assert(index >=0 && index < ENDINDEX); | 
| 448 | 
  | 
  } | 
| 449 | 
  | 
 | 
| 450 | 
  | 
  void Stats::collectStats(){ | 
| 399 | 
– | 
    Globals* simParams = info_->getSimParams(); | 
| 451 | 
  | 
    Snapshot* snap = info_->getSnapshotManager()->getCurrentSnapshot(); | 
| 452 | 
  | 
    Thermo thermo(info_); | 
| 453 | 
  | 
    | 
| 484 | 
  | 
        case SYSTEM_DIPOLE: | 
| 485 | 
  | 
          dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getSystemDipole()); | 
| 486 | 
  | 
          break; | 
| 487 | 
+ | 
        case SYSTEM_QUADRUPOLE: | 
| 488 | 
+ | 
          dynamic_cast<MatrixAccumulator *>(data_[i].accumulator)->add(thermo.getSystemQuadrupole()); | 
| 489 | 
+ | 
          break; | 
| 490 | 
  | 
        case HEATFLUX: | 
| 491 | 
  | 
          dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getHeatFlux()); | 
| 492 | 
  | 
          break; | 
| 517 | 
  | 
        case HYDROGENBONDING_POTENTIAL: | 
| 518 | 
  | 
          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(snap->getLongRangePotentials()[HYDROGENBONDING_FAMILY]); | 
| 519 | 
  | 
          break; | 
| 520 | 
+ | 
        case RECIPROCAL_POTENTIAL: | 
| 521 | 
+ | 
          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(snap->getReciprocalPotential()); | 
| 522 | 
+ | 
          break; | 
| 523 | 
  | 
        case SHORT_RANGE_POTENTIAL: | 
| 524 | 
  | 
          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(snap->getShortRangePotential()); | 
| 525 | 
  | 
          break; | 
| 544 | 
  | 
        case TAGGED_PAIR_DISTANCE: | 
| 545 | 
  | 
          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getTaggedAtomPairDistance()); | 
| 546 | 
  | 
          break; | 
| 547 | 
+ | 
        case ELECTRONIC_TEMPERATURE: | 
| 548 | 
+ | 
          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getElectronicTemperature()); | 
| 549 | 
+ | 
          break;  | 
| 550 | 
+ | 
        case COM: | 
| 551 | 
+ | 
          dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getCom()); | 
| 552 | 
+ | 
          break; | 
| 553 | 
+ | 
        case COM_VELOCITY: | 
| 554 | 
+ | 
          dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getComVel()); | 
| 555 | 
+ | 
          break; | 
| 556 | 
+ | 
        case ANGULAR_MOMENTUM: | 
| 557 | 
+ | 
          dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getAngularMomentum()); | 
| 558 | 
+ | 
          break; | 
| 559 | 
  | 
          /* | 
| 560 | 
  | 
        case SHADOWH: | 
| 561 | 
  | 
          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getShadowHamiltionian()); | 
| 564 | 
  | 
          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getHelfandMoment()); | 
| 565 | 
  | 
          break; | 
| 566 | 
  | 
          */ | 
| 498 | 
– | 
        case ELECTRONIC_TEMPERATURE: | 
| 499 | 
– | 
          dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getElectronicTemperature()); | 
| 500 | 
– | 
          break;  | 
| 567 | 
  | 
        } | 
| 568 | 
  | 
      } | 
| 569 | 
  | 
    } |