Skip to content
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

off_diag=False for Hint, i.e. gf_struct=[('up_0', 1),('up_1', 1),('dn_0', 1),('dn_1', 1)] #3

Open
the-hampel opened this issue Mar 28, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@the-hampel
Copy link
Member

the-hampel commented Mar 28, 2023

This part of the code:

for term, coef in h_int:
                bl1, u1 = term[0][1]
                bl2, u2 = term[3][1]
                bl3, u3 = term[1][1]
                bl4, u4 = term[2][1]

                assert(bl1 == bl2 and bl3 == bl4)
                Sigma_int[bl1][u2, u1] += coef * G_dens[bl3][u4, u3] 
                Sigma_int[bl3][u4, u3] += coef * G_dens[bl1][u2, u1]

                if bl1 == bl3 and with_fock:
                    Sigma_int[bl1][u4, u1] -= coef * G_dens[bl3][u2, u3]
                    Sigma_int[bl3][u2, u3] -= coef * G_dens[bl1][u4, u1]

assumes that den-den term appear only directly between two blocks of the fundamental operator set, i.e. up and down. There is no room for a structure like [('up_0', 1),('up_1', 1),('dn_0', 1),('dn_1', 1)] , where the density term is coupling different blocks. This should be made possible, and is possible in the TPRF hartree solver by converting the hint to a general U tensor with the function: get_rpa_tensor.

edit: see correction below. Code works correctly.

@the-hampel the-hampel added bug Something isn't working documentation Improvements or additions to documentation and removed bug Something isn't working labels Mar 28, 2023
@the-hampel
Copy link
Member Author

I have to correct my issue. The code works as expected. It only complains and triggers the assert, when the block structure of the interaction Hamiltonian would create contributions to Sigma that are not captures by its block structure.
TODO: improve assert message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant