Fix Fermi level variation at zero temperature#1059
Fix Fermi level variation at zero temperature#1059niklasschmitz wants to merge 103 commits intomasterfrom
Conversation
|
It's fair to move epsF as well for consistency , although you shouldn't depend on its result for anything (since it's just a convention) If there is no gap at zero temperature, the system is not well behaved and we just have to tell the user to add temperature (currently; this may eventually change) |
|
I think it's even worse, since the problem even appears in a system with a large gap: In the case that either HOMO or LUMO has a degeneracy (e.g. GaAs band structure at gamma point) which splits due to an external perturbation (for example due to strain, breaking lattice symmetry - something I am currently looking at, so that's how I got here :) ). |
|
Ah, I see what you mean. Why do you care about this anyway? the variations of eps_F are not observable |
|
I'm thinking about applications of AD to inverse design problems for engineering band structure properties. That led me to correctness questions around our AD ForwardDiff SCF rule in particular for bands & fermi level. Since at zero temperature |
Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 1 to 2. - [Release notes](https://github.com/julia-actions/setup-julia/releases) - [Changelog](https://github.com/julia-actions/setup-julia/blob/master/devdocs/making_a_new_release.md) - [Commits](julia-actions/setup-julia@v1...v2) --- updated-dependencies: - dependency-name: julia-actions/setup-julia dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Port XC term instantiation and forces to GPU * Implemented suggested changes * Type instabilit yfix * Suggested changes + fix type instability --------- Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
* Extend GPU documentation * fix * GPU doc up
* Add failing testcases for strain DFPT * Make ResponseOptions verbose=true default, as for SCF * Adjust tolerance on strain-forwarddiff test * Fix ForwardDiff response for strain perturbation * Replace deepcopy by type promotion in allocating Hamiltonian multiplication * Update comment on *(H, ψ) allocation + type promotion * Add anisotropic strain ForwardDiff case * Simplify basis response combination of explicit (basis_dual) and implicit (\delta results) contributions
…1078) Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
…existing compat) (#1091) Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org>
BTW, naming the term Entropy is confusing, because what's computed is -TS, not S. Should we rename it to Entropic?
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…or stopping criterion (#1175) Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
Co-authored-by: Bruno Ploumhans <Technici4n@users.noreply.github.com>
…om Julia 1.12 onwards (#1186)
* Increase GPU robustness of LOBPCG * Introduce safe_cholesky function in LOBPCG * Add reference to CUDA.jl issue
--------- Co-authored-by: Bruno Ploumhans <13494793+Technici4n@users.noreply.github.com> Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
Co-authored-by: Michael F. Herbst <info@michael-herbst.com>
…cupation sensitivities
This is a problem I encountered from AD, but the underlying problem seems to lie in
src/response/chi0.jl:Currently, for zero temperature the variation of the Fermi level returned by$\varepsilon_F = (HOMO + LUMO)/2$ which we also use in DFTK (cf src/occupation.jl), and disagrees with finite differences.
apply_χ0_4Pis always exactly zero (see chi0.jl). This is inconsistent with the zero-temperature convention to define the Fermi level asHowever, another problem to anticipate is that the zero-temperature definition will be non-differentiable at eigenvalue crossings. I'm not yet sure what the best solution is in such a case. Maybe we can throw a warning if we have near-degenerate eigenvalues at HOMO or LUMO with very different derivatives, indicating an eigenvalue splitting.
TODO list:
apply_χ0_4Pfor the variationδεFof the Fermi level against finite differences.