-
Notifications
You must be signed in to change notification settings - Fork 90
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
[WIP] Hybrid functionals #717
Conversation
Co-authored-by: Michael F. Herbst <[email protected]>
Typo in the top comments on LD definition + adding more details in `plots_dos` docstring.
) Co-authored-by: Michael F. Herbst <[email protected]>
Co-authored-by: Gaspard Kemlin <[email protected]>
Looks super, great work!
Should be OK to do: when i = (n,k) and j = (n',k'), rho_ij = psi_i^* psi_j is exp(i(k'-k)x) u_nk*(x) u_mk(x), so V_ij can be computed in Fourier space just as you do now but with a |k'-k+G|^2 instead of G^2. That should possibly be the only change needed, except for normalizations maybe. For testing, we should be able to compare hartree-fock against eg abinit. additional TODOs (not necessarily in the scope of this PR, I'm just adding for future reference) is to generalize SCF to mix orbitals, and to implement the ACE method for performance. |
also as a TODO: generalize to fractional occupations |
a8ade70
to
d008d40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution! A very solid start.
I would in fact vote for rather not going all the way and merging this into DFTK asap (i.e. maybe only with the version for one k-Point and without temperature as it is implemented right now).
But please add the TODOs @antoine-levitt mentioned as well as the things you still have on your checkbox list above.
src/terms/exact_exchange.jl
Outdated
|
||
# Solving poisson equation to obtain potential corresponding to | ||
# ϕ_i(r')ϕ_j(r) / |r - r'| | ||
vij_fourier = rho_ij_four_conj .* term.poisson_green_coeffs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be rho_ij_four
? Also it replaces \int ϕ_i^*(r) ϕ_j(r) / |r - r'| dr
Note that the BZ integral is singular and needs to be regularized, either by short-ranging the Coulomb (this is what abinit does, apparently) or by a correction technique, see eg https://journals.aps.org/prb/pdf/10.1103/PhysRevB.34.4405 (this is what QE does by default). There's also https://journals.aps.org/prb/pdf/10.1103/PhysRevB.73.205119 which I haven't read yet, and probably more. |
I am interested in implementing the hybrid functional with k-point sampling. Actually have tried a bit, but there are quite a few things to be done such as getting the coulomb singularity correction computed and generating the q point set and corresponding wave functions. I am wondering if this is already being actively worked on and what is the best way to contribute. |
Hi, As far as I know nobody's working on it actively, feel free to pick it up (the simplest is probably to start another PR; unless @BKaperick objects I think it's fine to use some of the code in this PR if you want, with proper attribution in a commit message). Getting this to work would be awesome! Regarding the Coulomb the simplest solution to get something working is probably to just do a damped Coulomb. For the set of q points, I'm not sure a specific set needs to be computed, can't you just use the existing kpoint grid? Or do you mean in the presence of symmetries? Note also that phonons are being actively worked on (cc @epolack), they might share some of the technology? Feel free to get in touch (here, by email or on zulip) |
Thanks for the reply! I will try to pick it up and extend the functionality to multiple k points.
Yes, the existing grid can be used, but if the actual kpoints are reduced by symmetry only those in the irreducible BZ are calculated. However, the double summation requires the full grid to be used for the q points. So for each q we need to get its wave function from the symmetry related k point. This requires some transformation of the wave function (see https://docs.abinit.org/theory/wavefunctions/#symmetry-properties).
Good call, I will take a look there. |
I have not looked closely if symmetries can be used for exchange computations, presumably they can and then the symmetric structure can be used? We use things like apply_symop (in symmetries.jl) to convert when needed. If they can't (or as a first step before tackling the symmetries), it's reasonable to just do a fully non-symmetry-adapted calculation (symmetries=false in Model()). See also unfold_bz(scfres) in symmetry.jl. |
Yes, sorry for letting this drag on @mfherbst and @antoine-levitt , I just could not find the time to get it working. Thank you for taking over the topic, @zhubonan. And of course you can use whatever code is useful from this PR. |
Superseeded by #942. |
Started work at the DFTK Summer School with @rashidrafeek and @ChRickert in response to issue #530.