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 |
|
*/ |
42 |
|
|
43 |
– |
/** |
44 |
– |
* @file Stats.cpp |
45 |
– |
* @author tlin |
46 |
– |
* @date 11/04/2004 |
47 |
– |
* @time 14:26am |
48 |
– |
* @version 1.0 |
49 |
– |
*/ |
50 |
– |
|
43 |
|
#include "brains/Stats.hpp" |
44 |
|
#include "brains/Thermo.hpp" |
45 |
|
|
193 |
|
data_[HYDROGENBONDING_POTENTIAL] = hydrogenbonding_potential; |
194 |
|
statsMap_["HYDROGENBONDING_POTENTIAL"] = HYDROGENBONDING_POTENTIAL; |
195 |
|
|
196 |
+ |
StatsData reciprocal_potential; |
197 |
+ |
reciprocal_potential.units = "kcal/mol"; |
198 |
+ |
reciprocal_potential.title = "Reciprocal Space Potential"; |
199 |
+ |
reciprocal_potential.dataType = "RealType"; |
200 |
+ |
reciprocal_potential.accumulator = new Accumulator(); |
201 |
+ |
data_[RECIPROCAL_POTENTIAL] = reciprocal_potential; |
202 |
+ |
statsMap_["RECIPROCAL_POTENTIAL"] = RECIPROCAL_POTENTIAL; |
203 |
+ |
|
204 |
|
StatsData short_range_potential; |
205 |
|
short_range_potential.units = "kcal/mol"; |
206 |
|
short_range_potential.title = "Short Range Potential"; |
272 |
|
system_dipole.accumulator = new VectorAccumulator(); |
273 |
|
data_[SYSTEM_DIPOLE] = system_dipole; |
274 |
|
statsMap_["SYSTEM_DIPOLE"] = SYSTEM_DIPOLE; |
275 |
+ |
|
276 |
+ |
StatsData system_quadrupole; |
277 |
+ |
system_quadrupole.units = "C*m*m"; |
278 |
+ |
system_quadrupole.title = "System Quadrupole"; |
279 |
+ |
system_quadrupole.dataType = "Mat3x3d"; |
280 |
+ |
system_quadrupole.accumulator = new MatrixAccumulator(); |
281 |
+ |
data_[SYSTEM_QUADRUPOLE] = system_quadrupole; |
282 |
+ |
statsMap_["SYSTEM_QUADRUPOLE"] = SYSTEM_QUADRUPOLE; |
283 |
|
|
284 |
|
StatsData tagged_pair_distance; |
285 |
|
tagged_pair_distance.units = "Ang"; |
320 |
|
electronic_temperature.accumulator = new Accumulator(); |
321 |
|
data_[ELECTRONIC_TEMPERATURE] = electronic_temperature; |
322 |
|
statsMap_["ELECTRONIC_TEMPERATURE"] = ELECTRONIC_TEMPERATURE; |
323 |
+ |
|
324 |
+ |
StatsData com; |
325 |
+ |
com.units = "A"; |
326 |
+ |
com.title = "Center of Mass"; |
327 |
+ |
com.dataType = "Vector3d"; |
328 |
+ |
com.accumulator = new VectorAccumulator(); |
329 |
+ |
data_[COM] = com; |
330 |
+ |
statsMap_["COM"] = COM; |
331 |
+ |
|
332 |
+ |
StatsData comVel; |
333 |
+ |
comVel.units = "A/fs"; |
334 |
+ |
comVel.title = "Center of Mass Velocity"; |
335 |
+ |
comVel.dataType = "Vector3d"; |
336 |
+ |
comVel.accumulator = new VectorAccumulator(); |
337 |
+ |
data_[COM_VELOCITY] = comVel; |
338 |
+ |
statsMap_["COM_VELOCITY"] = COM_VELOCITY; |
339 |
+ |
|
340 |
+ |
StatsData angMom; |
341 |
+ |
angMom.units = "amu A^2/fs"; |
342 |
+ |
angMom.title = "Angular Momentum"; |
343 |
+ |
angMom.dataType = "Vector3d"; |
344 |
+ |
angMom.accumulator = new VectorAccumulator(); |
345 |
+ |
data_[ANGULAR_MOMENTUM] = angMom; |
346 |
+ |
statsMap_["ANGULAR_MOMENTUM"] = ANGULAR_MOMENTUM; |
347 |
|
|
348 |
|
// Now, set some defaults in the mask: |
349 |
|
|
376 |
|
statsMask_.set(SYSTEM_DIPOLE); |
377 |
|
} |
378 |
|
|
379 |
+ |
// Why do we have both of these? |
380 |
+ |
if (simParams->getAccumulateBoxQuadrupole()) { |
381 |
+ |
statsMask_.set(SYSTEM_QUADRUPOLE); |
382 |
+ |
} |
383 |
+ |
if (info_->getCalcBoxQuadrupole()){ |
384 |
+ |
statsMask_.set(SYSTEM_QUADRUPOLE); |
385 |
+ |
} |
386 |
+ |
|
387 |
|
if (simParams->havePrintHeatFlux()) { |
388 |
|
if (simParams->getPrintHeatFlux()){ |
389 |
|
statsMask_.set(HEATFLUX); |
419 |
|
} |
420 |
|
} |
421 |
|
|
422 |
+ |
Stats::~Stats() { |
423 |
+ |
data_.clear(); |
424 |
+ |
statsMap_.clear(); |
425 |
+ |
} |
426 |
|
|
427 |
|
std::string Stats::getTitle(int index) { |
428 |
|
assert(index >=0 && index < ENDINDEX); |
440 |
|
} |
441 |
|
|
442 |
|
void Stats::collectStats(){ |
399 |
– |
Globals* simParams = info_->getSimParams(); |
443 |
|
Snapshot* snap = info_->getSnapshotManager()->getCurrentSnapshot(); |
444 |
|
Thermo thermo(info_); |
445 |
|
|
476 |
|
case SYSTEM_DIPOLE: |
477 |
|
dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getSystemDipole()); |
478 |
|
break; |
479 |
+ |
case SYSTEM_QUADRUPOLE: |
480 |
+ |
dynamic_cast<MatrixAccumulator *>(data_[i].accumulator)->add(thermo.getSystemQuadrupole()); |
481 |
+ |
break; |
482 |
|
case HEATFLUX: |
483 |
|
dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getHeatFlux()); |
484 |
|
break; |
509 |
|
case HYDROGENBONDING_POTENTIAL: |
510 |
|
dynamic_cast<Accumulator *>(data_[i].accumulator)->add(snap->getLongRangePotentials()[HYDROGENBONDING_FAMILY]); |
511 |
|
break; |
512 |
+ |
case RECIPROCAL_POTENTIAL: |
513 |
+ |
dynamic_cast<Accumulator *>(data_[i].accumulator)->add(snap->getReciprocalPotential()); |
514 |
+ |
break; |
515 |
|
case SHORT_RANGE_POTENTIAL: |
516 |
|
dynamic_cast<Accumulator *>(data_[i].accumulator)->add(snap->getShortRangePotential()); |
517 |
|
break; |
536 |
|
case TAGGED_PAIR_DISTANCE: |
537 |
|
dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getTaggedAtomPairDistance()); |
538 |
|
break; |
539 |
+ |
case ELECTRONIC_TEMPERATURE: |
540 |
+ |
dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getElectronicTemperature()); |
541 |
+ |
break; |
542 |
+ |
case COM: |
543 |
+ |
dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getCom()); |
544 |
+ |
break; |
545 |
+ |
case COM_VELOCITY: |
546 |
+ |
dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getComVel()); |
547 |
+ |
break; |
548 |
+ |
case ANGULAR_MOMENTUM: |
549 |
+ |
dynamic_cast<VectorAccumulator *>(data_[i].accumulator)->add(thermo.getAngularMomentum()); |
550 |
+ |
break; |
551 |
|
/* |
552 |
|
case SHADOWH: |
553 |
|
dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getShadowHamiltionian()); |
556 |
|
dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getHelfandMoment()); |
557 |
|
break; |
558 |
|
*/ |
498 |
– |
case ELECTRONIC_TEMPERATURE: |
499 |
– |
dynamic_cast<Accumulator *>(data_[i].accumulator)->add(thermo.getElectronicTemperature()); |
500 |
– |
break; |
559 |
|
} |
560 |
|
} |
561 |
|
} |