Loading...
Searching...
No Matches
PIQTSTJob.cpp
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#include "eon/ConFileIO.h"
13#include "eon/EonLogger.h"
14#include "eon/Matter.h"
15#include "eon/PIQTST.h"
16#include "eon/Parameters.h"
17#include "eon/Tunneling.h"
18
19#include <Eigen/Eigenvalues>
20
21#include <algorithm>
22#include <cmath>
23#include <fstream>
24#include <iomanip>
25#include <limits>
26#include <sstream>
27#include <stdexcept>
28
29namespace eonc::piqtst {
30
32 if (o.pi_planes < 0) {
33 throw std::invalid_argument("[Instanton] pi_planes must not be negative");
34 }
35 if (o.pi_planes == 0) {
36 return;
37 }
38 if (o.mode != "rate") {
39 throw std::invalid_argument("[Instanton] pi_planes needs mode = rate");
40 }
41 if (o.pi_planes < 2) {
42 throw std::invalid_argument(
43 "[Instanton] pi_planes must be 0 or at least 2");
44 }
45 if (o.pi_beads < 1) {
46 throw std::invalid_argument("[Instanton] pi_beads must be positive");
47 }
48 if (o.pi_equilibration_steps < 0 || o.pi_sampling_steps < 20) {
49 throw std::invalid_argument(
50 "[Instanton] pi_equilibration_steps must not be negative and "
51 "pi_sampling_steps must be at least 20 (ten blocks of two)");
52 }
53 if (!(o.pi_time_step > 0.0) || !(o.pi_pile_tau > 0.0) ||
54 !(o.pi_pile_scale > 0.0)) {
55 throw std::invalid_argument("[Instanton] pi_time_step, pi_pile_tau and "
56 "pi_pile_scale must be positive");
57 }
58 if (o.pi_seed < 0) {
59 throw std::invalid_argument("[Instanton] pi_seed must not be negative");
60 }
61 if (o.pi_thermostat != "pile" && o.pi_thermostat != "piglet") {
62 throw std::invalid_argument(
63 "[Instanton] pi_thermostat must be pile or piglet, not " +
65 }
66 if (o.pi_thermostat == "piglet" && o.pi_beads > 1 && o.pi_gle_file.empty()) {
67 throw std::invalid_argument(
68 "[Instanton] pi_thermostat = piglet needs pi_gle_file");
69 }
70 if (o.pi_direction != "mode" && o.pi_direction != "line") {
71 throw std::invalid_argument(
72 "[Instanton] pi_direction must be mode or line, not " + o.pi_direction);
73 }
74 if (!(o.pi_reactant_extent >= 0.0)) {
75 throw std::invalid_argument(
76 "[Instanton] pi_reactant_extent must not be negative");
77 }
78 if (o.pi_recrossing_parents < 0 || o.pi_recrossing_parents == 1) {
79 throw std::invalid_argument(
80 "[Instanton] pi_recrossing_parents must be 0 or at least 2");
81 }
82 if (o.pi_recrossing_parents == 0) {
83 return;
84 }
86 throw std::invalid_argument("[Instanton] pi_recrossing_children and "
87 "pi_recrossing_spacing must be positive");
88 }
89 if (!(o.pi_recrossing_time >= 4.0 * o.pi_time_step)) {
90 throw std::invalid_argument(
91 "[Instanton] pi_recrossing_time must be at least four pi_time_step");
92 }
93}
94
95namespace {
96
99struct Embedding {
100 std::vector<long> freeAtoms;
101 std::vector<double> sqrtMass;
102 long atoms{0};
103
104 explicit Embedding(const Matter &reactant)
105 : atoms(reactant.numberOfAtoms()) {
106 for (long i = 0; i < atoms; ++i) {
107 if (!reactant.getFixed(i)) {
108 freeAtoms.push_back(i);
109 sqrtMass.push_back(std::sqrt(reactant.getMass(i)));
110 }
111 }
112 }
113 long dimension() const { return 3 * static_cast<long>(freeAtoms.size()); }
115 VectorXd full(const VectorXd &q) const {
116 VectorXd out = VectorXd::Zero(3 * atoms);
117 for (size_t k = 0; k < freeAtoms.size(); ++k) {
118 for (int c = 0; c < 3; ++c) {
119 out(3 * freeAtoms[k] + c) = q(static_cast<long>(3 * k) + c);
120 }
121 }
122 return out;
123 }
125 VectorXd cartesian(const VectorXd &reference, const VectorXd &q) const {
126 VectorXd x = reference;
127 for (size_t k = 0; k < freeAtoms.size(); ++k) {
128 for (int c = 0; c < 3; ++c) {
129 x(3 * freeAtoms[k] + c) +=
130 q(static_cast<long>(3 * k) + c) / sqrtMass[k];
131 }
132 }
133 return x;
134 }
135 VectorXd toQ(const Matter &reactant, const Matter &m) const {
136 const AtomMatrix d =
137 reactant.pbc(m.getPositions() - reactant.getPositions());
138 VectorXd q(dimension());
139 for (size_t k = 0; k < freeAtoms.size(); ++k) {
140 for (int c = 0; c < 3; ++c) {
141 q(static_cast<long>(3 * k) + c) = sqrtMass[k] * d(freeAtoms[k], c);
142 }
143 }
144 return q;
145 }
146};
147
148VectorXd flatten(const AtomMatrix &m) {
149 VectorXd x(3 * m.rows());
150 for (long i = 0; i < m.rows(); ++i) {
151 for (int c = 0; c < 3; ++c) {
152 x(3 * i + c) = m(i, c);
153 }
154 }
155 return x;
156}
157
158std::string kelvinTag(double t) {
159 std::ostringstream name;
160 name << std::defaultfloat << std::setprecision(6) << t << "K";
161 return name.str();
162}
163
164} // namespace
165
166std::vector<std::string>
168 const Matter &reactant, const Matter &saddle,
169 const MatrixXd &hSaddle, const std::vector<VectorXd> &pathQ,
170 const std::vector<double> &temperatures,
171 std::vector<std::pair<std::string, double>> &extras) {
172 const auto &o = params.instanton_options();
174 const double timeUnit = params.constants().timeUnit;
175 const Embedding emb(reactant);
176 const VectorXd qSaddle = emb.toQ(reactant, saddle);
177 const double qNorm = qSaddle.norm();
178 if (!(qNorm > 0.0)) {
179 throw std::runtime_error("piqtst: the saddle sits on the reactant");
180 }
181 const VectorXd lineDir = qSaddle / qNorm;
182
183 // The plane normal. The saddle's unstable mode is the dividing surface
184 // the rate is evaluated on; one normal for every plane keeps s a linear
185 // coordinate, so the mean force integrates to its free energy.
186 VectorXd dir = lineDir;
187 std::string chosen = "line";
188 if (o.pi_direction == "mode") {
189 const Eigen::SelfAdjointEigenSolver<MatrixXd> es(
190 0.5 * (hSaddle + hSaddle.transpose()));
191 if (es.info() == Eigen::Success && es.eigenvalues()(0) < 0.0) {
192 VectorXd v = es.eigenvectors().col(0);
193 if (v.dot(lineDir) < 0.0) {
194 v = -v;
195 }
196 if (v.dot(lineDir) >= 0.5) {
197 dir = v;
198 chosen = "mode";
199 } else {
200 EONC_LOG_WARNING("[Instanton] piqtst: the unstable mode makes {:.3f} "
201 "rad with the reactant-saddle line; planes follow "
202 "the line",
203 std::acos(v.dot(lineDir)));
204 }
205 } else {
206 EONC_LOG_WARNING("[Instanton] piqtst: the saddle Hessian has no "
207 "negative eigenvalue; planes follow the line");
208 }
209 }
210 if (emb.freeAtoms.size() == static_cast<size_t>(reactant.numberOfAtoms()) &&
211 !reactant.getPeriodic()) {
212 EONC_LOG_WARNING("[Instanton] piqtst: no atom is fixed; the planes are "
213 "fixed in the reactant's frame and a rotation of the "
214 "cluster moves the centroid between them");
215 }
216 const double sStar = dir.dot(qSaddle);
217 const long nPlanes = o.pi_planes;
218 const double s0 = -o.pi_reactant_extent * sStar;
219 std::vector<double> sPlanes;
220 for (long j = 0; j < nPlanes; ++j) {
221 sPlanes.push_back(s0 + (sStar - s0) * static_cast<double>(j) /
222 static_cast<double>(nPlanes - 1));
223 }
224
225 Coordinate c;
226 c.atoms = reactant.numberOfAtoms();
227 c.masses.resize(static_cast<size_t>(c.atoms));
228 c.numbers.resize(static_cast<size_t>(c.atoms));
229 c.free.assign(static_cast<size_t>(3 * c.atoms), 0);
230 const VectorXi z = reactant.getAtomicNrs();
231 for (long i = 0; i < c.atoms; ++i) {
232 c.masses[static_cast<size_t>(i)] = reactant.getMass(i);
233 c.numbers[static_cast<size_t>(i)] = z(i);
234 }
235 for (const long i : emb.freeAtoms) {
236 for (int a = 0; a < 3; ++a) {
237 c.free[static_cast<size_t>(3 * i + a)] = 1;
238 }
239 }
240 c.reference = flatten(reactant.getPositions());
241 c.direction = emb.full(dir);
242 const Matrix3d cell =
243 reactant.getPeriodic() ? reactant.getCell() : Matrix3d::Zero().eval();
244 c.box = cell.data();
245
246 // Seeds: the band where it crosses the plane, else the straight line
247 // through the reactant and the saddle.
248 std::vector<double> bandS;
249 for (const auto &q : pathQ) {
250 bandS.push_back(dir.dot(q));
251 }
252 auto seed = [&](double s) -> VectorXd {
253 for (size_t k = 0; k + 1 < pathQ.size(); ++k) {
254 const double lo = bandS[k];
255 const double hi = bandS[k + 1];
256 if ((lo <= s && s <= hi) || (hi <= s && s <= lo)) {
257 const double t = hi != lo ? (s - lo) / (hi - lo) : 0.0;
258 return emb.cartesian(c.reference,
259 (1.0 - t) * pathQ[k] + t * pathQ[k + 1]);
260 }
261 }
262 return emb.cartesian(c.reference, (s / sStar) * qSaddle);
263 };
264
265 const double vReactant = Matter(reactant).getPotentialEnergy();
266 const double vSaddle = Matter(saddle).getPotentialEnergy();
267 double effective = std::numeric_limits<double>::quiet_NaN();
268 for (const auto &kv : extras) {
269 if (kv.first == "barrier_effective_instanton") {
270 effective = kv.second;
271 }
272 }
273 EONC_LOG_INFO("[Instanton] piqtst: {} planes from s = {:.4f} to s* = {:.4f} "
274 "amu^0.5 A along the {}, {} beads, {} + {} steps of {:.4g} fs",
275 nPlanes, s0, sStar, chosen == "mode" ? "unstable mode" : "line",
276 o.pi_beads, o.pi_equilibration_steps, o.pi_sampling_steps,
277 o.pi_time_step);
278
279 const std::string tableFile = "rate_piqtst.dat";
280 std::ofstream table(tableFile);
281 if (!table) {
282 throw std::runtime_error("piqtst: cannot write " + tableFile);
283 }
284 const bool kappaOn = o.pi_recrossing_parents > 0;
285 if (kappaOn && o.pi_thermostat == "piglet") {
286 EONC_LOG_WARNING("[Instanton] piqtst: the transmission factor's parents "
287 "take pile; RPMD needs the ring polymer's own "
288 "distribution, which piglet does not sample");
289 }
290 table << "# T_K s_amu05A dF_ds_eV_per_amu05A dF_ds_error F_eV F_error_eV "
291 "spread_max_A";
292 if (kappaOn) {
293 table << " kappa kappa_error ln_k_rpmd_s ln_k_rpmd_s_error";
294 }
295 table << '\n';
296 table << std::setprecision(10);
297 std::vector<std::string> files{tableFile};
298
299 std::vector<double> sorted = temperatures;
300 std::sort(sorted.begin(), sorted.end(), std::greater<>());
301 const double logSecond = std::log(tunneling::kTimeUnitSeconds);
302 for (size_t ti = 0; ti < sorted.size(); ++ti) {
303 const double t = sorted[ti];
304 const bool last = ti + 1 == sorted.size();
305 const double beta = 1.0 / (tunneling::kBoltzmann * t);
306 ScanOptions so;
307 so.planes = sPlanes;
308 so.equilibration = o.pi_equilibration_steps;
309 so.production = o.pi_sampling_steps;
310 so.blocks = 10;
311 so.ring.beads = o.pi_beads;
312 so.ring.temperature = t;
315 so.ring.dt = o.pi_time_step / timeUnit;
316 so.ring.thermostat = o.pi_thermostat == "piglet"
319 so.ring.pileTau = o.pi_pile_tau / timeUnit;
320 so.ring.pileScale = o.pi_pile_scale;
321 so.ring.gleFile = o.pi_gle_file;
322 so.ring.seed = static_cast<std::uint64_t>(o.pi_seed);
323 so.seed = seed;
324 const std::vector<Plane> planes = scan(pot, c, so);
325 const Rate r = rate(planes, beta);
326 const double lnPerSecond = r.logRate - logSecond;
327
328 Recrossing kappa;
329 double lnRpmd = std::numeric_limits<double>::quiet_NaN();
330 double lnRpmdError = std::numeric_limits<double>::quiet_NaN();
331 if (kappaOn) {
333 ro.s = planes.back().s;
334 ro.equilibration = o.pi_equilibration_steps;
335 ro.parents = o.pi_recrossing_parents;
336 ro.spacing = o.pi_recrossing_spacing;
337 ro.children = o.pi_recrossing_children;
338 ro.steps = std::lround(o.pi_recrossing_time / o.pi_time_step);
339 ro.ring = so.ring;
340 ro.seed = seed;
341 kappa = recrossing(pot, c, ro);
342 if (kappa.plateau > 0.0) {
343 lnRpmd = lnPerSecond + std::log(kappa.plateau);
344 lnRpmdError =
345 std::hypot(r.logRateError, kappa.plateauError / kappa.plateau);
346 } else {
347 EONC_LOG_WARNING("[Instanton] piqtst {:.4g} K: the transmission "
348 "factor {:.4g} +- {:.2g} is not positive; ln k_RPMD "
349 "is undefined (raise pi_recrossing_parents)",
350 t, kappa.plateau, kappa.plateauError);
351 }
352 EONC_LOG_INFO("[Instanton] piqtst {:.4g} K: transmission factor "
353 "kappa = {:.4f} +- {:.4f} from {} trajectories, "
354 "ln(k_RPMD s) = {:.4f} +- {:.4f}",
355 t, kappa.plateau, kappa.plateauError, kappa.trajectories,
356 lnRpmd, lnRpmdError);
357 std::vector<std::string> curveFiles;
358 if (last) {
359 curveFiles.push_back("kappa_piqtst.dat");
360 }
361 if (sorted.size() > 1) {
362 curveFiles.push_back("kappa_piqtst_" + kelvinTag(t) + ".dat");
363 }
364 for (const auto &file : curveFiles) {
365 std::ofstream curve(file);
366 if (!curve) {
367 throw std::runtime_error("piqtst: cannot write " + file);
368 }
369 curve << "# t_fs kappa\n" << std::setprecision(10);
370 for (size_t i = 0; i < kappa.time.size(); ++i) {
371 curve << kappa.time[i] * timeUnit << ' ' << kappa.kappa[i] << '\n';
372 }
373 files.push_back(file);
374 }
375 }
376
377 std::vector<std::string> conFiles;
378 if (last) {
379 conFiles.push_back("piqtst_planes.con");
380 }
381 if (sorted.size() > 1) {
382 conFiles.push_back("piqtst_planes_" + kelvinTag(t) + ".con");
383 }
384 for (size_t j = 0; j < planes.size(); ++j) {
385 const Plane &p = planes[j];
386 double largest = 0.0;
387 for (const double sp : p.spread) {
388 largest = std::max(largest, sp);
389 }
390 table << t << ' ' << p.s << ' ' << p.meanForce << ' ' << p.meanForceError
391 << ' ' << p.freeEnergy << ' ' << p.freeEnergyError << ' '
392 << largest;
393 if (kappaOn) {
394 table << ' ' << kappa.plateau << ' ' << kappa.plateauError << ' '
395 << lnRpmd << ' ' << lnRpmdError;
396 }
397 table << '\n';
398 Matter frame(reactant);
399 AtomMatrix pos = frame.getPositions();
400 for (long i = 0; i < c.atoms; ++i) {
401 for (int a = 0; a < 3; ++a) {
402 pos(i, a) = p.centroid(3 * i + a);
403 }
404 }
405 frame.setPositions(pos);
407 meta.frame_index = static_cast<uint64_t>(j);
408 meta.write_con_forces = false;
409 meta.spreads = p.spread;
410 meta.scalars = {{"piqtst_temperature_K", t},
411 {"piqtst_s", p.s},
412 {"piqtst_dF_ds", p.meanForce},
413 {"piqtst_dF_ds_error", p.meanForceError},
414 {"piqtst_F", p.freeEnergy},
415 {"piqtst_F_error", p.freeEnergyError},
416 {"beads", static_cast<double>(o.pi_beads)},
417 {"spread_max", largest}};
418 for (const auto &file : conFiles) {
419 if (!io::io_ok(frame.matter2con(file, j > 0, &meta))) {
420 throw std::runtime_error("piqtst: cannot write " + file);
421 }
422 }
423 }
424 for (const auto &file : conFiles) {
425 files.push_back(file);
426 }
427
428 const Plane &top = planes.back();
429 EONC_LOG_INFO("[Instanton] piqtst {:.4g} K: free-energy barrier {:.5f} "
430 "+- {:.5f} eV (classical {:.5f} eV, instanton effective "
431 "{:.5f} eV), ln(k s) = {:.4f} +- {:.4f}",
432 t, r.barrier, r.barrierError, vSaddle - vReactant, effective,
433 lnPerSecond, r.logRateError);
434 if (!(r.barrier > 0.0)) {
435 EONC_LOG_WARNING("[Instanton] piqtst {:.4g} K: F(s*) is {:.4g} eV "
436 "against the lowest plane before it; s* is no barrier "
437 "on the centroid free energy",
438 t, r.barrier);
439 }
440 if (r.firstPlaneHeight < 5.0) {
441 EONC_LOG_WARNING("[Instanton] piqtst {:.4g} K: the first plane is "
442 "{:.3g} kT above the reactant minimum of F; the "
443 "reactant integral is cut there (raise "
444 "pi_reactant_extent)",
445 t, r.firstPlaneHeight);
446 }
447 if (std::abs(top.meanForce) > 3.0 * top.meanForceError) {
448 EONC_LOG_WARNING("[Instanton] piqtst {:.4g} K: dF/ds at the saddle "
449 "plane is {:.4g} +- {:.2g} eV / (amu^0.5 A); the "
450 "maximum of F is not at s*",
451 t, top.meanForce, top.meanForceError);
452 }
453 if (!last) {
454 continue;
455 }
456 extras.emplace_back("piqtst_temperature_K", t);
457 extras.emplace_back("piqtst_planes", static_cast<double>(nPlanes));
458 extras.emplace_back("piqtst_beads", static_cast<double>(o.pi_beads));
459 extras.emplace_back("piqtst_s_star", sStar);
460 extras.emplace_back("piqtst_dF_ds_star", top.meanForce);
461 extras.emplace_back("piqtst_dF_ds_star_error", top.meanForceError);
462 extras.emplace_back("piqtst_first_plane_kT", r.firstPlaneHeight);
463 extras.emplace_back("barrier_piqtst", r.barrier);
464 extras.emplace_back("barrier_piqtst_error", r.barrierError);
465 extras.emplace_back("rate_piqtst", std::exp(lnPerSecond));
466 extras.emplace_back("rate_piqtst_log", lnPerSecond);
467 extras.emplace_back("rate_piqtst_log_error", r.logRateError);
468 if (kappaOn) {
469 extras.emplace_back("piqtst_kappa", kappa.plateau);
470 extras.emplace_back("piqtst_kappa_error", kappa.plateauError);
471 extras.emplace_back("rate_rpmd", std::exp(lnRpmd));
472 extras.emplace_back("rate_rpmd_log", lnRpmd);
473 extras.emplace_back("rate_rpmd_log_error", lnRpmdError);
474 }
475 }
476 return files;
477}
478
479} // namespace eonc::piqtst
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition Eigen.h:33
Eigen::Matrix< double, 3, 3, eOnStorageOrder > Matrix3d
Definition Eigen.h:35
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
#define EONC_LOG_WARNING(...)
Definition EonLogger.h:322
#define EONC_LOG_INFO(...)
Definition EonLogger.h:316
const AtomMatrix & getPositions() const
Definition Matter.cpp:378
const AtomMatrix & getPositions() const
Definition Matter.cpp:378
void setPositions(const AtomMatrix &pos)
Definition Matter.cpp:420
double getPotentialEnergy() const
Definition Matter.cpp:624
io::IoStatus matter2con(std::string filename, bool append=false, const io::ConFrameMetadata *metadata=nullptr)
Definition Matter.h:293
const instanton_options_t & instanton_options() const
const constants_t & constants() const
constexpr bool io_ok(IoStatus s) noexcept
Definition ConFileIO.h:38
Recrossing recrossing(Potential &pot, const Coordinate &c, const RecrossingOptions &o)
Bennett-Chandler transmission at s*: parents sampled with the centroid held on the plane under PILE,...
Definition PIQTST.cpp:266
std::vector< Plane > scan(Potential &pot, const Coordinate &c, const ScanOptions &o)
Samples one ring per plane and integrates the mean force.
Definition PIQTST.cpp:104
std::vector< std::string > runAfterInstanton(const Parameters &params, Potential &pot, const Matter &reactant, const Matter &saddle, const MatrixXd &hSaddle, const std::vector< VectorXd > &pathQ, const std::vector< double > &temperatures, std::vector< std::pair< std::string, double > > &extras)
[Instanton] mode rate with pi_planes > 0: the planes and rate at each temperature,...
Rate rate(const std::vector< Plane > &planes, double beta)
k = (1/2) sqrt(2 / (pi beta)) exp(-beta F(s*)) / int_{s_0}^{s*} exp(-beta F(s)) ds,...
Definition PIQTST.cpp:213
void validateOptions(const instanton_options_t &o)
Throws std::invalid_argument on an inconsistent [Instanton] pi_* key.
Definition PIQTSTJob.cpp:31
constexpr long reactant
constexpr double kTimeUnitSeconds
One unit of time, sqrt(amu Angstrom^2 / eV), in seconds.
Definition Tunneling.h:350
constexpr double kHbar
hbar in eV^0.5 amu^0.5 Angstrom, correctly rounded from the exact SI values (h = 6....
Definition Tunneling.h:39
constexpr double kBoltzmann
Boltzmann constant in eV / K, correctly rounded from the exact 1.380649e-23 J / K.
Definition Tunneling.h:43
std::optional< uint64_t > frame_index
Definition ConFileIO.h:72
std::vector< double > spreads
Per-atom root-mean-square spread of the position distribution about the written coordinates,...
Definition ConFileIO.h:90
std::vector< ConMetadataValue > scalars
Definition ConFileIO.h:79
std::optional< bool > write_con_forces
When set, this write includes or omits force sections regardless of Parameters.main_options()....
Definition ConFileIO.h:93
std::string gleFile
Normal-mode GLE matrices in normal-mode order.
double pileScale
Scales the critical PILE damping of the internal modes.
double pileTau
Centroid Langevin time, in the same time unit as dt.
The coordinate s = n .
Definition PIQTST.h:42
std::vector< char > free
Definition PIQTST.h:46
std::vector< int > numbers
Definition PIQTST.h:45
std::vector< double > masses
Definition PIQTST.h:44
const double * box
Definition PIQTST.h:49
double meanForceError
Definition PIQTST.h:76
double freeEnergy
F(s) - F(s_0) by the trapezoid rule over the planes, eV, and its standard error from the mean-force e...
Definition PIQTST.h:79
std::vector< double > spread
Root-mean-square bead displacement from the centroid per Cartesian coordinate, Angstrom,...
Definition PIQTST.h:85
VectorXd centroid
Production average of the centroid, Cartesian.
Definition PIQTST.h:82
double freeEnergyError
Definition PIQTST.h:80
double meanForce
dF/ds = -<a . f_centroid> / |a|^2, a = M^(1/2) n the plane's Cartesian normal, eV / (amu^0....
Definition PIQTST.h:75
double barrierError
Definition PIQTST.h:107
double firstPlaneHeight
beta (F(s_0) - F(reactant)): the reactant integral is cut at s_0, so a small value means the first pl...
Definition PIQTST.h:114
double logRate
ln k with k in inverse eOn time units (sqrt(amu Angstrom^2 / eV)), and its standard error.
Definition PIQTST.h:110
double barrier
F(s*) - F(reactant), eV, and its error; not positive when s* is no barrier on the centroid free energ...
Definition PIQTST.h:106
double logRateError
Definition PIQTST.h:111
long parents
Parent configurations, each this many thermostatted steps after the last.
Definition PIQTST.h:130
long equilibration
Thermostatted steps on the plane before the first parent.
Definition PIQTST.h:127
std::function< VectorXd(double)> seed
Cartesian centroid to start the parent ring at.
Definition PIQTST.h:141
long steps
Unconstrained, thermostat-free steps per child of ring.dt.
Definition PIQTST.h:135
long children
Momentum draws per parent; each runs forward and reversed.
Definition PIQTST.h:133
double s
The dividing plane s*, amu^0.5 Angstrom.
Definition PIQTST.h:125
pathintegral::Options ring
The parents' ring and thermostat.
Definition PIQTST.h:138
std::vector< double > time
t = step * ring.dt, from 0 to steps * ring.dt, and kappa(t) = <sdot(0) h(s(t) - s*)> / <sdot(0) h(sdo...
Definition PIQTST.h:149
double plateau
Mean of kappa(t) over the last quarter of the times, and its jackknife standard error over parents.
Definition PIQTST.h:153
std::vector< double > kappa
Definition PIQTST.h:150
std::function< VectorXd(double)> seed
Cartesian centroid to start the ring at on the plane at s.
Definition PIQTST.h:65
std::vector< double > planes
Plane positions in amu^0.5 Angstrom, ascending.
Definition PIQTST.h:55
long blocks
Equal blocks of the production run for the standard error.
Definition PIQTST.h:59
pathintegral::Options ring
Beads, temperature, units (kB in eV / K, hbar in eV time units), time step and thermostat of the ring...
Definition PIQTST.h:62