{ "cells": [ { "cell_type": "markdown", "id": "f7cdf3ab", "metadata": {}, "source": [ "# Hartree-Fock Method\n", "\n", "The Hartree-Fock (HF) method is the foundation of modern electronic structure theory. It provides a mean-field approximation to the many-electron Schrödinger equation by approximating the wavefunction as a Slater determinant of one-electron orbitals.\n", "\n", "This notebook covers:\n", "\n", "1. **Basic Theory** - The Hartree-Fock approximation\n", "2. **Initial Guess** - Methods for starting the SCF procedure\n", "3. **Restricted Hartree-Fock (RHF)** - For closed-shell systems\n", "4. **Unrestricted Hartree-Fock (UHF)** - For open-shell systems\n", "5. **Restricted Open-shell Hartree-Fock (ROHF)** - For open-shell systems with spatial symmetry\n", "6. **Practical Examples** - Using MiniHF's HFSolver" ] }, { "cell_type": "markdown", "id": "basic-theory", "metadata": {}, "source": [ "## 1. Hartree-Fock Theory\n", "\n", "### The Many-Electron Problem\n", "\n", "The time-independent Schrödinger equation for a molecule with $N$ electrons is:\n", "\n", "$$\n", "\\hat{H} \\Psi = E \\Psi\n", "$$\n", "\n", "where the Hamiltonian operator is:\n", "\n", "$$\n", "\\hat{H} = -\\frac{1}{2} \\sum_{i=1}^N \\nabla_i^2 - \\sum_{i=1}^N \\sum_{\\alpha=1}^M \\frac{Z_{\\alpha}}{r_{i\\alpha}} + \\sum_{i=1}^N \\sum_{j>i}^N \\frac{1}{r_{ij}}\n", "$$\n", "\n", "### The Hartree-Fock Approximation\n", "\n", "The HF method approximates the many-electron wavefunction as a Slater determinant of spin-orbitals:\n", "\n", "$$\n", "\\Psi_{HF} = \\frac{1}{\\sqrt{N!}} \\begin{vmatrix}\n", "\\phi_1(\\mathbf{r}_1, \\sigma_1) & \\phi_2(\\mathbf{r}_1, \\sigma_1) & \\cdots & \\phi_N(\\mathbf{r}_1, \\sigma_1) \\\\\n", "\\phi_1(\\mathbf{r}_2, \\sigma_2) & \\phi_2(\\mathbf{r}_2, \\sigma_2) & \\cdots & \\phi_N(\\mathbf{r}_2, \\sigma_2) \\\\\n", "\\vdots & \\vdots & \\ddots & \\vdots \\\\\n", "\\phi_1(\\mathbf{r}_N, \\sigma_N) & \\phi_2(\\mathbf{r}_N, \\sigma_N) & \\cdots & \\phi_N(\\mathbf{r}_N, \\sigma_N)\n", "\\end{vmatrix}\n", "$$\n", "\n", "### The Fock Matrix\n", "\n", "Minimizing the energy leads to the **Hartree-Fock equations**:\n", "\n", "$$\n", "\\hat{F} \\phi_i = \\epsilon_i \\phi_i\n", "$$\n", "\n", "where $\\hat{F}$ is the Fock operator:\n", "\n", "$$\n", "\\hat{F}(\\mathbf{r}) = \\hat{h}(\\mathbf{r}) + \\sum_{j=1}^N \\left[ \\hat{J}_j(\\mathbf{r}) - \\hat{K}_j(\\mathbf{r}) \\right]\n", "$$\n", "\n", "with:\n", "- $\\hat{h}(\\mathbf{r})$: One-electron Hamiltonian (kinetic + nuclear attraction)\n", "- $\\hat{J}_j(\\mathbf{r})$: Coulomb operator (classical electron repulsion)\n", "- $\\hat{K}_j(\\mathbf{r})$: Exchange operator (quantum mechanical exchange)\n", "\n", "### Matrix Formulation\n", "\n", "In a basis set $\\{\\chi_{\\mu}\\}$, the HF equations become:\n", "\n", "$$\n", "\\sum_{\\nu} F_{\\mu\\nu} C_{\\nu i} = \\epsilon_i \\sum_{\\nu} S_{\\mu\\nu} C_{\\nu i}\n", "$$\n", "\n", "where:\n", "- $F_{\\mu\\nu}$: Fock matrix element\n", "- $S_{\\mu\\nu}$: Overlap matrix element\n", "- $C_{\\nu i}$: Molecular orbital coefficient\n", "- $\\epsilon_i$: Orbital energy" ] }, { "cell_type": "markdown", "id": "dbdde824", "metadata": {}, "source": [ "## 2. Initial Guess\n", "\n", "The Hartree-Fock equations are solved iteratively through the Self-Consistent Field (SCF) procedure, which requires an initial guess for the molecular orbital coefficients. The quality of this initial guess matters significantly for three reasons: \n", "\n", "- **Convergence**: A good guess reduces the number of SCF iterations\n", "- **Stability**: A poor guess may lead to convergence to a local minimum\n", "- **Performance**: Some guesses work better for specific systems (e.g., transition metals)\n", "\n", "### Naive Initial Guess Methods\n", "\n", "These methods are computationally inexpensive and easy to implement, but often yield poor convergence or converge to local minima. **Thus, this project implements only the naive initial guess approaches** (Core Hamiltonian, Hückel, and Extended Hückel) as described below. \n", "\n", "#### 2.1 Core Hamiltonian Guess\n", "\n", "The simplest *ab initio* guess. It neglects all electron–electron repulsion and uses only one‑electron terms.\n", "\n", "**Procedure**:\n", "1. Compute the core Hamiltonian matrix \n", " $\\mathbf{H}_{\\text{core}} = \\mathbf{T} + \\mathbf{V}_{\\text{ne}}$, where \n", " $\\mathbf{T}$ = kinetic energy, $\\mathbf{V}_{\\text{ne}}$ = nuclear attraction.\n", "2. Solve the generalized eigenvalue problem \n", " $\\mathbf{H}_{\\text{core}} \\mathbf{C} = \\mathbf{S} \\mathbf{C} \\epsilon$.\n", "3. Use the resulting coefficients $\\mathbf{C}$ as the initial MO guess.\n", "\n", "> **Note**: This guess is very crude. It contains no electron‑electron repulsion, so it often fails for metals, small gap systems, or when SCF is near instabilities.\n", "\n", "#### 2.2 Simple Hückel Guess (Non‑iterative)\n", "\n", "A semi‑empirical π‑electron method. Not commonly used as a standalone HF initial guess today, but historically relevant.\n", "\n", "**Form** (for planar π systems): \n", "- Set $\\mathbf{H}_{ii} = \\alpha$, $\\mathbf{H}_{ij} = \\beta$ (if bonded) \n", "- Solve $\\mathbf{H}^{\\text{Hückel}} \\mathbf{C} = \\mathbf{S}^{\\text{Hückel}} \\mathbf{C} \\epsilon$ \n", " (often $\\mathbf{S} = \\mathbf{I}$ is assumed)\n", "\n", "> **Limitation**: Only π electrons, empirical parameters, not suitable for general HF initial guesses.\n", "\n", "#### 2.3 Extended Hückel Guess (EHT)\n", "\n", "Uses empirical atom‑specific parameters ($H_{ii}$ = valence orbital ionization energy) and a distance‑dependent off‑diagonal term (e.g., Wolfsberg–Helmholz formula).\n", "\n", "**Features**:\n", "- Includes all valence electrons.\n", "- Constructs a modified $\\mathbf{H}^{\\text{EHT}}$, then solves $\\mathbf{H}^{\\text{EHT}} \\mathbf{C} = \\mathbf{S} \\mathbf{C} \\epsilon$.\n", "- Provides a much better initial guess than the core Hamiltonian, especially for **organic molecules** and transition metal complexes.\n", "\n", "> **Advantage over core guess**: It mimics some effective potential via empirical data, reducing SCF oscillations. Many modern codes (e.g., ORCA, XTB) use variants of EHT‑like guesses as default.\n", "\n", "\n", "\n", "
\n", "
\n", " 📋 Advanced Initial Guess\n", "
\n", "
\n", " \n", "
\n", "
\n", "\n" ] }, { "cell_type": "markdown", "id": "f8120758", "metadata": {}, "source": [ "## 3. Restricted Hartree-Fock (RHF)\n", "\n", "RHF is used for **closed-shell systems** where all electrons are paired (even number of electrons, singlet spin state).\n", "\n", "### Key Features of RHF\n", "\n", "1. **Spin Restriction**: $\\alpha$ and $\\beta$ spin orbitals share the same spatial part:\n", "\n", " $$\n", " \\phi_i^{\\alpha}(\\mathbf{r}, \\sigma) = \\psi_i(\\mathbf{r}) \\alpha(\\sigma)\n", " $$\n", " $$\n", " \\phi_i^{\\beta}(\\mathbf{r}, \\sigma) = \\psi_i(\\mathbf{r}) \\beta(\\sigma)\n", " $$\n", "\n", "2. **Density Matrix**: A single density matrix describes both spins:\n", "\n", " $$\n", " P_{\\mu\\nu} = 2 \\sum_{i=1}^{N/2} C_{\\mu i} C_{\\nu i}^*\n", " $$\n", "\n", "3. **Fock Matrix**: Simplified due to spin restriction:\n", "\n", " $$\n", " F_{\\mu\\nu} = H_{\\mu\\nu}^{core} + \\sum_{\\lambda\\sigma} P_{\\lambda\\sigma} \\left[ (\\mu\\nu|\\lambda\\sigma) - \\frac{1}{2} (\\mu\\lambda|\\nu\\sigma) \\right]\n", " $$\n", "\n", "### RHF SCF Algorithm\n", "\n", "1. **Initialize**: Compute integrals and form initial guess for $\\mathbf{C}$\n", "2. **Build Density**: $P_{\\mu\\nu} = 2 \\sum_{i=1}^{N/2} C_{\\mu i} C_{\\nu i}^*$\n", "3. **Build Fock Matrix**: $\\mathbf{F} = \\mathbf{H}_{core} + \\mathbf{J} - \\frac{1}{2}\\mathbf{K}$\n", "4. **Solve Roothaan Equations**: $\\mathbf{F} \\mathbf{C} = \\mathbf{S} \\mathbf{C} \\mathbf{\\epsilon}$\n", "5. **Compute New Density**: $\\mathbf{P}^{new}$ from new $\\mathbf{C}$\n", "6. **Check Convergence**: Compare $\\mathbf{P}^{new}$ with $\\mathbf{P}^{old}$\n", "7. **Iterate**: Repeat until convergence\n", "\n", "### Convergence Criteria\n", "\n", "- **Density convergence**: $||\\mathbf{P}^{new} - \\mathbf{P}^{old}|| < 10^{-8}$\n", "- **Energy convergence**: $|E^{new} - E^{old}| < 10^{-10}$ Hartree\n", "- **Maximum iterations**: Typically 50-200" ] }, { "cell_type": "markdown", "id": "0bfe90a9", "metadata": {}, "source": [ "## 4. Unrestricted Hartree-Fock (UHF)\n", "\n", "UHF is used for **open-shell systems** where electrons are not all paired (odd number of electrons or triplet states).\n", "\n", "### Key Features of UHF\n", "\n", "1. **Spin Unrestriction**: $\\alpha$ and $\\beta$ spin orbitals have different spatial parts:\n", "\n", " $$\n", " \\phi_i^{\\alpha}(\\mathbf{r}, \\sigma) = \\psi_i^{\\alpha}(\\mathbf{r}) \\alpha(\\sigma)\n", " $$\n", " $$\n", " \\phi_i^{\\beta}(\\mathbf{r}, \\sigma) = \\psi_i^{\\beta}(\\mathbf{r}) \\beta(\\sigma)\n", " $$\n", "\n", "2. **Separate Density Matrices**: One for each spin:\n", "\n", " $$\n", " P_{\\mu\\nu}^{\\alpha} = \\sum_{i=1}^{N_{\\alpha}} C_{\\mu i}^{\\alpha} C_{\\nu i}^{\\alpha *}\n", " $$\n", " $$\n", " P_{\\mu\\nu}^{\\beta} = \\sum_{i=1}^{N_{\\beta}} C_{\\mu i}^{\\beta} C_{\\nu i}^{\\beta *}\n", " $$\n", "\n", "3. **Separate Fock Matrices**: One for each spin:\n", "\n", " $$\n", " F_{\\mu\\nu}^{\\alpha} = H_{\\mu\\nu}^{core} + \\sum_{\\lambda\\sigma} (P_{\\lambda\\sigma}^{\\alpha} + P_{\\lambda\\sigma}^{\\beta}) (\\mu\\nu|\\lambda\\sigma) - \\sum_{\\lambda\\sigma} P_{\\lambda\\sigma}^{\\alpha} (\\mu\\lambda|\\nu\\sigma)\n", " $$\n", " $$\n", " F_{\\mu\\nu}^{\\beta} = H_{\\mu\\nu}^{core} + \\sum_{\\lambda\\sigma} (P_{\\lambda\\sigma}^{\\alpha} + P_{\\lambda\\sigma}^{\\beta}) (\\mu\\nu|\\lambda\\sigma) - \\sum_{\\lambda\\sigma} P_{\\lambda\\sigma}^{\\beta} (\\mu\\lambda|\\nu\\sigma)\n", " $$\n", "\n", "### UHF vs RHF\n", "\n", "| Property | RHF | UHF |\n", "|----------|-----|-----|\n", "| Spin Restriction | $\\alpha=\\beta$ | $\\alpha\\neq\\beta$ |\n", "| Density Matrices | 1 | 2 |\n", "| Fock Matrices | 1 | 2 |\n", "|Applicable System|Closed-Shell|Open-Shell|\n", "| Spin Contamination | None | May occur |\n", "\n", "### Spin Contamination\n", "\n", "UHF wavefunctions can be contaminated with higher spin states:\n", "\n", "$$\n", "\\langle S^2 \\rangle = S(S+1) + \\delta S\n", "$$\n", "where $\\delta S > 0$ is the spin contamination." ] }, { "cell_type": "markdown", "id": "997b5810", "metadata": {}, "source": [ "## 5. Restricted Open-shell Hartree-Fock (ROHF)\n", "\n", "ROHF is a compromise between RHF and UHF for open-shell systems.\n", "\n", "### Key Features of ROHF\n", "\n", "1. **Partial Spin Restriction**: Core orbitals are doubly occupied with same spatial function, virtual orbitals are unoccupied. Only the open-shell orbitals have different $\\alpha$ and $\\beta$ occupation.\n", "\n", "2. **Avoids Spin Contamination**: Maintains spatial symmetry while handling open-shell character.\n", "\n", "3. **More Complex Equations**: Requires separate treatment of core, open-shell, and virtual orbitals.\n", "\n", "### ROHF Energy Expression\n", "\n", "$$\n", "E_{ROHF} = \\sum_{i}^{core} 2 \\langle \\psi_i | \\hat{h} | \\psi_i \\rangle + \\sum_{i}^{open} \\langle \\psi_i^{\\alpha} | \\hat{h} | \\psi_i^{\\alpha} \\rangle + \\sum_{i}^{open} \\langle \\psi_i^{\\beta} | \\hat{h} | \\psi_i^{\\beta} \\rangle\n", "$$\n", "\n", "plus Coulomb and exchange terms.\n", "\n", "### When to Use ROHF\n", "\n", "- Open-shell systems where spin contamination is a concern\n", "- Systems with high symmetry\n", "- Transition metal complexes with unpaired electrons" ] }, { "cell_type": "markdown", "id": "e086d803", "metadata": {}, "source": [ "## 6. Generalized Hartree-Fock (GHF)\n", "\n", "GHF is the most general form of Hartree-Fock theory.\n", "\n", "### Key Features of GHF\n", "\n", "1. **No Spin Restrictions**: Orbitals can be arbitrary linear combinations of $\\alpha$ and $\\beta$ spins:\n", "\n", " $$\n", " \\phi_i(\\mathbf{r}, \\sigma) = \\psi_i^{\\alpha}(\\mathbf{r}) \\alpha(\\sigma) + \\psi_i^{\\beta}(\\mathbf{r}) \\beta(\\sigma)\n", " $$\n", "\n", "2. **Complex Orbitals**: GHF orbitals are generally complex-valued.\n", "\n", "3. **Most Flexible**: Can describe any spin state.\n", "\n", "### GHF Density Matrix\n", "\n", "The density matrix becomes a 2x2 matrix in spin space:\n", "\n", "$$\n", "\\mathbf{P} = \\begin{pmatrix}\n", "\\mathbf{P}^{\\alpha\\alpha} & \\mathbf{P}^{\\alpha\\beta} \\\\\n", "\\mathbf{P}^{\\beta\\alpha} & \\mathbf{P}^{\\beta\\beta}\n", "\\end{pmatrix}\n", "$$\n", "\n", "### When to Use GHF\n", "\n", "- Systems with strong spin-orbit coupling\n", "- Systems where spatial symmetry is broken\n", "- Theoretical studies of spin dynamics\n", "\n", "### Drawbacks of GHF\n", "\n", "- Computationally more expensive\n", "- Complex-valued orbitals\n", "- Less commonly implemented" ] }, { "cell_type": "markdown", "id": "practical-examples", "metadata": {}, "source": [ "## 7. Practical Examples with MiniHF\n", "\n", "Let's demonstrate the Hartree-Fock solver in MiniHF with practical examples." ] }, { "cell_type": "code", "execution_count": 12, "id": "setup", "metadata": {}, "outputs": [], "source": [ "# Import required modules\n", "from minihf.molecule import Molecule\n", "from minihf.basis import BasisSet\n", "from minihf.hamiltonian import Hamiltonian\n", "from minihf.scf.hf_solver import HFSolver\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 10, "id": "rhf-example", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "--- RHF Calculation: Water Molecule ---\n", "Molecule: Water (H2O)\n", "Basis set: STO-3G\n", "Number of basis functions: 7\n", "\n", "Total energy: -73.218632 Hartree\n", "Electronic energy: -90.581924 Hartree\n", "Nuclear repulsion: 17.363292 Hartree\n", "\n", "Molecular orbital energies (eV):\n", " MO 1: -556.8357 eV\n", " MO 2: -45.9198 eV\n", " MO 3: -25.6964 eV\n", " MO 4: -15.9000 eV\n", " MO 5: -14.8850 eV\n", " MO 6: 26.9861 eV\n", " MO 7: 40.8066 eV\n", "\n", "HOMO energy: -14.8850 eV\n", "LUMO energy: 26.9861 eV\n", "HOMO-LUMO gap: 41.8711 eV\n" ] } ], "source": [ "# Example 1: RHF calculation for water (closed-shell)\n", "print(\"\\n--- RHF Calculation: Water Molecule ---\")\n", "\n", "# Create water molecule\n", "h2o_atoms = ['O 0.0, 0.0, 0.0', 'H 0.0, -0.757, 0.587', 'H 0.0, 0.757, 0.587']\n", "h2o = Molecule.build(atoms=h2o_atoms, charge=0, multiplicity=1)\n", "\n", "# Build basis set\n", "h2o_basis = BasisSet.build(h2o, 'sto-3g.nwchem')\n", "\n", "# Build Hamiltonian\n", "h2o_ham = Hamiltonian.build(h2o, h2o_basis)\n", "\n", "# Create HF solver and run RHF\n", "hf_solver = HFSolver(h2o_ham)\n", "rhf_results = hf_solver.rhf()\n", "\n", "# Print results\n", "print(f\"Molecule: Water (H2O)\")\n", "print(f\"Basis set: STO-3G\")\n", "print(f\"Number of basis functions: {len(h2o_basis)}\")\n", "print(f\"\\nTotal energy: {rhf_results['energy_total']:.6f} Hartree\")\n", "print(f\"Electronic energy: {rhf_results['energy_elec']:.6f} Hartree\")\n", "print(f\"Nuclear repulsion: {rhf_results['energy_nuc']:.6f} Hartree\")\n", "\n", "# Print orbital energies\n", "print(\"\\nMolecular orbital energies (eV):\")\n", "for i, energy in enumerate(rhf_results['mo_energy']):\n", " print(f\" MO {i+1}: {energy * 27.2114:>8.4f} eV\")\n", "\n", "# HOMO-LUMO gap\n", "homo_idx = 4 # Water has 10 electrons = 5 occupied MOs (0-indexed: 0-4)\n", "homo_energy = rhf_results['mo_energy'][homo_idx] * 27.2114\n", "lumo_energy = rhf_results['mo_energy'][homo_idx + 1] * 27.2114\n", "print(f\"\\nHOMO energy: {homo_energy:.4f} eV\")\n", "print(f\"LUMO energy: {lumo_energy:.4f} eV\")\n", "print(f\"HOMO-LUMO gap: {lumo_energy - homo_energy:.4f} eV\")" ] }, { "cell_type": "code", "execution_count": 11, "id": "uhf-example", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "--- UHF Calculation: Methyl Radical ---\n", "Molecule: Methyl Radical (CH3)\n", "Basis set: STO-3G\n", "Multiplicity: 2 (doublet)\n", "Number of basis functions: 8\n", "\n", "Total energy: -37.146975 Hartree\n", "Electronic energy: -55.355186 Hartree\n", "Nuclear repulsion: 18.208211 Hartree\n", "\n", "Orbital energies (eV):\n", "MO Alpha Beta Difference \n", "---------------------------------------------\n", "1 -311.4240 -310.6645 -0.7594 \n", "2 -34.2493 -32.0569 -2.1924 \n", "3 -22.5441 -21.5784 -0.9657 \n", "4 -22.5441 -21.5784 -0.9657 \n", "5 -16.0028 3.3759 -19.3788 \n", "6 39.3965 40.4194 -1.0229 \n", "7 39.3965 40.4194 -1.0229 \n", "8 51.8817 53.5871 -1.7053 \n" ] } ], "source": [ "# Example 2: UHF calculation for methyl radical (open-shell)\n", "print(\"\\n--- UHF Calculation: Methyl Radical ---\")\n", "\n", "# Create methyl radical (CH3)\n", "ch3_atoms = ['C 0.0, 0.0, 0.0', 'H 0.629, 0.629, 0.629', 'H -0.629, -0.629, 0.629', 'H -0.629, 0.629, -0.629']\n", "ch3 = Molecule.build(atoms=ch3_atoms, charge=0, multiplicity=2) # Doublet state\n", "\n", "# Build basis set\n", "ch3_basis = BasisSet.build(ch3, 'sto-3g.nwchem')\n", "\n", "# Build Hamiltonian\n", "ch3_ham = Hamiltonian.build(ch3, ch3_basis)\n", "\n", "# Create HF solver and run UHF\n", "hf_solver = HFSolver(ch3_ham)\n", "uhf_results = hf_solver.uhf()\n", "\n", "# Print results\n", "print(f\"Molecule: Methyl Radical (CH3)\")\n", "print(f\"Basis set: STO-3G\")\n", "print(f\"Multiplicity: {ch3.multiplicity} (doublet)\")\n", "print(f\"Number of basis functions: {len(ch3_basis)}\")\n", "print(f\"\\nTotal energy: {uhf_results['energy_total']:.6f} Hartree\")\n", "print(f\"Electronic energy: {uhf_results['energy_elec']:.6f} Hartree\")\n", "print(f\"Nuclear repulsion: {uhf_results['energy_nuc']:.6f} Hartree\")\n", "\n", "# Compare alpha and beta orbital energies\n", "print(\"\\nOrbital energies (eV):\")\n", "print(f\"{'MO':<5} {'Alpha':<12} {'Beta':<12} {'Difference':<12}\")\n", "print(\"-\" * 45)\n", "for i, (e_alpha, e_beta) in enumerate(zip(uhf_results['mo_energy'][0], uhf_results['mo_energy'][1])):\n", " diff = (e_alpha - e_beta) * 27.2114\n", " print(f\"{i+1:<5} {e_alpha * 27.2114:<12.4f} {e_beta * 27.2114:<12.4f} {diff:<12.4f}\")\n", "\n", "# Check spin contamination\n", "if 's_squared' in uhf_results:\n", " s_squared = uhf_results['s_squared']\n", " expected = (ch3.multiplicity - 1) * ch3.multiplicity / 4 # S(S+1) for doublet = 0.75\n", " print(f\"\\n = {s_squared:.6f}\")\n", " print(f\"Expected = {expected:.6f}\")\n", " print(f\"Spin contamination = {s_squared - expected:.6f}\")" ] }, { "cell_type": "markdown", "id": "summary", "metadata": {}, "source": [ "## 8. Summary\n", "\n", "In this notebook, we've covered the main variants of the Hartree-Fock method:\n", "\n", "### Method Comparison\n", "\n", "| Method | Description | Best For |\n", "|--------|-------------|----------|\n", "| **RHF** | Restricted Hartree-Fock | Closed-shell systems (even electrons, singlet) |\n", "| **UHF** | Unrestricted Hartree-Fock | Open-shell systems (odd electrons, triplets) |\n", "| **ROHF** | Restricted Open-shell HF | Open-shell systems with symmetry constraints |\n", "| **GHF** | Generalized Hartree-Fock | Systems with strong spin-orbit coupling |\n", "\n", "### Key Takeaways\n", "\n", "1. **SCF Procedure**: HF equations are solved iteratively until self-consistency\n", "2. **Initial Guess**: Important for convergence; core Hamiltonian guess is common\n", "3. **RHF**: Most efficient for closed-shell systems\n", "4. **UHF**: Handles open-shell but may have spin contamination\n", "5. **ROHF**: Balances symmetry and open-shell treatment\n", "6. **GHF**: Most general but computationally expensive" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.12" } }, "nbformat": 4, "nbformat_minor": 5 }