eOn 3.2.0
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
EigenmodeStrategy.cpp
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
13
#include "
eon/EigenmodeStrategy.h
"
14
#include "
eon/Davidson.h
"
15
#include "
eon/Dimer.h
"
16
#include "
eon/ImprovedDimer.h
"
17
#include "
eon/Lanczos.h
"
18
#include "
eon/Parameters.h
"
19
#include <stdexcept>
20
21
#ifdef WITH_RGSADDLE
22
#include "
eon/XtsciMinMode.h
"
23
#endif
24
25
#ifdef WITH_GPRD
26
#include "
eon/AtomicGPDimer.h
"
27
#endif
28
29
namespace
eonc
{
30
31
std::shared_ptr<LowestEigenmode>
32
buildEigenmodeStrategy
(std::shared_ptr<Matter> matter,
const
Parameters
¶ms,
33
std::shared_ptr<Potential>
pot
) {
34
if
(params.
saddle_search_options
().
minmode_method
==
35
LowestEigenmode::MINMODE_DIMER
) {
36
#ifdef WITH_RGSADDLE
37
return
std::make_shared<XtsciMinMode>(matter, params,
pot
);
38
#else
39
if
(params.
dimer_options
().
improved
) {
40
return
std::make_shared<ImprovedDimer>(matter, params,
pot
);
41
}
42
return
std::make_shared<Dimer>(matter, params,
pot
);
43
#endif
44
}
45
if
(params.
saddle_search_options
().
minmode_method
==
46
LowestEigenmode::MINMODE_LANCZOS
) {
47
#ifdef WITH_RGSADDLE
48
return
std::make_shared<XtsciMinMode>(matter, params,
pot
);
49
#else
50
return
std::make_shared<Lanczos>(matter, params,
pot
);
51
#endif
52
}
53
if
(params.
saddle_search_options
().
minmode_method
==
54
LowestEigenmode::MINMODE_DAVIDSON
) {
55
return
std::make_shared<Davidson>(matter, params,
pot
);
56
}
57
if
(params.
saddle_search_options
().
minmode_method
==
58
LowestEigenmode::MINMODE_XTSCI
) {
59
#ifdef WITH_RGSADDLE
60
return
std::make_shared<XtsciMinMode>(matter, params,
pot
);
61
#else
62
throw
std::runtime_error(
63
"min_mode_method=xtsci requires -Dwith_rgsaddle=true"
);
64
#endif
65
}
66
if
(params.
saddle_search_options
().
minmode_method
==
67
LowestEigenmode::MINMODE_GPRDIMER
) {
68
#ifdef WITH_GPRD
69
return
std::make_shared<AtomicGPDimer>(matter, params,
pot
);
70
#else
71
throw
std::runtime_error(
72
"min_mode_method=gprdimer needs a -Dwith_gprd build with the private "
73
"gpr_optim repository checked out in subprojects/gpr_optim "
74
"(rsync -a ../gpr_optim/ subprojects/gpr_optim/, then reconfigure)"
);
75
#endif
76
}
77
return
std::make_shared<ImprovedDimer>(matter, params,
pot
);
78
}
79
80
}
// namespace eonc
AtomicGPDimer.h
Davidson.h
Dimer.h
EigenmodeStrategy.h
ImprovedDimer.h
Lanczos.h
Parameters.h
XtsciMinMode.h
eonc::LowestEigenmode::MINMODE_GPRDIMER
static const char MINMODE_GPRDIMER[]
Definition
LowestEigenmode.h:36
eonc::LowestEigenmode::MINMODE_DIMER
static const char MINMODE_DIMER[]
Definition
LowestEigenmode.h:35
eonc::LowestEigenmode::MINMODE_LANCZOS
static const char MINMODE_LANCZOS[]
Definition
LowestEigenmode.h:37
eonc::LowestEigenmode::MINMODE_DAVIDSON
static const char MINMODE_DAVIDSON[]
Definition
LowestEigenmode.h:38
eonc::LowestEigenmode::MINMODE_XTSCI
static const char MINMODE_XTSCI[]
Definition
LowestEigenmode.h:39
eonc::Parameters
Definition
Parameters.h:35
eonc::Parameters::dimer_options
const dimer_options_t & dimer_options() const
Definition
ParametersAccess.cpp:135
eonc::Parameters::saddle_search_options
const saddle_search_options_t & saddle_search_options() const
Definition
ParametersAccess.cpp:127
eonc::pot
Definition
ExternalCommand.h:22
eonc
RAII resource manager for the ARTn C library with global synchronization.
Definition
ARTnSaddleSearch.cpp:23
eonc::buildEigenmodeStrategy
std::shared_ptr< LowestEigenmode > buildEigenmodeStrategy(std::shared_ptr< Matter > matter, const Parameters ¶ms, std::shared_ptr< Potential > pot)
Definition
EigenmodeStrategy.cpp:32
eonc::dimer_options_t::improved
bool improved
Definition
ParametersOptions.h:397
eonc::saddle_search_options_t::minmode_method
std::string minmode_method
Definition
ParametersOptions.h:269
client
EigenmodeStrategy.cpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf