-
What is RHF?
A brief introduction to the Restricted Hartree–Fock method and its applications.
-
Input & Output
Learn the basic GAMESS input file and identify the important sections of the output.
-
How RHF Works
Follow the Self-Consistent Field (SCF) procedure used to solve the Hartree–Fock equations.
-
Mathematics for Nerds
A detailed derivation of the Hartree–Fock equations with a worked example for the water molecule.
Input and Output¶
Input File¶
The following is a complete GAMESS input file for performing an RHF single-point energy calculation on a water (H₂O) molecule using the STO-3G basis set.
$CONTRL COORD=CART UNITS=ANGS RUNTYP=ENERGY SCFTYP=RHF $END
$BASIS GBASIS=STO NGAUSS=3 $END
$SYSTEM MWORDS=200 $END
$GUESS GUESS=HUCKEL $END
$DATA
Water Molecule
C1
O 8.0 0.0000000000 0.0000000000 0.1068300000
H 1.0 0.0000000000 0.7851780000 -0.4273190000
H 1.0 0.0000000000 -0.7851780000 -0.4273190000
$END
Explanation of Important Input Sections¶
A GAMESS input file is divided into several groups, each beginning with a $ sign and ending with $END. Every group controls a different aspect of the calculation.
1. $CONTRL Group¶
The $CONTRL group is the most important section of the input file. It specifies the type of calculation to be performed.
| Keyword | Description |
|---|---|
SCFTYP=RHF |
Uses the Restricted Hartree–Fock method. Suitable for closed-shell molecules where all electrons are paired. |
RUNTYP=ENERGY |
Performs a single-point energy calculation without changing the molecular geometry. |
COORD=CART |
Indicates that the atomic coordinates are provided in Cartesian coordinates (x, y, z). |
UNITS=ANGS |
Specifies that all coordinates are given in Ångström (Å). |
2. $BASIS Group¶
The $BASIS group defines the basis set used to represent the molecular orbitals.
| Keyword | Description |
|---|---|
GBASIS=STO |
Uses a Slater-Type Orbital (STO) basis represented by Gaussian functions. |
NGAUSS=3 |
Uses three Gaussian primitives to approximate each Slater orbital, corresponding to the STO-3G basis set. |
The STO-3G basis is a minimal basis set and is commonly used for educational examples and introductory calculations because it is computationally inexpensive.
3. $SYSTEM Group¶
This group controls the computational resources allocated to the calculation.
| Keyword | Description |
|---|---|
MWORDS=200 |
Allocates approximately 200 million words of memory for the calculation. |
For small molecules like water, this amount of memory is more than sufficient.
4. $GUESS Group¶
Before the SCF iterations begin, GAMESS requires an initial approximation to the molecular orbitals.
| Keyword | Description |
|---|---|
GUESS=HUCKEL |
Generates the initial molecular orbitals using the Extended Hückel method. |
A reasonable initial guess helps the SCF procedure converge more quickly.
5. $DATA Group¶
$DATA
Water Molecule
C1
O 8.0 0.0000000000 0.0000000000 0.1068300000
H 1.0 0.0000000000 0.7851780000 -0.4273190000
H 1.0 0.0000000000 -0.7851780000 -0.4273190000
$END
The $DATA group contains the molecular structure.
Line 1¶
This is simply the title of the calculation and can be any descriptive text.
Line 2¶
This specifies the point group symmetry of the molecule.
C1 indicates that no symmetry is being used. Although water belongs to the C₂v point group, using C1 simplifies the calculation and avoids complications related to symmetry.
Atomic Coordinates¶
Each remaining line defines one atom using the format
For example,
represents an oxygen atom with
- Atomic number = 8
- Cartesian coordinates = (0.0000, 0.0000, 0.1068 Å)
Similarly,
defines one hydrogen atom with atomic number 1.
Summary¶
The complete input file tells GAMESS:
- What method to use (RHF)
- What type of calculation to perform (single-point energy)
- Which basis set to use (STO-3G)
- How to generate the initial molecular orbitals (Hückel guess)
- The molecular geometry of the water molecule
Once this information is provided, GAMESS begins the Self-Consistent Field (SCF) procedure to compute the molecular orbitals and the total Hartree–Fock energy. ...
Understanding the GAMESS Output¶
Once the input file is submitted, GAMESS prints a detailed output containing information about the molecular system, the basis set, the SCF procedure, and the final results.
In this section, we will go through the most important parts of the output produced for the RHF calculation of the water molecule.
1. Molecular Geometry¶
THE POINT GROUP OF THE MOLECULE IS C1
THE ORDER OF THE PRINCIPAL AXIS IS 0
ATOM ATOMIC COORDINATES (BOHR)
CHARGE X Y Z
O 8.0 0.0000000000 0.0000000000 0.1129663669
H 1.0 0.0000000000 1.4837712716 -0.8964288797
H 1.0 0.0000000000 -1.4837712716 -0.8964288797
What does this mean?¶
The first section confirms that GAMESS has correctly read the molecular geometry from the input file.
Notice that
- the molecule belongs to the C₁ point group,
- the coordinates are printed in Bohr, even though they were supplied in Ångström.
GAMESS automatically converts the input coordinates into atomic units before beginning the calculation.
2. Interatomic Distances¶
INTERNUCLEAR DISTANCES (ANGS.)
1 O 2 H 3 H
1 O 0.0000000 0.9496419 0.9496419
2 H 0.9496419 0.0000000 1.5703560
3 H 0.9496419 1.5703560 0.0000000
What does this mean?¶
GAMESS calculates all bond lengths from the Cartesian coordinates.
For the water molecule,
- O–H bond length = 0.9496 Å
- H–H distance = 1.5704 Å
This section is useful for verifying that the molecular geometry has been entered correctly.
3. Basis Set Information¶
TOTAL NUMBER OF BASIS SET SHELLS = 4
NUMBER OF CARTESIAN GAUSSIAN BASIS FUNCTIONS = 7
NUMBER OF ELECTRONS = 10
SPIN MULTIPLICITY = 1
NUMBER OF OCCUPIED ORBITALS (ALPHA) = 5
NUMBER OF OCCUPIED ORBITALS (BETA ) = 5
What does this mean?¶
This section summarizes the electronic system.
For this calculation,
- Water contains 10 electrons.
- Since RHF is used, there are 5 occupied α orbitals and 5 occupied β orbitals.
- The STO-3G basis generates 7 basis functions for the entire molecule.
- The spin multiplicity is 1, confirming that water is a closed-shell system.
4. Nuclear Repulsion Energy¶
What does this mean?¶
This is the electrostatic repulsion between the atomic nuclei.
Since nuclei are positively charged, they repel each other, contributing a positive energy to the total molecular energy.
This quantity depends only on the molecular geometry and does not change during the SCF iterations.
5. Initial Guess Orbitals¶
What does this mean?¶
Before solving the Hartree–Fock equations, GAMESS generates an initial approximation to the molecular orbitals using the Hückel method.
These orbitals serve as the starting point for the SCF iterations.
6. RHF SCF Iterations¶
ITER EX DEM TOTAL ENERGY E CHANGE DENSITY CHANGE
1 -74.7995505090
2 -74.9442494628
3 -74.9560149502
4 -74.9573846051
...
13 -74.9576302882
What does this mean?¶
This is the heart of the Hartree–Fock calculation.
During each iteration,
- the Fock matrix is constructed,
- new molecular orbitals are calculated,
- the electron density is updated,
- the total energy is recalculated.
Notice that the energy becomes progressively lower:
| Iteration | Energy (Hartree) |
|---|---|
| 1 | -74.7995505090 |
| 5 | -74.9575876719 |
| 10 | -74.9576302862 |
| 13 | -74.9576302882 |
As the iterations proceed,
- the energy changes become smaller,
- the density changes decrease,
- eventually the calculation reaches self-consistency.
7. SCF Convergence¶
What does this mean?¶
This is the most important message in the entire output.
It confirms that
- the SCF procedure has converged,
- the molecular orbitals are self-consistent,
- the final Hartree–Fock energy is
The calculation required 13 SCF iterations to reach convergence.
8. Molecular Orbital Energies¶
What does this mean?¶
These are the molecular orbital energies (in Hartree).
Since water has 10 electrons, the first five molecular orbitals are occupied.
Therefore,
- HOMO = Orbital 5 = −0.3858 Hartree
- LUMO = Orbital 6 = 0.5988 Hartree
The HOMO–LUMO energy gap is approximately
A larger HOMO–LUMO gap generally indicates greater electronic stability.
9. Energy Components¶
ONE ELECTRON ENERGY = -122.5249813908
TWO ELECTRON ENERGY = 38.3145517546
NUCLEAR REPULSION ENERGY = 9.2527993481
TOTAL ENERGY = -74.9576302882
What does this mean?¶
The total Hartree–Fock energy is obtained by combining
- kinetic energy,
- electron–nucleus attraction,
- electron–electron repulsion,
- nuclear–nuclear repulsion.
For the water molecule,
| Contribution | Energy (Hartree) |
|---|---|
| One-electron | -122.5249813908 |
| Two-electron | 38.3145517546 |
| Nuclear repulsion | 9.2527993481 |
| Total RHF Energy | -74.9576302882 |
10. Mulliken Population Analysis¶
TOTAL MULLIKEN AND LOWDIN ATOMIC POPULATIONS
ATOM MULL.POP. CHARGE
O 8.386339 -0.386339
H 0.806830 0.193170
H 0.806830 0.193170
What does this mean?¶
The Mulliken population analysis estimates how electrons are distributed among the atoms.
For water,
- Oxygen carries a partial negative charge of −0.386.
- Each hydrogen carries a partial positive charge of +0.193.
This agrees with the expected polarity of water, where oxygen is more electronegative than hydrogen.
11. Bond Order Analysis¶
What does this mean?¶
The calculated bond order for each O–H bond is approximately 0.945, which is close to the expected value of 1 for a single covalent bond.
12. Dipole Moment¶
What does this mean?¶
The calculated molecular dipole moment is
1.686 Debye
The dipole moment measures the separation of positive and negative charge within the molecule.
Water is a highly polar molecule because the oxygen atom attracts electron density more strongly than the hydrogen atoms.
13. Normal Termination¶
What does this mean?¶
This is the final confirmation that the calculation completed successfully.
Always verify that this message appears before using any results from the output file.
How RHF Works¶
The Restricted Hartree–Fock (RHF) method determines the electronic structure of a closed-shell molecule through an iterative process known as the Self-Consistent Field (SCF) procedure. Instead of solving the many-electron Schrödinger equation exactly, RHF approximates the motion of each electron by allowing it to move in the average electrostatic field created by all the other electrons.
The calculation begins with an approximate description of the molecule and repeatedly improves the molecular orbitals until a self-consistent solution is obtained.
RHF Workflow¶
Input Molecular Geometry
│
▼
Choose Basis Set
│
▼
Generate Initial Guess Orbitals
│
▼
Construct the Fock Matrix
│
▼
Solve for Molecular Orbitals
│
▼
Update Electron Density
│
▼
Converged?
┌──────┴──────┐
│ │
No Yes
│ │
└────► Repeat ◄────┘
│
▼
Final Energy and Molecular Orbitals
Step 1: Define the Molecular System¶
The calculation begins by reading the molecular geometry provided in the input file along with the chosen basis set. From this information, GAMESS determines the number of atoms, electrons, molecular charge, and spin multiplicity. These define the molecular system that will be studied.
Step 2: Generate an Initial Guess¶
Since the exact molecular orbitals are initially unknown, GAMESS generates an approximate set of orbitals using methods such as the Hückel or Core Hamiltonian approach. These orbitals serve as the starting point for the SCF procedure.
Step 3: Construct the Fock Matrix¶
Using the current electron density, GAMESS constructs the Fock matrix, which represents the effective Hamiltonian experienced by each electron. This matrix incorporates the average interaction between electrons and forms the basis for calculating improved molecular orbitals.
Step 4: Calculate New Molecular Orbitals¶
The Fock matrix is solved to obtain a new set of molecular orbitals and their corresponding orbital energies. These orbitals provide a better approximation to the electronic structure than those from the previous iteration.
Step 5: Update the Electron Density¶
The newly calculated occupied molecular orbitals are used to generate an updated electron density. Since the Fock matrix depends on this density, it must be reconstructed using the new information.
Step 6: Check for Convergence¶
The process of constructing the Fock matrix, solving for molecular orbitals, and updating the electron density is repeated until the changes in the total energy and electron density become smaller than a predefined convergence threshold.
Once convergence is achieved, the calculation produces the final RHF wavefunction, molecular orbital energies, electron density, and total electronic energy.
Why is it Called "Self-Consistent Field"?¶
The term Self-Consistent Field (SCF) refers to the fact that the electron density and the effective field experienced by the electrons depend on each other.
- The electron density is used to construct the Fock matrix.
- The Fock matrix determines the molecular orbitals.
- The molecular orbitals generate a new electron density.
This cycle continues until the input and output electron densities become identical within the chosen convergence criterion. At this point, the electronic structure is said to be self-consistent.
Restricted Hartree–Fock
In RHF, each occupied molecular orbital contains two electrons with opposite spins (α and β) occupying the same spatial orbital. This restriction makes RHF suitable only for closed-shell molecules, where all electrons are paired.
Summary¶
The RHF method is an iterative optimization procedure that starts with an approximate electronic structure and systematically improves it until a self-consistent solution is reached. The converged molecular orbitals obtained from an RHF calculation serve as the foundation for many advanced quantum chemistry methods, including MP2, Configuration Interaction (CI), Coupled Cluster (CC), and CASSCF.
Mathematics for Nerds¶
...