Skip to main content
Sandbox Physics
Molecular electrons and the breaking of a bond

L3 · Chapter 8

An accurate energy can still give the wrong bond force

A small energy error at one geometry does not guarantee an accurate force. A force depends on the slope of the whole energy curve. To judge a method for stretching a bond, compare nearby geometries and ask separately how much freedom the basis gives the electrons.

The slope tells the nuclei which way to move

Keep the nuclei on the horizontal axis at xA=−R/2x_A=-R/2 and xB=R/2x_B=R/2, with positive separation RR measured in bohr. At every separation, solve the electronic problem and add the nuclear repulsion. Call the resulting Born–Oppenheimer energy E(R)E(R), in hartree.

The generalized force FRF_R is positive when it tends to increase the separation. It is the negative slope of the total-energy curve. A negative value pulls the nuclei together. Its unit is hartree per bohr. At an equilibrium minimum the slope vanishes; the energy itself need not be zero.

FR(R)=−dE(R)dRF_R(R)=-\frac{dE(R)}{dR}
This force is conjugate to the separation. For the centered two-nucleus geometry it equals the force on the right nucleus along the bond axis.

Reading: Sandbox Physics · Psi4 manual · A. E. DePrince III

Two curves can cross and still have different slopes

Write the method error as ΔE(R)=Emethod(R)−EFCI(R)\Delta E(R)=E_{\rm method}(R)-E_{\rm FCI}(R), using the same basis for both curves. Their force difference is the negative derivative of this error. Adding a constant to every energy moves the curve vertically and changes no force.

Now try a different error: ΔE(R)=a(R−R∗)\Delta E(R)=a(R-R_*). Exactly at R∗R_*, the energy error is zero, yet the force error is −a-a. An isolated accurate energy can therefore coexist with a persistently wrong pull on the bond.

For a worked example, take a=0.02 Eh/a0a=0.02\,E_{\rm h}/a_0. The two curves agree in energy at R∗R_*, but the method force is too negative by 0.02 Eh/a00.02\,E_{\rm h}/a_0. Matching another energy point very close by would reveal the unwanted slope.

ΔFR(R)=−dΔE(R)dR\Delta F_R(R)=-\frac{d\Delta E(R)}{dR}
A force comparison tests how the energy error changes between nearby geometries.

A stretched hydrogen molecule makes the differences visible

At R=4a0R=4a_0, the saved STO-3G calculation gives the values below. Every total energy includes 1/R1/R. Subtracting the FCI energy from the UHF energy gives 0.00794 Eh0.00794\,E_{\rm h}. Subtracting their forces gives +0.0134 Eh/a0+0.0134\,E_{\rm h}/a_0: UHF pulls inward less strongly at this geometry.

The UHF energy is much closer to FCI than RHF is, but its spin diagnostic is ⟨S^2⟩=0.964\langle \hat S^2\rangle=0.964, compared with zero for a pure singlet. The second FCI natural occupation is 0.6440.644. These quantities answer different questions: the force tests the slope, the spin diagnostic tests spin purity, and the occupation shows how strongly a second orbital participates.

The PBE row is a spin-restricted Kohn–Sham calculation with the PBE functional. Its saved metadata fixes PySCF, Libxc and the numerical integration grid. These numbers compare the methods for this molecule, basis and spin restriction.

Computed hydrogen molecule at four bohr in STO-3G; forces from a central energy difference with a step of 0.001 bohr.
MethodE/EhE/E_{\rm h}FR/(Eh/a0)F_R/(E_{\rm h}/a_0)
RHF−0.761082-0.761082−0.0972243-0.0972243
UHF−0.935842-0.935842−0.00499779-0.00499779
FCI−0.943778-0.943778−0.0184051-0.0184051
MP2−0.862710-0.862710−0.0364091-0.0364091
Restricted PBE−0.896969-0.896969−0.0612703-0.0612703

Reading: Sandbox Physics · Psi4 manual · Psi4 manual · J. P. Perdew

A better electronic method still lives inside its basis

FCI lets the electrons use every configuration available in the chosen orbital space. It cannot create spatial functions that the basis never supplied. Adding more configurations and adding more basis functions solve two different approximation problems.

At R=1.4a0R=1.4a_0, STO-3G gives ERHF=−1.116714 EhE_{\rm RHF}=-1.116714\,E_{\rm h} and EFCI=−1.137276 EhE_{\rm FCI}=-1.137276\,E_{\rm h}. Their difference, 0.020562 Eh0.020562\,E_{\rm h}, is the magnitude of the correlation energy missed by restricted HF within that basis.

With cc-pVDZ, the FCI energy is −1.163399 Eh-1.163399\,E_{\rm h}. The extra lowering relative to STO-3G is 0.026123 Eh0.026123\,E_{\rm h}, showing that even the exact STO-3G solution retains a substantial basis error. The saved 6-31G calculation provides a third comparison. These named bases are different finite spaces; monotonic variational improvement is guaranteed when one allowed space contains the previous one.

A useful study varies the electronic method at fixed basis, then checks several bases at fixed method. The small browser model handles the first comparison. The saved larger-basis calculations supply the second. FCI in cc-pVDZ remains a finite spatial approximation.

Reading: Sandbox Physics · A. E. DePrince III · Psi4 manual · Basis Set Exchange

Use nearby calculations to check the force

A central difference estimates the force from two extra electronic calculations at R−hR-h and R+hR+h. Both calculations must reconverge the wavefunction. Each atom-centered basis function also moves with its nucleus. Keeping old coefficients or fixed basis centers would describe a different derivative.

For a smooth energy curve, halving a sufficiently small step reduces the leading central-difference error by about four. Extremely small steps eventually amplify energy convergence error and floating-point noise. The reference calculation uses h=0.001a0h=0.001a_0 and separately compares with analytic molecular gradients. Near a change in the stable electronic branch, inspect the curve before assuming smooth behavior.

FR(R)≈−E(R+h)−E(R−h)2hF_R(R)\approx-\frac{E(R+h)-E(R-h)}{2h}
The symmetric difference cancels the leading one-sided error. Compare steps and an independent gradient to decide how many digits are useful.

Reading: Sandbox Physics · A. E. DePrince III · Psi4 manual

Try the prediction

Compare a small energy error with a bond-force error

  1. Predict whether the method with the smallest energy error at four bohr must also have the smallest force error.
  2. Select each method at the same saved geometry. Record the two errors with their separate units, then compare with a near-equilibrium geometry.
  3. Use the FCI natural occupation and the UHF spin diagnostic to explain why a single energy number misses part of the story.

Exercises and explanations

  1. A method adds 0.01 Eh0.01\,E_{\rm h} to the exact energy at every geometry. What error does it make in the force and in an energy difference?

    Read the explanation

    Both errors are zero: differentiating a constant gives zero, and subtracting two energies cancels the same offset. The absolute total energy remains wrong.

  2. A researcher compares UHF/STO-3G with FCI/cc-pVDZ and calls their energy difference the UHF correlation error. How should the comparison be changed?

    Read the explanation

    First compare UHF and FCI within the same basis to isolate the finite-space electronic-method difference. Separately compare FCI across the basis choices. Changing both method and basis mixes two causes.

  3. At four bohr, calculate the UHF force error from the table. Is the UHF attraction stronger or weaker?

    Read the explanation

    −0.00499779−(−0.0184051)=+0.0134073-0.00499779-(-0.0184051)=+0.0134073 in hartree per bohr. Both forces point toward smaller separation, but UHF has the smaller magnitude, so it predicts a weaker inward pull.

Sources and calculation scope

  1. Sandbox Physics, FR13 reference inputs, raw numerical records and reproduction guide (2026)

    Original generated data: H2/STO-3G method energies, forces and occupations; independent Psi4 checks; basis and DFT-grid checks; fixed-orbital fractional-spin data. The guide links scripts, raw outputs, runtime versions and data licenses.

  2. A. E. DePrince III, The Hartree–Fock Self-Consistent Field Procedure

    Author tutorial: electronic Hamiltonian, variational principle, density matrices, SCF, basis convergence and spin-symmetry breaking. The browser calculation specializes these equations to two hydrogen STO-3G functions.

  3. Psi4 manual, HF: Hartree–Fock Theory

    Theory and numerical methods sections: restricted and unrestricted references, generalized eigenproblem, total energy and convergence. The reproducible reference manifest records the installed version and settings.

  4. Psi4 manual, CI: Configuration Interaction

    CI expansion and full configuration interaction within a chosen orbital space. Here FCI is exact only for the stated finite-basis Hamiltonian.

  5. J. P. Perdew, K. Burke and M. Ernzerhof, Generalized Gradient Approximation Made Simple (1996)

    Published PBE generalized-gradient functional, with the 1997 erratum. The method-error experiment selects PBE; its saved numerical record fixes the library, grid and spin restriction.

  6. Basis Set Exchange, STO-3G basis data

    Hydrogen STO-3G contraction: one contracted s function per atom, made from three Gaussian primitives. Basis coefficients and normalization are fixed in the calculation manifest.

FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy