45#include "applications/dynamicProps/SystemDipoleCorrFunc.hpp"
47#include "utils/Revision.hpp"
52 SystemDipoleCorrFunc::SystemDipoleCorrFunc(SimInfo* info,
53 const std::string& filename,
54 const std::string& sele1,
55 const std::string& sele2) :
56 SystemACF<RealType>(info, filename, sele1, sele2) {
57 setCorrFuncType(
"SystemDipoleCorrFunc");
58 setOutputName(
getPrefix(dumpFilename_) +
".sysdipcorr");
59 setLabelString(
"<M(0).M(t)>");
60 sysDipoles_.resize(nFrames_);
61 thermo_ =
new Thermo(info_);
64 void SystemDipoleCorrFunc::computeProperty1(
int frame) {
65 sysDipoles_[frame] = thermo_->getSystemDipole();
69 RealType SystemDipoleCorrFunc::calcCorrVal(
int frame1,
int frame2) {
70 return dot(sysDipoles_[frame1], sysDipoles_[frame2]);
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.
Real dot(const DynamicVector< Real > &v1, const DynamicVector< Real > &v2)
Returns the dot product of two DynamicVectors.
std::string getPrefix(const std::string &str)