Complete RHF Algorithm¶
The Restricted Hartree–Fock (RHF) calculation in ORCA follows a systematic sequence of steps to obtain a self-consistent electronic wavefunction. Beginning with the molecular geometry supplied by the user, ORCA constructs the basis functions, iteratively solves the Hartree–Fock equations, and finally produces the converged molecular orbitals and electronic properties.
The complete workflow is illustrated below.
ORCA RHF WORKFLOW
User Input
(Method, Basis Set, Geometry)
│
▼
Read Molecular Geometry
│
▼
Determine Charge and Multiplicity
│
▼
Generate Gaussian Basis Functions
│
▼
Compute One- and Two-Electron Integrals
│
▼
Construct Initial Density Matrix
│
▼
Build Initial Fock Matrix
│
▼
Solve Roothaan–Hall Equations
│
▼
Obtain Molecular Orbitals
│
▼
Construct New Density Matrix
│
▼
Compare with Previous Density
│
┌───────┴────────┐
│ │
│ Not Converged │
▼ │
Apply DIIS / SOSCF │
│ │
Build New Fock Matrix │
│ │
└────────────────┘
│
▼
SCF Converged
│
▼
Compute Molecular Properties
│
▼
Write Output Files
(.out, .gbw, .densities,
.property.txt)
│
▼
Reference Wavefunction for
CASSCF, CASPT2 and NEVPT2
Step 1 — Read the Input¶
ORCA begins by reading the input file and extracting
- computational method,
- basis set,
- molecular geometry,
- molecular charge,
- spin multiplicity,
- optional control parameters.
For this tutorial the method is Restricted Hartree–Fock (RHF) with the def2-SVP basis set applied to the water molecule.
Step 2 — Generate Basis Functions¶
The Cartesian coordinates are converted into Gaussian basis functions according to the selected basis set.
For the present calculation, ORCA constructs the def2-SVP basis, which defines the mathematical functions used to represent the molecular orbitals.
Step 3 — Evaluate Molecular Integrals¶
Using the basis functions, ORCA evaluates the one- and two-electron integrals required for the Hartree–Fock calculation.
These include
- overlap integrals,
- kinetic energy integrals,
- electron–nuclear attraction integrals,
- electron–electron repulsion integrals.
These quantities remain fixed throughout the SCF procedure, except for the electron-density-dependent contributions to the Fock matrix.
Step 4 — Generate an Initial Guess¶
An approximate electron density is generated automatically.
From this initial density, ORCA constructs
- the first density matrix,
- the initial Fock matrix,
- approximate molecular orbitals.
This provides the starting point for the iterative SCF procedure.
Step 5 — Self-Consistent Field Iterations¶
The core of the RHF calculation is the SCF cycle.
During each iteration ORCA performs the following operations:
- Construct the Fock matrix from the current density matrix.
- Solve the Roothaan–Hall equations.
- Obtain updated molecular orbitals.
- Build a new density matrix.
- Compute the electronic energy.
- Test the convergence criteria.
This cycle continues until the density matrix and total energy become self-consistent.
Step 6 — SCF Acceleration¶
To improve convergence, ORCA employs advanced numerical techniques.
Direct Inversion in the Iterative Subspace (DIIS)¶
DIIS accelerates convergence by combining information from previous SCF iterations to predict an improved Fock matrix, reducing oscillations and the number of iterations required.
Second-Order Self-Consistent Field (SOSCF)¶
For systems where conventional SCF convergence is slow or unstable, ORCA can switch to SOSCF optimization, which uses second-order information to obtain a more efficient path toward convergence.
These algorithms enhance numerical stability while preserving the underlying Hartree–Fock formalism.
Step 7 — Compute Molecular Properties¶
After convergence, ORCA evaluates molecular properties from the final wavefunction, including
- total electronic energy,
- molecular orbital energies,
- Mulliken charges,
- Löwdin charges,
- Mayer bond orders,
- dipole moment,
- electron density.
These quantities are written to the output and property files.
Step 8 — Write Output Files¶
Finally, ORCA writes the results to several files.
| File | Purpose |
|---|---|
.out |
Complete calculation log and SCF history |
.gbw |
Binary wavefunction containing molecular orbitals |
.densities |
Electron density information |
.property.txt |
Molecular properties and population analyses |
Among these, the GBW file is particularly important because it serves as the reference wavefunction for subsequent electronic structure calculations.
Step 9 — Use the RHF Wavefunction¶
The converged RHF wavefunction provides the starting point for more sophisticated electronic structure methods.
Within this documentation, the RHF results will be used as the reference for
- Complete Active Space Self-Consistent Field (CASSCF),
- Complete Active Space Second-Order Perturbation Theory (CASPT2),
- N-Electron Valence State Perturbation Theory (NEVPT2).
Using the converged RHF orbitals as the initial guess significantly improves the efficiency and reliability of these multireference calculations.
Summary¶
The ORCA RHF algorithm begins by constructing Gaussian basis functions from the molecular geometry, evaluates the required molecular integrals, and iteratively solves the Roothaan–Hall equations through the Self-Consistent Field procedure. Modern convergence techniques such as DIIS and SOSCF accelerate the optimization of the molecular orbitals. Once convergence is achieved, ORCA computes molecular properties and stores the optimized wavefunction in the GBW file, providing the reference state for subsequent correlated electronic structure methods.