Module

Wrapper and auxiliary functions for Eliashberg solver ebmb

ebmb.box_dos(file='dos.in', de=0.001, t=0.25, bandwidth=None, replace=True)[source]

Calculate rectangular density of states and save it to file.

Parameters:
filestr

Path to output file.

defloat

Energy resolution.

tfloat

One eighth of the bandwidth.

bandwidthfloat

Alternatively, bandwith.

replacebool

Overwrite existing output file?

Returns:
ndarray

Energy.

ndarray

Density of states.

ebmb.chain_a2F(file='a2F.in', dw=0.0001, l=1.0, w0=0.02, wlog=None, replace=True)[source]

Calculate and save Eliashberg spectral function of 1D lattice.

See Eqs. (63) and (64) of Phys. Rev. X 13, 041009 (2023). Averaging the electron-phonon coupling over k yields this Eliashberg spectral function. The lambda parameter l is g0 / w0 squared times the density of states.

Parameters:
filestr

Path to output file.

dwfloat

Energy resolution.

lfloat

Effective electron-phonon coupling.

w0float

Second-moment average phonon frequency.

wlogfloat

Logarithmic average phonon frequency.

replacebool

Overwrite existing output file?

Returns:
ndarray

Energy.

ndarray

Eliashberg spectral function.

ebmb.chain_dos(file='dos.in', de=0.001, t=0.25, bandwidth=None, replace=True)[source]

Calculate density of states of 1D lattice and save it to file.

Parameters:
filestr

Path to output file.

defloat

Energy resolution.

tfloat

Hopping parameter.

bandwidthfloat

Alternatively, bandwith.

replacebool

Overwrite existing output file?

Returns:
ndarray

Energy.

ndarray

Density of states.

ebmb.dos(file, epsilon, domain, filters=[], points=101, replace=True)[source]

Calculate subdomain-resolved density of states and save it to file.

Parameters:
filestr

Path to output file.

epsilonfunction

Band structure.

domainlist of ndarray

Discretized domains of arguments of epsilon.

filterslist of function

N filters defining N + 1 subdomains.

pointsint

Number of energy points.

replacebool

Overwrite existing output file?

Returns:
ndarray

Energy.

ndarray

Subdomain-resolved density of states.

Examples

e, dos = ebmb.dos('dos.in', epsilon=lambda *k: -np.cos(k).sum() / 2,
    domain=[np.linspace(-np.pi, np.pi, 1000, endpoint=False)] * 2,
    filters=[lambda *k: np.pi ** 2 / 2 <= np.dot(k, k) <= np.pi ** 2])
ebmb.gaussian_a2F(file='a2F.in', dw=0.0001, l=1.0, w0=0.02, s=0.002, replace=True)[source]

Calculate and save Gaussian example Eliashberg spectral function.

Parameters:
filestr

Path to output file.

dwfloat

Energy resolution.

lfloat

Prefactor (expected value of electron-phonon coupling).

w0float

Center (expected value of Einstein frequency).

sfloat

Broadening.

replacebool

Overwrite existing output file?

Returns:
ndarray

Energy.

ndarray

Eliashberg spectral function.

ebmb.get(program='ebmb', file='~temporary.dat', replace=True, **parameters)[source]

Run ‘ebmb’, ‘tc’ or ‘critical’ and load results.

Parameters:
programstr

Name of or path to executable.

filestr

Path to output file.

replacebool

Overwrite existing output file?

**parameters

Program parameters.

Returns:
dict

Returned if program corresponds to ‘ebmb’. Self-energy components etc.

ndarray

Returned otherwise. Critical parameter(s).

ebmb.load(file)[source]

Load output file of ‘ebmb’.

Parameters:
filestr

Path to output file.

Returns:
dict

Self-energy components etc.

ebmb.load_floats(file)[source]

Load output file of ‘tc’ or ‘critical’.

Parameters:
filestr

Path to output file.

Returns:
ndarray

Critical parameter(s).

ebmb.read_char(file)[source]

Read character from binary or text file (for Python-3 compatibility).

Parameters:
fileFile Object

File opened in binary or text mode.

Returns:
str

Next character from file.

ebmb.run(program='ebmb', redirect=False, **parameters)[source]

Run ‘ebmb’, ‘tc’ or ‘critical’.

Parameters:
programstr

Name of or path to executable. If not found, the path to a directory ‘bin’ located next to this module is prepended before trying again.

redirectbool

Do not print but return standard output of program.

**parameters

Program parameters.

ebmb.square_dos(file='dos.in', de=0.001, t=0.25, bandwidth=None, replace=True)[source]

Calculate density of states of square lattice and save it to file.

Parameters:
filestr

Path to output file.

defloat

Energy resolution.

tfloat

Hopping parameter.

bandwidthfloat

Alternatively, bandwith.

replacebool

Overwrite existing output file?

Returns:
ndarray

Energy.

ndarray

Density of states.

ebmb.steplike_dos(file='dos.in', de=0.001, t=0.25, bandwidth=None, ratio=6.0, d=0.02, replace=True)[source]

Calculate and save steplike DOS [Akashi, Arita, PRB 88, 014514 (2013)]

Parameters:
filestr

Path to output file.

defloat

Energy resolution.

tfloat

One eighth of the bandwidth.

bandwidthfloat

Alternatively, bandwith.

ratiofloat

Quotient of densities of states after and before the step (N+/N-)

dfloat

Width of the step.

replacebool

Overwrite existing output file?

Returns:
ndarray

Energy.

ndarray

Density of states.