-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Allowing imtime_bubble_chi0_wk to take 2 inputs. #46
Comments
This should be implemented by the following PR whenever people have some free-time to look at it. Andrew |
Dear Andrew, Thank you for the feature request and the pull request #47. Before giving feedback on the details of your pull request I would like to ask for your help to understand better what you want to accomplish on a high level. (So that there is no other/better way of mapping this to the TPRF notation/nomenclature). In contrast to most TRIQS solvers TPRF (currently) takes an approach assuming that there are no symmetries in the single particle indices. I.e. for cases where you might get a block Greens function ( To be concrete. For a spin-ful single band system, we would currently map the block greens function to a matrix valued Green's function along the lines # G_w : from impurity solver BlockGF with up/down block structure
g_w = Gf(mesh=G_w.mesh, target_shape=[2,2])
g_w[0, 0] << G_w['up']
g_w[1, 1] << G_w['down'] this way the Green's function has the spin structure When computing the bubble susceptibility using this Green's function we get the four index result I know that this is not the most memory optimal way of doing things if you have a problem with, e.g. spin symmetry. Perhaps it is time to consider generalise the TPRF routines to also accept block Green's functions. I am interested in hearing your view on this. In your application is there some case that can not be covered by mapping the BlockGF to a matrix valued Green's function? I look forward to hear back from you and working with you on the PR. Cheers, Hugo |
Hi Hugo, Thanks so much. Since posting that, I have figured out the matrix structure. In my example, where I wanted to compute embedding That said, there's a lot of contracted indices here computed that I do not need. I would eventually like to place this bubble inside a self-consistent loop and perform hundreds of iterations to converge my Dyson equations. I am hoping to do this for two fermion flavours, two spins, and with the form factor If I'm misunderstanding or not making things clear let me know and I'll try to elaborate. |
Dear Andrew, I am sorry for the silence. The product you want to compute is a convolution in frequency and momentum, so in order to do it computationally efficient you would like to do the product in real space and imaginary time This should give you You can compute the bubble part using, and the Green's function transform from momentum and frequency space can be done using
If you add the Best, Hugo |
Dear Hugo, Thank you for your response. The logic you discussed I believe is exactly the logic used in |
Dear Andrew, I disagree, you can make the g_wr = fourier_wk_to_wr(g_wk)
g_tr = fourier_wr_to_tr(g_wr)
gg_tr = chi0_tr_from_grt_PH(g_tr)
ggV_tr = gg_tr.copy()
ggV_tr.data[:] = gg_tr.data[:] * V_r.data[:][None, :, ...]
ggV_wr = chi_wr_from_chi_tr(ggV_tr, nw=nw)
ggV_wk = chi_wk_from_chi_wr(ggV_wr) This does the multiplication of V after taking the product with two Green's functions. Do you think this would be a solution for you? Best, Hugo |
Dear Hugo, ah! Now I understand, thank you very much for writing that out more explicitly for me. Yes this will work. I do have use cases where I want different G's that come from genuinely different lattices, but I'll wait on the PR request for that more general case. |
I would be happy to implement this but would need some advice on how to proceed with a PR.
Summary
Modify the function
imtime_bubble_chi0_wk(G_wk, nw)
so that it can take two Green's functions as inputs. The interface would be something likeimtime_bubble_chi0_wk(G_a_wk,G_b_wk, nw)
orimtime_bubble_chi0_wk(G_wk,"up","down", nw)
where you provide names for theGFBlock
object.Motivation
Often times in GW calculations (or self-consistent loops generally), or for more generalized susceptibilities, one would like to be able to compute the generalized bubble / susceptibility
(or spin-mixing terms).
Implementation
Currently, I believe this is only implemented in the C++ code. The function we would need to modify is
chi_Dtr_t chi0_tr_from_grt_PH(g_Dtr_cvt g_tr)
inchi_imtime.cpp
I believe to allow for two inputs.The text was updated successfully, but these errors were encountered: