# Charge-transfer excitations: PDSCF and MOM :::{admonition} Video :class: tip [Watch the narrated video of this tutorial on YouTube](https://www.youtube.com/@electronicstructurelab). ::: :::{admonition} In this tutorial :class: tip In a charge-transfer (CT) excitation an electron moves from a donor to an acceptor molecule. Linear-response TDDFT with semilocal functionals gets these states badly wrong. You compute the NH$_3\to$F$_2$ CT excitation with perturbative $\Delta$SCF (PDSCF), check it against the published value, and follow it as the molecules move apart. You then compare with the constrained hole–particle SCF, the maximum-overlap $\Delta$SCF method and TDDFT. **Time:** about 1 s per run, 2 minutes for the whole distance scan (32 cores). **Files:** {download}`nh3f2_pdscf_8.yaml `, {download}`nh3f2_pdscf_8.out ` (reference output), {download}`nh3f2_template.yaml ` (distance scan), exercise inputs `files/nh3f2_{chp,tddft,mom_M,mom_T}_8.yaml`, {download}`run.sh `. ::: ## Why charge transfer is special When an electron moves from a donor D to an acceptor A that are a distance $R$ apart, the excitation energy is, for large $R$, $$ E_{\rm CT}(R) \approx {\rm IP}_D - {\rm EA}_A - \frac{1}{R}, $$ the energy to ionize D, minus the energy gained by charging A, minus the attraction of the resulting ion pair. Linear-response TDDFT with a semilocal or global-hybrid functional misses the $-1/R$ term entirely. It puts the CT state close to the Kohn–Sham orbital energy difference $\varepsilon_{\rm LUMO}(A)-\varepsilon_{\rm HOMO}(D)$, which is much too small. $\Delta$SCF methods avoid this. They compute the excited state as a self-consistent determinant with one electron moved, so the electron and the hole relax and attract each other. ## Perturbative ΔSCF PDSCF (Baruah, Olguin and Zope, *J. Chem. Phys.* **137**, 084316 (2012)) builds the excited determinant from the converged ground-state orbitals in one step. It applies a first-order orbital update $\Delta H = \alpha\,(H_{\rm ex}-H_g)$ and chooses $\alpha$ to minimize the energy. There is no SCF loop, so the state cannot collapse to the ground state. For a closed-shell molecule it runs two states: - the mixed state M, $\alpha$ hole $\to$ $\alpha$ particle; - the triplet T, $\beta$ hole $\to$ $\alpha$ particle. It reports the spin-purified singlet $E_S = 2E_M - E_T$. ## The input file ```yaml system: charge: 0 unpaired_electrons: 0 units: angstrom functional: exchange: pbe correlation: pbe basis: name: def2-mTZVP file: basis/def2-mTZVP.nw scf: conv_tol: 1.0e-8 pdscf: spin_purify: true atoms: - element: N position: [0.000000, 0.000000, 0.000000] - element: H position: [0.937530, 0.000000, -0.381028] - element: H position: [-0.468765, 0.811924, -0.381028] - element: H position: [-0.468765, -0.811924, -0.381028] - element: F position: [0.000000, 0.000000, 7.294000] - element: F position: [0.000000, 0.000000, 8.706000] ``` NH$_3$ and F$_2$ are 8 Å apart along $z$. The `pdscf` section runs after the ground-state SCF. The default hole is the HOMO and the default particle the LUMO; `hole` and `particle` select other orbitals. :::{admonition} Check where the orbitals are :class: warning For a CT state the hole must sit on the donor and the particle on the acceptor. Here the HOMO is the NH$_3$ lone pair and the LUMO the F$_2$ $\sigma^*$, so HOMO $\to$ LUMO is the intended transfer. In other complexes the frontier orbitals can be on the wrong fragments: in C$_2$H$_4$–C$_2$F$_4$ the C$_2$H$_4\to$C$_2$F$_4$ transfer is orbital 31 $\to$ 34, not 32 $\to$ 33. Check the orbitals (cube files, tutorial 1) and set `hole:` and `particle:`. ::: ## Running ```bash $ OMP_NUM_THREADS=16 ./run_dft tutorials/11_pdscf/files/nh3f2_pdscf_8.yaml > nh3f2_pdscf_8.out ``` ## Reading the output ```text Perturbative DeltaSCF (Baruah, Olguin, Zope, JCP 137, 084316) mixed state M: alpha hole -> alpha particle perturbative DeltaSCF: hole (spin 1, #14) -> particle (spin 1, #15 eps_hole = -5.8631 eV, eps_particle = -5.6459 eV E_ground = -255.9190118600 E_rigid (a=0) = -255.4010664452 excitation 14.0940 eV alpha E(alpha) (Ha) excitation (eV) 0.0000 -255.4010664455 14.09401 1.0000 -255.2258691394 18.86137 0.5000 -255.5721205483 9.43939 0.4153 -255.5786601292 9.26144 0.4194 -255.5786825372 9.26083 alpha_opt = 0.4194 E_excited = -255.5786825372 excitation energy = 9.2608 eV retraction checks: max|| = 3.47E-18, max |U^T U - 1| = 2.89E-15 ... E_exc(M) = 9.2608 eV E_exc(T) = 9.2604 eV E_exc(S) = 2M - T = 9.2613 eV ``` - **The hole and particle orbital energies differ by only 0.22 eV**, but the excitation costs 9.26 eV. The orbital gap says nothing about a CT excitation. - **The rigid excitation is far too high.** `E_rigid` moves the electron without letting anything relax, which costs 14.1 eV. - **The line search over $\alpha$ relaxes it to 9.26 eV.** The retraction checks confirm that the excited determinant is orthogonal to the ground state, to machine precision. - **M and T coincide.** The hole and the particle are 8 Å apart, so their exchange interaction vanishes, and so does the singlet–triplet splitting. $E_S = 9.26$ eV agrees with the published 9.25 eV. ## Distance dependence `run.sh` repeats the calculation for $R=6$, 8, 10 and 15 Å (from `files/nh3f2_template.yaml`). For each distance it runs one-step PDSCF, the constrained hole–particle SCF (CHP, exercise 1) and TDDFT (exercise 2): ```{figure} figures/ct_vs_distance.png :width: 90% CT excitation energy against the NH$_3$–F$_2$ distance. CHP follows $a+b/R$ with $b=-13.9$ eV·Å, close to the $-14.4$ eV·Å of two point charges. TDDFT stays near zero and even decreases with $R$. ``` | $R$ (Å) | one-step PDSCF | CHP | TDDFT (PBE) | |---|---|---|---| | 6 | (15.60) | 8.52 | 0.36 | | 8 | 9.26 | 9.11 | 0.22 | | 10 | 9.60 | 9.45 | 0.17 | | 15 | 10.05 | 9.91 | 0.13 | - **CHP** is self-consistent: the excited state is fully relaxed, 0.15 eV below the one-step value. It has the $-1/R$ behaviour of an ion pair. - **One-step PDSCF** follows the same curve from 8 Å on. At 6 Å the hole and particle orbitals are almost degenerate (0.34 eV apart), and the one-step update of the mixed state breaks down. CHP is the method for such cases. - **TDDFT puts the CT state at the orbital energy difference**: 0.1–0.4 eV instead of 9–10 eV, shrinking as the fragments separate. ## Things to try ### 1. Constrained hole–particle SCF `chp: true` (`files/nh3f2_chp_8.yaml`) relaxes the hole and particle self-consistently under orthogonality constraints (Evangelista et al. 2013) and follows the particle by maximum overlap, so it cannot slide down to the ground state. :::{dropdown} What you should find At 8 Å: M = T = $E_S$ = 9.114 eV, 0.15 eV below the one-step value. CHP starts from the one-step state. If it ends above the one-step energy, which cannot happen for the intended state, it retries from the rigid determinant and keeps the lower result (`chp_start: auto`, the default). At 6 Å this retry is what gives the correct 8.54 eV mixed state. ::: ### 2. Linear-response TDDFT `files/nh3f2_tddft_8.yaml` runs PBE TDDFT (tutorial 5) for the complex. :::{dropdown} What you should find ```text state omega (Ha) omega (eV) f (length) dominant transition (weight) 1 0.00798451 0.21727 0.00000 occ 14 -> virt 1 ( 1.000) ``` The lowest root is the CT transition, the NH$_3$ lone pair to the F$_2$ $\sigma^*$, at 0.22 eV: the Kohn–Sham orbital energy difference, 9 eV too low. With a semilocal kernel the coupling between two orbitals that do not overlap vanishes, so TDDFT cannot add the electron–hole attraction or the orbital relaxation. Range-separated hybrids repair part of this; $\Delta$SCF methods include it by construction. ::: ### 3. ΔSCF with the maximum overlap method `files/nh3f2_mom_M_8.yaml` and `files/nh3f2_mom_T_8.yaml` run the M and T states as ordinary SCFs with `moment_mode: mom`. They occupy the chosen orbitals and follow them by maximum overlap from iteration to iteration. ```yaml scf: moment_mode: mom occ_alpha: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15] # alpha HOMO (14) -> LUMO (15) occ_beta: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] ``` :::{dropdown} What you should find Both converge to $E=-255.58402$ Ha, an excitation of 9.116 eV, within 2 meV of CHP. MOM and CHP reach the same relaxed state. Plain `moment_mode: fixed_occupation` oscillates for this complex, because the hole and particle orbitals change order as the charge separates. Tracking them by overlap is what makes $\Delta$SCF work for CT states. ::: ## Troubleshooting - **The state is not the one you wanted.** Check hole and particle orbitals on the fragments, and set `hole:` and `particle:`. - **One-step M and T very different for a long-range CT state.** The one-step update failed (near-degenerate hole and particle). Use `chp: true`. - **Core excitations.** These need a basis whose core can relax (`uncontract: true` on the excited atom; User Manual, `pdscf` section). - **Not available.** Hartree–Fock references, level shifts and `moment_mode` other than `fixed` are refused for the ground state. **Next:** {doc}`../12_solvation/index`.