8#ifndef PNOPARAMETERS_H_
9#define PNOPARAMETERS_H_
36 std::stringstream
ss(
string);
61 initialize<int>(
"rank_increase", 15 ,
"maximum rank to increase in every macroiteration");
62 initialize<int>(
"chunk", 100 ,
"chunk of functions operated on in parallel when G or K is applied (prevent memory shortage)");
66 initialize<std::string>(
"guesstype",
"exop",
"the guesstype: exop (recommended, multiply polynomial excitation operators onto the occupied orbitals), empty (don't compute a guess), scf (use the ao basis from the SCF solver), partial_wave (create s,p,d ..., type functions and place on atoms), predefined (same as partial_wave but for predefined sets) ");
67 initialize<std::string>(
"exop",
"multipole",
"this string defines which excitation operators can be used, use 'dipole', 'dipole+', 'quadrupole', 'ocopole', or 'multipole', need to set guesstype to 'exop' which is the default ");
68 initialize<bool>(
"exop_trigo",
true,
"use trigonometric excitation operators ( x --> sin(x) ");
69 initialize<std::string>(
"partial_wave",
"",
"atom centered partial wave guess of format like 'h-2s1p-o-3s2p1d', need to set guesstype to 'partial_wave' and adaptive_solver to 'none' ");
70 initialize<std::string>(
"predefined",
"",
"predefined partial wave guesses of type pvxz with x=d,t,q,5,6, need to set guesstype to 'predefined' and adaptive_solver to 'none'");
71 initialize<int>(
"maxiter_t",100,
"maximal number of iterations in the amplitude solver");
72 initialize<int>(
"maxiter_micro",10,
"Maximum of iterations for every cycle in the adaptive solver");
73 initialize<int>(
"maxiter_macro",10,
"Maximum of iterations of cycles in the adaptive solver");
76 initialize<bool>(
"canonicalize_pno",
true,
"canonicalize the pnos before the amplitude solver");
78 initialize<double>(
"econv_micro",1.e-3,
"Energy convergence for microiterations (Greens function based optimization) in adaptive solver");
79 initialize<double>(
"econv_pairs",1.e-4,
"ENergy convergence for individual pairs in adaptive solver. Converged pairs are frozen automatically");
80 initialize<double>(
"econv_macro",1.e-3,
"Energy convergence for macroiterations in adaptive solver, no effect if adaptive_solver is deactivated");
81 initialize<double>(
"dconv",1.e-1,
"convergence of every PNO in the Green's function solver");
84 initialize<std::string>(
"no_compute",
"none",
"do not compute the pairs of this type, use 'mp2', 'cispd', 'all' or 'none' ");
85 initialize<std::string>(
"no_opt",
"none",
"do not optimize the pnos of this type, use 'mp2', 'cispd', 'all' or 'none' ");
86 initialize<std::string>(
"no_guess",
"none",
"guess for this type will be empty, use 'mp2', 'cispd', 'all' or 'none' ");
87 initialize<std::string>(
"adaptive_solver",
"all",
"Use adaptive solver for those pairs, use 'mp2', 'cispd', 'all' or 'none', works only in combination with guesstype 'exop' ");
91 initialize<int> (
"cispd_number", -1,
"CIS(D) excitation numbers, to read in correct functions" );
93 initialize<std::string> (
"freeze_pairs",
"none",
"frozen pairs will not be optimized: Expected format 'a b c d' will freeze pairs ab and cd");
94 initialize<std::vector<int> >(
"freeze_pairs_of_orbital",std::vector<int>(),
" All pairs which originate from this orbital will not be optimized");
95 initialize<std::vector<int> >(
"active_pairs_of_orbital",std::vector<int>(),
" All pairs which originate from this orbital will not be frozen all other pairs will, if this vector is not empty");
96 initialize<bool>(
"no_opt_in_first_iteration",
false,
"Do not optimize in the first iteration (then the potentials do not have to be evaluated, use this for large guesses)");
97 initialize<std::string>(
"exchange",
"full",
"approximate exchange with 'neglect' or xc functional -> same syntax as moldft");
98 initialize<bool>(
"save_pnos",
true,
"Save the OBS-PNOs to a file, before and after orthonormalization.");
108 if (atom.atomic_number < 3){
110 }
else if(atom.atomic_number < 11){
112 }
else if(atom.atomic_number < 19){
125 const std::string
gt =
"exop";
126 const std::string
ex =
"multipole";
138 std::vector<std::pair<int,int> > result;
142 std::stringstream
ss(str);
146 result.push_back(std::make_pair(i,j));
162 std::map<std::string, std::vector<int> >
partial_wave(
const std::string& key =
"partial_wave")
const {
165 std::transform(str.begin(), str.end(), str.begin(), ::tolower);
167 std::replace(str.begin(), str.end(),
'-',
' ');
169 std::stringstream
ss(str);
171 std::map<std::string, std::vector<int> > result;
175 std::vector<char>
control = {
's',
'p',
'd',
'f',
'g',
'h',
'i',
'k'};
176 for (
size_t i=0; i<
pw_string.size()/2; ++i){
202 std::vector<std::pair<int,double> >
cispd()
const {
204 const int number =
get<int >(
"cispd_number");
207 return std::vector<std::pair<int,double> >();
210 return std::vector<std::pair<int,double> >(1,std::make_pair(number,
energy));
240 initialize<bool>(
"abs_c",
true,
" use auxilliary basis on f12Q[Kf12] part of energy (only if energytype is HYLLERAAS_ENERGYTYPE). If switched off the part neglected!");
241 initialize<bool>(
"abs_u",
false,
" use auxilliary basis on f12QUe part of energy (only if energytype is HYLLERAAS_ENERGYTYPE). If switched off the part is computed in full (recommended) ");
243 initialize<std::string>(
"energytype",
"projected",
" the energytype is 'projected' or 'hylleraas' functional projected energies do not need auxilliary bases for the evaluation of the f12 energy. It's recommended to use projected_energies! For Hylleraas type you need to specify an auxbas from file OR internal");
245 initialize<std::string>(
"auxbas",
"none",
"atom centered partial wave guess of format like 'h-2s1p-o-3s2p1d' ");
246 initialize<std::string>(
"auxbas_file",
"none",
" use external comp. aux. basis in addition to the pnos as auxbasis. Give the filename as parameter. Give the auxbas in turbomole format. Don't use contractions. If a file is specified the auxbas parameter has no effect");
258 std::transform(key.begin(), key.end(), key.begin(), ::tolower);
259 std::stringstream
ss(key);
266 std::map<std::string,std::vector<int> >
auxbas()
const {
Definition PNOParameters.h:227
void initialize_f12_parameters()
Definition PNOParameters.h:239
F12Parameters(World &world, const commandlineparser &parser, const PNOParameters ¶m, const std::string &TAG="pno")
Definition PNOParameters.h:233
bool abs_c() const
Definition PNOParameters.h:250
F12Parameters(const PNOParameters ¶m)
Definition PNOParameters.h:229
double cabs_thresh() const
Definition PNOParameters.h:252
void set_derived_values()
Definition PNOParameters.h:270
EnergyType energytype() const
Definition PNOParameters.h:256
double gamma() const
Definition PNOParameters.h:265
bool abs_u() const
Definition PNOParameters.h:251
std::map< std::string, std::vector< int > > auxbas() const
Definition PNOParameters.h:266
std::string auxbas_file() const
Definition PNOParameters.h:253
bool f12() const
Definition PNOParameters.h:249
Definition molecule.h:124
Definition PNOParameters.h:30
std::string exop() const
Definition PNOParameters.h:161
std::vector< std::vector< double > > protocol() const
Definition PNOParameters.h:156
bool save_pnos() const
Definition PNOParameters.h:151
std::size_t freeze() const
Definition PNOParameters.h:158
PairType no_compute() const
Definition PNOParameters.h:196
void set_derived_values(const Molecule &molecule)
Definition PNOParameters.h:102
double dconv() const
Definition PNOParameters.h:193
bool canonicalize_pno() const
Definition PNOParameters.h:191
GuessType guesstype() const
Definition PNOParameters.h:160
double tpno_tight() const
Definition PNOParameters.h:190
bool exop_trigo() const
Definition PNOParameters.h:153
int maxiter() const
Definition PNOParameters.h:187
PairType no_guess() const
Definition PNOParameters.h:198
void initialize_pno_parameters()
Definition PNOParameters.h:60
std::map< std::string, std::vector< int > > partial_wave(const std::string &key="partial_wave") const
Definition PNOParameters.h:162
double econv() const
Definition PNOParameters.h:216
PNOParameters(World &world, const commandlineparser &parser, const std::string &TAG="pno")
Definition PNOParameters.h:49
int maxiter_macro() const
Definition PNOParameters.h:221
PairType no_opt() const
Definition PNOParameters.h:197
T assign_from_string(const std::string &string) const
Definition PNOParameters.h:34
PNOParameters()
Definition PNOParameters.h:41
PNOParameters(World &world, const commandlineparser &parser, const Molecule &molecule, const std::string &TAG="pno")
Definition PNOParameters.h:54
std::vector< int > freeze_pairs_of_orbital() const
Definition PNOParameters.h:213
PNOParameters(const QCCalculationParametersBase ¶m)
Definition PNOParameters.h:45
std::string predefined_guess() const
Definition PNOParameters.h:186
std::vector< std::pair< int, double > > cispd() const
Definition PNOParameters.h:202
bool diagonal() const
Definition PNOParameters.h:150
std::vector< int > active_pairs_of_orbital() const
Definition PNOParameters.h:214
PairType restart() const
Definition PNOParameters.h:195
bool f12() const
Definition PNOParameters.h:201
double op_thresh() const
Definition PNOParameters.h:194
double tpno() const
Definition PNOParameters.h:189
int chunk() const
Definition PNOParameters.h:155
int maxiter_micro() const
Definition PNOParameters.h:220
bool kain() const
Definition PNOParameters.h:199
double econv_micro() const
Definition PNOParameters.h:218
int rank_increase() const
Definition PNOParameters.h:154
int maxrank() const
Definition PNOParameters.h:159
double thresh() const
Definition PNOParameters.h:192
std::vector< std::pair< int, int > > freeze_pairs() const
Definition PNOParameters.h:136
bool debug() const
Definition PNOParameters.h:157
PairType adaptive_solver() const
Definition PNOParameters.h:215
double econv_macro() const
Definition PNOParameters.h:219
bool no_opt_in_first_iteration() const
Definition PNOParameters.h:222
std::size_t kain_subspace() const
Definition PNOParameters.h:200
std::string exchange() const
Definition PNOParameters.h:152
double econv_pairs() const
Definition PNOParameters.h:217
int maxiter_t() const
Definition PNOParameters.h:188
class for holding the parameters for calculation
Definition QCCalculationParametersBase.h:290
virtual void read_input_and_commandline_options(World &world, const commandlineparser &parser, const std::string tag)
Definition QCCalculationParametersBase.h:325
void set_derived_value(const std::string &key, const T &value)
Definition QCCalculationParametersBase.h:403
A parallel world class.
Definition world.h:132
double(* energy)()
Definition derivatives.cc:58
auto T(World &world, response_space &f) -> response_space
Definition global_functions.cc:34
#define MADNESS_ASSERT(condition)
Assert a condition that should be free of side-effects since in release builds this might be a no-op.
Definition madness_exception.h:134
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
std::ostream & operator<<(std::ostream &os, const particle< PDIM > &p)
Definition lowrankfunction.h:397
EnergyType
Definition PNOParameters.h:21
@ HYLLERAAS_ENERGYTYPE
Definition PNOParameters.h:21
@ UNKNOWN_ENERGYTYPE
Definition PNOParameters.h:21
@ PROJECTED_ENERGYTYPE
Definition PNOParameters.h:21
GuessType
Definition PNOParameters.h:25
@ PSI4_GUESSTYPE
Definition PNOParameters.h:25
@ EXOP_GUESSTYPE
Definition PNOParameters.h:25
@ SCF_GUESSTYPE
Definition PNOParameters.h:25
@ FROM_FILE_GUESSTYPE
Definition PNOParameters.h:25
@ PREDEFINED_GUESSTYPE
Definition PNOParameters.h:25
@ UNKNOWN_GUESSTYPE
Definition PNOParameters.h:25
@ EMPTY_GUESSTYPE
Definition PNOParameters.h:25
@ PARTIAL_WAVE_GUESSTYPE
Definition PNOParameters.h:25
std::istream & operator>>(std::istream &is, PairType &en)
Definition PNOParameters.cpp:24
std::string type(const PairType &n)
Definition PNOParameters.h:18
PairType
Definition PNOParameters.h:17
@ UNKNOWN_PAIRTYPE
Definition PNOParameters.h:17
@ CISPD_PAIRTYPE
Definition PNOParameters.h:17
@ MP2_PAIRTYPE
Definition PNOParameters.h:17
@ ALL_PAIRTYPE
Definition PNOParameters.h:17
@ NONE_PAIRTYPE
Definition PNOParameters.h:17
static XNonlinearSolver< std::vector< Function< T, NDIM > >, T, vector_function_allocator< T, NDIM > > nonlinear_vector_solver(World &world, const long nvec)
Definition nonlinsol.h:371
very simple command line parser
Definition commandlineparser.h:15
InputParameters param
Definition tdse.cc:203
double gt(const coord_t &r)
Definition testgconv.cc:142
static Molecule molecule
Definition testperiodicdft.cc:39