Skip to content

How Restricted Hartree–Fock Works

The Restricted Hartree–Fock (RHF) method determines the ground-state electronic wavefunction of a closed-shell molecule by solving the electronic Schrödinger equation within the mean-field approximation. Instead of treating the instantaneous interactions between all electrons simultaneously, each electron is assumed to move in the average electrostatic field generated by all other electrons.

Since this average field depends on the electron distribution, and the electron distribution depends on the molecular orbitals, the solution must be obtained through an iterative Self-Consistent Field (SCF) procedure.


Step 1 — Read the Molecular Geometry

The calculation begins by reading the molecular geometry supplied in the input file.

For this tutorial, the geometry consists of a water molecule specified in Cartesian coordinates.

O   0.000000   0.000000   0.106830
H   0.000000   0.785178  -0.427319
H   0.000000  -0.785178  -0.427319

ORCA then determines

  • atomic numbers,
  • total molecular charge,
  • spin multiplicity,
  • number of electrons.

For water,

  • Number of atoms = 3
  • Total electrons = 10
  • Charge = 0
  • Multiplicity = 1

These values define the electronic system that will be solved.


Step 2 — Build the Basis Functions

The Schrödinger equation cannot be solved directly for molecules, so ORCA expands every molecular orbital as a linear combination of atomic basis functions.

For this calculation the keyword

def2-SVP

selects the def2-SVP Gaussian basis set.

Each molecular orbital is written as

\[ \psi_i=\sum_{\mu}C_{\mu i}\chi_\mu \]

where

  • \(\chi_\mu\) are basis functions,
  • \(C_{\mu i}\) are molecular orbital coefficients.

For the present calculation ORCA constructs

  • 24 basis functions

which are later combined to form the occupied and virtual molecular orbitals.


Step 3 — Generate an Initial Guess

Before the SCF iterations begin, ORCA requires an approximate electron density.

This initial guess is generated automatically using standard atomic density models.

From this initial density ORCA constructs the first

  • density matrix,
  • Fock matrix,
  • molecular orbitals.

Although the initial orbitals are only approximate, they provide a suitable starting point for the iterative optimization.


Step 4 — Construct the Fock Matrix

Using the current electron density, ORCA constructs the Fock matrix.

The Fock matrix contains three contributions:

  • kinetic energy of the electrons,
  • electron–nuclear attraction,
  • average electron–electron repulsion.

Unlike the core Hamiltonian, the Fock matrix depends on the electron density. Consequently, it changes during every SCF iteration.


Step 5 — Solve the Roothaan Equations

The Fock matrix is diagonalized to obtain a new set of molecular orbitals.

The occupied orbitals are filled according to the Aufbau principle, with two electrons of opposite spin occupying each spatial orbital.

The resulting molecular orbitals are then used to construct a new electron density.


Step 6 — Build a New Density Matrix

After obtaining updated molecular orbitals, ORCA computes a new density matrix.

This density determines

  • electron distribution,
  • electrostatic potential,
  • molecular charge distribution.

Since the density has changed, the Fock matrix must also be rebuilt.


Step 7 — Check for Self-Consistency

The newly generated density matrix is compared with that from the previous iteration.

ORCA monitors quantities such as

  • total electronic energy,
  • change in energy,
  • RMS density change,
  • maximum density change.

If these quantities satisfy the convergence criteria, the SCF procedure terminates.

Otherwise,

  • a new Fock matrix is constructed,
  • the molecular orbitals are updated,
  • another SCF iteration begins.

Modern versions of ORCA accelerate this process using techniques such as DIIS (Direct Inversion in the Iterative Subspace) and SOSCF (Second-Order Self-Consistent Field), which significantly reduce the number of iterations required for convergence.


Step 8 — Compute Molecular Properties

Once the SCF calculation has converged, the optimized wavefunction is used to compute various molecular properties.

Typical quantities include

  • total Hartree–Fock energy,
  • molecular orbital energies,
  • Mulliken charges,
  • Löwdin charges,
  • Mayer bond orders,
  • dipole moment,
  • electron density.

These properties are written to the output file and the accompanying property file.


Step 9 — Save the Wavefunction

Finally, ORCA stores the converged wavefunction in the GBW file.

This file contains

  • molecular orbital coefficients,
  • orbital occupations,
  • basis set information,
  • electron density.

The GBW file can be reused for

  • restarting calculations,
  • molecular orbital visualization,
  • population analysis,
  • subsequent CASSCF,
  • CASPT2,
  • NEVPT2 calculations.

Using the converged RHF wavefunction as the initial guess greatly improves the efficiency of these higher-level methods.


Complete RHF Workflow

The complete RHF calculation performed by ORCA can be summarized as

Read Molecular Geometry
Determine Charge and Multiplicity
Construct Basis Functions
Generate Initial Density Guess
Build Fock Matrix
Diagonalize Fock Matrix
Generate Molecular Orbitals
Construct Density Matrix
Check SCF Convergence
     │             │
     │ No          │ Yes
     ▼             ▼
Build New      Compute Molecular
Fock Matrix    Properties
     │             │
     └──────┬──────┘
 Save Wavefunction (.gbw)
 Reference for CASSCF,
 CASPT2 and NEVPT2

Summary

The Restricted Hartree–Fock method determines the electronic structure of a closed-shell molecule through an iterative self-consistent field procedure. Beginning with an initial estimate of the electron density, ORCA repeatedly constructs the Fock matrix, solves for improved molecular orbitals, and updates the density until self-consistency is achieved. The converged wavefunction provides the molecular orbitals, electron density, and total electronic energy, and serves as the reference for more advanced correlated methods such as CASSCF, CASPT2, and NEVPT2.