GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
GpState.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
#pragma once
4
5
#include <string>
6
7
#include "
../../structures/Structures.h
"
8
9
namespace
gpr
{
10
class
GaussianProcessRegression
;
11
struct
AtomsConfiguration
;
12
namespace
neb
{
13
struct
ActiveLearningSession
;
14
}
15
16
namespace
io
{
17
21
struct
TrainedGpState
{
22
Observation
observations
;
23
FieldMatrixd
length_scale
;
24
FieldMatrixd
atomistic_length_scale
;
25
bool
has_atomistic_length_scale
=
false
;
26
double
magn_sigma2
= 0.0;
27
double
const_sigma2
= 0.0;
28
double
sigma2
= 0.0;
29
double
output_mean
= 0.0;
30
double
output_scale
= 1.0;
31
bool
output_mean_frozen
=
false
;
32
double
pair_cutoff
= 0.0;
33
double
pair_cutoff_width
= 0.0;
34
int
model_profile
= 0;
35
bool
has_pair_kernel
=
false
;
36
std::string
kernel_text
;
37
std::string
identity
;
38
};
39
41
void
saveTrainedGpState
(
const
std::string& path,
42
const
GaussianProcessRegression
& gp,
43
const
Observation
& observations,
44
const
AtomsConfiguration
& atoms);
45
46
[[nodiscard]]
TrainedGpState
loadTrainedGpState
(
const
std::string& path);
47
49
[[nodiscard]]
TrainedGpState
observationState
(
const
Observation
& observations);
50
54
bool
applyTrainedGpState
(
GaussianProcessRegression
& gp,
55
const
TrainedGpState
& state,
56
const
AtomsConfiguration
& atoms,
57
bool
require_identity);
58
62
void
refuseNonFiniteSeedRows
(
const
Observation
& observations,
63
Eigen::Index expected_cols = -1);
64
69
int
seedSession
(
neb::ActiveLearningSession
& session,
70
const
TrainedGpState
& state,
bool
require_identity,
71
Eigen::Index expected_cols = -1);
72
76
[[nodiscard]] std::string
resolveGpStatePath
(
const
std::string& spec,
77
bool
restart);
78
80
[[nodiscard]] std::string
outputDirectory
(
const
std::string& output_path);
81
82
}
// namespace io
83
}
// namespace gpr
Structures.h
gpr::GaussianProcessRegression
Definition
GaussianProcessRegression.h:335
gpr::io
Definition
SeededSearch.h:8
gpr::io::applyTrainedGpState
bool applyTrainedGpState(GaussianProcessRegression &gp, const TrainedGpState &state, const AtomsConfiguration &atoms, bool require_identity)
Definition
GpState.cpp:564
gpr::io::resolveGpStatePath
std::string resolveGpStatePath(const std::string &spec, bool restart)
Definition
GpState.cpp:694
gpr::io::refuseNonFiniteSeedRows
void refuseNonFiniteSeedRows(const Observation &observations, Eigen::Index expected_cols)
Definition
GpState.cpp:587
gpr::io::observationState
TrainedGpState observationState(const Observation &observations)
A state that carries observations and no pair kernel.
Definition
GpState.cpp:556
gpr::io::loadTrainedGpState
TrainedGpState loadTrainedGpState(const std::string &path)
Definition
GpState.cpp:516
gpr::io::saveTrainedGpState
void saveTrainedGpState(const std::string &path, const GaussianProcessRegression &gp, const Observation &observations, const AtomsConfiguration &atoms)
Write gp-state.npz. A second save of the same state is the same bytes.
Definition
GpState.cpp:450
gpr::io::outputDirectory
std::string outputDirectory(const std::string &output_path)
Directory of an output path, or . when the path has no directory.
Definition
GpState.cpp:714
gpr::io::seedSession
int seedSession(neb::ActiveLearningSession &session, const TrainedGpState &state, bool require_identity, Eigen::Index expected_cols)
Definition
GpState.cpp:638
gpr::neb
The nudged elastic band: path, GP-NEB driver, configuration and result, acquisition,...
Definition
ChainRealign.h:29
gpr
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition
Macros.h:16
gpr::FieldMatrixd
Eigen::Matrix< double, EigenDynamic, EigenDynamic, FieldMatrixStorage > FieldMatrixd
Definition
Macros.h:25
gpr::AtomsConfiguration
Stores configurations of all atoms in the system.
Definition
Structures.h:832
gpr::Observation
Observation data: energy, gradient and positions.
Definition
Structures.h:1029
gpr::io::TrainedGpState
Definition
GpState.h:21
gpr::io::TrainedGpState::const_sigma2
double const_sigma2
Definition
GpState.h:27
gpr::io::TrainedGpState::sigma2
double sigma2
Definition
GpState.h:28
gpr::io::TrainedGpState::kernel_text
std::string kernel_text
Definition
GpState.h:36
gpr::io::TrainedGpState::output_mean
double output_mean
Definition
GpState.h:29
gpr::io::TrainedGpState::observations
Observation observations
Definition
GpState.h:22
gpr::io::TrainedGpState::atomistic_length_scale
FieldMatrixd atomistic_length_scale
Definition
GpState.h:24
gpr::io::TrainedGpState::has_pair_kernel
bool has_pair_kernel
Definition
GpState.h:35
gpr::io::TrainedGpState::model_profile
int model_profile
Definition
GpState.h:34
gpr::io::TrainedGpState::pair_cutoff
double pair_cutoff
Definition
GpState.h:32
gpr::io::TrainedGpState::output_scale
double output_scale
Definition
GpState.h:30
gpr::io::TrainedGpState::identity
std::string identity
Definition
GpState.h:37
gpr::io::TrainedGpState::output_mean_frozen
bool output_mean_frozen
Definition
GpState.h:31
gpr::io::TrainedGpState::length_scale
FieldMatrixd length_scale
Definition
GpState.h:23
gpr::io::TrainedGpState::has_atomistic_length_scale
bool has_atomistic_length_scale
Definition
GpState.h:25
gpr::io::TrainedGpState::pair_cutoff_width
double pair_cutoff_width
Definition
GpState.h:33
gpr::io::TrainedGpState::magn_sigma2
double magn_sigma2
Definition
GpState.h:26
gpr::neb::ActiveLearningSession
Definition
Session.h:198
managers
io
GpState.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf