Loading...
Searching...
No Matches
eonc::pathintegral Namespace Reference

Classes

struct  Options
class  RingPolymer
 Ring-polymer NVT step. More...
struct  Sample

Enumerations

enum class  Springs { Trotter , Eco }
 Trotter springs, or economised springs fitted to harmonic radii of gyration up to a maximum frequency (Zeng and Manolopoulos, arXiv:2607.06414). More...
enum class  Thermostat { Pile , Piglet }
 PILE-L, or a normal-mode GLE. More...

Functions

void requireTrotterSprings (const std::string &springs, const char *use)
 Economised springs and a normal-mode GLE are refused.
VectorXd trotterEigenvalues (long nBeads)
 Dimensionless free-ring eigenvalues, mode 0 equal to 0.
VectorXd ecoEigenvalues (long nBeads, double xmax)
MatrixXd normalModeMatrix (long nBeads)
 Orthogonal bead-to-normal-mode matrix. Row k is mode k.

Enumeration Type Documentation

◆ Springs

enum class eonc::pathintegral::Springs
strong

Trotter springs, or economised springs fitted to harmonic radii of gyration up to a maximum frequency (Zeng and Manolopoulos, arXiv:2607.06414).

Enumerator
Trotter 
Eco 

Definition at line 42 of file PathIntegral.h.

◆ Thermostat

enum class eonc::pathintegral::Thermostat
strong

PILE-L, or a normal-mode GLE.

A complete set of GLE blocks includes the centroid; an internal-mode-only set retains a Langevin centroid.

Enumerator
Pile 
Piglet 

Definition at line 46 of file PathIntegral.h.

Function Documentation

◆ ecoEigenvalues()

VectorXd eonc::pathintegral::ecoEigenvalues ( long nBeads,
double xmax )

Definition at line 344 of file PathIntegral.cpp.

344 {
345 if (nBeads < 1) {
346 throw std::invalid_argument("bead count must be positive");
347 }
348 VectorXd eva = VectorXd::Zero(nBeads);
349 if (nBeads == 1) {
350 return eva;
351 }
352 if (!(xmax > 0.0)) {
353 throw std::invalid_argument(
354 "economised springs need a positive maximum frequency");
355 }
356 const VectorXd y = ecoFit(nBeads, xmax);
357 for (long k = 1; k < nBeads; ++k) {
358 const long pair = std::min(k, nBeads - k) - 1;
359 eva[k] = y[pair] / static_cast<double>(nBeads);
360 }
361 return eva;
362}

◆ normalModeMatrix()

MatrixXd eonc::pathintegral::normalModeMatrix ( long nBeads)

Orthogonal bead-to-normal-mode matrix. Row k is mode k.

Definition at line 364 of file PathIntegral.cpp.

364 {
365 if (nBeads < 1) {
366 throw std::invalid_argument("bead count must be positive");
367 }
368 MatrixXd b = MatrixXd::Zero(nBeads, nBeads);
369 const double n = static_cast<double>(nBeads);
370 for (long j = 0; j < nBeads; ++j) {
371 b(0, j) = 1.0;
372 for (long i = 1; i <= nBeads / 2; ++i) {
373 b(i, j) = std::sqrt(2.0) * std::cos(2.0 * kPi * static_cast<double>(j) *
374 static_cast<double>(i) / n);
375 }
376 for (long i = nBeads / 2 + 1; i < nBeads; ++i) {
377 b(i, j) = std::sqrt(2.0) * std::sin(2.0 * kPi * static_cast<double>(j) *
378 static_cast<double>(i) / n);
379 }
380 }
381 if (nBeads % 2 == 0) {
382 const long mid = nBeads / 2;
383 for (long j = 0; j < nBeads; ++j) {
384 b(mid, j) = (j % 2 == 0) ? 1.0 : -1.0;
385 }
386 }
387 b /= std::sqrt(n);
388 return b;
389}
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition Eigen.h:33

◆ requireTrotterSprings()

void eonc::pathintegral::requireTrotterSprings ( const std::string & springs,
const char * use )

Economised springs and a normal-mode GLE are refused.

The instanton assumes Trotter springs and is refused the same way.

Definition at line 323 of file PathIntegral.cpp.

323 {
324 const std::string s = lower(springs);
325 if (s == "eco" || s == "economised") {
326 throw std::invalid_argument(
327 std::string(use) +
328 " requires Trotter springs; economised springs are refused");
329 }
330}

◆ trotterEigenvalues()

VectorXd eonc::pathintegral::trotterEigenvalues ( long nBeads)

Dimensionless free-ring eigenvalues, mode 0 equal to 0.

Physical frequencies are omegan times these values, with omegan = beads * kB * T / hbar.

Definition at line 332 of file PathIntegral.cpp.

332 {
333 if (nBeads < 1) {
334 throw std::invalid_argument("bead count must be positive");
335 }
336 VectorXd eva(nBeads);
337 for (long k = 0; k < nBeads; ++k) {
338 eva[k] = 2.0 * std::sin(kPi * static_cast<double>(k) /
339 static_cast<double>(nBeads));
340 }
341 return eva;
342}