Loading...
Searching...
No Matches
PIQTST.h
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#pragma once
13
14// Path-integral quantum transition-state theory (Voth, Chandler and
15// Miller, J. Chem. Phys. 91, 7749 (1989)): the centroid potential of mean
16// force along a linear mass-weighted coordinate s from ring polymers whose
17// centroid is held on parallel planes, and the rate from its value on the
18// dividing plane, optionally times the ring-polymer MD transmission factor
19// on that plane (Craig and Manolopoulos, J. Chem. Phys. 122, 084106 (2005);
20// Suleimanov, Allen and Green, Comput. Phys. Commun. 184, 833 (2013)).
21
22#include "eon/Eigen.h"
24#include "eon/PathIntegral.h"
25#include "eon/Potential.h"
26
27#include <functional>
28#include <string>
29#include <utility>
30#include <vector>
31
32namespace eonc {
33class Matter;
34class Parameters;
35} // namespace eonc
36
37namespace eonc::piqtst {
38
42struct Coordinate {
43 long atoms{0};
44 std::vector<double> masses; // per atom, amu
45 std::vector<int> numbers; // per atom
46 std::vector<char> free; // per coordinate, 3 * atoms
47 VectorXd reference; // Cartesian, 3 * atoms, Angstrom
48 VectorXd direction; // mass-weighted unit vector, 3 * atoms
49 const double *box{nullptr}; // 3 x 3 cell, or null
50};
51
55 std::vector<double> planes;
56 long equilibration{500};
57 long production{2000};
59 long blocks{10};
65 std::function<VectorXd(double)> seed;
66};
67
68struct Plane {
69 double s{0.0};
72 double meanForce{0.0};
73 double meanForceError{0.0};
76 double freeEnergy{0.0};
77 double freeEnergyError{0.0};
79 VectorXd centroid;
82 std::vector<double> spread;
83 long batches{0};
84};
85
89std::vector<Plane> scan(Potential &pot, const Coordinate &coordinate,
90 const ScanOptions &options);
91
94void integrate(std::vector<Plane> &planes);
95
96struct Rate {
98 long reactant{0};
100 double barrier{0.0};
101 double barrierError{0.0};
104 double logRate{0.0};
105 double logRateError{0.0};
108 double firstPlaneHeight{0.0};
109};
110
115Rate rate(const std::vector<Plane> &planes, double beta);
116
119 double s{0.0};
121 long equilibration{500};
124 long parents{0};
125 long spacing{50};
127 long children{20};
129 long steps{0};
135 std::function<VectorXd(double)> seed;
136};
137
143 std::vector<double> time;
144 std::vector<double> kappa;
147 double plateau{0.0};
148 double plateauError{0.0};
150 long batches{0};
151};
152
157Recrossing recrossing(Potential &pot, const Coordinate &coordinate,
158 const RecrossingOptions &options);
159
162
170std::vector<std::string>
172 const Matter &reactant, const Matter &saddle,
173 const MatrixXd &hSaddle, const std::vector<VectorXd> &pathQ,
174 const std::vector<double> &temperatures,
175 std::vector<std::pair<std::string, double>> &extras);
176
177} // namespace eonc::piqtst
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition Eigen.h:33
Recrossing recrossing(Potential &pot, const Coordinate &c, const RecrossingOptions &o)
Bennett-Chandler transmission at s*: parents sampled with the centroid held on the plane,...
Definition PIQTST.cpp:263
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,...
void integrate(std::vector< Plane > &planes)
Trapezoid integral of the mean forces, F(s_0) = 0, with errors from independent planes.
Definition PIQTST.cpp:86
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
RAII resource manager for the ARTn C library with global synchronization.
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:73
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:76
std::vector< double > spread
Root-mean-square bead displacement from the centroid per Cartesian coordinate, Angstrom,...
Definition PIQTST.h:82
VectorXd centroid
Production average of the centroid, Cartesian.
Definition PIQTST.h:79
double freeEnergyError
Definition PIQTST.h:77
double meanForce
dF/ds = -<n .
Definition PIQTST.h:72
long reactant
Index of the plane with the lowest F, the reactant.
Definition PIQTST.h:98
double barrierError
Definition PIQTST.h:101
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:108
double logRate
ln k with k in inverse eOn time units (sqrt(amu Angstrom^2 / eV)), and its standard error.
Definition PIQTST.h:104
double barrier
F(s*) - F(reactant), eV, and its error.
Definition PIQTST.h:100
double logRateError
Definition PIQTST.h:105
long parents
Parent configurations, each this many thermostatted steps after the last.
Definition PIQTST.h:124
long equilibration
Thermostatted steps on the plane before the first parent.
Definition PIQTST.h:121
std::function< VectorXd(double)> seed
Cartesian centroid to start the parent ring at.
Definition PIQTST.h:135
long steps
Unconstrained, thermostat-free steps per child of ring.dt.
Definition PIQTST.h:129
long children
Momentum draws per parent; each runs forward and reversed.
Definition PIQTST.h:127
double s
The dividing plane s*, amu^0.5 Angstrom.
Definition PIQTST.h:119
pathintegral::Options ring
The parents' ring and thermostat.
Definition PIQTST.h:132
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:143
double plateau
Mean of kappa(t) over the last quarter of the times, and its jackknife standard error over parents.
Definition PIQTST.h:147
std::vector< double > kappa
Definition PIQTST.h:144
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