# 9. Local hybrid functionals A local hybrid mixes exact and semilocal exchange with a position-dependent function $a_\sigma(\mathbf r)$ ([Jaramillo, Scuseria, Ernzerhof 2003](#ref-jse03)): $$ E_x=\sum_\sigma\int\Big[a_\sigma(\mathbf r)\,e_{x\sigma}^{\rm ex}(\mathbf r) +\big(1-a_\sigma(\mathbf r)\big)\,e_{x\sigma}^{\rm SL}(\mathbf r)\Big]d\mathbf r . $$ DFTSW27 evaluates the exact-exchange energy density **seminumerically** on the molecular grid ([Plessow and Weigend 2012](#ref-pw12)), without an auxiliary basis, and the SCF is fully self-consistent for closed and open shells. For an overview of the accuracy of local hybrids see [Holzer, Franzke, Kehry 2021](#ref-hfk21). ## Input `exchange` and `correlation` name the semilocal parts; `local_hybrid` selects the mixing function. | Key | Meaning | |---|---| | `local_hybrid: lh07t-svwn` | preset: $b=0.48$, Slater exchange, VWN5 correlation ([Bahmann, Kaupp et al. 2007](#ref-lh07)) | | `local_hybrid: tw_t` | $a=b\,\tau_W/\tau$, with $\tau_W=|\nabla\rho|^2/8\rho$ per spin | | `local_hybrid: constant` | $a=b$: a global hybrid (`lh_b: 0.25` with PBE is PBE0) | | `lh_b` | parameter $b$ (`tw_t`: default 1; `constant`: required) | | `lh_spin` | `resolved` (default; per-spin $\rho_\sigma,\tau_\sigma$) or `common` | | `lh_engine` | `seminumerical` (default) or `poisson` (needs `coulomb: method: poisson`; slower) | | `lh_screen_tol` | screening threshold of the exchange engine, default 1e-10 | The simplest run uses the preset: ```{literalinclude} ../examples/h2o_lh07t.yaml :language: yaml :start-at: "functional:" :end-before: "basis:" ``` An explicit mixing function with PBE: ```{literalinclude} ../examples/h2o_lh_twt.yaml :language: yaml :start-at: "functional:" :end-before: "basis:" ``` ## Checks and results Water, def2-TZVP, same geometry as in {doc}`dft`, exact Coulomb integrals: | Input | Mixing | Total energy (Ha) | |---|---|---| | `h2o_lh07t.yaml` | Lh07t-SVWN preset | −76.2065279 | | `h2o_lh_twt.yaml` | $\tau_W/\tau$, $b=0.5$, PBE | −76.3874083 | | `h2o_lh_const.yaml` | constant $a=0.25$, PBE | −76.3779128 | | `h2o_pbe0.yaml` (libxc) | PBE0 | −76.3779122 | The last two lines are a useful self-test: a local hybrid with constant mixing 0.25 is PBE0, and the seminumerical engine reproduces the integral-based PBE0 to 6 µHa. ## What works and what does not - Analytic gradients, geometry optimizations, the analytic Hessian and IR intensities work with the seminumerical engine and `eri` or RI-J Coulomb. See {doc}`vibrations`. - For larger systems use `coulomb: method: density_fitting` with a J-fitting auxiliary basis (`basis/def2-universal-JFIT.nw`): local-hybrid exchange needs no electron-repulsion integrals, so the Coulomb matrix dominates the cost. - Not available together with SIC, double hybrids, noncollinear mode or PDSCF. - Local hybrids on the Poisson engine have no analytic gradient. Related: {doc}`dft`, {doc}`scf`.