Input / Output Functions
Description
Contains a set of routines that retrieve quantities such as Green’s functions, self-energies (see ed_greens_functions
) and observables (from ed_observables
) and pass them to the user, as well ass routines to read and store Green’s function and self-energies.
Quick access
- Routines:
ed_get_gimp()
,ed_get_dimp()
,ed_get_sigma()
,ed_get_g0imp()
,ed_get_spinchi()
,ed_get_denschi()
,ed_get_pairchi()
,ed_get_exctchi()
,ed_get_dens()
,ed_get_mag()
,ed_get_docc()
,ed_get_phi()
,ed_get_eimp()
,ed_get_epot()
,ed_get_eint()
,ed_get_ehartree()
,ed_get_eknot()
,ed_get_doubles()
,ed_get_dust()
,ed_get_dund()
,ed_get_dse()
,ed_get_dph()
,ed_get_sp_dm()
,ed_get_imp_info()
,ed_get_quantum_soc_operators()
,ed_get_neigen_total()
Used modules
ed_input_vars
: Contains all global input variables which can be set by the user through the input file. A specific preocedureed_read_input()
should be called to read the input file usingparse_input_variable()
procedure from SciFortran. All variables are automatically set to a default, looked for and updated by reading into the file and, sequentially looked for and updated from command line (std.input) using the notation variable_name=variable_value(s) (case independent).ed_vars_global
: Contains all variables, arrays and derived types instances shared throughout the code. Specifically, it contains definitions of theeffective_bath
, thegfmatrix
and thesector
data structures.ed_aux_funx
: Hosts a number of auxiliary procedures required in different parts of the code. Specifically, it implements: creation/annihilation fermionic operators, binary decomposition of integer representation of Fock states and setup the local impurity Hamiltonianed_setup
: Contains procedures to set up the Exact Diagonalization calculation, executing all internal consistency checks and allocation of the global memory.ed_bath
: Contains routines for setting, accessing, manipulating and clearing the bath of the Impurity problem.ed_chi_functions
-
-
-
Subroutines and functions
- interface ed_io/ed_get_gimp(self, nlat[, axis, type, z])
This subroutine gets from the EDIpack2 library the value of the impurity Green’s function calculated on the Matsubara or real-frequency axis, with number of frequencies
lmats
orlreal
.The impurity Green’s function is an array having the following possible dimensions:
- Parameters:
self (various shapes) [complex, inout] – Green’s function matrix
nlat [integer, in] – Number of inequivalent impurity sites for real-space DMFT
- Options:
axis [character(len=*)] – Can be
"m"
for Matsubara (default),"r"
for realtype [character(len=*)] – Can be
"n"
for Normal (default),"a"
for anomalousz (•) [complex] – User provided array of complex frequency where to evaluate Self
- interface ed_io/ed_get_dimp(self, nlat[, axis, z])
This subroutine gets from the EDIpack2 library the value of the impurity phonon’s Green’s function calculated on the Matsubara or real-frequency axis, with number of frequencies
lmats
orlreal
.The impurity phonon’s Green’s function is an array having the following possible dimensions:
- Parameters:
self (various shapes) [complex, inout] – phonon’s Green’s function matrix
nlat [integer, in] – Number of inequivalent impurity sites for real-space DMFT
- Options:
axis [character(len=*)] – Can be
"m"
for Matsubara (default),"r"
for realz (•) [complex] – User provided array of complex frequency where to evaluate Self
- interface ed_io/ed_get_sigma(self, nlat[, axis, type, z])
- This subrotine gets from the EDIpack2 library the value of the self-energy calculated on the Matsubara or real-frequency axis, with number of frequencies
lmats
orlreal
.The self-energy is an array having the following possible dimensions:- Parameters:
self (various shapes) [complex, inout] – Green’s function matrix
nlat [integer, in] – Number of inequivalent impurity sites for real-space DMFT
- Options:
axis [character(len=*)] – Can be
"m"
for Matsubara (default),"r"
for realtype [character(len=*)] – Can be
"n"
for Normal (default),"a"
for anomalousz (•) [complex] – User provided array of complex frequency where to evaluate Self
- interface ed_io/ed_get_g0imp(self, bath[, axis, type, z])
- This subroutine gets from the EDIpack2 library the value of the impurity non-interacting Green’s function calculated on the Matsubara or real-frequency axis, with number of frequencies
lmats
orlreal
.It autonomously decides whether the system is single-impurity or real-space DMFT based on thebath
shapeThe impurity non-interacting Green’s function is an array having the following possible dimensions:
The bath is an array having the following possible dimensions:
[
nb
] for single-impurity DMFT[
nlat
,nb
] for real-space DMFT, withnlat
the number of inequivalent impurity sites
Where
nb
is the length of thebath
array.- Parameters:
self (various shapes) [complex, inout] – Green’s function matrix
bath (various shapes) [real] – The bath vector
- Options:
axis [character(len=*)] – Can be
"m"
for Matsubara (default),"r"
for realtype [character(len=*)] – Can be
"n"
for Normal (default),"a"
for anomalousz (•) [complex] – User provided array of complex frequency where to evaluate Self
- interface ed_io/ed_get_spinchi(self, nlat[, axis, z])
This subroutine gets from the EDIpack2 library the value of the impurity spin susceptibility function calculated on the Matsubara or real-frequency axis, with number of frequencies
lmats
orlreal
.The impurity spin susceptibility function is an array having the following possible dimensions:
- Parameters:
self (various shapes) [complex, inout] – spin susceptibility
nlat [integer, in] – Number of inequivalent impurity sites for real-space DMFT
- Options:
axis [character(len=*)] – Can be
"m"
for Matsubara (default),"r"
for realz (•) [complex] – User provided array of complex frequency where to evaluate Self
- interface ed_io/ed_get_denschi(self, nlat[, axis, z])
This subroutine gets from the EDIpack2 library the value of the impurity dens susceptibility function calculated on the Matsubara or real-frequency axis, with number of frequencies
lmats
orlreal
.The impurity dens susceptibility function is an array having the following possible dimensions:
- Parameters:
self (various shapes) [complex, inout] – spin susceptibility
nlat [integer, in] – Number of inequivalent impurity sites for real-space DMFT
- Options:
axis [character(len=*)] – Can be
"m"
for Matsubara (default),"r"
for realz (•) [complex] – User provided array of complex frequency where to evaluate Self
- interface ed_io/ed_get_pairchi(self, nlat[, axis, z])
This subroutine gets from the EDIpack2 library the value of the impurity pair susceptibility function calculated on the Matsubara or real-frequency axis, with number of frequencies
lmats
orlreal
.The impurity pair susceptibility function is an array having the following possible dimensions:
- Parameters:
self (various shapes) [complex, inout] – spin susceptibility
nlat [integer, in] – Number of inequivalent impurity sites for real-space DMFT
- Options:
axis [character(len=*)] – Can be
"m"
for Matsubara (default),"r"
for realz (•) [complex] – User provided array of complex frequency where to evaluate Self
- interface ed_io/ed_get_exctchi(self, nlat[, axis, z])
This subroutine gets from the EDIpack2 library the value of the impurity exct susceptibility function calculated on the Matsubara or real-frequency axis, with number of frequencies
lmats
orlreal
.The impurity exct susceptibility function is an array having the following possible dimensions:
- Parameters:
self (various shapes) [complex, inout] – spin susceptibility
nlat [integer, in] – Number of inequivalent impurity sites for real-space DMFT
- Options:
axis [character(len=*)] – Can be
"m"
for Matsubara (default),"r"
for realz (•) [complex] – User provided array of complex frequency where to evaluate Self
- interface ed_io/ed_get_dens(self, nlat[, iorb, nlat])
This subroutine gets from the EDIpack2 library the value of the impurity dens susceptibility function calculated on the Matsubara or real-frequency axis, with number of frequencies
lmats
orlreal
.The impurity dens susceptibility function is an array having the following possible dimensions:
- Parameters:
self (various shapes) [real] – The density value or array of values
- Options:
iorb [integer] – the orbital index
nlat [integer] – the number of inequivalent impurity sites for real-space DMFT
- interface ed_io/ed_get_mag(self, nlat[, component, iorb, nlat])
This subroutine gets from the EDIpack2 library the value of the magnetization and passes it to the user.
The
self
variable can have the following dimensions:scalar: if
component
andiorb
are provided for single-impurity DMFT, given magnetization component for that orbital[
norb
]: for single-impurity DMFT, one magnetization component for all orbitals[
nlat
]: for real-space DMFT withnlat
impurities, magnetization for that orbital for all impurity sites[
nlat
,norb
]: ifnlat
is provided for real-space DMFT, one magnetization component for all orbitals and impurity sites[
nlat
,3
,norb
]: ifnlat
is provided for real-space DMFT, all magnetization components for all orbitals and sites
- Parameters:
self (various shapes) [real] – Magnetization
- Options:
component [character(len=1)] – Component of the magnetization, can be
"x"
,"y"
,"z"
(default"z"
)iorb [integer] – Orbital (default
1
)nlat [integer] – Number of inequivalent impurities for real-space DMFT
- interface ed_io/ed_get_docc(self, nlat[, iorb, nlat])
This subroutine gets from the EDIpack2 library the value of the double occupation and passes it to the user.
The
self
variable can have the following dimensions:scalar: if
iorb
is provided for single-impurity DMFT, dobule-occupation for that orbital[
norb
]: if no optional variable is provided for single-impurity DMFT, double-occupation for all orbitals[
nlat
]: ifiorb
(default = 1) is provided for real-space DMFT withnlat
impurities, double-occupation for that orbital for all impurity sites[
nlat
,norb
]: ifnlat
is provided for real-space DMFT, double-occupation for all impurity sites and orbitals
- Parameters:
self (various shapes) [real] – double-occupation value or array of values
- Options:
iorb [integer] – orbital index
nlat [integer] – number of inequivalent impurity sites for real-space DMFT
- interface ed_io/ed_get_phi(self, nlat[, iorb, jorb, nlat])
This subroutine gets from the EDIpack2 library the value of the superconducting order parameter \(\phi\) (
ed_mode
=superc
) and passes it to the user.The
self
variable can have the following dimensions:scalar: if
iorb
is provided for single-impurity DMFT, \(\phi\) for that orbital[
norb
]: if no optional variable is provided for single-impurity DMFT, \(\phi\) for all orbitals[
nlat
]: ifiorb
(default = 1) is provided for real-space DMFT withnlat
impurities, \(\phi\) for that orbital for all impurity sites[
nlat
,norb
]: ifnlat
is provided for real-space DMFT, \(\phi\) for all impurity sites and orbitals
- Parameters:
self (various shapes) [real] – \(\phi\) value or array of values
- Options:
iorb [integer] – first orbital index
jorb [integer] – second orbital index
nlat [integer] – number of inequivalent impurity sites for real-space DMFT
- interface ed_io/ed_get_eimp(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the array [
ed_epot
,ed_eint
,ed_ehartree
,ed_eknot
]. These are the expectation values various contribution to the internal energyed_epot
= energy contribution from the interaction terms, including the Hartree termed_eint
= energy contribution from the interaction terms, excluding the Hartree termed_ehartree
= \(-\frac{U}{2} \sum_{i} \langle n_{i\uparrow} + n_{i\downarrow} \rangle -\frac{2U^{'}-J_{H}}{2} \sum_{i < j} \langle n_{i\uparrow}+n_{i\downarrow} + n_{i\downarrow}+n_{j\downarrow} \rangle +\frac{U}{4} + \frac{2U^{'}-J_{H}}{2}\) for \(i,j\) orbitalsed_eknot
= kinetic term from the local 1-body Hamiltonian
The returned array can have the following dimensions:
[
4
]: for single-site DMFT[
nlat
,4
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – energy components array
nlat [integer] – number of inequivalent impurity sites for real-space DMFT
- interface ed_io/ed_get_epot(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the value of
ed_epot
, the energy contribution from the interaction terms, including the Hartree term. The returned array can have the following dimensions:scalar: for single-site DMFT
[
nlat
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – value of
ed_epot
nlat [integer] – number of inequivalent impurity sites for real-space DM
- interface ed_io/ed_get_eint(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the value of
ed_int
, the energy contribution from the interaction terms, excluding the Hartree term. The returned array can have the following dimensions:scalar: for single-site DMFT
[
nlat
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – value of
ed_int
nlat [integer] – number of inequivalent impurity sites for real-space DM
- interface ed_io/ed_get_ehartree(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the value of the Hartree potential
ed_ehartree
. The returned array can have the following dimensions:scalar: for single-site DMFT
[
nlat
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – value of
ed_ehartree
nlat [integer] – number of inequivalent impurity sites for real-space DM
- interface ed_io/ed_get_eknot(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the value
ed_eknot
, the kinetic term from the local 1-body Hamiltonian The returned array can have the following dimensions:scalar: for single-site DMFT
[
nlat
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – value of
ed_eknot
nlat [integer] – number of inequivalent impurity sites for real-space DM
- interface ed_io/ed_get_doubles(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the array [
ed_dust
,ed_dund
,ed_dse
,ed_dph
]. These are the expectation values of the two-body operators associated with the density-density inter-orbital interaction (with opposite and parallel spins), spin-exchange and pair-hopping.ed_dust
= \(\sum_{i < j} n_{i\uparrow}n_{j\downarrow} + n_{i\downarrow}n_{j\uparrow}\) for \(i,j\) orbitalsed_dund
= \(\sum_{i < j} n_{i\uparrow}n_{j\uparrow} + n_{i\downarrow}n_{j\downarrow}\) for \(i,j\) orbitalsed_dse
= \(\sum_{i < j} c^{\dagger}_{i\uparrow}c^{\dagger}_{j\uparrow}c_{i\downarrow}c_{j\uparrow}\) for \(i,j\) orbitalsed_dph
= \(\sum_{i < j} c^{\dagger}_{i\uparrow}c^{\dagger}_{i\downarrow}c_{j\downarrow}c_{j\uparrow}\) for \(i,j\) orbitals
The returned array can have the following dimensions:
[
4
]: for single-site DMFT[
nlat
,4
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – array of two-body terms expectation values
nlat [integer] – number of inequivalent impurity sites for real-space DMFT
- interface ed_io/ed_get_dust(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the value of
ed_dust
= \(\sum_{i < j} n_{i\uparrow}n_{j\downarrow} + n_{i\downarrow}n_{j\uparrow}\) for \(i,j\) orbitals The returned array can have the following dimensions:scalar: for single-site DMFT
[
nlat
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – value of
dust
nlat [integer] – number of inequivalent impurity sites for real-space DMFT
- interface ed_io/ed_get_dund(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the value of
ed_dund
= \(\sum_{i < j} n_{i\uparrow}n_{j\uparrow} + n_{i\downarrow}n_{j\downarrow}\) for \(i,j\) orbitals The returned array can have the following dimensions:scalar: for single-site DMFT
[
nlat
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – value of
dund
nlat [integer] – number of inequivalent impurity sites for real-space DMFT
- interface ed_io/ed_get_dse(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the value of
ed_dse
= \(\sum_{i < j} c^{\dagger}_{i\uparrow}c^{\dagger}_{j\uparrow}c_{i\downarrow}c_{j\uparrow}\) for \(i,j\) orbitals The returned array can have the following dimensions:scalar: for single-site DMFT
[
nlat
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – value of
dse
nlat [integer] – number of inequivalent impurity sites for real-space DMFT
- interface ed_io/ed_get_dph(self, nlat)
This subroutine gets from the EDIpack2 library and passes to the user the value of
ed_dph
= \(\sum_{i < j} c^{\dagger}_{i\uparrow}c^{\dagger}_{i\downarrow}c_{j\downarrow}c_{j\uparrow}\) for \(i,j\) orbitals The returned array can have the following dimensions:scalar: for single-site DMFT
[
nlat
]: for real-space DMFT withnlat
impurities
- Parameters:
self (various shapes) [real] – value of
dph
nlat [integer] – number of inequivalent impurity sites for real-space DMFT
- interface ed_io/ed_get_sp_dm(dm_)
This subroutine returns to the user the impurity density matrix. The density matrix is an array having the following possible dimensions:
- Parameters:
dm_ (various shapes) [complex, out,allocatable] – ,custom_rot,dm_eig_,dm_rot_)
- subroutine ed_io/ed_get_imp_info(self)
- Parameters:
self (2) [real]
- subroutine ed_io/ed_get_quantum_soc_operators()
This subroutine gets and prints the values of the components \(\overrightarrow{L}\), \(\overrightarrow{S}\), \(\overrightarrow{J}\) in the chosen basis depending on
jz_basis
, and prints them on the files"L_imp_"//reg(str(ndx))//".dat"
,"S_imp_"//reg(str(ndx))//".dat"
and"J_imp_"//reg(str(ndx))//".dat"
, wherendx
is the inequivalent impurity site for real-space DMFT (if that is the case). The ordering of the results in the output files is described by comments in the files themselves
- subroutine ed_io/ed_get_neigen_total(nlii, nlat)
In the case of inequivalent impurity sites, this function returns the number of eigenstates per impurity site in the ED spectrum.
- Parameters:
nlii (nlat) [integer] – array containing the number of eigenstates per inequivalent impurity site
- Options:
nlat [integer] – number of inequivalent impurity sites for real-space DMFT