Guide · VASP · 12 min read

How do I compute a formation, adsorption or defect energy from several VASP runs?

Checked against the docs · VASP wiki · Last checked 12 November 2026 · Spot a mistake? Tell us

Short answer

Run each piece on its own (for an adsorption energy: the slab with the molecule, the clean slab and the molecule alone), with the same functional, POTCARs and an ENCUT set by hand in every run, then subtract with the atoms balanced on both sides, for example E_ads = E(slab + CO) − E(slab) − E(CO). A VASP total energy is measured against reference atoms, so what you report is always a difference between consistent runs.

What is an energy difference, and why do I need several runs?

VASP gives you a total energy for each structure you compute. On its own, that number is not an absolute energy: the OSZICAR page notes that the energy of the reference atom has already been subtracted from it, and the FAQ adds that VASP's cohesive energies are measured against a spherical, non-spin-polarized atom. What you report is always a difference between total energies of runs that describe the same atoms in two situations.

Each kind of energy is one such difference:

  • Adsorption energy: a surface with a molecule on it, against the clean surface and the molecule apart.
  • Surface energy: a slab, against the same number of atoms in the bulk.
  • Binding energy between layers: the layered crystal, against its separate layers.
  • Formation energy of a compound: the compound, against its elements in chosen reference states.
  • Defect formation energy: the cell with the defect, against the perfect cell and the atoms added or removed.

Every piece is its own VASP run. The work is choosing the pieces, computing them consistently, and keeping the atoms balanced in the subtraction.

What has to be the same in every run?

The pieces must sit on the same energy scale, or the difference is meaningless. From the wiki:

  • The same ENCUT, set by hand. If you leave ENCUT out, VASP takes the largest ENMAX of the POTCARs in each run, and that changes when the species change: a run with C and O has a different default from the clean metal. The wiki strongly recommends setting ENCUT yourself in every run for exactly this reason, because otherwise the total energies cannot be compared. Its Ni(111) example says it outright: the O and C potentials need 400 eV, so the earlier clean-surface run cannot be used as the reference, and is recomputed at the same cutoff.
  • The same functional and POTCARs. The functional, the PAW datasets and the cutoff together set the energy surface; change one and you change the surface, as the wiki notes on its MD page. See Which functional should I use?
  • The same U, if any. The DFT+U pages warn that energies from runs with different U or J are not meaningfully compared. The wiki describes no way to combine a compound computed with U and an elemental reference computed without it, such as a metal; if your formation energy needs that, take the method from the published work you compare with, and say which you used.
  • The same van der Waals treatment. A dispersion correction is added to the total energy, so runs with and without it are on different scales; see How do I add van der Waals corrections?

What may differ is the sampling each structure needs: a molecule in a box wants only the Γ point, a slab a 2D mesh, the bulk a full 3D mesh. Converge each one for its own cell.

How do I compute an adsorption energy?

The wiki's worked example is CO on a Ni(111) slab, with three runs:

  1. The slab with CO, relaxed (E_total).
  2. The clean slab (E_clean), with the same cell and k-points.
  3. The CO molecule alone in a box (E_CO).

Then:

Example
E_ads = E_total − E_clean − E_CO
      = −40.829 − (−25.737) − (−14.835)
      = −0.257 eV

The numbers are the wiki's. The atoms balance: slab plus C plus O on the left, slab, then C plus O, on the right. A negative result here means the combined system is lower in energy than the slab and the molecule kept apart.

From the same example:

  • The slab: five Ni layers with the bottom three fixed by selective dynamics, about 10 Å of vacuum, and a 9 9 1 k-point mesh (one point along the vacuum direction).
  • The cutoff: 400 eV in every run, set by the C and O potentials. The wiki shows that raising the clean slab from 270 to 400 eV moves its energy from −25.732 to −25.737 eV, and notes this matters more for larger cells.

How do I compute a molecule or an atom on its own?

The molecule or atom goes in a box large enough that it does not interact with its periodic copies. From the wiki's atom and molecule examples:

  • Γ point only. For atoms and molecules a single k-point is enough; more k-points only describe the interaction between copies, which should be zero.
  • A big enough box. The wiki's O atom and CO examples use an 8 Å cube. Its page on atoms lists cell sizes that give reliable results: 14 Å for aluminum, 12 Å for potassium, 10 Å for copper, rhodium and palladium, 8 Å for carbon, 7 Å for nitrogen, and recommends a slightly non-cubic box, such as 10.000 × 10.001 × 10.002 Å.
  • Gaussian smearing (ISMEAR = 0), with a small SIGMA if atomic orbitals are almost degenerate.
  • Spin polarization (ISPIN = 2) where the atom or molecule has unpaired electrons. The O atom has two, and O₂ ends with mag= 2 in the wiki's example. For the O atom the wiki's OSZICAR gives F = −0.315 eV without spin polarization and −1.673 eV with it: over 1.3 eV, five times the size of the CO adsorption energy above.
  • The energy to read. The wiki's O atom example says the relevant energy for molecules and atoms is the one OUTCAR prints as "energy without entropy".

The wiki's examples each read the energy their own page names: the free energy TOTEN for a metal slab, the energy without entropy for a molecule. They do not say whether to mix the two in one difference. Look at both lines in each run's OUTCAR: where they differ by less than your tolerance, the choice does not change the result. For what smearing does to these numbers, see Which smearing should I use?

How do I compute a surface or binding energy?

Surface energy. The wiki's Ni(111) slab of five layers, with bulk nickel computed in the same way (non-spin-polarized in that example), gives:

Example
σ = ½ (E_slab − N × E_bulk per atom)
  = ½ (−25.731 − 5 × (−5.407))
  = 0.65 eV

The ½ is there because a slab has two surfaces, and N is the number of atoms in the slab. This value is for the unrelaxed slab.

Binding between layers. The wiki's graphite example computes graphite (4 atoms) and a single graphene sheet (2 atoms, in a cell 20 Å tall with a 16 16 1 mesh), and divides each by its number of atoms:

Example
E_bind per atom = E_graphite / 4 − E_graphene / 2

It reads both energies from the free energy TOTEN line of OUTCAR.

Divide before you compare. Whenever cells hold different numbers of atoms, compare per atom or per formula unit; the magnetic calculation guide does the same for magnetic orders.

How do I compute a formation or defect energy?

The wiki has no worked page for these. The formulas below are not taken from the wiki; check them against the convention of the work you compare with. The rules above (same cutoff, functional, POTCARs and U in every run) apply unchanged.

Formation energy of a compound from its elements. The reference state of each element is a convention that differs between studies; use the one of the work you compare with, and state it.

Example
E_f = E(compound) − Σ n_i × E_i

where n_i is the number of atoms of element i in the compound cell and E_i the energy per atom of that element in its reference state (for a metal, its bulk crystal; for oxygen, the O₂ molecule, spin-polarized as above). Divide by the number of atoms for a value per atom.

A neutral vacancy in a cell of N atoms of one element, with the removed atom referenced to the bulk crystal. In a compound the removed atom goes to a reservoir with its own chemical potential, which this page does not cover.

Example
E_vac = E(N − 1 atoms) − (N − 1)/N × E(N atoms)

Charged defects need more. A charged cell is set with NELECT, which the wiki warns converges very slowly with cell size unless corrected. For defects in solids, the wiki's page on dipole corrections says the error is often of order 0.1 eV, but can reach several eV when three things come together: a semiconductor with first-row elements, a small dielectric constant, and a charge state of 3 or 4; it recommends cubic cells, and the corrections it prints in OUTCAR must be rescaled by hand with the dielectric constant. The wiki does not give the full formation-energy expression for a charged defect, with the Fermi level and the electrons' chemical potential; take it from the defect literature your group follows. Start from Dipole corrections for defects in solids.

Slabs with a dipole. LDIPOL = .TRUE. with IDIPOL corrects the potential and forces of any cell with a net dipole moment, and lets the work function be evaluated for an asymmetric slab, at the cost of slower electronic convergence. A charged slab's total energy cannot be corrected, the NELECT page warns: it depends linearly on the width of the vacuum.

How do I check the result?

Confirm the settings matched. In each run's OUTCAR:

Terminal
grep -E "ENCUT|GGA|LDAU|IVDW" OUTCAR
grep TITEL POTCAR

The first line shows the cutoff and functional tags VASP read, the second the potentials in the run's POTCAR. They must agree across every run in the difference.

Read the energies the same way. The final line of each run's OSZICAR holds F and E0:

Terminal
grep "F=" OSZICAR | tail -1

OUTCAR has the full block, including "energy without entropy":

Terminal
grep -A 2 "free  energy   TOTEN" OUTCAR | tail -3

Converge the difference, not the totals. The wiki notes that energy differences usually converge much faster with ENCUT than total energies when the structures are similar, and much more slowly when they are very different, such as the bulk against an isolated atom. Test the difference you report: raise the cutoff, the k-points and, for slabs and boxes, the vacuum, until it stops changing (see How do I test convergence?).

Check the atom count. Write the reaction out with the number of each element on both sides before you subtract.

What goes wrong with energy differences?

MistakeWhat you would seeWhat to do
ENCUT left at its defaultEach run gets the largest ENMAX of its own POTCARs, so the energies are on different scales.Set the same ENCUT in every run, at least the largest ENMAX of all the species involved.
Reusing a reference computed at another cutoffThe wiki's Ni(111) slab: −25.732 eV at 270 eV, −25.737 eV at 400 eV.Recompute the reference at the common cutoff.
Different POTCARs or functional between runsA difference between two energy surfaces.One POTCAR per element and one functional for the whole set.
Different U between runsA meaningless difference, the DFT+U pages warn.The same U and J everywhere; see above for mixed cases.
A non-spin-polarized atom or O₂Over 1 eV off for the O atom in the wiki's example.ISPIN = 2 for open-shell atoms and molecules.
A molecule in too small a boxIt interacts with its periodic copies.Grow the box until the energy stops changing.
Many k-points for a molecule in a boxWasted time; only the spurious interaction is sampled better.Γ point only.
Atoms not balancedA number that is not the energy of any reaction.Count each element on both sides.
Comparing cells with different atom counts directlyDifferences of whole formula units.Per atom or per formula unit.
A charged defect without correctionsErrors from 0.1 eV to several eV.Follow the wiki's dipole-correction page; prefer cubic cells.

Verlet does not compute formation or adsorption energies for you yet: each piece is its own run, and the subtraction is yours. Select two to four runs under All runs and press Compare: they appear side by side, with every setting that differs and each run's last energy, so a cutoff or functional that does not match shows before you subtract. Everything above works without it.