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 on the internal modes with a separate Langevin thermostat on the centroid. 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 on the internal modes with a separate Langevin thermostat on the 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 273 of file PathIntegral.cpp.

273 {
274 if (nBeads < 1) {
275 throw std::invalid_argument("bead count must be positive");
276 }
277 VectorXd eva = VectorXd::Zero(nBeads);
278 if (nBeads == 1) {
279 return eva;
280 }
281 if (!(xmax > 0.0)) {
282 throw std::invalid_argument(
283 "economised springs need a positive maximum frequency");
284 }
285 const VectorXd y = ecoFit(nBeads, xmax);
286 for (long k = 1; k < nBeads; ++k) {
287 const long pair = std::min(k, nBeads - k) - 1;
288 eva[k] = y[pair] / static_cast<double>(nBeads);
289 }
290 return eva;
291}

◆ normalModeMatrix()

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

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

Definition at line 293 of file PathIntegral.cpp.

293 {
294 if (nBeads < 1) {
295 throw std::invalid_argument("bead count must be positive");
296 }
297 MatrixXd b = MatrixXd::Zero(nBeads, nBeads);
298 const double n = static_cast<double>(nBeads);
299 for (long j = 0; j < nBeads; ++j) {
300 b(0, j) = 1.0;
301 for (long i = 1; i <= nBeads / 2; ++i) {
302 b(i, j) = std::sqrt(2.0) * std::cos(2.0 * kPi * static_cast<double>(j) *
303 static_cast<double>(i) / n);
304 }
305 for (long i = nBeads / 2 + 1; i < nBeads; ++i) {
306 b(i, j) = std::sqrt(2.0) * std::sin(2.0 * kPi * static_cast<double>(j) *
307 static_cast<double>(i) / n);
308 }
309 }
310 if (nBeads % 2 == 0) {
311 const long mid = nBeads / 2;
312 for (long j = 0; j < nBeads; ++j) {
313 b(mid, j) = (j % 2 == 0) ? 1.0 : -1.0;
314 }
315 }
316 b /= std::sqrt(n);
317 return b;
318}
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 252 of file PathIntegral.cpp.

252 {
253 const std::string s = lower(springs);
254 if (s == "eco" || s == "economised") {
255 throw std::invalid_argument(
256 std::string(use) +
257 " requires Trotter springs; economised springs are refused");
258 }
259}

◆ 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 261 of file PathIntegral.cpp.

261 {
262 if (nBeads < 1) {
263 throw std::invalid_argument("bead count must be positive");
264 }
265 VectorXd eva(nBeads);
266 for (long k = 0; k < nBeads; ++k) {
267 eva[k] = 2.0 * std::sin(kPi * static_cast<double>(k) /
268 static_cast<double>(nBeads));
269 }
270 return eva;
271}