nrgljubljana_interface.solver.Solver

class nrgljubljana_interface.solver.Solver(*args, **params_kw)[source]

Bases: SolverCore

NRGLjubljana impurity solver.

Thin Python wrapper over the compiled SolverCore. Construct it with the model, symmetry type and frequency mesh, assign the hybridization function S.Delta_w['imp'] << ..., then call solve() and read the results (S.A_w, S.G_w, S.Sigma_w, …).

The __init__(), solve() and set_nrg_params() methods each accept either keyword arguments (which are used to build the corresponding parameter object) or a single parameter object positionally, so a stored S.constr_params / S.last_solve_params / S.nrg_params can be passed straight back in.

Parameters:
argsConstrParamsT, optional

A construction-parameter object (e.g. a stored constr_params) passed positionally, instead of the keyword arguments below.

modelstr, optional

Impurity model to solve (selects a template directory), e.g. 'SIAM'. Default 'SIAM'.

symtypestr, optional

NRGLjubljana symmetry code, e.g. 'QS', 'QSZ', 'ISO'. Default 'QS'.

mesh_maxfloat, optional

Maximum frequency of the logarithmic mesh. Default 10.

mesh_minfloat, optional

Minimum frequency of the logarithmic mesh. Default 1e-4.

mesh_ratiofloat, optional

Common ratio of the geometric (logarithmic) frequency mesh. Default 1.05.

Attributes

A_w

The spectral function \(A(\omega)\).

B_l_w

The spectral function \(B_l(\omega)\) of the auxiliary correlator \(F_l(\omega)\).

B_r_w

The spectral function \(B_r(\omega)\) of the auxiliary correlator \(F_r(\omega)\).

C_w

The spectral function \(C(\omega)\) of the auxiliary correlator \(I(\omega)\).

Delta_struct

The hybridization function structure object.

Delta_w

The hybridization function on the real-frequency axis.

F_l_w

The auxiliary Green's function \(F_l(\omega) = \Sigma(\omega)\, G(\omega)\).

F_r_w

The auxiliary Green's function \(F_r(\omega) = G(\omega)\, \Sigma(\omega)\).

G_w

The retarded Green's function \(G(\omega)\).

I_w

The auxiliary Green's function \(I(\omega)\).

SigmaHartree_w

Constant Hartree shift to the self-energy, stored as a Green's function.

Sigma_w

The retarded self-energy \(\Sigma(\omega)\) (computed from \(F_l\), \(F_r\), \(G\) and \(I\)).

chi_NN_w

Charge susceptibility \(\chi_{NN}(\omega)\).

chi_SS_w

Spin susceptibility \(\chi_{SS}(\omega)\).

chi_struct

The susceptibility structure object.

constr_params

Parameters used for the solver construction.

expv

Expectation values of local impurity operators.

gf_struct

The Green's function structure object.

keep_temp_dir

Keep the temporary directories after the calculation.

last_solve_params

Parameters used for the most recent solve process.

log_mesh

Logarithmic real-frequency mesh.

nrg_params

Low-level NRG parameters.

tdfdm

Thermodynamic variables (FDM algorithm).

verbose

If true, detailed output from NRGLjubljana and its tools is sent to stdout.

Methods

be_quiet

Suppress verbose output from the NRG solver.

check_model_params

Check that all required model parameters have been defined.

create_tempdir

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

generate_param_file

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

instantiate

Prepare the input files for an individual NRG calculation.

read_structure

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

readexpv

Read expectation values from the NRG output files.

readtdfdm

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

set_nrg_params(*args, **params_kw)

Set the advanced (low-level) NRG parameters.

set_params

Establish good defaults for the low-level NRG parameters.

set_verbosity

Set the verbosity (see also be_quiet()).

solve(*args, **params_kw)

Solve the impurity problem.

solve_one

Perform an individual NRG calculation.

write_gamma

Write \(\Gamma = -\mathrm{Im}\,\Delta(\omega)\) to a file.

Notes

See ConstrParamsT for the full list of construction parameters.