---
title: "An accurate energy can still give the wrong bond force"
description: "Compare hydrogen energy curves, force errors and natural occupations, then separate electronic-method error from the limits of a small basis."
canonical_url: "https://sandboxphysics.com/stories/molecular-electronic/energies-forces-and-bases/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/molecular-electronic/energies-forces-and-bases/"
last_modified: "2026-10-28"
---

[Molecular electrons and the breaking of a bond](https://sandboxphysics.com/stories/molecular-electronic/)

L3 · Chapter 8

# An accurate energy can still give the wrong bond force

Sandbox Physics · 2026-10-28

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.

## Before you begin

Chapters 4–7 explain RHF, UHF, FCI, MP2 and the selected PBE approximation. A derivative is the local slope of a curve. Here we apply that idea to total energy as a function of nuclear separation.

[Review the preceding chapter](https://sandboxphysics.com/stories/molecular-electronic/density-functional-theory/)

- Explain why an energy offset and a force error are different.
- Read a comparison of energy, force and occupation along a stretching curve.
- Separate correlation error within one basis from changes caused by enlarging the basis.

## The slope tells the nuclei which way to move

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

The generalized force $F_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.

$$
F_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 $\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: $\Delta E(R)=a(R-R_*)$. Exactly at $R_*$, the energy error is zero, yet the force error is $-a$. An isolated accurate energy can therefore coexist with a persistently wrong pull on the bond.

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

$$
\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=4a_0$, the saved STO-3G calculation gives the values below. Every total energy includes $1/R$. Subtracting the FCI energy from the UHF energy gives $0.00794\,E_{\rm h}$. Subtracting their forces gives $+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 $\langle \hat S^2\rangle=0.964$, compared with zero for a pure singlet. The second FCI natural occupation is $0.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.

| Method | $E/E_{\rm h}$ | $F_R/(E_{\rm h}/a_0)$ |
| --- | --- | --- |
| RHF | $-0.761082$ | $-0.0972243$ |
| UHF | $-0.935842$ | $-0.00499779$ |
| FCI | $-0.943778$ | $-0.0184051$ |
| MP2 | $-0.862710$ | $-0.0364091$ |
| Restricted PBE | $-0.896969$ | $-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.4a_0$, STO-3G gives $E_{\rm RHF}=-1.116714\,E_{\rm h}$ and $E_{\rm FCI}=-1.137276\,E_{\rm h}$. Their difference, $0.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\,E_{\rm h}$. The extra lowering relative to STO-3G is $0.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-h$ and $R+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.001a_0$ and separately compares with analytic molecular gradients. Near a change in the stable electronic branch, inspect the curve before assuming smooth behavior.

$$
F_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](https://sandboxphysics.com/labs/electronic-method-error-map/)

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\,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$ in hartree per bohr. Both forces point toward smaller separation, but UHF has the smaller magnitude, so it predicts a weaker inward pull.

[Previous: What density functional theory changes](https://sandboxphysics.com/stories/molecular-electronic/density-functional-theory/) [Next: A fractional-spin test for a broken bond](https://sandboxphysics.com/stories/molecular-electronic/fractional-spin-paper/)

## Sources and calculation scope

1. [Sandbox Physics, FR13 reference inputs, raw numerical records and reproduction guide (2026)](https://github.com/yangzichao/sandboxphysics/blob/main/docs/frontier/fr13/reference-reproduction.md)

   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](https://www.chem.fsu.edu/~deprince/tutorials/jupyter_notebooks/hartree_fock/hartree_fock.html)

   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](https://psicode.org/psi4manual/master/scf.html)

   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](https://psicode.org/psi4manual/master/detci.html)

   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)](https://doi.org/10.1103/PhysRevLett.77.3865)

   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](https://www.basissetexchange.org/)

   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.
