22#include "./solver_core.hpp"
24#include <triqs/utility/exceptions.hpp>
25#include <itertools/itertools.hpp>
38#include <boost/lexical_cast.hpp>
42#include <mpi/string.hpp>
61namespace nrgljubljana_interface {
64 bool has_struct(
const gf_struct_t &s) {
66 for (
const auto &[bl_name, bl_size] : s) len += bl_size;
71 if (world.rank() == 0)
78 TRIQS_ASSERT2(has_struct(
Delta_struct),
"Delta_struct must be defined. template corrupted?");
83 if (!F) TRIQS_RUNTIME_ERROR <<
"Failed to open template info file";
84 auto getline = [&F](
const std::string &keyword) -> std::string {
87 auto pos = s.find(
':');
88 std::string keyword_found = s.substr(0, pos);
89 TRIQS_ASSERT2(keyword == keyword_found,
"template info file is corrupted");
90 std::string value = s.substr(pos+1);
117 std::ifstream F(
constr_params.get_model_dir() +
"/" + filename);
118 if (mandatory && not F.is_open()) TRIQS_RUNTIME_ERROR <<
"Failed to open structure file " << filename;
119 gf_struct_t _gf_struct;
123 while (F >> bl_name >> bl_size) { _gf_struct.emplace_back(bl_name, bl_size); }
129 if (!has_struct(_gf_struct))
132 for (
int bl_idx : range(_gf_struct.size())) {
133 long bl_size =
Delta_w[bl_idx].target_shape()[0];
134 for (
auto [i, j] : product_range(bl_size, bl_size)) {
135 auto bl_name =
Delta_w.block_names()[bl_idx];
136 auto file_ending = std::string{
"_"} + bl_name +
"_" + std::to_string(i) + std::to_string(j) +
".dat";
137 std::string imGfilename =
"im" + name + file_ending;
138 std::ifstream imG(imGfilename);
139 std::string reGfilename =
"re" + name + file_ending;
140 std::ifstream reG(reGfilename);
146 TRIQS_ASSERT2(abs(w-
double(mp)) < 1e-8*abs(w),
"frequency mismatch");
147 (*G_w)[bl_idx][mp](i, j) = re + 1i * im;
152 for (
auto mp :
log_mesh) (*G_w)[bl_idx][mp](i, j) = 0.0;
159 if (!has_struct(_gf_struct))
162 for (
int bl_idx : range(_gf_struct.size())) {
163 long bl_size =
Delta_w[bl_idx].target_shape()[0];
164 for (
auto [i, j] : product_range(bl_size, bl_size)) {
165 auto bl_name =
Delta_w.block_names()[bl_idx];
166 auto file_ending = std::string{
"_"} + bl_name +
"_" + std::to_string(i) + std::to_string(j) +
".dat";
167 std::string Afilename = name + file_ending;
168 std::ifstream A(Afilename);
173 TRIQS_ASSERT2(abs(w-
double(mp)) < 1e-8*abs(w),
"frequency mismatch");
174 (*A_w)[bl_idx][mp](i, j) = re;
177 for (
auto mp :
log_mesh) (*A_w)[bl_idx][mp](i, j) = 0.0;
185 for (
int cnt = 1; cnt <= Nz; cnt++) {
186 const std::string expvfilename = std::to_string(cnt) +
"/customfdm";
187 std::ifstream F(expvfilename);
188 if (!F) TRIQS_RUNTIME_ERROR <<
"Expectation values output file not found.";
189 std::string snumber, skeyword, svalue;
191 getline(F, skeyword);
195 std::istringstream sskeyword(skeyword);
196 std::deque<std::string> keywords{std::istream_iterator<std::string>{sskeyword},
197 std::istream_iterator<std::string>{}};
198 std::istringstream ssvalue(svalue);
199 std::deque<double> values{std::istream_iterator<double>{ssvalue},
200 std::istream_iterator<double>{}};
201 TRIQS_ASSERT2(keywords.size() == values.size(),
"customfdm corrupted");
202 keywords.pop_front();
204 for (
auto [k, v] : zip(keywords, values))
expv[k] += v;
206 for (
auto &i :
expv) { i.second /= Nz; }
211 for (
int cnt = 1; cnt <= Nz; cnt++) {
212 const std::string tdfdmfilename = std::to_string(cnt) +
"/tdfdm";
213 std::ifstream F(tdfdmfilename);
214 if (!F) TRIQS_RUNTIME_ERROR <<
"Thermodynamic variables output file not found.";
215 std::string skeyword, svalue;
216 getline(F, skeyword);
220 std::istringstream sskeyword(skeyword);
221 std::deque<std::string> keywords{std::istream_iterator<std::string>{sskeyword},
222 std::istream_iterator<std::string>{}};
223 std::istringstream ssvalue(svalue);
224 std::deque<double> values{std::istream_iterator<double>{ssvalue},
225 std::istream_iterator<double>{}};
226 TRIQS_ASSERT2(keywords.size() == values.size(),
"tdfdm corrupted");
227 keywords.pop_front();
229 for (
auto [k, v] : zip(keywords, values))
tdfdm[k] += v;
231 for (
auto &i :
tdfdm) { i.second /= Nz; }
234 inline void call(
const std::string &command,
bool verbose =
true,
bool exit_on_failure =
true) {
235 std::string s = command + (verbose ?
"" :
" >/dev/null");
236 std::cout <<
"running " << s << std::endl;
237 if (system(s.c_str()) != 0) {
239 TRIQS_RUNTIME_ERROR <<
"Failure running NRGLjubljana_interface script: " << s;
241 std::cerr <<
"Warning: failure running NRGLjubljana_interface script: " << s << std::endl;
248 long bl_size =
Delta_w[bl_idx].target_shape()[0];
249 auto bl_name =
Delta_w.block_names()[bl_idx];
250 for (
auto [i, j] : product_range(bl_size, bl_size)) {
251 std::ofstream F(
"Gamma_" + bl_name +
"_" + std::to_string(i) + std::to_string(j) +
".dat");
252 F << std::setprecision(std::numeric_limits<double>::max_digits10);
253 const double cutoff = 1e-8;
254 for (
auto w :
Delta_w[bl_idx].mesh()) {
255 double value = -
Delta_w[bl_idx][w](i, j).imag();
256 if (value < cutoff) { value = cutoff; }
257 F << double(w) <<
" " << value << std::endl;
263 inline std::string get_current_dir() {
265 return ( getcwd(temp,
sizeof(temp)) ? std::string(temp) : std::string(
"") );
271 std::string tempdir{};
272 if (world.rank() == 0) {
273 std::cout <<
"Starting NRG solver\n";
277 mpi::broadcast(tempdir, world);
278 std::string cwd = get_current_dir();
279 if (chdir(tempdir.c_str()) != 0) TRIQS_RUNTIME_ERROR <<
"chdir to tempdir failed.";
280 if (world.rank() == 0) {
286 for (
int i: range(1,sp.
Nz+1))
292 auto chunk = mpi::chunk(range(1,sp.
Nz+1), world);
298 if (world.rank() == 0) {
299 std::cout <<
"Post-processing results" << std::endl;
305 if (world.rank() == 0)
306 std::cout <<
"Reading results from files" << std::endl;
323 Sigma_w = (*SigmaHartree_w) + (*I_w) - (*F_l_w) / (*G_w) * (*F_r_w);
327 if (chdir(cwd.c_str()) != 0) TRIQS_RUNTIME_ERROR <<
"failed to return from tempdir";
334 call(
"rm -rf " + tempdir,
verbose,
false);
347 if (np.
discretization !=
"Z") TRIQS_RUNTIME_ERROR <<
"Must use discretization=Z in the high-level solver interface.";
352 auto scale = [=](
int n) {
353 return (1. - 1. / sp.
Lambda) / std::log(sp.
Lambda) * std::pow(sp.
Lambda, -(np.
z - 1)) * std::pow(sp.
Lambda, -(n - 1) / 2.);
358 np.
mMAX = std::max(80, 2 * np.
Nmax);
364 TRIQS_ASSERT2(sp.
method ==
"fdm",
"currently only method=fdm is supported");
365 if (sp.
method ==
"fdm") { np.
fdm =
true; }
367 if (sp.
method ==
"cfs") { np.
cfs =
true; }
375 std::cout <<
"Preparing z=" << z <<
" taskdir=" << taskdir << std::endl;
376 TRIQS_ASSERT(world.rank() == 0);
378 if (mkdir(taskdir.c_str(), 0755) != 0) TRIQS_RUNTIME_ERROR <<
"failed to mkdir taskdir " << taskdir;
379 call(
"./instantiate " + taskdir,
verbose);
384 std::cout <<
"Solving taskdir=" << taskdir <<
" rank=" << world.rank() << std::endl;
385 if (chdir(taskdir.c_str()) != 0) TRIQS_RUNTIME_ERROR <<
"failed to chdir to taskdir " << taskdir;
387 std::streambuf *old = std::cout.rdbuf();
388 std::ofstream log_stream;
390 log_stream.open(
"log");
391 if (!log_stream) TRIQS_RUNTIME_ERROR <<
"failed to open log file";
392 std::cout.rdbuf(log_stream.rdbuf());
394 NRG::set_workdir(
"");
395 NRG::run_nrg_master(
"");
396 if (!
verbose) std::cout.rdbuf(old);
397 if (chdir(
"..") != 0) TRIQS_RUNTIME_ERROR <<
"failed to return from taskdir " << taskdir;
401 const std::string default_tempdir =
".";
402 std::string tempdir = default_tempdir;
403 if (
const char *env_w = std::getenv(
"NRG_TEMPDIR")) tempdir = env_w;
404 if (!tempdir_.empty()) tempdir = tempdir_;
405 const std::string tempdir_template = tempdir +
"/nrg_tempdir_XXXXXX";
406 size_t len = tempdir_template.length()+1;
407 auto x = std::make_unique<char[]>(len);
408 strncpy(x.get(), tempdir_template.c_str(), len);
409 if (
auto w = mkdtemp(x.get()))
412 TRIQS_RUNTIME_ERROR <<
"Failed to create a directory for temporary files.";
421 TRIQS_RUNTIME_ERROR <<
"Model parameter " << p <<
" has not been defined.";
435 std::ofstream F(
"param");
437 F << std::setprecision(std::numeric_limits<double>::max_digits10);
438 F <<
"[extra]" << std::endl;
439 for (
const auto &i : sp.
model_parameters) F << i.first <<
"=" << i.second << std::endl;
440 F <<
"[param]" << std::endl;
441 F <<
"bandrescale=" << sp.
bandrescale << std::endl;
442 F <<
"model=" << cp.
model << std::endl;
443 F <<
"symtype=" << cp.
symtype << std::endl;
444 F <<
"Lambda=" << sp.
Lambda << std::endl;
445 F <<
"xmax=" << np.
xmax << std::endl;
446 F <<
"Nmax=" << np.
Nmax << std::endl;
447 F <<
"mMAX=" << np.
mMAX << std::endl;
448 F <<
"keep=" << sp.
keep << std::endl;
449 F <<
"keepenergy=" << sp.
keepenergy << std::endl;
450 F <<
"keepmin=" << sp.
keepmin << std::endl;
451 F <<
"T=" << sp.
T << std::endl;
452 F <<
"ops=" << cp.
ops << std::endl;
453 F <<
"specs=" << cp.
specs << std::endl;
454 F <<
"specd=" << cp.
specd << std::endl;
455 F <<
"spect=" << cp.
spect << std::endl;
456 F <<
"specq=" << cp.
specq << std::endl;
457 F <<
"specot=" << cp.
specot << std::endl;
458 F <<
"specgt=" << np.
specgt << std::endl;
459 F <<
"speci1t=" << np.
speci1t << std::endl;
460 F <<
"speci2t=" << np.
speci2t << std::endl;
461 F <<
"specchit=" << cp.
specchit << std::endl;
462 F <<
"specv3=" << cp.
specv3 << std::endl;
463 F <<
"v3mm=" << np.
v3mm << std::endl;
464 F <<
"dmnrg=" << np.
dmnrg << std::endl;
465 F <<
"cfs=" << np.
cfs << std::endl;
466 F <<
"fdm=" << np.
fdm << std::endl;
467 F <<
"fdmexpv=" << np.
fdmexpv << std::endl;
468 F <<
"dmnrgmats=" << np.
dmnrgmats << std::endl;
469 F <<
"fdmmats=" << np.
fdmmats << std::endl;
470 F <<
"mats=" << np.
mats << std::endl;
471 F <<
"alpha=" << sp.
alpha << std::endl;
472 F <<
"gamma=" << sp.
gamma << std::endl;
474 F <<
"z=" << np.
z << std::endl;
475 F <<
"Nz=" << sp.
Nz << std::endl;
476 F <<
"polarized=" << cp.
polarized << std::endl;
477 F <<
"pol2x2=" << cp.
pol2x2 << std::endl;
478 F <<
"rungs=" << cp.
rungs << std::endl;
479 F <<
"tri=" << np.
tri << std::endl;
480 F <<
"preccpp=" << np.
preccpp << std::endl;
481 F <<
"diag=" << np.
diag << std::endl;
482 F <<
"diagratio=" << np.
diagratio << std::endl;
483 F <<
"dsyevrlimit=" << np.
dsyevrlimit << std::endl;
484 F <<
"zheevrlimit=" << np.
zheevrlimit << std::endl;
485 F <<
"restart=" << np.
restart << std::endl;
487 F <<
"safeguard=" << np.
safeguard << std::endl;
489 F <<
"fixeps=" << np.
fixeps << std::endl;
490 F <<
"betabar=" << np.
betabar << std::endl;
491 F <<
"gtp=" << np.
gtp << std::endl;
492 F <<
"chitp=" << np.
chitp << std::endl;
493 F <<
"finite=" << np.
finite << std::endl;
494 F <<
"cfsgt=" << np.
cfsgt << std::endl;
495 F <<
"cfsls=" << np.
cfsls << std::endl;
496 F <<
"fdmgt=" << np.
fdmgt << std::endl;
497 F <<
"fdmls=" << np.
fdmls << std::endl;
498 F <<
"fdmexpvn=" << np.
fdmexpvn << std::endl;
499 F <<
"finitemats=" << np.
finitemats << std::endl;
500 F <<
"dm=" << np.
dm << std::endl;
501 F <<
"broaden_max=" << cp.
mesh_max << std::endl;
502 F <<
"broaden_min=" << cp.
mesh_min << std::endl;
503 F <<
"broaden_ratio=" << cp.
mesh_ratio << std::endl;
505 F <<
"omega0=" << np.
omega0 << std::endl;
507 F <<
"diagth=" << np.
diagth << std::endl;
508 F <<
"substeps=" << np.
substeps << std::endl;
509 F <<
"strategy=" << np.
strategy << std::endl;
510 F <<
"Ninit=" << np.
Ninit << std::endl;
511 F <<
"reim=" << np.
reim << std::endl;
513 F <<
"dumpabs=" << np.
dumpabs << std::endl;
514 F <<
"dumpscaled=" << np.
dumpscaled << std::endl;
516 F <<
"dumpgroups=" << np.
dumpgroups << std::endl;
517 F <<
"grouptol=" << np.
grouptol << std::endl;
519 F <<
"savebins=" << np.
savebins << std::endl;
520 F <<
"broaden=" << np.
broaden << std::endl;
521 F <<
"emin=" << np.
emin << std::endl;
522 F <<
"emax=" << np.
emax << std::endl;
523 F <<
"bins=" << np.
bins << std::endl;
525 F <<
"linstep=" << np.
linstep << std::endl;
528 F <<
"goodE=" << np.
goodE << std::endl;
529 F <<
"NN1=" << np.
NN1 << std::endl;
530 F <<
"NN2even=" << np.
NN2even << std::endl;
531 F <<
"NN2avg=" << np.
NN2avg << std::endl;
532 F <<
"NNtanh=" << np.
NNtanh << std::endl;
533 F <<
"width_td=" << np.
width_td << std::endl;
535 F <<
"prec_td=" << np.
prec_td << std::endl;
536 F <<
"prec_custom=" << np.
prec_custom << std::endl;
537 F <<
"prec_xy=" << np.
prec_xy << std::endl;
538 F <<
"resume=" << np.
resume << std::endl;
539 F <<
"log=" << np.
log << std::endl;
540 F <<
"logall=" << np.
logall << std::endl;
541 F <<
"done=" << np.
done << std::endl;
542 F <<
"calc0=" << np.
calc0 << std::endl;
543 F <<
"lastall=" << np.
lastall << std::endl;
546 F <<
"dump_f=" << np.
dump_f << std::endl;
548 F <<
"logenumber=" << np.
logenumber << std::endl;
549 F <<
"stopafter=" << np.
stopafter << std::endl;
550 F <<
"forcestop=" << np.
forcestop << std::endl;
551 F <<
"removefiles=" << np.
removefiles << std::endl;
552 F <<
"noimag=" << np.
noimag << std::endl;
554 F <<
"checkdiag=" << np.
checkdiag << std::endl;
555 F <<
"checkrho=" << np.
checkrho << std::endl;
556 F <<
"data_has_rescaled_energies=false" << std::endl;
564 auto grp = h5group.create_group(subgroup_name);
566 h5_write_attribute(grp,
"TRIQS_GIT_HASH", std::string(AS_STRING(TRIQS_GIT_HASH)));
567 h5_write_attribute(grp,
"NRGLJUBLJANA_INTERFACE_GIT_HASH", std::string(AS_STRING(NRGLJUBLJANA_INTERFACE_GIT_HASH)));
577 auto grp = h5group.open_group(subgroup_name);
580 h5_read(grp,
"", s.result_set());
581 h5_read(grp,
"nrg_params", s.nrg_params);
582 h5_read(grp,
"last_solve_params", s.last_solve_params);
583 h5_read(grp,
"Delta_w", s.Delta_w);
588 std::complex<double> hilbert_transform_refreq(
const c_w_cvt &gf, std::complex<double> z){
589 return hilbert_transform(gf, z);
592 matrix<std::complex<double>> hilbert_transform_elementwise(
const m_w_cvt &gf, std::complex<double> z) {
593 return hilbert_transform_elementwise(gf, z);
nrg_params_t nrg_params
Low-level NRG parameters.
std::optional< solve_params_t > last_solve_params
Parameters used for the most recent solve process.
static std::string hdf5_format()
HDF5 format tag for the solver object.
void readtdfdm(int Nz)
Read thermodynamic variables (FDM algorithm) from the NRG output files.
constr_params_t constr_params
Parameters used for the solver construction.
C2PY_IGNORE void readGF(const std::string &name, std::optional< g_w_t > &G_w, gf_struct_t &_gf_struct)
Read a block Green's function from (im/re)name-block-ij.dat files.
refreq_log log_mesh
Logarithmic real-frequency mesh.
g_w_t Delta_w
The hybridization function on the real-frequency axis.
friend void h5_write(h5::group h5group, std::string subgroup_name, solver_core const &s)
Write a solver object to an HDF5 file.
void solve(solve_params_t const &solve_params)
Solve the impurity problem.
void generate_param_file(double z)
Produce the param file for a given value of the twist parameter .
gf_struct_t gf_struct
The Green's function structure object.
void check_model_params(const solve_params_t &sp)
Check that all required model parameters have been defined.
gf_struct_t Delta_struct
The hybridization function structure object.
solver_core(constr_params_t cp)
Construct an NRGLjubljana_interface solver.
void set_params()
Establish good defaults for the low-level NRG parameters.
gf_struct_t chi_struct
The susceptibility structure object.
std::string create_tempdir(const std::string &tempdir_)
Create a temporary working directory for a series of NRG runs.
C2PY_IGNORE void readA(const std::string &name, std::optional< g_w_t > &A_w, gf_struct_t &_gf_struct)
Read a block spectral function from name-block-ij.dat files.
gf_struct_t read_structure(const std::string &filename, bool mandatory)
Read the block structure of Green's function objects from a file.
void solve_one(const std::string &taskdir)
Perform an individual NRG calculation. Called from solve().
void readexpv(int Nz)
Read expectation values from the NRG output files.
void set_nrg_params(nrg_params_t const &nrg_params)
Adjust the advanced (low-level) NRG parameters.
void write_gamma()
Write to a file.
bool verbose
If true, detailed output from NRGLjubljana and its tools is sent to stdout.
bool keep_temp_dir
Keep the temporary directories after the calculation.
void instantiate(double z, const std::string &taskdir)
Prepare the input files for an individual NRG calculation. Called from solve().
static C2PY_IGNORE solver_core h5_read_construct(h5::group h5group, std::string subgroup_name)
Construct a solver object from an HDF5 file.
Construction parameters for the NRGLjubljana solver.
double mesh_max
Maximum frequency of the logarithmic mesh.
std::string specd
Spectral functions of doublet operators to compute.
std::string symtype
Symmetry type (NRGLjubljana symmetry code, e.g. QS, QSZ, ISO).
std::string specq
Spectral functions of quadruplet operators to compute.
std::string model
Impurity model to solve (selects a template directory).
std::string specv3
3-leg vertex functions to compute.
std::string specot
Spectral functions of orbital-triplet operators to compute.
std::string specs
Spectral functions of singlet operators to compute.
std::string specchit
Susceptibilities to compute.
double mesh_min
Minimum frequency of the logarithmic mesh.
bool pol2x2
Use a 2x2 spin structure in the Wilson chain.
bool polarized
Use a spin-polarized Wilson chain.
std::string ops
Operators whose expectation values are to be calculated.
bool rungs
Include channel-mixing terms in the Wilson chain.
double mesh_ratio
Common ratio of the geometric (logarithmic) frequency mesh.
std::string spect
Spectral functions of triplet operators to compute.
Collection of all output containers held by the solver.
std::optional< g_w_t > G_w
The retarded Green's function .
std::map< std::string, double > expv
Expectation values of local impurity operators.
std::optional< g_w_t > Sigma_w
The retarded self-energy (computed from , , and ).
std::optional< g_w_t > B_l_w
The spectral function of the auxiliary correlator .
std::optional< g_w_t > F_l_w
The auxiliary Green's function .
std::optional< g_w_t > F_r_w
The auxiliary Green's function .
std::optional< g_w_t > I_w
The auxiliary Green's function .
std::optional< g_w_t > SigmaHartree_w
Constant Hartree shift to the self-energy, stored as a Green's function.
std::optional< g_w_t > B_r_w
The spectral function of the auxiliary correlator .
std::map< std::string, double > tdfdm
Thermodynamic variables (FDM algorithm).
std::optional< g_w_t > C_w
The spectral function of the auxiliary correlator .
friend void h5_read(h5::group h5group, std::string subgroup_name, container_set &c)
Read all containers from an HDF5 file.
std::optional< g_w_t > chi_SS_w
Spin susceptibility .
std::optional< g_w_t > chi_NN_w
Charge susceptibility .
std::optional< g_w_t > A_w
The spectral function .
Low-level NRG parameters.
bool fdmmats
Perform the FDM calculation on the Matsubara axis.
bool logall
Log everything.
double z
Parameter (twist) in the logarithmic discretization.
double discard_trim
Peak clipping at the end of the run.
size_t dsyevrlimit
Minimal matrix size for dsyevr.
std::string discretization
Discretization scheme.
int mMAX
Number of sites in the star representation ( : automatically determined).
bool checkdiag
Test the diagonalisation results.
bool fdm
Perform an FDM (full-density-matrix) calculation.
double omega0_ratio
Sets .
double betabar
Parameter for thermodynamics.
bool dumpabs
Dump in terms of absolute energies.
bool removefiles
Remove temporary data files.
double diagratio
Ratio of eigenstates computed in partial diagonalisation.
std::string tri
Tridiagonalisation approach.
double emin
Lower binning limit.
bool v3mm
Compute the 3-leg vertex on the Matsubara/Matsubara axis.
bool dump_f
Dump matrix elements.
bool fdmls
Compute the FDM lesser correlation function.
size_t Ninit
Number of initial Wilson chain operators.
int Nmax
Number of sites in the Wilson chain ( : automatically determined).
bool dmnrgmats
Perform the DMNRG calculation on the Matsubara axis.
bool NN1
Perform N/N+1 patching.
size_t safeguardmax
Maximal number of additional states to keep.
size_t dumpprecision
Number of digits of precision used when dumping.
bool cfsgt
Compute the CFS greater correlation function.
bool noimag
Do not output the imaginary parts of expectation values.
double discard_immediately
Peak clipping on the fly.
bool resume
Attempt to restart the calculation.
double fixeps
Threshold value for eigenvalue splitting corrections.
bool cfs
Perform a CFS (complete Fock space) calculation.
double restartfactor
Rescale factor used when restart is true.
bool reim
Output the imaginary parts of the correlators.
bool dm
Compute density matrices.
size_t logenumber
Number of eigenvalues to show for log=e.
int forcestop
Force stop at the given iteration (-1: disabled).
std::string specgt
Conductance curves to compute.
std::string stopafter
Stop the calculation at a given point.
size_t dumpdiagonal
Dump diagonal matrix elements.
double chitp
Parameter for calculations.
bool dumpsubspaces
Save detailed subspace info.
double broaden_min_ratio
Auto-tune the broaden_min parameter.
size_t prec_td
Precision of columns in the 'td' output file.
bool checksumrules
Check operator sum rules.
bool dumpenergies
Dump all energies to a file.
bool restart
Restart the calculation to achieve the truncation goal.
std::string speci1t
curves to compute.
double NNtanh
Parameter in the window function.
bool NN2avg
Average over even and odd N/N+2 spectra.
std::string strategy
Recalculation strategy.
bool calc0
Perform calculations at the 0-th iteration.
double gtp
Parameter for calculations.
bool fdmexpv
Calculate expectation values using the FDM algorithm.
double grouptol
Energy tolerance for considering two states as degenerate.
bool finitemats
Perform a calculation on the Matsubara axis.
size_t width_custom
Width of columns in the 'custom' output file.
bool dumpscaled
Dump using omega_N energy units.
size_t width_td
Width of columns in the 'td' output file.
bool dumpgroups
Dump by grouping degenerate states.
size_t preccpp
Precision for tridiagonalisation.
bool lastalloverride
Override the automatic lastall setting.
double goodE
Energy window parameter for patching.
double linstep
Bin width for the linear mesh.
bool savebins
Save binned (unbroadened) data.
bool NN2even
Use even iterations in N/N+2 patching.
double emax
Upper binning limit.
double xmax
Largest in the discretization ODE solver ( : automatically determined).
bool cfsls
Compute the CFS lesser correlation function.
bool fdmgt
Compute the FDM greater correlation function.
size_t bins
Number of bins per decade for spectral data.
size_t mats
Number of Matsubara points to collect.
bool broaden
Enable broadening of spectra.
bool lastall
Keep all states in the last iteration for DMNRG.
std::string diag
Eigensolver routine (dsyev|dsyevr|zheev|zheevr|default).
std::string speci2t
curves to compute.
double omega0
Smallest energy scale in the problem, .
size_t prec_xy
Precision of the spectral function output.
size_t dumpannotated
Number of eigenvalues to dump.
size_t zheevrlimit
Minimal matrix size for zheevr.
double accumulation
Shift of the accumulation points for binning.
size_t fdmexpvn
Iteration at which the expectation values are evaluated.
bool done
Create a DONE file.
double safeguard
Additional states to keep in case of a near degeneracy.
bool finite
Perform a Costi-Hewson-Zlatic finite-T calculation.
int diagth
Number of diagonalisation threads.
size_t prec_custom
Precision of columns in the 'custom' output file.
std::string log
List of tokens defining what to log.
bool dmnrg
Perform a DMNRG (density-matrix NRG) calculation.
bool substeps
Use the interleaved diagonalization scheme.
Parameters for the solve() method.
double Lambda
Logarithmic discretization parameter.
int Nz
Number of discretization meshes (interleaved twist parameters z).
size_t keepmin
Minimum number of states to keep at each NRG step.
double bandrescale
Band rescaling factor (half-width of the support of the hybridisation function); set to mesh_max if n...
std::map< std::string, double > model_parameters
Model parameters (name to value map, e.g. U1, eps1).
double gamma
Parameter for the Gaussian convolution step.
std::string method
Method for calculating the dynamical quantities.
double alpha
Width of the logarithmic gaussian used for broadening.
double keepenergy
Cut-off energy for truncation.
double Tmin
Lowest energy scale on the Wilson chain.
size_t keep
Maximum number of states to keep at each NRG step.