TRIQS/nrgljubljana_interface 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
params.hpp
1/*******************************************************************************
2 *
3 * nrgljubljana_interface: A TRIQS interface to the nrgljubliana impurity solver
4 *
5 * Copyright (c) 2019 The Simons foundation
6 * authors: Rok Zitko, Nils Wentzell
7 *
8 * nrgljubljana_interface is free software: you can redistribute it and/or modify it under the
9 * terms of the GNU General Public License as published by the Free Software
10 * Foundation, either version 3 of the License, or (at your option) any later
11 * version.
12 *
13 * nrgljubljana_interface is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 * details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * nrgljubljana_interface. If not, see <http://www.gnu.org/licenses/>.
20 *
21 ******************************************************************************/
22#pragma once
23#include "./types.hpp"
24
25namespace nrgljubljana_interface {
26
29
31 std::string templatedir = NRGIF_TEMPLATE_DIR;
32
34 std::string model = "SIAM";
35
37 std::string symtype = "QS";
38
47 [[nodiscard]] std::string get_model_dir() const {
48 if (const char *env_tdir = std::getenv("NRGIF_TEMPLATE_DIR")) {
49 return std::string{env_tdir} + "/" + model + "/" + symtype;
50 } else {
51 return templatedir + "/" + model + "/" + symtype;
52 }
53 }
54
56 double mesh_max = 10;
57
59 double mesh_min = 1e-4;
60
62 double mesh_ratio = 1.05;
63
65 bool polarized = false;
66
68 bool pol2x2 = false;
69
71 bool rungs = false;
72
74 std::string ops = "";
75
77 std::string specs = "";
78
80 std::string specd = "";
81
83 std::string spect = "";
84
86 std::string specq = "";
87
89 std::string specot = "";
90
92 std::string specchit = "";
93
95 std::string specv3 = "";
96
98 std::string params = "";
99
101 friend void h5_write(h5::group h5group, std::string subgroup_name, constr_params_t const &cp);
102
104 friend void h5_read(h5::group h5group, std::string subgroup_name, constr_params_t &cp);
105 };
106
109
111 double Lambda = 2.0;
112
114 int Nz = 1;
115
117 double Tmin = 1e-4;
118
120 size_t keep = 100;
121
123 double keepenergy = -1.0;
124
126 size_t keepmin = 0;
127
129 double T = 0.001;
130
132 double alpha = 0.3;
133
135 double gamma = 0.2;
136
138 std::string method = "fdm";
139
141 double bandrescale = -1.0;
142
144 std::map<std::string, double> model_parameters;
145
147 friend void h5_write(h5::group h5group, std::string subgroup_name, solve_params_t const &sp);
148
150 friend void h5_read(h5::group h5group, std::string subgroup_name, solve_params_t &sp);
151 };
152
155
157 bool dmnrg = false;
158
160 bool cfs = false;
161
163 bool fdm = true;
164
166 bool fdmexpv = true;
167
169 bool dmnrgmats = false;
170
172 bool fdmmats = false;
173
175 size_t mats = 100;
176
178 std::string specgt = "";
179
181 std::string speci1t = "";
182
184 std::string speci2t = "";
185
187 bool v3mm = false;
188
190 int mMAX = -1;
191
193 int Nmax = -1;
194
196 double xmax = -1.0;
197
199 std::string discretization = "Z";
200
202 double z = 1.0;
203
205 std::string tri = "old";
206
208 size_t preccpp = 2000;
209
211 std::string diag = "default";
212
214 double diagratio = 1.0;
215
217 size_t dsyevrlimit = 100;
218
220 size_t zheevrlimit = 100;
221
223 bool restart = true;
224
226 double restartfactor = 2.0;
227
229 double safeguard = 1e-5;
230
232 size_t safeguardmax = 200;
233
235 double fixeps = 1e-15;
236
238 double betabar = 1.0;
239
241 double gtp = 0.7;
242
244 double chitp = 1.0;
245
247 bool finite = false;
248
250 bool cfsgt = false;
251
253 bool cfsls = false;
254
256 bool fdmgt = false;
257
259 bool fdmls = false;
260
262 size_t fdmexpvn = 0;
263
265 bool finitemats = false;
266
268 bool dm = false;
269
271 double broaden_min_ratio = 3.0;
272
274 double omega0 = -1.0;
275
277 double omega0_ratio = 1.0;
278
280 int diagth = 1;
281
283 bool substeps = false;
284
286 std::string strategy = "kept";
287
289 size_t Ninit = 0;
290
292 bool reim = false;
293
295 size_t dumpannotated = 0;
296
298 bool dumpabs = false;
299
301 bool dumpscaled = true;
302
304 size_t dumpprecision = 8;
305
307 bool dumpgroups = true;
308
310 double grouptol = 1e-6;
311
313 size_t dumpdiagonal = 0;
314
316 bool savebins = true;
317
319 bool broaden = false;
320
322 double emin = -1.0;
323
325 double emax = -1.0;
326
328 size_t bins = 1000;
329
331 double accumulation = 0.0;
332
334 double linstep = 0;
335
337 double discard_trim = 1e-16;
338
340 double discard_immediately = 1e-16;
341
343 double goodE = 2.0;
344
346 bool NN1 = false;
347
349 bool NN2even = true;
350
352 bool NN2avg = false;
353
355 double NNtanh = 0.0;
356
358 size_t width_td = 16;
359
361 size_t width_custom = 16;
362
364 size_t prec_td = 10;
365
367 size_t prec_custom = 10;
368
370 size_t prec_xy = 10;
371
373 bool resume = false;
374
376 std::string log = "";
377
379 bool logall = false;
380
382 bool done = true;
383
385 bool calc0 = true;
386
388 bool lastall = false;
389
391 bool lastalloverride = false;
392
394 bool dumpsubspaces = false;
395
397 bool dump_f = false;
398
400 bool dumpenergies = false;
401
403 size_t logenumber = 10;
404
406 std::string stopafter = "";
407
409 int forcestop = -1;
410
412 bool removefiles = true;
413
415 bool noimag = true;
416
418 bool checksumrules = false;
419
421 bool checkdiag = false;
422
424 bool checkrho = false;
425
427 friend void h5_write(h5::group h5group, std::string subgroup_name, nrg_params_t const &sp);
428
430 friend void h5_read(h5::group h5group, std::string subgroup_name, nrg_params_t &sp);
431 };
432
433} // namespace nrgljubljana_interface
Construction parameters for the NRGLjubljana solver.
Definition params.hpp:28
std::string get_model_dir() const
Resolve the template directory for the chosen model and symmetry.
Definition params.hpp:47
friend void h5_write(h5::group h5group, std::string subgroup_name, constr_params_t const &cp)
Write constr_params_t to HDF5.
Definition params.cpp:26
double mesh_max
Maximum frequency of the logarithmic mesh.
Definition params.hpp:56
std::string params
List of model parameters that need to be specified.
Definition params.hpp:98
std::string specd
Spectral functions of doublet operators to compute.
Definition params.hpp:80
std::string symtype
Symmetry type (NRGLjubljana symmetry code, e.g. QS, QSZ, ISO).
Definition params.hpp:37
std::string specq
Spectral functions of quadruplet operators to compute.
Definition params.hpp:86
std::string model
Impurity model to solve (selects a template directory).
Definition params.hpp:34
std::string specv3
3-leg vertex functions to compute.
Definition params.hpp:95
std::string specot
Spectral functions of orbital-triplet operators to compute.
Definition params.hpp:89
std::string specs
Spectral functions of singlet operators to compute.
Definition params.hpp:77
friend void h5_read(h5::group h5group, std::string subgroup_name, constr_params_t &cp)
Read constr_params_t from HDF5.
Definition params.cpp:48
std::string specchit
Susceptibilities to compute.
Definition params.hpp:92
double mesh_min
Minimum frequency of the logarithmic mesh.
Definition params.hpp:59
bool pol2x2
Use a 2x2 spin structure in the Wilson chain.
Definition params.hpp:68
bool polarized
Use a spin-polarized Wilson chain.
Definition params.hpp:65
std::string ops
Operators whose expectation values are to be calculated.
Definition params.hpp:74
bool rungs
Include channel-mixing terms in the Wilson chain.
Definition params.hpp:71
double mesh_ratio
Common ratio of the geometric (logarithmic) frequency mesh.
Definition params.hpp:62
std::string templatedir
Path to the template library (defaults to the bundled templates).
Definition params.hpp:31
std::string spect
Spectral functions of triplet operators to compute.
Definition params.hpp:83
Low-level NRG parameters.
Definition params.hpp:154
bool fdmmats
Perform the FDM calculation on the Matsubara axis.
Definition params.hpp:172
double z
Parameter (twist) in the logarithmic discretization.
Definition params.hpp:202
friend void h5_read(h5::group h5group, std::string subgroup_name, nrg_params_t &sp)
Read nrg_params_t from HDF5.
Definition params.cpp:196
double discard_trim
Peak clipping at the end of the run.
Definition params.hpp:337
size_t dsyevrlimit
Minimal matrix size for dsyevr.
Definition params.hpp:217
std::string discretization
Discretization scheme.
Definition params.hpp:199
int mMAX
Number of sites in the star representation ( : automatically determined).
Definition params.hpp:190
bool checkdiag
Test the diagonalisation results.
Definition params.hpp:421
bool fdm
Perform an FDM (full-density-matrix) calculation.
Definition params.hpp:163
double betabar
Parameter for thermodynamics.
Definition params.hpp:238
bool dumpabs
Dump in terms of absolute energies.
Definition params.hpp:298
bool removefiles
Remove temporary data files.
Definition params.hpp:412
double diagratio
Ratio of eigenstates computed in partial diagonalisation.
Definition params.hpp:214
std::string tri
Tridiagonalisation approach.
Definition params.hpp:205
double emin
Lower binning limit.
Definition params.hpp:322
bool v3mm
Compute the 3-leg vertex on the Matsubara/Matsubara axis.
Definition params.hpp:187
bool dump_f
Dump matrix elements.
Definition params.hpp:397
bool fdmls
Compute the FDM lesser correlation function.
Definition params.hpp:259
size_t Ninit
Number of initial Wilson chain operators.
Definition params.hpp:289
int Nmax
Number of sites in the Wilson chain ( : automatically determined).
Definition params.hpp:193
bool dmnrgmats
Perform the DMNRG calculation on the Matsubara axis.
Definition params.hpp:169
bool NN1
Perform N/N+1 patching.
Definition params.hpp:346
size_t safeguardmax
Maximal number of additional states to keep.
Definition params.hpp:232
size_t dumpprecision
Number of digits of precision used when dumping.
Definition params.hpp:304
bool cfsgt
Compute the CFS greater correlation function.
Definition params.hpp:250
bool noimag
Do not output the imaginary parts of expectation values.
Definition params.hpp:415
double discard_immediately
Peak clipping on the fly.
Definition params.hpp:340
bool resume
Attempt to restart the calculation.
Definition params.hpp:373
double fixeps
Threshold value for eigenvalue splitting corrections.
Definition params.hpp:235
bool cfs
Perform a CFS (complete Fock space) calculation.
Definition params.hpp:160
double restartfactor
Rescale factor used when restart is true.
Definition params.hpp:226
bool reim
Output the imaginary parts of the correlators.
Definition params.hpp:292
friend void h5_write(h5::group h5group, std::string subgroup_name, nrg_params_t const &sp)
Write nrg_params_t to HDF5.
Definition params.cpp:102
bool dm
Compute density matrices.
Definition params.hpp:268
size_t logenumber
Number of eigenvalues to show for log=e.
Definition params.hpp:403
int forcestop
Force stop at the given iteration (-1: disabled).
Definition params.hpp:409
std::string specgt
Conductance curves to compute.
Definition params.hpp:178
std::string stopafter
Stop the calculation at a given point.
Definition params.hpp:406
size_t dumpdiagonal
Dump diagonal matrix elements.
Definition params.hpp:313
double chitp
Parameter for calculations.
Definition params.hpp:244
bool dumpsubspaces
Save detailed subspace info.
Definition params.hpp:394
double broaden_min_ratio
Auto-tune the broaden_min parameter.
Definition params.hpp:271
size_t prec_td
Precision of columns in the 'td' output file.
Definition params.hpp:364
bool checksumrules
Check operator sum rules.
Definition params.hpp:418
bool dumpenergies
Dump all energies to a file.
Definition params.hpp:400
bool restart
Restart the calculation to achieve the truncation goal.
Definition params.hpp:223
std::string speci1t
curves to compute.
Definition params.hpp:181
double NNtanh
Parameter in the window function.
Definition params.hpp:355
bool NN2avg
Average over even and odd N/N+2 spectra.
Definition params.hpp:352
std::string strategy
Recalculation strategy.
Definition params.hpp:286
bool calc0
Perform calculations at the 0-th iteration.
Definition params.hpp:385
double gtp
Parameter for calculations.
Definition params.hpp:241
bool fdmexpv
Calculate expectation values using the FDM algorithm.
Definition params.hpp:166
double grouptol
Energy tolerance for considering two states as degenerate.
Definition params.hpp:310
bool finitemats
Perform a calculation on the Matsubara axis.
Definition params.hpp:265
size_t width_custom
Width of columns in the 'custom' output file.
Definition params.hpp:361
bool dumpscaled
Dump using omega_N energy units.
Definition params.hpp:301
size_t width_td
Width of columns in the 'td' output file.
Definition params.hpp:358
bool dumpgroups
Dump by grouping degenerate states.
Definition params.hpp:307
size_t preccpp
Precision for tridiagonalisation.
Definition params.hpp:208
bool lastalloverride
Override the automatic lastall setting.
Definition params.hpp:391
double goodE
Energy window parameter for patching.
Definition params.hpp:343
double linstep
Bin width for the linear mesh.
Definition params.hpp:334
bool savebins
Save binned (unbroadened) data.
Definition params.hpp:316
bool NN2even
Use even iterations in N/N+2 patching.
Definition params.hpp:349
double emax
Upper binning limit.
Definition params.hpp:325
double xmax
Largest in the discretization ODE solver ( : automatically determined).
Definition params.hpp:196
bool cfsls
Compute the CFS lesser correlation function.
Definition params.hpp:253
bool fdmgt
Compute the FDM greater correlation function.
Definition params.hpp:256
size_t bins
Number of bins per decade for spectral data.
Definition params.hpp:328
size_t mats
Number of Matsubara points to collect.
Definition params.hpp:175
bool broaden
Enable broadening of spectra.
Definition params.hpp:319
bool lastall
Keep all states in the last iteration for DMNRG.
Definition params.hpp:388
std::string diag
Eigensolver routine (dsyev|dsyevr|zheev|zheevr|default).
Definition params.hpp:211
std::string speci2t
curves to compute.
Definition params.hpp:184
double omega0
Smallest energy scale in the problem, .
Definition params.hpp:274
size_t prec_xy
Precision of the spectral function output.
Definition params.hpp:370
size_t dumpannotated
Number of eigenvalues to dump.
Definition params.hpp:295
size_t zheevrlimit
Minimal matrix size for zheevr.
Definition params.hpp:220
double accumulation
Shift of the accumulation points for binning.
Definition params.hpp:331
size_t fdmexpvn
Iteration at which the expectation values are evaluated.
Definition params.hpp:262
bool done
Create a DONE file.
Definition params.hpp:382
double safeguard
Additional states to keep in case of a near degeneracy.
Definition params.hpp:229
bool finite
Perform a Costi-Hewson-Zlatic finite-T calculation.
Definition params.hpp:247
int diagth
Number of diagonalisation threads.
Definition params.hpp:280
size_t prec_custom
Precision of columns in the 'custom' output file.
Definition params.hpp:367
std::string log
List of tokens defining what to log.
Definition params.hpp:376
bool dmnrg
Perform a DMNRG (density-matrix NRG) calculation.
Definition params.hpp:157
bool substeps
Use the interleaved diagonalization scheme.
Definition params.hpp:283
Parameters for the solve() method.
Definition params.hpp:108
double Lambda
Logarithmic discretization parameter.
Definition params.hpp:111
int Nz
Number of discretization meshes (interleaved twist parameters z).
Definition params.hpp:114
size_t keepmin
Minimum number of states to keep at each NRG step.
Definition params.hpp:126
double bandrescale
Band rescaling factor (half-width of the support of the hybridisation function); set to mesh_max if n...
Definition params.hpp:141
std::map< std::string, double > model_parameters
Model parameters (name to value map, e.g. U1, eps1).
Definition params.hpp:144
friend void h5_read(h5::group h5group, std::string subgroup_name, solve_params_t &sp)
Read solve_params_t from HDF5.
Definition params.cpp:86
double gamma
Parameter for the Gaussian convolution step.
Definition params.hpp:135
friend void h5_write(h5::group h5group, std::string subgroup_name, solve_params_t const &sp)
Write solve_params_t to HDF5.
Definition params.cpp:70
std::string method
Method for calculating the dynamical quantities.
Definition params.hpp:138
double alpha
Width of the logarithmic gaussian used for broadening.
Definition params.hpp:132
double keepenergy
Cut-off energy for truncation.
Definition params.hpp:123
double Tmin
Lowest energy scale on the Wilson chain.
Definition params.hpp:117
size_t keep
Maximum number of states to keep at each NRG step.
Definition params.hpp:120