Loading...
Searching...
No Matches
Tunneling.h File Reference
#include "Matter.h"
#include "PhysicalQuadraticBath.h"
#include <array>
#include <cstdint>
#include <functional>
#include <limits>
#include <memory>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  eonc::tunneling::Profile
 Energy along the path, interpolated as a monotone cubic (Fritsch and Carlson), flat at both ends because the ends of a band are minima. More...
struct  eonc::tunneling::Splitting
struct  eonc::tunneling::Levels
 The two lowest levels of a one-dimensional double well, in eV. More...
struct  eonc::tunneling::BandWall
 One well's outer wall: increasing mass-weighted distances outward from the minimum along the reaction path, and the energies there on the scale of the band's profile. More...
struct  eonc::tunneling::BandWalls
struct  eonc::tunneling::RingSeed
 Closed ring of beads samples of path whose imaginary-time period is betaHbar. More...
struct  eonc::tunneling::InstantonOptions
struct  eonc::tunneling::Instanton
class  eonc::tunneling::EnergyBias
 delta sigma(xi) between two minima, xi = (q - start) . More...
struct  eonc::tunneling::RateInstantonOptions
struct  eonc::tunneling::RingSpectrum
 Spectrum of a closed ring's Hessian without forming it. More...
struct  eonc::tunneling::RateInstanton
struct  eonc::tunneling::RingChannel
 Where a ring sits against the saddle it was seeded from, in mass-weighted coordinates. More...
struct  eonc::tunneling::RotationZeroModes
struct  eonc::tunneling::RingRigidBodies
 The atoms behind a ring's mass-weighted coordinates, for its rigid motions: sqrt(m) per atom, the Cartesian positions q is measured from (3 per atom; the reactant minimum, q = 0, for the rotational ratio), and which rotations are free. More...

Namespaces

namespace  eonc
 RAII resource manager for the ARTn C library with global synchronization.
namespace  eonc::tunneling

Typedefs

using eonc::tunneling::BatchPotential
 V (eV) and dV/dq (eV / (amu^0.5 Angstrom)) at every point of q, all in one call so a potential can spread the beads over its calculators.
using eonc::tunneling::OwnedBatchPotential
 Explicit electronic-state owners for each evaluated geometry.
using eonc::tunneling::BeadHessian = std::function<MatrixXd(long j, const VectorXd &q)>
 The mass-weighted Hessian d2V/dq2 at interior bead j (1..P-1).
using eonc::tunneling::RingBeadHessian = std::function<MatrixXd(long j, const VectorXd &q)>
 The mass-weighted Hessian d2V/dq2 at ring bead j (0..N-1).

Functions

double eonc::tunneling::massWeightedDistance (const Matter &a, const Matter &b)
 sqrt(sum_i m_i |b_i - a_i|^2) under the minimum image of a's cell.
std::vector< double > eonc::tunneling::massWeightedPath (const std::vector< std::shared_ptr< Matter > > &band)
 Cumulative mass-weighted arc length at each image of a band.
double eonc::tunneling::wellCurvature (const Profile &p, bool leftEnd)
 d2V/ds2 at one end of the path, in eV / (amu Angstrom^2), from a least squares fit of a s^2 + b s^3 to the points within half the barrier above that end.
std::array< double, 2 > eonc::tunneling::wellFit (const Profile &p, bool leftEnd)
 {a, b} of that fit, s measured inward from the end: wellCurvature is 2 a.
double eonc::tunneling::hbarOmega (double curvature)
 hbar omega in eV for a mass-weighted curvature.
double eonc::tunneling::wkbAction (const Profile &p, double energy, int points=4001)
 (1/hbar) integral sqrt(2 (V(s) - E)) ds over the path where V > E.
Splitting eonc::tunneling::wkbSplitting (const Profile &p, double hwReactant, double hwProduct)
 delta0 = (hbar omega / pi) exp(-S) with the Landau and Lifshitz prefactor.
Splitting eonc::tunneling::bandSplitting (const std::vector< std::shared_ptr< Matter > > &band, double referenceEnergy)
 The splitting of a converged band, with the well frequencies from the band's curvature at each end.
Profile eonc::tunneling::bandProfile (const std::vector< std::shared_ptr< Matter > > &band, double referenceEnergy)
 The energy of a band against its mass-weighted arc length, measured from referenceEnergy.
Levels eonc::tunneling::dvrLevels (const std::function< double(double)> &v, double sReactant, double sProduct, double sTop, double hwReactant, double hwProduct)
 The levels of -hbar^2/2 d2/ds2 + V(s) at unit mass on a mass-weighted path coordinate s, with V defined past both minima: fourth-order central differences on a uniform grid from kDvrPadLengths oscillator lengths before the reactant minimum to as far past the product's.
Levels eonc::tunneling::bandLevels (const Profile &p, const BandWalls *walls=nullptr)
 dvrLevels on a band: the profile between the images, and past each end the well's fit a s^2 + b s^3 continued, never softer than its parabola.
BandWalls eonc::tunneling::bandWalls (const std::vector< std::shared_ptr< Matter > > &band, double referenceEnergy, long points)
 The walls of both ends of a band, after Khomenko et al.
bool eonc::tunneling::singleBarrier (const Profile &p)
 Whether a profile is one double well: its images rise to exactly one maximum between the two ends.
std::vector< VectorXd > eonc::tunneling::ringFromPath (const std::vector< VectorXd > &path, const std::vector< double > &energies, double betaHbar, long beads, RingSeed *seed)
double eonc::tunneling::wkbLogRateAlongPath (const Profile &profile, double beta, double hwReactant)
 ln(k), k in 1/time, for the one-dimensional thermal rate along profile.
double eonc::tunneling::pathOmega (const MatrixXd &hessStart, const MatrixXd &hessEnd, const VectorXd &start, const VectorXd &end)
 omega along the straight line between the minima from the curvature of each well there, the larger of the two; in 1 / time.
Instanton eonc::tunneling::optimizeInstanton (const VectorXd &start, const VectorXd &end, double betaHbar, std::vector< VectorXd > guess, const BatchPotential &potential, const InstantonOptions &options)
 Minimises the action from guess (P + 1 beads, ends at the minima, or empty for a tanh kink along the straight line).
void eonc::tunneling::instantonSplitting (Instanton &inst, const BeadHessian &hessian, const MatrixXd &hessStart, const MatrixXd &hessEnd)
 Fills delta0, zeroMode and modeSeparation from the bead Hessians and the Hessians of the two minima.
double eonc::tunneling::zeroPointDifference (const MatrixXd &hessStart, const MatrixXd &hessEnd, long rigidModes)
 Harmonic zero-point energy of the end minimum minus that of the start, in eV: (hbar / 2) times the difference of the sums of the vibrational frequencies of the two mass-weighted Hessians.
double eonc::tunneling::crossoverTemperature (const MatrixXd &hessSaddle)
 T_c = hbar omega_b / (2 pi kB) from the mass-weighted Hessian at the saddle, in K; throws when the Hessian has no negative eigenvalue.
double eonc::tunneling::parabolicFactor (double temperature, double crossover)
 (pi T_c / T) / sin(pi T_c / T).
double eonc::tunneling::harmonicTstLogRate (const MatrixXd &hessReactant, const MatrixXd &hessSaddle, double beta, double barrier, long rigidModes)
 ln(k) for classical harmonic transition-state theory, k in 1/time.
double eonc::tunneling::quantumHarmonicTstLogRate (const MatrixXd &hessReactant, const MatrixXd &hessSaddle, double beta, double barrier, long rigidModes)
 ln(k) for quantum harmonic transition-state theory, k in 1/time: (1 / (2 pi beta hbar)) prod_r 2 sinh(beta hbar omega_r / 2) / prod'_s 2 sinh(beta hbar omega_s / 2) exp(-beta barrier), the zero-point and quantised partition functions of every bound mode; the saddle's unstable mode leaves the product.
void eonc::tunneling::addFrictionBath (const std::vector< VectorXd > &q, double &u, std::vector< VectorXd > &grad, const std::vector< double > &eta)
 Position-independent (one eta) or bead-wise friction on a closed ring.
double eonc::tunneling::closedRingPotential (const std::vector< VectorXd > &beads, double spring, const BatchPotential &potential, const std::vector< double > &discretization={})
 U_N of a closed ring.
RingSpectrum eonc::tunneling::ringSpectrum (const std::vector< MatrixXd > &beadHessians, double c, const std::vector< VectorXd > &tau)
 The ring Hessian of bead Hessians beadHessians (d2V/dq2 at each of the N beads) and spring constant c, with the normalised direction tau (N beads) lifted by c and taken out again through the determinant lemma det(J + c tau tau^T) = (c + lambda_0) det' J, exact when J tau = lambda_0 tau.
RateInstanton eonc::tunneling::optimizeRateInstanton (const VectorXd &saddle, const MatrixXd &hessSaddle, double beta, std::vector< VectorXd > guess, const BatchPotential &potential, const RateInstantonOptions &options)
 Finds the rate instanton at inverse temperature beta (1 / eV).
RingChannel eonc::tunneling::ringChannel (const std::vector< VectorXd > &beads, const VectorXd &saddle, const VectorXd &mode)
 The channel test above for a ring of beads, a saddle and its unstable mode (normalised inside).
RotationZeroModes eonc::tunneling::rotationZeroModes (const MatrixXd &hess, const MatrixXd &generators, double fraction)
void eonc::tunneling::bofillKeepingInertia (MatrixXd &h, const VectorXd &dq, const VectorXd &dg, long allowedNegatives)
 The Bofill update of a bead block (Powell symmetric Broyden and SR1 mixed by the angle between the secant residual and the step), then any negative eigenvalues beyond allowedNegatives, the count the block's last exact (finite-difference) version had, mirrored to their absolute value.
double eonc::tunneling::logRotationalRatio (const std::vector< VectorXd > &beads, const RingRigidBodies &bodies)
 ln of the classical rotational partition function of beads over that of as many copies of the reference (q = 0), for the free rotations: half the log of the ratio of the products of their principal moments, the inertia of every bead's atoms about the beads' common centre of mass, which is the Gram matrix of the ring's rotation generators.
void eonc::tunneling::instantonRate (RateInstanton &inst, const RingBeadHessian &hessian, const MatrixXd &hessReactant, double vReactant, const MatrixXd &hessSaddle=MatrixXd(), double vSaddle=0.0, long rigidModes=0, long denseLimit=4096, const RingRigidBodies &rigidBodies={})
 Fills the rate from the bead Hessians, the reactant minimum's Hessian and energy, and optionally the saddle's Hessian and energy for the classical comparison (pass an empty matrix to skip it).
double eonc::tunneling::cyclicRingLogAbsDet (double c, const std::vector< MatrixXd > &diag)
 log|det| of the cyclic block-tridiagonal ring Hessian.
std::vector< VectorXd > eonc::tunneling::cyclicRingSolve (double c, const std::vector< MatrixXd > &diag, const std::vector< VectorXd > &rhs)
 Solves that same cyclic ring Hessian.

Variables

constexpr double eonc::tunneling::kHbar = 0.06465415129579072
 hbar in eV^0.5 amu^0.5 Angstrom, correctly rounded from the exact SI values (h = 6.62607015e-34 J s, e = 1.602176634e-19 C) and the CODATA 2022 dalton, 1.66053906892e-27 kg.
constexpr double eonc::tunneling::kBoltzmann = 8.617333262145177e-5
 Boltzmann constant in eV / K, correctly rounded from the exact 1.380649e-23 J / K.
constexpr long eonc::tunneling::kDvrPointsPerLength = 20
 Grid points per oscillator length hbar / sqrt(hbar omega) of the stiffer well.
constexpr double eonc::tunneling::kDvrPadLengths = 7.0
 Oscillator lengths the grid reaches past each minimum.
constexpr long eonc::tunneling::kDvrMaxPoints = 1500
 Largest grid; a longer path takes a coarser spacing.
constexpr double eonc::tunneling::kTimeUnitSeconds = 1.0180505717871193e-14
 One unit of time, sqrt(amu Angstrom^2 / eV), in seconds.
constexpr double eonc::tunneling::kRotationZeroFraction = 0.1
 Which rotations of a structure are zero modes of its mass-weighted Hessian.