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
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_GPRD
22#include "eon/AtomicGPDimer.h"
23#endif
24
25namespace eonc {
26
27std::shared_ptr<LowestEigenmode>
28buildEigenmodeStrategy(std::shared_ptr<Matter> matter, const Parameters &params,
29 std::shared_ptr<Potential> pot) {
32 if (params.dimer_options().improved) {
33 return std::make_shared<ImprovedDimer>(matter, params, pot);
34 }
35 return std::make_shared<Dimer>(matter, params, pot);
36 }
39 return std::make_shared<Lanczos>(matter, params, pot);
40 }
43 return std::make_shared<Davidson>(matter, params, pot);
44 }
47#ifdef WITH_GPRD
48 return std::make_shared<AtomicGPDimer>(matter, params, pot);
49#else
50 throw std::runtime_error(
51 "min_mode_method=gprdimer needs a -Dwith_gprd build with the private "
52 "gpr_optim repository checked out in subprojects/gpr_optim "
53 "(rsync -a ../gpr_optim/ subprojects/gpr_optim/, then reconfigure)");
54#endif
55 }
56 return std::make_shared<ImprovedDimer>(matter, params, pot);
57}
58
59} // namespace eonc
static const char MINMODE_GPRDIMER[]
static const char MINMODE_DIMER[]
static const char MINMODE_LANCZOS[]
static const char MINMODE_DAVIDSON[]
const dimer_options_t & dimer_options() const
const saddle_search_options_t & saddle_search_options() const
RAII resource manager for the ARTn C library with global synchronization.
std::shared_ptr< LowestEigenmode > buildEigenmodeStrategy(std::shared_ptr< Matter > matter, const Parameters &params, std::shared_ptr< Potential > pot)