eOn client
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
GleThermostat.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
#include <functional>
14
#include <string>
15
16
#include "
eon/Eigen.h
"
17
18
namespace
eonc
{
19
48
class
GleThermostat
{
49
public
:
52
GleThermostat
(
const
MatrixXd
&a_drift,
double
kbt,
double
dt_half,
53
long
n_dof);
54
57
static
MatrixXd
loadDriftMatrix
(
const
std::string &path);
58
61
void
apply
(VectorXd &vel,
const
VectorXd &masses3N,
62
const
std::function<
double
()> &gauss);
63
65
bool
valid
()
const
{
return
m_valid
; }
66
67
private
:
68
bool
m_valid
{
false
};
69
MatrixXd
m_T
;
70
MatrixXd
m_S
;
71
MatrixXd
m_Z
;
72
};
73
74
}
// namespace eonc
75
76
using
eonc::GleThermostat
;
Eigen.h
MatrixXd
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, eOnStorageOrder > MatrixXd
Definition
Eigen.h:33
eonc::GleThermostat
Colored-noise (generalized Langevin) thermostat.
Definition
GleThermostat.h:48
eonc::GleThermostat::m_S
MatrixXd m_S
noise factor, S S^T = kbt (I - T T^T)
Definition
GleThermostat.h:70
eonc::GleThermostat::m_T
MatrixXd m_T
exp(-A dt/2)
Definition
GleThermostat.h:69
eonc::GleThermostat::apply
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 d...
Definition
GleThermostat.cpp:85
eonc::GleThermostat::m_Z
MatrixXd m_Z
extended state, (1 + n_aux) x n_dof
Definition
GleThermostat.h:71
eonc::GleThermostat::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 f...
Definition
GleThermostat.cpp:60
eonc::GleThermostat::m_valid
bool m_valid
Definition
GleThermostat.h:68
eonc::GleThermostat::valid
bool valid() const
True when construction produced a usable propagator.
Definition
GleThermostat.h:65
eonc::GleThermostat::loadDriftMatrix
static MatrixXd loadDriftMatrix(const std::string &path)
Load a drift matrix from a gle4md-layout text file ('#' starts a comment).
Definition
GleThermostat.cpp:22
eonc
RAII resource manager for the ARTn C library with global synchronization.
Definition
ARTnSaddleSearch.cpp:19
include
eon
GleThermostat.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf