#include <eabf2D.h>
|
| eABF2D (const double _lowerboundary, const double _upperboundary, const double _width, const double _krestr, const double _lowerboundary2, const double _upperboundary2, const double _width2, const double _krestr2, const std::string &_outputfile, const int _outputfreq, const bool _restart, const std::string &_inputfile, const bool _outputgrad, const int _gradfreq, const double _temperature) |
|
virtual | ~eABF2D () |
|
bool | update (const std::string &) |
|
| eABF () |
|
| eABF (const std::string &_outputfile, const int _outputfreq, const bool _restart, const std::string &_inputfile, const bool _outputgrad, const int _gradfreq, const double _temperature) |
|
virtual | ~eABF () |
|
bool | mergefile (const std::string &inputname, const std::string &outputname) |
|
bool | setcolumn (std::vector< int > col) |
|
Definition at line 23 of file eabf2D.h.
◆ eABF2D()
eABF2D::eABF2D |
( |
const double |
_lowerboundary, |
|
|
const double |
_upperboundary, |
|
|
const double |
_width, |
|
|
const double |
_krestr, |
|
|
const double |
_lowerboundary2, |
|
|
const double |
_upperboundary2, |
|
|
const double |
_width2, |
|
|
const double |
_krestr2, |
|
|
const std::string & |
_outputfile, |
|
|
const int |
_outputfreq, |
|
|
const bool |
_restart, |
|
|
const std::string & |
_inputfile, |
|
|
const bool |
_outputgrad, |
|
|
const int |
_gradfreq, |
|
|
const double |
_temperature |
|
) |
| |
Definition at line 28 of file eabf2D.C.
References eABF::krestr, eABF::lowerboundary, eABF::restart, eABF::upperboundary, and eABF::width.
43 eABF(_outputfile, _outputfreq, _restart, _inputfile, _outputgrad, _gradfreq, _temperature)
49 width.push_back(_width);
50 width.push_back(_width2);
52 krestr.push_back(_krestr2);
std::vector< double > lowerboundary
std::vector< double > width
std::vector< double > krestr
std::vector< double > upperboundary
◆ ~eABF2D()
virtual eABF2D::~eABF2D |
( |
| ) |
|
|
inlinevirtual |
◆ update()
bool eABF2D::update |
( |
const std::string & |
colvarstring | ) |
|
|
virtual |
Implements eABF.
Definition at line 92 of file eabf2D.C.
References eABF::bins, eabffunc::chartodouble(), eabffunc::chartoint(), eABF::col, eABF::gradfreq, eABF::line, eABF::min, eABF::outputfreq, eABF::outputgrad, eabffunc::split(), and eABF::width.
97 std::vector<std::string> data;
114 if (abf_force > 150 && eabf_force < -150)
116 else if (abf_force < -150 && eabf_force > 150)
119 if (abf_force2 > 150 && eabf_force2 < -150)
121 else if (abf_force2 < -150 && eabf_force2 > 150)
124 int binx = int(floor(abf_force /
width[0])) -
min[0];
125 int biny = int(floor(eabf_force /
width[0])) -
min[0];
126 int binx2 = int(floor(abf_force2 /
width[1])) -
min[1];
127 int biny2 = int(floor(eabf_force2 /
width[1])) -
min[1];
140 if (binx < 0 || binx >=
bins[0] || biny < 0 || biny >=
bins[0] || binx2 < 0 || binx2 >=
bins[1] || biny2 < 0 || biny2 >=
bins[1])
145 countall[binx*
bins[0] + biny][binx2*
bins[1] + biny2]++;
148 if (countall[binx*
bins[0] + biny][binx2*
bins[1] + biny2] == 1)
150 county[biny][biny2]++;
153 sumx1[biny][biny2] += abf_force;
154 sumx21[biny][biny2] += abf_force * abf_force;
155 sumx2[biny][biny2] += abf_force2;
156 sumx22[biny][biny2] += abf_force2 * abf_force2;
std::vector< double > width
int chartoint(const std::string &c)
double chartodouble(const std::string &c)
void split(const std::string &s, std::vector< std::string > &ret)
The documentation for this class was generated from the following files: