30 std::variant<Dimer, ImprovedDimer, Lanczos, Davidson, AtomicGPDimer>;
37inline std::shared_ptr<EigenmodeStrategy>
39 std::shared_ptr<Potential>
pot) {
43 return std::make_shared<EigenmodeStrategy>(
46 return std::make_shared<EigenmodeStrategy>(
Dimer(matter, params,
pot));
49 return std::make_shared<EigenmodeStrategy>(
Lanczos(matter, params,
pot));
52 return std::make_shared<EigenmodeStrategy>(
Davidson(matter, params,
pot));
59 return std::make_shared<EigenmodeStrategy>(
60 std::in_place_type<AtomicGPDimer>, matter, params,
pot);
65 throw std::runtime_error(
66 "min_mode_method=gprdimer requires -Dwith_gprd=true (WITH_GPRD)");
70 return std::make_shared<EigenmodeStrategy>(
76 std::shared_ptr<Matter> matter,
78 std::visit([&](
auto &impl) { impl.compute(matter, direction); }, s);
83 return std::visit([](
auto &impl) {
return impl.getEigenvalue(); }, s);
88 return std::visit([](
auto &impl) {
return impl.getEigenvector(); }, s);
94 return std::get_if<ImprovedDimer>(&s);
99 return std::visit([](
auto &impl) {
return impl.totalForceCalls; }, s);
103 return std::visit([](
auto &impl) {
return impl.statsTorque; }, s);
107 return std::visit([](
auto &impl) {
return impl.statsAngle; }, s);
111 return std::visit([](
auto &impl) {
return impl.statsRotations; }, s);
115 return std::visit([](
auto &impl) {
return impl.totalIterations; }, s);
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Classic dimer method to find the lowest curvature mode.
static const char MINMODE_DIMER[]
static const char MINMODE_GPRDIMER[]
static const char MINMODE_DAVIDSON[]
static const char MINMODE_LANCZOS[]
struct eonc::Parameters::dimer_options_t dimer_options
struct eonc::Parameters::saddle_search_options_t saddle_search_options
RAII resource manager for the ARTn C library with global synchronization.
double eigenmodeStatsAngle(EigenmodeStrategy &s)
AtomMatrix eigenmodeGetEigenvector(EigenmodeStrategy &s)
Dispatch getEigenvector() to the active variant.
ImprovedDimer * asImprovedDimer(EigenmodeStrategy &s)
Access ImprovedDimer-specific features.
double eigenmodeStatsTorque(EigenmodeStrategy &s)
std::shared_ptr< EigenmodeStrategy > buildEigenmodeStrategy(std::shared_ptr< Matter > matter, const Parameters ¶ms, std::shared_ptr< Potential > pot)
Build the eigenmode solver from parameters.
void eigenmodeCompute(EigenmodeStrategy &s, std::shared_ptr< Matter > matter, AtomMatrix direction)
Dispatch compute() to the active variant.
double eigenmodeGetEigenvalue(EigenmodeStrategy &s)
Dispatch getEigenvalue() to the active variant.
long eigenmodeStatsRotations(EigenmodeStrategy &s)
long eigenmodeTotalForceCalls(EigenmodeStrategy &s)
Read stats from any variant (all inherit LowestEigenmode stats fields).
std::variant< Dimer, ImprovedDimer, Lanczos, Davidson > EigenmodeStrategy
long eigenmodeTotalIterations(EigenmodeStrategy &s)
std::string minmode_method