MADNESS 0.10.1
CalculationParameters.h
Go to the documentation of this file.
1/*
2 This file is part of MADNESS.
3
4 Copyright (C) 2007,2010 Oak Ridge National Laboratory
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20 For more information please contact:
21
22 Robert J. Harrison
23 Oak Ridge National Laboratory
24 One Bethel Valley Road
25 P.O. Box 2008, MS-6367
26
27 email: harrisonrj@ornl.gov
28 tel: 865-241-3937
29 fax: 865-572-0680
30
31
32 $Id$
33 */
34
35/// \file CalculationParameters
36/// \brief solution parameters for SCF calculations
37
38
39
40#ifndef MADNESS_CHEM_CALCULATIONPARAMETERS_H__INCLUDED
41#define MADNESS_CHEM_CALCULATIONPARAMETERS_H__INCLUDED
42
47
48
49namespace madness {
50
52 static constexpr char const* tag = "dft";
53
55
57 read_input_and_commandline_options(world, parser, "dft");
58 // NB: `--optimize` deliberately does NOT set anything here. It selects a
59 // workflow task (WorkflowBuilders::add_optimize_workflow_drivers); the
60 // `dft` group has no say in whether a geometry is optimized.
61 std::string inputfile=parser.value("input");
62 // std::string prefix=commandlineparser::remove_extension(commandlineparser::base_name(inputfile));
63 // if (prefix!="input") set_derived_value("prefix",prefix);
64 }
65
66 /// ctor reading out the input file
68 initialize<std::string>("prefix","mad","prefixes your output/restart/json/plot/etc files");
69 initialize<double>("charge",0.0,"total molecular charge");
70 initialize<std::string> ("xc","hf","XC input line");
71 initialize<std::string> ("hfexalg","multiworld","hf exchange algorithm; multiworld (the tiled exchange) bounds memory, needs one subworld per rank",{"multiworld","multiworld_row","fetch_compute","smallmem","largemem"});
72 initialize<long> ("hfex_granularity",1,"hfexalg=multiworld: orbital batches per rank; >1 balances better");
73 initialize<bool> ("hfex_cost_aware",true,"hfexalg=multiworld: place tasks by measured cost, not by count");
74 initialize<bool> ("hfex_apply_screen",true,"hfexalg=multiworld: skip the Poisson apply where the multiplier is negligible in the destination box (bounded per block; a one-sided bias of 5e-10 Eh per occupied orbital at thresh 1e-6)");
75 initialize<int> ("hfex_accumulation",2,"hfexalg=multiworld: gather tile results 1=per subworld, 2=per node");
76 initialize<std::string>("hfex_mo_order","as_is","hfexalg=multiworld: the order of the orbitals in the exchange batches: as_is (as given), shuffle (a fixed random permutation), balanced (dealt into the batches by coefficient count, so every batch carries the same share of the core orbitals)",{"as_is","shuffle","balanced"});
77 initialize<std::string>("bsh_apply","auto","BSH apply backend; auto=macrotask when multinode or at tight thresh, else tile",{"auto","tile","macrotask","plain"});
78 initialize<std::vector<std::string>>("memory",{"storefunction","nodereplicated","distributed"},"memory algorithm for storing functions (storing,cloud,target)");
79 initialize<double>("smear",0.0,"smearing parameter");
80 initialize<double>("econv",1.e-5,"energy convergence");
81 initialize<double>("dconv",1.e-4,"density convergence");
82 initialize<std::vector<std::string> >("convergence_criteria",{"bsh_residual","total_energy"},"possible values are: bsh_residual, total_energy, each_energy, density");
83 initialize<int> ("k",-1,"polynomial order");
84 initialize<double>("l",20,"user coordinates box size");
85 initialize<std::string>("deriv","abgv","derivative method",{"abgv","bspline","ble"});
86 initialize<std::string>("dft_deriv","bspline","derivative method for gga potentials",{"abgv","bspline","ble"});
87 initialize<bool> ("xc_weak_gga",false,"weak form of the semilocal xc potential; nemo only");
88 initialize<double>("maxrotn",0.25,"step restriction used in autoshift algorithm");
89 initialize<int> ("nvalpha",0,"number of alpha virtuals to compute");
90 initialize<int> ("nvbeta",0,"number of beta virtuals to compute");
91 initialize<std::vector<double> >("aocc",std::vector<double>(),"explicit alpha occupations (0 or 1) by orbital index within the occupied span; a 0 is a hole");
92 initialize<std::vector<double> >("bocc",std::vector<double>(),"explicit beta occupations (0 or 1) by orbital index within the occupied span; a 0 is a hole");
93 initialize<int> ("nopen",0,"number of unpaired electrons = nalpha-nbeta");
94 initialize<int> ("maxiter",25,"maximum number of iterations");
95 initialize<int> ("nio",1,"no. of io servers to use");
96 initialize<bool> ("spin_restricted",true,"true if spin restricted");
97 initialize<int> ("plotlo",0,"range of MOs to print (for both spins if polarized");
98 initialize<int> ("plothi",-1,"range of MOs to print (for both spins if polarized");
99 initialize<bool> ("plotdens",false,"If true print the density at convergence");
100 initialize<bool> ("plotcoul",false,"If true plot the total coulomb potential at convergence");
101 initialize<bool> ("plotcube",false,"If true also write Gaussian .cube files (for Avogadro/VMD) alongside .dx");
102 initialize<std::string> ("localize","new","localization method",{"pm","boys","new","new_sys","cholesky","canon"});
103 initialize<std::string> ("pointgroup","c1","use point (sub) group symmetry if not localized",{"c1","c2","ci","cs","c2v","c2h","d2","d2h"});
104 initialize<std::string>("restart","auto","where the initial orbitals come from: auto picks "
105 "between none/iterate/read_only by what is on disk",
106 {"auto","none","iterate","read_only","ao","nwchem"});
107 // Retired in favour of the `restart` modes above, but kept registered so a
108 // deck that still sets them gets a migration error instead of the single
109 // easily-missed warning that ignore_unknown_keys would produce. See the
110 // guard at the end of set_derived_values().
111 initialize<bool> ("restartao",false,"RETIRED -- use restart=ao");
112 initialize<bool> ("no_compute",false,"RETIRED -- use restart=read_only");
113 initialize<bool> ("save",true,"if true save orbitals to disk");
114 initialize<int> ("maxsub",10,"size of iterative subspace ... set to 0 or 1 to disable");
115 initialize<double> ("orbitalshift",0.0,"scf orbital shift: shift the occ orbitals to lower energies");
116 initialize<int> ("npt_plot",101,"no. of points to use in each dim for plots");
117// initialize<Tensor<double> > ("plot_cell",Tensor<double>(),"lo hi in each dimension for plotting (default is all space)");
118 initialize<std::vector<double> > ("plot_cell",std::vector<double>(),"lo hi in each dimension for plotting (default is all space)");
119 initialize<std::string> ("aobasis","6-31g","AO basis used for initial guess (6-31gss, 6-31g, 3-21g, sto-6g, sto-3g)");
120 initialize<bool> ("derivatives",false,"if true calculate nuclear derivatives");
121 initialize<bool> ("dipole",false,"if true calculate dipole moment");
122 initialize<bool> ("conv_only_dens",false,"if true remove bsh_residual from convergence criteria (deprecated)");
123 initialize<bool> ("psp_calc",false,"pseudopotential calculation for all atoms");
124 initialize<std::string> ("pcm_data","none","do a PCM (solvent) calculation");
125 initialize<std::string> ("dispersion","none","DFT-D3 dispersion correction",{"none","d3bj","d3zero"});
126 initialize<std::string> ("dispersion_functional","none","functional whose D3 damping parameters to use");
127 initialize<bool> ("dispersion_atm",false,"include the three-body Axilrod-Teller-Muto dispersion term");
128 initialize<bool> ("pure_ae",true,"pure all electron calculation with no pseudo-atoms");
129 initialize<int> ("print_level",3,"0: no output; 1: final energy; 2: iterations; 3: timings; 10: debug");
130 initialize<std::vector<std::string> > ("population",{"none"},"atomic charges (and spin populations) of the final "
131 "orbitals, printed at the end: none, mulliken, lowdin, iao; several allowed, e.g. [iao,mulliken]");
132 initialize<std::string> ("population_basis","6-31g","basis set for the mulliken and lowdin populations "
133 "(default: the value of aobasis)");
134 initialize<std::string> ("population_minbasis","sto-3g","minimal basis set for the iao populations");
135 initialize<std::string> ("molecular_structure","inputfile","where to read the molecule from: inputfile or name from the library");
136
137 // Next list inferred parameters
138 initialize<int> ("nalpha",-1,"number of alpha spin electrons");
139 initialize<int> ("nbeta",-1,"number of beta spin electrons");
140 initialize<int> ("nmo_alpha",-1,"number of alpha spin molecular orbitals");
141 initialize<int> ("nmo_beta",-1,"number of beta spin molecular orbitals");
142 initialize<double> ("lo",1.e-10,"smallest length scale we need to resolve");
143 initialize<std::vector<double> > ("protocol",{1.e-4,1.e-6},"calculation protocol");
144
145 // Retired geometry-optimization knobs. Geometry optimization is no longer
146 // something an SCF does to itself; it is a workflow task of its own
147 // (`madqc --optimize --wf=<scf|nemo>`, qcapp::OptimizeDriver) and every
148 // knob it has lives in the `optimization` group (ParameterManager.hpp).
149 //
150 // These stay registered, and error, rather than being deleted outright:
151 // ignore_unknown_keys is true by default, so a deleted key would let an
152 // old deck run as a plain single point after one warning nobody reads --
153 // silently returning an unoptimized geometry. See the guard at the end of
154 // set_derived_values().
155 initialize<bool> ("gopt",false,"RETIRED -- use `madqc --optimize`");
156 initialize<double> ("gtol",1.e-4,"RETIRED -- use optimization group `gtol`");
157 initialize<bool> ("gtest",false,"RETIRED -- never had an effect");
158 initialize<double> ("gval",1.e-5,"RETIRED -- use optimization group `value_precision`");
159 initialize<double> ("gprec",1.e-4,"RETIRED -- use optimization group `gradient_precision`");
160 initialize<int> ("gmaxiter",20,"RETIRED -- use optimization group `maxiter`");
161 initialize<bool> ("ginitial_hessian",false,"RETIRED -- use optimization group `initial_hessian`");
162 initialize<std::string> ("algopt","bfgs","RETIRED -- use optimization group `algopt`",{"bfgs","cg"});
163 initialize<int> ("nv_factor",1,"RETIRED -- use `nv_extra`/`nv_step`");
164 initialize<int> ("nv_extra",0,"extra virtuals converged first and dropped stepwise down to nvalpha");
165 initialize<int> ("nv_step",0,"virtuals dropped per step-down stage (0: all extras at once)");
166 initialize<int> ("nv_its",5,"maximum iterations per intermediate step-down stage");
167 initialize<bool> ("freeze_occupied",false,"iterate only the virtuals in the mean field of restarted occupied orbitals, which stay fixed");
168 initialize<int> ("vnucextra",2,"load balance parameter for nuclear pot");
169 initialize<int> ("loadbalparts",2,"??");
170
171 //Keyword to use nwchem output for initial guess
172 initialize<std::string> ("nwfile","none","Base name of nwchem output files (.out and .movecs extensions) to read from");
173
174 }
175
176 std::string get_tag() const override {
177 return tag;
178 }
179
180 public:
182
183 std::string prefix() const {return get<std::string>("prefix");}
184
185 double econv() const {return get<double>("econv");}
186 double dconv() const {return get<double>("dconv");}
187
188 bool converge_density() const {
189 std::vector<std::string> criteria=get<std::vector<std::string> >("convergence_criteria");
190 return std::find(criteria.begin(),criteria.end(),"density")!=criteria.end();
191 }
193 std::vector<std::string> criteria=get<std::vector<std::string> >("convergence_criteria");
194 return std::find(criteria.begin(),criteria.end(),"bsh_residual")!=criteria.end();
195 }
197 std::vector<std::string> criteria=get<std::vector<std::string> >("convergence_criteria");
198 return std::find(criteria.begin(),criteria.end(),"total_energy")!=criteria.end();
199 }
200 bool converge_each_energy() const {
201 std::vector<std::string> criteria=get<std::vector<std::string> >("convergence_criteria");
202 return std::find(criteria.begin(),criteria.end(),"each_energy")!=criteria.end();
203 }
204
205 int nopen() const {return get<int>("nopen");}
206 int nalpha() const {return get<int>("nalpha");}
207 int nbeta() const {return get<int>("nbeta");}
208
209 int nvalpha() const {return get<int>("nvalpha");}
210 int nvbeta() const {return get<int>("nvbeta");}
211 std::vector<double> aocc() const {return get<std::vector<double> >("aocc");}
212 std::vector<double> bocc() const {return get<std::vector<double> >("bocc");}
213 int nv_extra() const {return get<int>("nv_extra");}
214 int nv_step() const {return get<int>("nv_step");}
215 int nv_its() const {return get<int>("nv_its");}
216 bool freeze_occupied() const {return get<bool>("freeze_occupied");}
217
218 int nmo_alpha() const {return get<int>("nmo_alpha");}
219 int nmo_beta() const {return get<int>("nmo_beta");}
220
221 bool have_beta() const {return (nbeta()>0) and (not spin_restricted());}
222
223 bool spin_restricted() const {return get<bool>("spin_restricted");}
224
225 double lo() const {return get<double>("lo");}
226 double L() const {return get<double>("l");}
227 int k() const {return get<int>("k");}
228
229 std::string localize_method() const {return get<std::string>("localize");}
230 bool do_localize() const {return (localize_method()!="canon");}
231 bool localize_pm() const {return (localize_method()=="pm");}
232
233 std::string pointgroup() const {return get<std::string>("pointgroup");}
234 bool do_symmetry() const {return (pointgroup()!="c1");}
235 double charge() const {return get<double>("charge");}
236 int print_level() const {return get<int>("print_level");}
237 std::vector<std::string> population() const {return get<std::vector<std::string> >("population");}
238 std::string population_basis() const {return get<std::string>("population_basis");}
239 std::string population_minbasis() const {return get<std::string>("population_minbasis");}
240
241 int maxiter() const {return get<int>("maxiter");}
242 double orbitalshift() const {return get<double>("orbitalshift");}
243
244 std::string deriv() const {return get<std::string>("deriv");}
245 std::string dft_deriv() const {return get<std::string>("dft_deriv");}
246 bool xc_weak_gga() const {return get<bool>("xc_weak_gga");}
247 std::string pcm_data() const {return get<std::string>("pcm_data");}
248 std::string dispersion() const {return get<std::string>("dispersion");}
249 std::string dispersion_functional() const {return get<std::string>("dispersion_functional");}
250 bool dispersion_atm() const {return get<bool>("dispersion_atm");}
251 std::string xc() const {return get<std::string>("xc");}
252 std::string hfexalg() const {return get<std::string>("hfexalg");}
253 long hfex_granularity() const {return get<long>("hfex_granularity");}
254 bool hfex_cost_aware() const {return get<bool>("hfex_cost_aware");}
255 bool hfex_apply_screen() const {return get<bool>("hfex_apply_screen");}
256 int hfex_accumulation() const {return get<int>("hfex_accumulation");}
257 std::string hfex_mo_order() const {return get<std::string>("hfex_mo_order");}
258 std::string bsh_apply() const {return get<std::string>("bsh_apply");}
259
260 std::vector<std::string> memory() const {return get<std::vector<std::string>>("memory");}
261
262 std::string aobasis() const {return get<std::string>("aobasis");}
263
264 std::vector<double> protocol() const {return get<std::vector<double> >("protocol");}
265 bool save() const {return get<bool>("save");}
266 /// the `restart` keyval as a string; parse with restart_mode_from_string()
267
268 /// Returns the spelling rather than the RestartMode enum because RestartPlan.h
269 /// includes this header, so the dependency cannot run the other way.
270 std::string restart() const {return get<std::string>("restart");}
271 bool restart_cphf() const {return get<bool>("restart_cphf");}
272
273 int maxsub() const {return get<int>("maxsub");}
274 double maxrotn() const {return get<double>("maxrotn");}
275
276 int vnucextra() const {return get<int>("vnucextra");}
277 int loadbalparts() const {return get<int>("loadbalparts");}
278
279
280 bool derivatives() const {return get<bool>("derivatives");}
281 bool dipole() const {return get<bool>("dipole");}
282
283 // NB: no gopt()/gtol()/gval()/gprec()/gmaxiter()/ginitial_hessian()/algopt()
284 // accessors. Those keyvals are retired; see the initialize() block above and
285 // the guard in set_derived_values(). The optimizer's knobs are in
286 // OptimizationParameters (chem/ParameterManager.hpp).
287
288 std::string nwfile() const {return get<std::string>("nwfile");}
289
291 std::vector<double> vcell=get<std::vector<double> >("plot_cell");
292 if (vcell.size()==0) return Tensor<double>();
293 Tensor<double> cell(3,2);
294 cell(0,0)=vcell[0];
295 cell(0,1)=vcell[1];
296 cell(1,0)=vcell[2];
297 cell(1,1)=vcell[3];
298 cell(2,0)=vcell[4];
299 cell(2,1)=vcell[5];
300 return cell;
301 }
302
303
305
306 for (size_t iatom = 0; iatom < molecule.natom(); iatom++) {
307 if (molecule.get_pseudo_atom(iatom)){
308 set_derived_value("pure_ae",false);
309 continue;
310 }
311 }
312 set_derived_value("aobasis",molecule.guess_file());;
313 const int n_core = molecule.n_core_orb_all();
314
315
316 std::vector<double> proto=get<std::vector<double> >("protocol");
317 // No ... The accuracy of computation is INDEPENDENT of the convergence requirement
318 // --- actually need more precision than convergence threshold in order to have
319 // variational principle working and for robust convergence
320 //proto.back()=get<double>("econv");
321 set_derived_value("protocol",proto);
322 // No ... the energy is variational! Don't need more accuracy in dconv --- in fact the opposite is true.
323 // set_derived_value("dconv",sqrt(get<double>("econv"))*0.1);
324
325 double z = molecule.total_nuclear_charge();
326 const double charge=get<double>("charge");
327 int nelec = int(z - charge - n_core*2);
328 if (fabs(nelec+charge+n_core*2-z) > 1e-6) {
329 error("non-integer number of electrons?", nelec+charge+n_core*2-z);
330 }
331
332 set_derived_value("nalpha",(nelec + nopen())/2);
333 set_derived_value("nbeta",(nelec - nopen())/2);
334
335 if (nalpha() < 0) error("negative number of alpha electrons?", nalpha());
336 if (nbeta() < 0) error("negative number of beta electrons?", nbeta());
337 if ((nalpha()+nbeta()) != nelec) error("nalpha+nbeta != nelec", nalpha()+nbeta());
338 if (nalpha() != nbeta()) set_derived_value("spin_restricted",false);
339
340 set_derived_value("nmo_alpha",nalpha() + nvalpha());
341 set_derived_value("nmo_beta",nbeta() + nvbeta());
342
343 if (nv_extra() < 0 or nv_step() < 0 or nv_its() < 1) error("nv_extra, nv_step >= 0 and nv_its >= 1 required");
344 if (nv_extra() > 0 and nvalpha() == 0) error("nv_extra requires nvalpha > 0");
345 if (freeze_occupied() and nvalpha() == 0 and nvbeta() == 0) error("freeze_occupied requires nvalpha or nvbeta > 0");
346
347 // Explicit occupations address the occupied span. A hole there is only
348 // index-stable with canonical orbitals: every iteration re-sorts them by
349 // eigenvalue, so the empty index stays on the same orbital.
350 bool hole = false;
351 for (const auto& [name, n] : std::vector<std::pair<std::string, int>>{{"aocc", nalpha()}, {"bocc", nbeta()}}) {
352 const auto occ = get<std::vector<double> >(name);
353 if (int(occ.size()) > n) error((name + " has more entries than occupied orbitals").c_str(), occ.size());
354 for (const double o : occ) {
355 if (o != 0.0 and o != 1.0) error((name + " entries must be 0 or 1").c_str(), o);
356 if (o == 0.0) hole = true;
357 }
358 }
359 if (not bocc().empty() and spin_restricted()) error("bocc requires spin_restricted false");
360 if (hole) {
361 set_derived_value("localize", std::string("canon"));
362 if (do_localize()) error("a hole in the explicit occupations requires localize canon");
363 }
364
365 // Unless overridden by the user use a cell big enough to
366 // have exp(-sqrt(2*I)*r) decay to 1e-6 with I=1ev=0.037Eh
367 // --> need 50 a.u. either side of the molecule
368 set_derived_value("l",molecule.bounding_cube() + 50.0);
369
370 //set_derived_value("lo",molecule.smallest_length_scale());
371
372 // set highest possible point group for symmetry
373 if (do_localize()) set_derived_value("pointgroup",std::string("c1"));
374 else set_derived_value("pointgroup",molecule.get_pointgroup());
375
376 // above two lines will not override user input, so check input is sane
377 if (do_localize() and do_symmetry()) {
378 error("\n\nsymmetry and localization cannot be used at the same time\n"
379 "switch from local to canonical orbitals (keyword canon)\n\n");
380 }
381
382 // Geometry optimization left the `dft` group entirely. `gopt` in particular
383 // must not be waved through: a deck that sets it expects an optimized
384 // geometry back, and silently returning a single point at the input
385 // geometry is a wrong answer, not a missing feature. They stay registered
386 // and erroring rather than being deleted, because ignore_unknown_keys is
387 // true by default and a deleted key would run the deck as a plain single
388 // point after one warning nobody reads.
389 for (const char* key : {"gopt","gtol","gtest","gval","gprec",
390 "gmaxiter","ginitial_hessian","algopt"}) {
391 if (is_user_defined(key))
392 error(("\n\n`" + std::string(key) + "` has been retired: geometry optimization is now a task of "
393 "its own.\nUse `madqc --optimize --wf=<scf|nemo>` and the `optimization` "
394 "parameter group\n(see `madqc --print_parameters=optimization`).\n\n").c_str());
395 }
396
397 // Retired keyvals. A clean break needs to be loud: ignore_unknown_keys is
398 // true by default, so deleting these outright would let an old deck run
399 // with different semantics after one warning nobody reads. They stay
400 // registered and erroring until the migration is old news.
401 if (is_user_defined("restartao"))
402 error("\n\n`restartao` has been retired: use `restart ao` instead\n\n");
403 if (is_user_defined("no_compute"))
404 error("\n\n`no_compute` has been retired: use `restart read_only` instead\n\n");
405 if (is_user_defined("nv_factor"))
406 error("\n\n`nv_factor` has been retired: the virtual step-down is now `nv_extra`, "
407 "`nv_step` and `nv_its`\n\n");
408
409 // population analysis: known schemes, `none` alone, and all-electron only (the
410 // projected basis functions describe all electrons of an atom)
411 {
412 const std::vector<std::string> pop = population();
413 bool any = false, none = false;
414 for (const auto& s : pop) {
415 MADNESS_CHECK_THROW(s == "none" or s == "mulliken" or s == "lowdin" or s == "iao",
416 "population: the schemes are none, mulliken, lowdin and iao");
417 any = any or s != "none";
418 none = none or s == "none";
419 }
420 MADNESS_CHECK_THROW(not (any and none), "population: none cannot be combined with a scheme");
421 MADNESS_CHECK_THROW(not any or (get<bool>("pure_ae") and not get<bool>("psp_calc") and n_core == 0),
422 "population: needs an all-electron calculation (no pseudopotentials or core potentials)");
423 set_derived_value("population_basis", aobasis());
424 }
425
426 // dispersion correction
427 if (dispersion()!="none" and xc()!="hf") {
428 set_derived_value("dispersion_functional",xc());
429 }
430
431
432 }
433};
434
435
436} // namespace madness
437
438#endif /* MADNESS_CHEM_CALCULATIONPARAMETERS_H__INCLUDED */
Definition molecule.h:129
void read_input_and_commandline_options(World &world, const commandlineparser &parser, const std::string tag)
Definition chem/QCCalculationParametersBase.h:339
T get(const std::string key) const
Definition chem/QCCalculationParametersBase.h:313
void initialize(const std::string &key, const T &value, const std::string comment="", const std::vector< T > allowed_values={})
Definition chem/QCCalculationParametersBase.h:394
bool is_user_defined(std::string key) const
Definition chem/QCCalculationParametersBase.h:322
void set_derived_value(const std::string &key, const T &value)
Definition chem/QCCalculationParametersBase.h:436
QCCalculationParametersBase()
ctor for testing
Definition chem/QCCalculationParametersBase.h:383
A tensor is a multidimensional array.
Definition tensor.h:313
A parallel world class.
Definition world.h:134
#define MADNESS_CHECK_THROW(condition, msg)
Check a condition — even in a release build the condition is always evaluated so it can have side eff...
Definition madness_exception.h:207
Namespace for all elements and tools of MADNESS.
Definition DFConvergence.h:9
Tensor< double > FunctionDefaults< NDIM >::cell
Definition mraimpl.h:3892
@ none
ignore everything on disk, start from the initial guess
Definition RestartPlan.h:53
static double pop(std::vector< double > &v)
Definition SCF.cc:118
void error(const char *msg)
Definition world.cc:147
std::string name(const FuncType &type, const int ex=-1)
Definition ccpairfunction.h:28
Definition test_QCCalculationParametersBase.cc:76
bool converge_each_energy() const
Definition CalculationParameters.h:200
std::vector< double > protocol() const
Definition CalculationParameters.h:264
std::string population_minbasis() const
Definition CalculationParameters.h:239
int nv_its() const
Definition CalculationParameters.h:215
double charge() const
Definition CalculationParameters.h:235
CalculationParameters(const CalculationParameters &other)=default
void read_input_and_commandline_options(World &world, const commandlineparser &parser, const std::string tag)
Definition chem/QCCalculationParametersBase.h:339
bool converge_density() const
Definition CalculationParameters.h:188
bool do_symmetry() const
Definition CalculationParameters.h:234
std::string dispersion() const
Definition CalculationParameters.h:248
bool localize_pm() const
Definition CalculationParameters.h:231
void set_derived_values(const Molecule &molecule)
Definition CalculationParameters.h:304
std::string restart() const
the restart keyval as a string; parse with restart_mode_from_string()
Definition CalculationParameters.h:270
int k() const
Definition CalculationParameters.h:227
bool converge_bsh_residual() const
Definition CalculationParameters.h:192
std::vector< std::string > population() const
Definition CalculationParameters.h:237
std::vector< std::string > memory() const
Definition CalculationParameters.h:260
std::string hfex_mo_order() const
Definition CalculationParameters.h:257
CalculationParameters()
ctor reading out the input file
Definition CalculationParameters.h:67
bool converge_total_energy() const
Definition CalculationParameters.h:196
Tensor< double > plot_cell() const
Definition CalculationParameters.h:290
bool hfex_apply_screen() const
Definition CalculationParameters.h:255
std::string dispersion_functional() const
Definition CalculationParameters.h:249
std::string nwfile() const
Definition CalculationParameters.h:288
static constexpr char const * tag
Definition CalculationParameters.h:52
std::string prefix() const
Definition CalculationParameters.h:183
int nmo_alpha() const
Definition CalculationParameters.h:218
std::vector< double > bocc() const
Definition CalculationParameters.h:212
int nopen() const
Definition CalculationParameters.h:205
bool freeze_occupied() const
Definition CalculationParameters.h:216
bool dipole() const
Definition CalculationParameters.h:281
bool hfex_cost_aware() const
Definition CalculationParameters.h:254
bool save() const
Definition CalculationParameters.h:265
double dconv() const
Definition CalculationParameters.h:186
double econv() const
Definition CalculationParameters.h:185
int nvalpha() const
Definition CalculationParameters.h:209
int vnucextra() const
Definition CalculationParameters.h:276
int hfex_accumulation() const
Definition CalculationParameters.h:256
int print_level() const
Definition CalculationParameters.h:236
std::string deriv() const
Definition CalculationParameters.h:244
bool do_localize() const
Definition CalculationParameters.h:230
long hfex_granularity() const
Definition CalculationParameters.h:253
std::string hfexalg() const
Definition CalculationParameters.h:252
double L() const
Definition CalculationParameters.h:226
int nv_step() const
Definition CalculationParameters.h:214
std::string localize_method() const
Definition CalculationParameters.h:229
int loadbalparts() const
Definition CalculationParameters.h:277
std::string aobasis() const
Definition CalculationParameters.h:262
int nalpha() const
Definition CalculationParameters.h:206
std::string dft_deriv() const
Definition CalculationParameters.h:245
int maxsub() const
Definition CalculationParameters.h:273
int nvbeta() const
Definition CalculationParameters.h:210
int nv_extra() const
Definition CalculationParameters.h:213
bool derivatives() const
Definition CalculationParameters.h:280
std::string population_basis() const
Definition CalculationParameters.h:238
int nbeta() const
Definition CalculationParameters.h:207
int nmo_beta() const
Definition CalculationParameters.h:219
bool xc_weak_gga() const
Definition CalculationParameters.h:246
bool have_beta() const
Definition CalculationParameters.h:221
bool spin_restricted() const
Definition CalculationParameters.h:223
int maxiter() const
Definition CalculationParameters.h:241
double orbitalshift() const
Definition CalculationParameters.h:242
double lo() const
Definition CalculationParameters.h:225
std::string pcm_data() const
Definition CalculationParameters.h:247
std::vector< double > aocc() const
Definition CalculationParameters.h:211
bool restart_cphf() const
Definition CalculationParameters.h:271
bool dispersion_atm() const
Definition CalculationParameters.h:250
std::string get_tag() const override
Definition CalculationParameters.h:176
std::string pointgroup() const
Definition CalculationParameters.h:233
double maxrotn() const
Definition CalculationParameters.h:274
std::string xc() const
Definition CalculationParameters.h:251
CalculationParameters(World &world, const commandlineparser &parser)
Definition CalculationParameters.h:56
std::string bsh_apply() const
Definition CalculationParameters.h:258
very simple command line parser
Definition commandlineparser.h:28
std::string value(const std::string key) const
Definition commandlineparser.h:84
void e()
Definition test_sig.cc:75
static Molecule molecule
Definition testperiodicdft.cc:39