Closed ParthaSarathiRana closed 2 years ago
Hello,
I have located your error in the following passage:
U = 1.0 * np.ones(shape=(1, 1, 1, 1), dtype=np.complex)
chi_d_wk = solve_rpa_PH(chi0_wk, -U) # Minus here for correct density RPA equation
chi_m_wk = solve_rpa_PH(chi0_wk, U)
You created the interaction tensor U
for a one orbital model (shape=(1, 1, 1, 1)
), while the susceptibility chi0_wk
was created for a two orbital model (shape=(2, 2, 2, 2)
).
To create the interaction tensor for multiple orbitals checkout https://github.com/TRIQS/tprf/blob/d72e1901d93cd0f3096591518040ad10da116800/python/triqs_tprf/rpa_tensor.py#L84 , which implements
U^{\mathrm{d/m}}_{a\bar{b}c\bar{d}} =
\begin{cases}
U/U, & \mathrm{if}\;a=\bar{b}=c=\bar{d} \\
-U'+2J/U', & \mathrm{if}\;a=\bar{d}\neq \bar{b}=c \\
2U'-J/J, & \mathrm{if}\;a=\bar{b}\neq c=\bar{d} \\
J/J, & \mathrm{if}\;a=c\neq \bar{b}=\bar{d} \\
0, & \mathrm{else}
\end{cases}
with the intra-orbital (inter-orbital) Hubbard interaction U (U') and the Hund's J (J') coupling, see https://github.com/TRIQS/tprf/blob/eliashberg_3.0.x/doc/theory/eliashberg.rst.
To fix the passage it should look like this
U_d, U_m = kanamori_charge_and_spin_quartic_interaction_tensors(norb, U, Up, J, Jp)
chi_d_wk = solve_rpa_PH(chi0_wk, U_d)
chi_m_wk = solve_rpa_PH(chi0_wk, -U_m) # Minus for correct charge rpa equation
Hi,
Please note that the U_d
and U_m
tensors also has to be used for the phi construction, i.e.
phi_d_wk = construct_phi_wk(chi_d_wk, U_d)
phi_m_wk = construct_phi_wk(chi_m_wk, -U_m) # Is the sign needed here too?
Best, Hugo
Many many Thanks
I am trying to run the eliashberg code with 2 orbital cube lattice, and got the following error:
eliashberg.py.txt
Two-Particle Response Function tool-box
beta = 10.0 nk = 512 nw = 200 norb = 2
Approx. Memory Utilization: 0.06 GB
--> fourier_wk_to_wr --> fourier_wr_to_tr --> chi0_tr_from_grt_PH (bubble in tau & r) --> chi_wr_from_chi_tr --> chi_wk_from_chi_wr (r->k) terminate called after throwing an instance of 'triqs::runtime_error' what(): .. Triqs runtime error at /home/partha/install/include/triqs/arrays/expression_template/matrix_algebra.hpp : 40
Matrix product : dimension mismatch in A*B [[(0.000339501,-7.88828e-17),(0,0),(0,0),(0,0)] [(0,0),(0,0),(0.000339501,-7.88828e-17),(0,0)] [(0,0),(0.000339501,-7.88828e-17),(0,0),(0,0)] [(0,0),(0,0),(0,0),(0.000339501,-7.88828e-17)]] [[(-1,-0)]] .. Error occurred on node 0
[partha-Lenovo-ideapad-330-15IKB:19392] Process received signal [partha-Lenovo-ideapad-330-15IKB:19392] Signal: Aborted (6) [partha-Lenovo-ideapad-330-15IKB:19392] Signal code: (-6) [partha-Lenovo-ideapad-330-15IKB:19392] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7efec93843c0] [partha-Lenovo-ideapad-330-15IKB:19392] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7efec901d18b] [partha-Lenovo-ideapad-330-15IKB:19392] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7efec8ffc859] [partha-Lenovo-ideapad-330-15IKB:19392] [ 3] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x9e911)[0x7efeafe37911] [partha-Lenovo-ideapad-330-15IKB:19392] [ 4] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa38c)[0x7efeafe4338c] [partha-Lenovo-ideapad-330-15IKB:19392] [ 5] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xa9369)[0x7efeafe42369] [partha-Lenovo-ideapad-330-15IKB:19392] [ 6] /usr/lib/x86_64-linux-gnu/libstdc++.so.6terminate called recursively (__gxx_personality_v0Aborted (core dumped)