Colored-noise (generalized Langevin) thermostat. More...
#include <GleThermostat.h>
Public Member Functions | |
| GleThermostat (const MatrixXd &a_drift, double kbt, double dt_half, long n_dof) | |
| Build from the drift matrix, target kB*T (eV), the half-step dt (internal units), and the number of free degrees of freedom. | |
| void | apply (VectorXd &vel, const VectorXd &masses3N, const std::function< double()> &gauss) |
| One OU half-step on the mass-scaled velocities; gauss supplies standard-normal draws from the job's deterministic stream. | |
| bool | valid () const |
| True when construction produced a usable propagator. | |
Static Public Member Functions | |
| static MatrixXd | loadDriftMatrix (const std::string &path) |
| Load a drift matrix from a gle4md-layout text file ('#' starts a comment). | |
Private Attributes | |
| bool | m_valid {false} |
| MatrixXd | m_T |
| exp(-A dt/2) | |
| MatrixXd | m_S |
| noise factor, S S^T = kbt (I - T T^T) | |
| MatrixXd | m_Z |
| extended state, (1 + n_aux) x n_dof | |
Colored-noise (generalized Langevin) thermostat.
Ceriotti, Bussi & Parrinello, "Colored-noise thermostats a la carte", J. Chem. Theory Comput. 6, 1170 (2010): each Cartesian degree of freedom carries n_aux auxiliary momenta, and the extended momentum vector evolves under the exact Ornstein-Uhlenbeck map
(p, s) <- T (p, s) + S xi, T = exp(-A dt/2), S S^T = C - T C T^T, C = kB T * I (canonical sampling),
applied as half-steps around a velocity Verlet integrator. The frequency-dependent friction shaped by A thermalises every mode of a stiff spectrum at comparable efficiency, where white noise critically damps only one band.
The drift matrix A is an operator input ((n_aux+1) x (n_aux+1) plain-text rows, inverse internal time units, the layout produced by the gle4md generator). A 1x1 matrix [gamma] degenerates to standard white-noise Langevin, so the thermostat carries no hidden per-system tuning of its own.
All degrees of freedom propagate together: with the extended state held as a (1 + n_aux) x n_dof matrix Z (row 0 the mass-scaled velocities, rows 1.. the auxiliaries), one half-step is Z <- T Z + S Xi with Xi standard normal.
Definition at line 48 of file GleThermostat.h.
| eonc::GleThermostat::GleThermostat | ( | const MatrixXd & | a_drift, |
| double | kbt, | ||
| double | dt_half, | ||
| long | n_dof ) |
Build from the drift matrix, target kB*T (eV), the half-step dt (internal units), and the number of free degrees of freedom.
Definition at line 60 of file GleThermostat.cpp.
| void eonc::GleThermostat::apply | ( | VectorXd & | vel, |
| const VectorXd & | masses3N, | ||
| const std::function< double()> & | gauss ) |
One OU half-step on the mass-scaled velocities; gauss supplies standard-normal draws from the job's deterministic stream.
Definition at line 85 of file GleThermostat.cpp.
|
static |
Load a drift matrix from a gle4md-layout text file ('#' starts a comment).
Returns an empty (0 x 0) matrix on parse failure.
Definition at line 22 of file GleThermostat.cpp.
|
inline |
|
private |
noise factor, S S^T = kbt (I - T T^T)
Definition at line 70 of file GleThermostat.h.
|
private |
exp(-A dt/2)
Definition at line 69 of file GleThermostat.h.
|
private |
Definition at line 68 of file GleThermostat.h.
|
private |
extended state, (1 + n_aux) x n_dof
Definition at line 71 of file GleThermostat.h.