Parse Umatrix
EDIpack offers the user two ways of providing the interaction Hamiltonian.
The default way is to use the in-built variables ULOC
, UST
,
JH
, JX
, JP
, which implement a Hubbard-Kanamori Hamiltonian for a maximum of 5 orbitals.
This is achieved by setting the ED_USE_KANAMORI
flag to T
in the input file.
Alternatively, the user can provide a plain text file containing the second-quantized
two-body operators. This is achieved by setting the ED_READ_UMATRIX
flag to T
in the input file. Note that ED_READ_UMATRIX
and ED_USE_KANAMORI
cannot be T
at the same time.
The filename (without extension) has to be provide via the UMATRIX_FILE
variable (default name umatrix
). The actual file in the execution folder will need to have
the .restart
suffix. When doing a real-space DMFT simulation, the prefix will need to be
_ineqXXXX.restart
, where XXXX
is a 4-digit incresing number corresponding to the index of
the inequivalent site.
After the interaction terms have been set in either way, a properly formatted file
called UMATRIX_FILE
.used
will be generated containing the list of all two-body operators.
Each umatrix file needs to have the following format:
NORB BANDS
i1 j1 k1 l1 U_i1j1k1l1
i2 j2 k2 l2 U_i2j2k2l2
...
NORB
is the number of orbitals. Empty lines and lines starting with #,%,!
are ignored.
The indices i,j,k,l
are of the form o s
where o
is an integer number for the
orbital index (starting from 1, maximum NORB
) and s
is u
for \(\uparrow\)
spin and d
for \(\downarrow\) spin. Each line of the file represents an operator of this form
Note the inversion of the l
and k
operators with respect to \(U_{ijkl}\).
The coefficient is given by the following formula
Note that the \(\frac{1}{2}\) prefactor is applied internally and does not need to be included by the user.
What follows is an example for a Hubbard-Kanamori interaction corresponding to the default input variables
ULOC
= 100
, UST
= 10
, JH
= JX
= JP
= 1
.
2 BANDS
#ULOC
1 d 1 u 1 d 1 u 100.0
1 u 1 d 1 u 1 d 100.0
2 d 2 u 2 d 2 u 100.0
2 u 2 d 2 u 2 d 100.0
#UST
1 d 2 u 1 d 2 u 10.0
1 u 2 d 1 u 2 d 10.0
2 d 1 u 2 d 1 u 10.0
2 u 1 d 2 u 1 d 10.0
#UST-JH
1 u 2 u 1 u 2 u 9.0
1 d 2 d 1 d 2 d 9.0
2 d 1 d 2 d 1 d 9.0
2 u 1 u 2 u 1 u 9.0
#JX
1 d 2 u 2 d 1 u 1.0
1 u 2 d 2 u 1 d 1.0
2 d 1 u 1 d 2 u 1.0
2 u 1 d 1 u 2 d 1.0
#JP
1 d 1 u 2 d 2 u 1.0
1 u 1 d 2 u 2 d 1.0
2 d 2 u 1 d 1 u 1.0
2 u 2 d 1 u 1 d 1.0
Quick access
Used modules
ed_vars_global
: Global variable accessible throughout the codeed_input_vars
: User-accessible input variables
External modules
scifor
Subroutines and functions
- subroutine ed_parse_umatrix/add_twobody_operator(oi, si, oj, sj, ok, sk, ol, sl, uijkl)
This subroutine lets the user add a two-body operator at runtime. The convention is consistent with that of the umatrix file
- Parameters:
oi [integer] – Orbital index of \(c^{\dagger}_{i}\)
si [character(len=1)] – Spin index of \(c^{\dagger}_{i}\)
oj [integer] – Orbital index of \(c^{\dagger}_{j}\)
sj [character(len=1)] – Spin index of \(c^{\dagger}_{j}\)
ok [integer] – Orbital index of \(c_{k}\)
sk [character(len=1)] – Spin index of \(c_{k}\)
ol [integer] – Orbital index of \(c_{l}\)
sl [character(len=1)] – Spin index of \(c_{l}\)
uijkl [real] – Interaction coefficient
- subroutine ed_parse_umatrix/reset_umatrix()
This subroutine resets ro zero the internal interaction matrices
- subroutine ed_parse_umatrix/save_umatrix_file([ufile])
This subroutine saves the currently used interaction Hamiltonian into a file. It takes the elements from the internal
ULOC
,UST
,JH
,JX
,JP
and sundry terms- Options:
ufile [character(len=*)] – File to which the interaction operators are saved. Default
UMATRIX_FILE
.used
- subroutine ed_parse_umatrix/read_umatrix_file(ufile)
This subroutine reads the interaction Hamiltonian from a user-specified file. Empty and commented lines are ignored. Each two-body operator is then parsed to recognize whether it is of the form
ULOC
,UST
,JH
,JX
,JP
. If so, those coefficients are populated. If not, the operator is saved in a dynamically allocated "sundry" array. Since EDIpack applies operators from right to left as \(c\rightarrow c^{\dagger} \rightarrow c \rightarrow c^{\dagger}\) the read two-body operators need to be properly ordered. If mean-field terms arise from the anticommutation, these are stored in an arraymfHloc
of dimension [2
,2
,Norb
,Norb
], which will be added toimpHloc
upon Fock space H construction. IfED_VERBOSE
>3
, this routine will print extensive information about the read file(s) and the type of the operators therein contained.- Parameters:
ufile [character(len=*)] – File containing a properly formatted interaction Hamiltonian. Default
UMATRIX_FILE
.restart