45#include "applications/dynamicProps/OnsagerCorrFunc.hpp"
49#include "applications/dynamicProps/TimeCorrFunc.hpp"
50#include "brains/DataStorage.hpp"
53#include "brains/Thermo.hpp"
57#include "utils/Constants.hpp"
58#include "utils/Revision.hpp"
62 OnsagerCorrFunc::OnsagerCorrFunc(
SimInfo* info,
const std::string& filename,
63 const std::string& sele1,
64 const std::string& sele2) :
66 setCorrFuncType(
"OnsagerCorrFunc");
67 setOutputName(
getPrefix(dumpFilename_) +
".onsager");
68 setLabelString(
"L_ii\tL_ij\tL_jj");
70 R1_.resize(nTimeBins_);
71 R2_.resize(nTimeBins_);
74 void OnsagerCorrFunc::computeProperty1(
int frame) {
80 R1_[frame] += sd->
getPos();
84 void OnsagerCorrFunc::computeProperty2(
int frame) {
90 R2_[frame] += sd->
getPos();
94 Vector3d OnsagerCorrFunc::calcCorrVal(
int frame1,
int frame2) {
95 Vector3d v1 = R1_[frame2] - R1_[frame1];
96 Vector3d v2 = R2_[frame2] - R2_[frame1];
StuntDouble * nextSelected(int &i)
Finds the next selected StuntDouble in the selection.
StuntDouble * beginSelected(int &i)
Finds the first selected StuntDouble in the selection.
One of the heavy-weight classes of OpenMD, SimInfo maintains objects and variables relating to the cu...
"Don't move, or you're dead! Stand up! Captain, we've got them!"
Vector3d getPos()
Returns the current position of this stuntDouble.
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)