TRIQS/nrgljubljana_interface 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
nrgljubljana_interface::solver_core

#include <nrgljubljana_interface/solver_core.hpp>

Detailed Description

TRIQS interface to the NRGLjubljana numerical renormalization group impurity solver.

Given a hybridization function, drives the external NRGLjubljana solver to compute spectral functions, Green's functions, the self-energy, susceptibilities and thermodynamic/expectation values for quantum impurity models.

Definition at line 43 of file solver_core.hpp.

Inheritance diagram for nrgljubljana_interface::solver_core:
nrgljubljana_interface::container_set

Public Member Functions

 solver_core (constr_params_t cp)
 Construct an NRGLjubljana_interface solver.
void be_quiet ()
 Read a scalar real-valued function name.dat.
void check_model_params (const solve_params_t &sp)
 Check that all required model parameters have been defined.
std::string create_tempdir (const std::string &tempdir_)
 Create a temporary working directory for a series of NRG runs.
void generate_param_file (double z)
 Produce the param file for a given value of the twist parameter \( z \).
void instantiate (double z, const std::string &taskdir)
 Prepare the input files for an individual NRG calculation. Called from solve().
gf_struct_t read_structure (const std::string &filename, bool mandatory)
 Read the block structure of Green's function objects from a file.
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.
void readexpv (int Nz)
 Read expectation values from the NRG output files.
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.
void readtdfdm (int Nz)
 Read thermodynamic variables (FDM algorithm) from the NRG output files.
void set_nrg_params (nrg_params_t const &nrg_params)
 Adjust the advanced (low-level) NRG parameters.
void set_params ()
 Establish good defaults for the low-level NRG parameters.
void set_verbosity (bool v)
 Set the verbosity (see also be_quiet()).
void solve (solve_params_t const &solve_params)
 Solve the impurity problem.
void solve_one (const std::string &taskdir)
 Perform an individual NRG calculation. Called from solve().
void write_gamma ()
 Write \( \Gamma = -\mathrm{Im}\,\Delta(\omega) \) to a file.

Static Public Member Functions

static C2PY_IGNORE solver_core h5_read_construct (h5::group h5group, std::string subgroup_name)
 Construct a solver object from an HDF5 file.
static std::string hdf5_format ()
 HDF5 format tag for the solver object.

Public Attributes

gf_struct_t chi_struct
 The susceptibility structure object.
constr_params_t constr_params
 Parameters used for the solver construction.
gf_struct_t Delta_struct
 The hybridization function structure object.
g_w_t Delta_w
 The hybridization function on the real-frequency axis.
gf_struct_t gf_struct
 The Green's function structure object.
bool keep_temp_dir = false
 Keep the temporary directories after the calculation.
std::optional< solve_params_tlast_solve_params
 Parameters used for the most recent solve process.
refreq_log log_mesh
 Logarithmic real-frequency mesh.
nrg_params_t nrg_params
 Low-level NRG parameters.
bool verbose = false
 If true, detailed output from NRGLjubljana and its tools is sent to stdout.
Public Attributes inherited from nrgljubljana_interface::container_set
std::optional< g_w_t > A_w
 The spectral function \( A(\omega) \).
std::optional< g_w_t > B_l_w
 The spectral function \( B_l(\omega) \) of the auxiliary correlator \( F_l(\omega) \).
std::optional< g_w_t > B_r_w
 The spectral function \( B_r(\omega) \) of the auxiliary correlator \( F_r(\omega) \).
std::optional< g_w_t > C_w
 The spectral function \( C(\omega) \) of the auxiliary correlator \( I(\omega) \).
std::optional< g_w_t > chi_NN_w
 Charge susceptibility \( \chi_{NN}(\omega) \).
std::optional< g_w_t > chi_SS_w
 Spin susceptibility \( \chi_{SS}(\omega) \).
std::map< std::string, double > expv
 Expectation values of local impurity operators.
std::optional< g_w_t > F_l_w
 The auxiliary Green's function \( F_l(\omega) = \Sigma(\omega)\, G(\omega) \).
std::optional< g_w_t > F_r_w
 The auxiliary Green's function \( F_r(\omega) = G(\omega)\, \Sigma(\omega) \).
std::optional< g_w_t > G_w
 The retarded Green's function \( G(\omega) \).
std::optional< g_w_t > I_w
 The auxiliary Green's function \( I(\omega) \).
std::optional< g_w_t > Sigma_w
 The retarded self-energy \( \Sigma(\omega) \) (computed from \( F_l \), \( F_r \), \( G \) and \( I \)).
std::optional< g_w_t > SigmaHartree_w
 Constant Hartree shift to the self-energy, stored as a Green's function.
std::map< std::string, double > tdfdm
 Thermodynamic variables (FDM algorithm).

Friends

void h5_write (h5::group h5group, std::string subgroup_name, solver_core const &s)
 Write a solver object to an HDF5 file.

Constructor & Destructor Documentation

◆ solver_core()

nrgljubljana_interface::solver_core::solver_core ( constr_params_t cp)
explicit

Construct an NRGLjubljana_interface solver.

Parameters
cpConstruction parameters.

Definition at line 70 of file solver_core.cpp.

Member Function Documentation

◆ be_quiet()

void nrgljubljana_interface::solver_core::be_quiet ( )
inline

Read a scalar real-valued function name.dat.

Suppress verbose output from the NRG solver.

Definition at line 205 of file solver_core.hpp.

◆ check_model_params()

void nrgljubljana_interface::solver_core::check_model_params ( const solve_params_t & sp)

Check that all required model parameters have been defined.

Parameters
spSolve parameters to validate.

Definition at line 415 of file solver_core.cpp.

◆ create_tempdir()

std::string nrgljubljana_interface::solver_core::create_tempdir ( const std::string & tempdir_ = "")

Create a temporary working directory for a series of NRG runs.

Parameters
tempdir_Base directory in which to create the temporary directory.
Returns
Path to the created temporary directory.

Definition at line 400 of file solver_core.cpp.

◆ generate_param_file()

void nrgljubljana_interface::solver_core::generate_param_file ( double z)

Produce the param file for a given value of the twist parameter \( z \).

Parameters
zDiscretization twist parameter.

Definition at line 425 of file solver_core.cpp.

◆ instantiate()

void nrgljubljana_interface::solver_core::instantiate ( double z,
const std::string & taskdir )

Prepare the input files for an individual NRG calculation. Called from solve().

Parameters
zDiscretization twist parameter.
taskdirDirectory in which to prepare the calculation.

Definition at line 374 of file solver_core.cpp.

◆ read_structure()

gf_struct_t nrgljubljana_interface::solver_core::read_structure ( const std::string & filename,
bool mandatory = true )

Read the block structure of Green's function objects from a file.

Parameters
filenameFile describing the block (gf) structure.
mandatoryIf true, a missing file is an error.
Returns
The Green's function block structure.

Definition at line 116 of file solver_core.cpp.

◆ readA()

void nrgljubljana_interface::solver_core::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.

The spectral function is assumed to be purely real.

Parameters
nameBase name of the spectral function output files.
A_wContainer that receives the spectral function.
_gf_structBlock structure of the spectral function.

Definition at line 158 of file solver_core.cpp.

◆ readexpv()

void nrgljubljana_interface::solver_core::readexpv ( int Nz)

Read expectation values from the NRG output files.

Parameters
NzNumber of discretization twists.

Definition at line 184 of file solver_core.cpp.

◆ readGF()

void nrgljubljana_interface::solver_core::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.

Parameters
nameBase name of the Green's function output files.
G_wContainer that receives the Green's function.
_gf_structBlock structure of the Green's function.

Definition at line 128 of file solver_core.cpp.

◆ readtdfdm()

void nrgljubljana_interface::solver_core::readtdfdm ( int Nz)

Read thermodynamic variables (FDM algorithm) from the NRG output files.

Parameters
NzNumber of discretization twists.

Definition at line 210 of file solver_core.cpp.

◆ set_nrg_params()

void nrgljubljana_interface::solver_core::set_nrg_params ( nrg_params_t const & nrg_params)

Adjust the advanced (low-level) NRG parameters.

Parameters
nrg_paramsLow-level NRG parameters.

Definition at line 371 of file solver_core.cpp.

◆ set_verbosity()

void nrgljubljana_interface::solver_core::set_verbosity ( bool v)
inline

Set the verbosity (see also be_quiet()).

Parameters
vIf true, enable verbose output.

Definition at line 212 of file solver_core.hpp.

◆ solve()

void nrgljubljana_interface::solver_core::solve ( solve_params_t const & solve_params)

Solve the impurity problem.

Runs the full NRGLjubljana pipeline for the assigned hybridization function and populates the result containers.

Parameters
solve_paramsParameters specific to the NRGLjubljana run.

Definition at line 268 of file solver_core.cpp.

◆ solve_one()

void nrgljubljana_interface::solver_core::solve_one ( const std::string & taskdir)

Perform an individual NRG calculation. Called from solve().

Parameters
taskdirDirectory containing the prepared calculation.

Definition at line 383 of file solver_core.cpp.


The documentation for this class was generated from the following files: