Input / Output Functions
These functions pass to the userspace the observables and response functions calculated and stored within the EDIpack2 library.
- edipy2.global_env.build_gimp(zeta, ilat=None, ishape=None, typ='n')
This function generates the Green’s function for a user-chosen set of frequencies in the complex plane
- Parameters:
zeta (complex or [complex] or np.array(dtype=complex)) – user-defined array of frequencies in the whole complex plane.
ilat (int) – if the case of real-space DMFT, if only the Green’s function of a specific inequivalent site is needed, this can be specified.
ishape (int) –
this variable determines the shape of the returned array. Possible values:
None
: the same shape asHloc
plus one axis for frequency3
: in the single-impurity case, it will return an array of the shape [Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,len(zeta)
]. In the real-space DMFT case, it will return an array of the shape [Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,len(zeta)
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, ValueError is returned.4
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,len(zeta)
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.5
: in the single-impurity case, it will return an array of the shape [Nspin
,Nspin
,Norb
,Norb
,len(zeta)
].6
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
,Nspin
,Norb
,Norb
,len(zeta)
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.
typ (str) – whether to return the normal or anomalous Green’s function (for the superconducting case). Can be
n
for normal ora
for anomalous.
- Raises:
ValueError – If
ishape
is incompatible wothilat
or not in the previous list.ValueError – If
axis
is not in the previous list.
- Returns:
An array of floats that contains the Green’s function along the specific axis, with dimension set by
ishape
andzeta
.- Return type:
np.array(dtype=float)
- edipy2.global_env.build_sigma(zeta, ilat=None, ishape=None, typ='n')
This function generates the self-energy for a user-chosen set of frequencies in the complex plane
- Parameters:
zeta (complex or [complex] or np.array(dtype=complex)) – user-defined array of frequencies in the whole complex plane.
ilat (int) – if the case of real-space DMFT, if only the self-energy of a specific inequivalent site is needed, this can be specified.
ishape (int) –
this variable determines the shape of the returned array. Possible values:
None
: the same shape asHloc
plus one axis for frequency3
: in the single-impurity case, it will return an array of the shape [Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,len(zeta)
]. In the real-space DMFT case, it will return an array of the shape [Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,len(zeta)
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, ValueError is returned.4
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,len(zeta)
. :code:`Nlat will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.5
: in the single-impurity case, it will return an array of the shape [Nspin
,Nspin
,Norb
,Norb
,len(zeta)
].6
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
,Nspin
,Norb
,Norb
,len(zeta)
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.
typ (str) – whether to return the normal or anomalous self-energy (for the superconducting case). Can be
n
for normal ora
for anomalous.
- Raises:
ValueError – If
ishape
is incompatible wothilat
or not in the previous list.ValueError – If
axis
is not in the previous list.
- Returns:
An array of floats that contains the self-energy along the specific axis, with dimension set by
ishape
andzeta
.- Return type:
np.array(dtype=float)
- edipy2.global_env.get_dens(ilat=None, iorb=None)
This function returns the value of the charge density
- Parameters:
- Returns:
the full charge density tensor has dimensions [
Nlat
,Norb]. Depending on which keyworod arguments are (or not) provided, this is sliced on the corresponding axis.- Return type:
float or np.array(dtype=float)
- edipy2.global_env.get_docc(ilat=None, iorb=None)
This function returns the value of the double occupation
- Parameters:
- Returns:
the full double-occupation tensor has dimensions [
Nlat
,Norb]. Depending on which keyworod arguments are (or not) provided, this is sliced on the corresponding axis.- Return type:
float or np.array(dtype=float)
- edipy2.global_env.get_eimp(ilat=None, ikind=None)
This function returns the value of the local energy components
- Parameters:
ilat (int) – if the case of real-space DMFT, if only the Green’s function of a specific inequivalent site is needed, this can be specified.
ikind (int) –
index of the component. It is
1
: ed_Epot: the potential energy from interaction2
: ed_Eint: ed-Epot - ed_Ehartree (? it is not assigned)3
: ed_Ehartree: Hartree part of interaction energy4
: ed_Eknot: on-site part of the kinetic term
- Returns:
the full local energy tensor has dimensions [
Nlat
,4]. Depending on which keyworod arguments are (or not) provided, this is sliced on the corresponding axis.- Return type:
float or np.array(dtype=float)
- edipy2.global_env.get_mag(icomp=None, ilat=None, iorb=None)
This function returns the value of the magnetization
- Parameters:
icomp (str) – the component of the magnetization,
"x"
,"y"
or"z"
(default).ilat (int) – if the case of real-space DMFT, if only the Green’s function of a specific inequivalent site is needed, this can be specified.
iorb (int) – the orbital index. If none is provided, the whole density vector is returned
- Returns:
the full magnetization tensor has dimensions [
Nlat
,3,Norb]. Depending on which keyworod arguments are (or not) provided, this is sliced on the corresponding axis.- Return type:
float or np.array(dtype=float)
- edipy2.global_env.get_gimp(ilat=None, ishape=None, axis='m', typ='n')
This function gets from the EDIpack2 library the value of the Green’s function calculated on the Matsubara or real-frequency axis, with parameters specified in the input file.
- Parameters:
ilat (int) – if the case of real-space DMFT, if only the Green’s function of a specific inequivalent site is needed, this can be specified.
ishape (int) –
this variable determines the shape of the returned array. Possible values:
None
: the same shape asHloc
plus one axis for frequency3
: in the single-impurity case, it will return an array of the shape [Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,Lmats
/Lreal
]. In the real-space DMFT case, it will return an array of the shape [Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,Lmats
/Lreal
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, ValueError is returned.4
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,Lmats
/Lreal
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.5
: in the single-impurity case, it will return an array of the shape [Nspin
,Nspin
,Norb
,Norb
,Lmats
/Lreal
].6
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
,Nspin
,Norb
,Norb
,Lmats
/Lreal
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.
axis (str) – the axis along which to return the Green’s functio. Can be
m
for Matsubara orr
for real. In the first case, the number of frequencies will be given byed.Lmats
, in the second byed.Lreal
.typ (str) – whether to return the normal or anomalous Green’s function (for the superconducting case). Can be
n
for normal ora
for anomalous.
- Raises:
ValueError – If
ishape
is incompatible wothilat
or not in the previous list.ValueError – If
axis
is not in the previous list.
- Returns:
An array of floats that contains the Green’s function along the specific axis, with dimension set by
ishape
andaxis
.- Return type:
np.array(dtype=float)
- edipy2.global_env.get_sigma(ilat=None, ishape=None, axis='m', typ='n')
This function gets from the EDIpack2 library the value of the self-energy calculated on the Matsubara or real-frequency axis, with parameters specified in the input file.
- Parameters:
ilat (int) – if the case of real-space DMFT, if only the self-energy of a specific inequivalent site is needed, this can be specified.
ishape (int) –
this variable determines the shape of the returned array. Possible values:
None
: the same shape asHloc
plus one axis for frequency3
: in the single-impurity case, it will return an array of the shape [Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
, Nfrequencies=ed.Lmats/ed.Lreal]. In the real-space DMFT case, it will return an array of the shape [Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,Lmats
/Lreal
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, ValueError is returned.4
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,Lmats
/Lreal
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.5
: in the single-impurity case, it will return an array of the shape [Nspin
,Nspin
,Norb
,Norb
,Lmats
/Lreal
].6
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
,Nspin
,Norb
,Norb
,Lmats
/Lreal
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.
axis (str) – the axis along which to return the self-energy. Can be
m
for Matsubara orr
for real. In the first case, the number of frequencies will be given byed.Lmats
, in the second byed.Lreal
.typ (str) – whether to return the normal or anomalous self-energy (for the superconducting case). Can be
n
for normal ora
for anomalous.
- Raises:
ValueError – If
ishape
is incompatible wothilat
or not in the previous list.ValueError – If
axis
is not in the previous list.
- Returns:
An array of floats that contains the self-energy along the specific axis, with dimension set by
ishape
andaxis
.- Return type:
np.array(dtype=float)