Loading...
Searching...
No Matches
OHTSTJob.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 "eon/Eigen.h"
14#include "eon/Job.h"
15#include "eon/Matter.h"
16#include "eon/Parameters.h"
17
18namespace eonc {
19
40class OHTSTJob : public Job {
41
42public:
43 OHTSTJob(std::unique_ptr<Parameters> parameters)
44 : Job(std::move(parameters)) {}
45 ~OHTSTJob(void) = default;
46 std::vector<std::string> run(void);
47
48private:
52 double fn{0.0};
53 VectorXd rotNorm;
54 VectorXd rotRaw;
55 VectorXd pos;
56 };
57
58 PlaneAverages samplePlane(Matter &matter, const VectorXd &gamma,
59 const VectorXd &normal);
60
63 double reactantQRatio(Matter &matter, const VectorXd &gammaR,
64 const VectorXd &normal);
65
68 void drawThermalVelocities(VectorXd &vel, const VectorXd *normal);
69
75 bool symmetryReflect(const VectorXd &xR, VectorXd &x, VectorXd &v,
76 const VectorXd &xOld, const VectorXd *normal);
77
78 std::vector<VectorXd> m_symDirs;
79 VectorXd m_symXR;
80
81 VectorXd m_masses3N;
82 double m_dt{0.0};
83 double m_kbt{0.0};
84 double m_andersenProb{0.0};
85 long m_seedState{12345};
86 double uniformDraw();
87 double gaussDraw();
88 bool m_gaussHave{false};
89 double m_gaussSpare{0.0};
90};
91
92} // namespace eonc
93
94using eonc::OHTSTJob;
The job class is used to serve as an abstract class for all jobs, as well as to call a job at runtime...
Job(std::unique_ptr< Parameters > parameters)
Definition Job.h:58
double reactantQRatio(Matter &matter, const VectorXd &gammaR, const VectorXd &normal)
Definition OHTSTJob.cpp:221
double m_andersenProb
per-step Andersen collision probability
Definition OHTSTJob.h:84
void drawThermalVelocities(VectorXd &vel, const VectorXd *normal)
Definition OHTSTJob.cpp:71
PlaneAverages samplePlane(Matter &matter, const VectorXd &gamma, const VectorXd &normal)
Definition OHTSTJob.cpp:125
VectorXd m_masses3N
per-DOF masses of the free atoms (amu)
Definition OHTSTJob.h:81
~OHTSTJob(void)=default
OHTSTJob(std::unique_ptr< Parameters > parameters)
Definition OHTSTJob.h:43
long m_seedState
LCG state for the thermostat draws.
Definition OHTSTJob.h:85
double uniformDraw()
uniform (0,1)
Definition OHTSTJob.cpp:51
double m_gaussSpare
Definition OHTSTJob.h:89
double gaussDraw()
standard normal (Box-Muller)
Definition OHTSTJob.cpp:58
double m_kbt
k_B T (eV)
Definition OHTSTJob.h:83
std::vector< std::string > run(void)
Virtual run; used solely for dynamic dispatch.
Definition OHTSTJob.cpp:281
bool m_gaussHave
Definition OHTSTJob.h:88
std::vector< VectorXd > m_symDirs
p-hat_i, index 0 = primary
Definition OHTSTJob.h:78
double m_dt
integration step, internal units
Definition OHTSTJob.h:82
VectorXd m_symXR
reactant anchor R of the half-lines
Definition OHTSTJob.h:79
bool symmetryReflect(const VectorXd &xR, VectorXd &x, VectorXd &v, const VectorXd &xOld, const VectorXd *normal)
Definition OHTSTJob.cpp:80
RAII resource manager for the ARTn C library with global synchronization.
VectorXd pos
<r>, anchors Eq 18 and the Eq 12 restart
Definition OHTSTJob.h:55
VectorXd rotNorm
<(n.F) R / (alpha |R|^2)>, drives rotation
Definition OHTSTJob.h:53
VectorXd rotRaw
<(n.F) R>, integrand of Eq 19
Definition OHTSTJob.h:54