Lecture 1 · Part I: Quantum mechanics you need
The Born–Oppenheimer approximation
What physical problem is VASP solving when it relaxes a structure?
You will be able to explain
- which particles and interactions the full Hamiltonian of a material contains
- how Born–Oppenheimer treats nuclear motion on one electronic energy surface, and which couplings it neglects
- how an energy surface gives forces, and why a relaxation solves the electrons again at every step
- which physical approximations a VASP relaxation makes before any functional is chosen
By Osman Goni Ridwan · Last reviewed
DFT & VASP Course · Lecture 11 / 20
Lecture 0 treated VASP as a machine that turns a structure into an energy. This lecture opens the machine one level. Which physical problem does it solve? Which approximations are already made before you choose any functional? And what actually happens, step by step, when a structure relaxes?
Press P to present one slide at a time, S for speaker notes.
What is VASP computing when a structure relaxes?
Push an atom off its site and the forces push it back. Where do those forces come from?
This lecture follows the question from the bottom up:
- Particles
- Hamiltonian
- Born–Oppenheimer
- Energy surface
- Forces
- Relaxation
DFT & VASP Course · Lecture 12 / 20
In Lab 1 you will take the silicon crystal of Lab 0, push one atom of the cell slightly off its site, and let VASP relax it. In a periodic calculation every copy of that atom moves with it, so in effect one set of atoms shifts against the other, as in the sketch. The forces then push the two sets back toward their ideal positions.
VASP does not know that a crystal “wants” to be perfect. It computes energies and forces from a quantum-mechanical model, and a relaxation happens because it keeps asking one question: if the nuclei move a little, does the energy go down? This lecture builds that question from the bottom up, starting with the particles a material is made of.
What is a material made of, as far as VASP is concerned?
Nuclei and electrons, held together by electrostatic attraction and repulsion.
| Particle | Charge | Mass | Treated as |
|---|---|---|---|
| Nucleus I, at RI | +ZIe | MI≥1836me | A point charge; in a relaxation, a classical particle |
| Electron i, at ri | −e | me | A quantum particle, described by a wavefunction |
1836.15
times the electron's mass: the lightest nucleus, a single proton. Every other nucleus is heavier still.
DFT & VASP Course · Lecture 13 / 20
For everything in this course, a material is a collection of nuclei and electrons interacting through electrostatic (Coulomb) forces: like charges repel, opposite charges attract. Nucleus I has charge +ZIe, mass MI and position RI; electron i has charge −e, mass me and position ri. Nuclei are about 10−15 m across, a hundred thousand times smaller than an atom, so treating them as point charges is an excellent approximation.
The mass ratio is the key number of this lecture. Even a single proton is 1836.15 times heavier than an electron, and a silicon nucleus is about 51,200 times heavier. Electrons are light and behave as waves, so they need quantum mechanics: their state is a wavefunction of all their coordinates, Ψ(r1,…,rN), which for 100 electrons is a function of 300 spatial coordinates plus spins. For the heavy nuclei, a classical picture is often a good first approximation in ordinary DFT work; the end of this lecture says when it is not.
How should you read the symbols?
Particle labels, sums and spatial derivatives describe who contributes to the energy.
| Symbol | Read it as |
|---|---|
| RI, ri | Three position coordinates: capital I labels a nucleus, lower-case i an electron. |
| H^, T^, V^ | Rules acting on a wavefunction: total, kinetic and potential energy operators. |
| ∑i, ∑i<j | Add all electrons, or all distinct pairs. Three electrons give pairs (1,2), (1,3), (2,3). |
| ∇i2 | Add the wavefunction's curvatures along x, y and z for electron i. |
| ∂E/∂RI | How the energy changes when nucleus I moves, keeping the other coordinates fixed. |
DFT & VASP Course · Lecture 14 / 20
A bold position is a vector: RI=(XI,YI,ZI). A subscript is a label, rather than a multiplication. A sum over i<j counts each pair once and excludes a particle interacting with itself. A hat marks an operator, a rule applied to a function; Lecture 2 develops that language. For now, read H^ as the complete energy rule.
A first derivative is a slope; a second derivative measures how that slope changes, or curvature. The Laplacian is ∇i2=∂2/∂xi2+∂2/∂yi2+∂2/∂zi2. Later, the force uses a first derivative of the energy. These are different objects: curvature of a wavefunction enters kinetic energy, while slope of an energy surface gives force.
We use Hartree atomic units to keep the equations readable: ℏ=h/(2π), the reduced Planck constant, and me, the electron mass, are set to 1 along with the electrostatic constants. Energy is then in hartree (1 Ha ≈ 27.211 eV), length in bohr (1 bohr ≈ 0.529 Å). Setting constants to 1 chooses units; it keeps the interactions in the model.
What does the full Hamiltonian contain?
Five terms: two kinetic energies and three Coulomb interactions.
- Nuclear kinetic energy, −∑I2MI1∇I2: the nuclei can move.
- Electronic kinetic energy, −∑i21∇i2: the electrons can move.
- Nucleus–nucleus repulsion, ∑I<J∣RI−RJ∣ZIZJ.
- Electron–electron repulsion, ∑i<j∣ri−rj∣1: makes the problem many-body.
- Electron–nucleus attraction, −∑i,I∣ri−RI∣ZI: ties electrons to nuclei.
Hartree atomic units, with MI in electron masses. Click a term, a line of the legend, or a group in the diagram.
DFT & VASP Course · Lecture 15 / 20
The Hamiltonian is the operator for the total energy. In the non-relativistic picture it has five pieces: the kinetic energies of nuclei and electrons, and the three kinds of Coulomb interaction between them. The formulas are in Hartree atomic units, where ℏ=me=e=4πε0=1. In SI units the electron–electron term, for example, reads e2/(4πε0∣ri−rj∣); atomic units simply set the constants to 1, which is why the formulas look bare. ∇I2 differentiates with respect to the coordinates of nucleus I, and ∇i2 with respect to those of electron i.
Two terms deserve attention. V^ee depends on the distance between every pair of electrons, so the equation cannot be split into separate equations for each electron; that is what "many-body" means (Lecture 5). V^eN depends on electron and nuclear coordinates together, so the Hamiltonian cannot be split into a nuclear part and an electronic part either. The next slides show how the second coupling is handled.
A note on relativity. PAW means projector augmented wave: VASP solves for smooth orbitals and reconstructs their rapid variation close to nuclei using atom-specific data in POTCAR. Its standard datasets include scalar-relativistic atomic corrections, which account for important relativistic energy shifts without explicit spin–orbit coupling. Spin–orbit coupling links an electron's intrinsic spin with its orbital motion; LSORBIT = .TRUE. adds it. Spin is introduced in Lecture 5, PAW in Lecture 18, and spin–orbit effects in Lecture 24. These names identify choices in the model; no PAW derivation is needed to follow today's relaxation.
Why can't we solve this Hamiltonian directly?
Every particle is coupled to every other, so the problem does not split into pieces.
90 coordinates
in one function, for the two-atom cell of silicon: 3 × (2 nuclei + 28 electrons).
Keep in mind
This is not a weakness of VASP. It is the central difficulty of quantum many-body physics, and every method in this course is a way around it.
DFT & VASP Course · Lecture 16 / 20
The exact solution of the full problem is a single function of the 3N electronic and 3M nuclear coordinates, plus spins, and the Coulomb terms couple all of them. Even the two-atom primitive cell of silicon holds 2 nuclei and 28 electrons (silicon has Z=14), which makes 3×30=90 coordinates. A real crystal repeats that cell an enormous number of times. (Lecture 13 and Lecture 14 show how periodicity helps.)
The first step around the difficulty is to separate the nuclei from the electrons. That still leaves Ψ(r1,…,rN) and the exponential wall of Lecture 0, which DFT then sidesteps.
What is the Born–Oppenheimer approximation?
Treat nuclear motion on one electronic energy surface, neglecting coupling to other electronic states.
- ψa: electronic state at nuclear geometry R. It changes with the geometry; a labels the chosen state.
- χa: nuclear wavefunction describing motion on that state's energy surface Ea(R).
- 1 · Fix a geometryHold nuclei fixed for the electronic calculation and solve for the chosen electronic state.
- 2 · Build its energy surfaceRepeat at other geometries to obtain Ea(R). Ground-state work uses the lowest electronic surface.
- 3 · Treat nuclear motionUse this surface for the nuclei, neglecting transitions to other electronic states.
DFT & VASP Course · Lecture 17 / 20
The full wavefunction Ψ(r,R) describes electrons and nuclei together: r collects the electron coordinates and R the nuclear coordinates. The Born–Oppenheimer approximation treats their motion using a single electronic state. The product on the slide expresses this: ψa describes the electrons at each geometry, and χa describes nuclear motion on the resulting energy surface. The electronic wavefunction still depends on where the nuclei are.
The state label in this section identifies a state of all the electrons together. It is distinct from the crystal wavevector k introduced in Lecture 2 and from an individual Kohn–Sham orbital. A potential-energy surface is simply the energy as a function of nuclear geometry; we plot one shortly. An avoided crossing is a region where two electronic energy surfaces approach closely and turn apart, where mixing can become important.
To obtain that surface, hold the nuclei fixed at one geometry, solve the electronic problem, and repeat at other geometries while following the same electronic state. Each state has its own surface Ea(R); ordinary ground-state DFT uses the lowest one, E0(R). Its energy includes nucleus–nucleus repulsion. In a VASP relaxation, the nuclei are held fixed during each electronic solve, then the optimizer uses the resulting forces to choose the next geometry. The surface is sampled as needed during the run.
What is approximated? Nuclear motion can mix different electronic states through terms called nonadiabatic couplings. Born–Oppenheimer neglects that mixing and treats the nuclei on one surface. The usual basic treatment also omits a small diagonal correction to that surface; the next slide's deeper explanation shows where these terms arise.
Why is this often useful? The large nuclear masses often make nuclear motion slow compared with the electronic timescales relevant to that motion. This motivates the approximation, but the mass ratio alone does not guarantee its accuracy. Couplings can matter when electronic states approach one another in energy, for example near avoided crossings.
What happens to the nuclei? They can still move, and χa can describe them quantum mechanically, including vibration and zero-point motion. Treating them classically is an additional approximation. A structural relaxation makes a further choice: it searches for a minimum of the surface. Its sequence of geometries and electronic iterations is an optimization procedure, rather than a record of motion in physical time.
What problem is left once the nuclei are clamped?
Each geometry becomes its own electronic problem, with its own energy E(R).
- Clamped-nuclei Hamiltonian: the full Hamiltonian without T^N, for nuclei fixed at R.
- Electronic wavefunction: a function of the electron coordinates r; R enters only as a parameter.
- Energy for this geometry, including nucleus–nucleus repulsion. Change R and you have a new electronic problem.
- Nucleus–nucleus repulsion: for fixed nuclei a constant, which shifts the energy and leaves ψ unchanged.
The sentence that matters for VASP
A geometry goes in, an energy comes out: {RI}⟶E({RI}).
DFT & VASP Course · Lecture 18 / 20
For the electronic subproblem, omit the nuclear kinetic-energy operator T^N and treat the nuclear positions as fixed parameters. Nuclear kinetic energy belongs to the subsequent problem of nuclear motion on the surface. The equation on the slide is the electronic Schrödinger equation at each geometry. The semicolon in ψel(r;R) marks the distinction: r are the electronic variables, R the nuclear parameters. The nucleus–nucleus repulsion is constant with respect to r, so it shifts the energy without changing the electronic wavefunction. It changes with geometry and contributes to the forces. VASP's total energy includes it.
Solving at many geometries traces out the potential-energy curve, or surface, on which the nuclei then move. That surface is the subject of the next slide.
What exactly is neglected, and when does it matter?
Write the exact wavefunction of electrons and nuclei as an expansion in the clamped-nuclei states, Ψ(r,R)=∑aχa(R)ψa(r;R). Here ψa are the electronic states at geometry R, with energies Ea(R), and χa are nuclear functions to be found. Insert this into the full Schrödinger equation, multiply by ψa∗ and integrate over the electron coordinates. The result is
[T^N+Ea(R)]χa+b∑Λabχb=Eχa,Λab=−I∑MI1(⟨ψa∣∇Iψb⟩⋅∇I+21⟨ψa∣∇I2ψb⟩).The terms Λab appear because the nuclear kinetic energy also acts on the electronic states, which depend on R. They carry a factor 1/MI. The off-diagonal ones, a=b, couple nuclear motion on different electronic surfaces and can cause transitions between electronic states. Dropping all of Λ leaves [T^N+Ea(R)]χa=Eχa: a quantum equation for nuclei moving on a single surface. This is the basic Born–Oppenheimer treatment used here. For a locally real, normalized electronic state, the diagonal term gives the diagonal Born–Oppenheimer correction, a finite-nuclear-mass correction to the surface. Retaining it can matter for accurate spectroscopy, while still neglecting transitions between electronic states.
When does the approximation fail? For a=b the coupling can be rewritten as
⟨ψa∣∇Iψb⟩=Eb−Ea⟨ψa∣(∇IH^el)∣ψb⟩.For distinct, nondegenerate states, the small energy difference in the denominator can make the coupling large near an avoided crossing of two potential-energy curves. The accuracy depends on both the coupling and the nuclear motion. This matters in photochemistry and in some reactions.
Metals have no gap at all, yet in practice the approximation works well there for reaction energies, molecular dynamics and most phonon frequencies. Its failures in metals are subtler: in graphene whose electron density is tuned by a gate voltage, for example, it misses the measured stiffening of one Raman-active vibration, the G peak.
What is a potential-energy surface?
Solving at many geometries maps out the energy surface on which the nuclei move.
DFT & VASP Course · Lecture 19 / 20
Solve the clamped-nuclei problem at many geometries and you trace out the potential-energy surface E(R1,…,RM). Its minima are stable or metastable structures. Its first-order saddle points, maxima along one direction and minima along all others, are the transition states, whose energies set the barriers between minima (Lecture 32).
A real material has 3M nuclear coordinates, so its surface lives in many dimensions; the curve in the figure is a one-dimensional slice through a model bond. The Morse form is a simple formula that behaves like a real bond: De is the depth of the well, the energy needed to break the bond; re is the equilibrium bond length; and a sets how narrow the well is. The parameters are chosen for illustration, not taken from a real molecule. Pull the atoms together and the energy rises steeply; pull them apart and it levels off at zero, the energy of separated atoms. Press Relax to watch the atoms slide downhill; each row of the table is one ionic step, and the slides after next explain what that step does.
How does an energy surface give forces on atoms?
The force on a nucleus is the downhill slope of the energy.
- Force on nucleus I, in eV/Å in VASP.
- Slope of the energy as nucleus I moves, in each of three directions.
- Minus sign: the force points downhill.
- Stationary pointEvery force is zero: a minimum, a maximum or a saddle point.
- MinimumThe energy also rises in every direction, apart from moving all atoms together.
- In OUTCARThe block headed
POSITION … TOTAL-FORCE (eV/Angst).
DFT & VASP Course · Lecture 110 / 20
The force on a nucleus is the negative slope of the energy: it points in the direction that lowers the energy fastest, and its size says how fast. VASP prints the forces in eV/Å, in the OUTCAR block headed POSITION TOTAL-FORCE (eV/Angst), one line per atom with its position and the three force components.
Where the slope vanishes, every force is zero: at a minimum, a maximum or a saddle point. At a minimum the energy also rises in every direction, with one exception in a crystal: moving all atoms together costs nothing. In the bond of the previous figure, the equilibrium distance is where dE/dR=0. Pushed closer, the atoms are pushed apart; pulled further, they are pulled back.
How VASP gets forces without moving any atom
Moving each atom a little and recomputing the energy would take extra calculations for every coordinate. Instead, VASP uses the Hellmann–Feynman theorem. Differentiate E=⟨ψ∣H^el∣ψ⟩ with respect to RI:
∂RI∂E=⟨ψ∂RI∂H^elψ⟩+2Re⟨∂RI∂ψH^elψ⟩.Because ψ is an eigenstate, H^elψ=Eψ, the second term equals E∂⟨ψ∣ψ⟩/∂RI, which is zero because ψ stays normalized. Only the first term remains, and only V^eN and VNN depend on RI. The result has a classical reading: the force on a nucleus is its charge times the electric field at its position, created by the electron density n(r) and by the other nuclei,
FI=ZI[J=I∑ZJ∣RI−RJ∣3RI−RJ−∫n(r)∣RI−r∣3RI−rdr].The first term pushes nucleus I away from the other nuclei; the second pulls it towards the electron cloud. So once the density is known, the forces cost almost nothing extra. In practice the PAW method adds terms from the atom-centred functions that move with each atom, and an SCF loop that is not fully converged adds a small error; Lecture 21 covers both.
What is a structural relaxation?
A loop: solve the electrons, compute the forces, move the nuclei downhill, repeat.
DFT & VASP Course · Lecture 111 / 20
A structural relaxation moves the nuclei downhill on the potential-energy surface, solving the whole electronic problem again at every step:
- Start from the positions in POSCAR and hold the nuclei fixed.
- Solve the electronic problem: the SCF loop of Lecture 0.
- Compute the energy and the forces.
- If every force is below the threshold, stop. Otherwise move the nuclei downhill, in a direction the optimizer builds from the forces, and go back to step 2.
Every ionic step contains a full electronic calculation, so a relaxation that takes 30 ionic steps solves the electronic problem 30 times. That is why relaxations cost far more than single-point runs. (Each new SCF starts from the previous step's orbitals, so it needs fewer iterations than the first.) OSZICAR gets a line per electronic step and a summary line (F=, E0=) per ionic step; OUTCAR gets a force block per ionic step; CONTCAR holds the positions of the last step.
SCF means self-consistent field: repeat the electronic solve until the density and the effective potential agree with each other, while the nuclei stay fixed. EDIFF controls that inner electronic convergence; EDIFFG controls the outer structural stopping test. An optimizer is the numerical rule choosing the next geometry from the forces. Molecular dynamics instead advances nuclear positions in physical time. These are different uses of the same energy and force calculation.
Which INCAR tags control a relaxation?
Five tags decide how the nuclei move, how far, how many times, and when to stop.
| Tag | Controls | Default | For a relaxation |
|---|---|---|---|
| IBRION | How the nuclei move | −1 if NSW = 0; otherwise 0, molecular dynamics | 1 (RMM-DIIS), 2 (conjugate gradient) or 3 (damped MD) |
| POTIM | Scaling of the step width | 0.5 for IBRION = 1, 2, 3 | The default suits IBRION = 2; 1 and 3 are sensitive to it |
| NSW | Maximum number of ionic steps | 0: nuclei never move | Enough steps to converge |
| EDIFFG | When to stop | EDIFF × 10, an energy criterion | Negative: a force threshold in eV/Å |
| ISIF | What may change | 2, except for MD and hybrid functionals | 2: atoms move, the cell is fixed |
DFT & VASP Course · Lecture 112 / 20
These are the tags of Lab 1. The optimizer names describe numerical strategies: conjugate gradient builds search directions from present and previous forces and searches along them; RMM-DIIS uses a history of positions and forces; damped molecular dynamics removes kinetic motion while approaching a minimum. You can choose the supplied algorithms without deriving them today.
- IBRION chooses the algorithm. Its default is a trap: setting only NSW selects molecular dynamics (IBRION = 0), not a relaxation. For a relaxation, IBRION = 2 (conjugate gradient) is the robust choice far from the minimum; IBRION = 1, a quasi-Newton method, is faster close to it; IBRION = 3 follows damped molecular dynamics.
- POTIM scales the step the optimizer takes. Conjugate gradient finds the step length by itself, so the default is fine there; the other two use POTIM directly and can stall or overshoot if it is badly chosen.
- EDIFFG sets the stopping rule. A positive value stops when the energy changes by less than EDIFFG between ionic steps. A negative value stops when the force on every atom is below |EDIFFG|, so
EDIFFG = -0.02asks for forces below 0.02 eV/Å. Small forces establish approximate stationarity; a minimum also requires stable curvature in every unconstrained direction. A force criterion therefore needs a stability check when that distinction matters; the right threshold depends on the research question. - ISIF = 2 moves the atoms and keeps the cell fixed. Relaxing the cell shape and volume comes in Lecture 22.
Does a relaxation find the most stable structure?
No: it usually reaches a local minimum near the starting geometry.
DFT & VASP Course · Lecture 113 / 20
Try the three starting points. From 0.35 Å the relaxation stops in the shallow minimum on the right, although the deeper one is on the left. From −0.30 Å it finds the deep one. From 0.06 Å it stops at once: the force there is already below 0.01 eV/Å, on top of the barrier.
An optimizer only ever follows the local slope, so it cannot know what lies beyond the next hill. A relaxation therefore stops at a stationary point near where it starts, usually a local minimum. If symmetry keeps the forces exactly at zero, it can also stop on a saddle point; a phonon calculation tests the curvature using collective atomic vibrations and can distinguish a minimum from a saddle (Lecture 31). Whether a lower structure exists elsewhere is a different question, the subject of crystal structure prediction, which is how the carbon frameworks of Lecture 0 were found.
Which approximations have we already made?
At least three physical approximations come before any choice of exchange–correlation functional.
| Approximation | What it assumes | When it can fail |
|---|---|---|
| No spin–orbit coupling | Scalar-relativistic PAW datasets; spin–orbit off unless LSORBIT = .TRUE. | Heavy elements, direction-dependent magnetic energy (Lecture 24) |
| Born–Oppenheimer | Nuclear motion on one electronic surface; coupling between electronic states neglected | Strong nonadiabatic coupling; omitted diagonal correction matters for accurate spectroscopy |
| Classical nuclei in a static relaxation | Optimize nuclear positions on the surface; omit zero-point and thermal motion | Nuclear quantum effects, largest with light atoms; finite-temperature properties |
The Born–Oppenheimer approximation is not the exchange–correlation approximation. PBE, SCAN, DFT+U and HSE are later choices.
DFT & VASP Course · Lecture 114 / 20
Before you choose any functional, a VASP relaxation already rests on at least three physical approximations. The third is easy to forget. A relaxed structure is the static one: the nuclei sit at the bottom of the energy surface, without thermal motion and without the zero-point motion that quantum mechanics requires even at absolute zero. Born–Oppenheimer also allows quantum nuclear motion on the same surface. Classical molecular dynamics can include thermal motion; the static relaxation considered here omits it.
A vibrational mode is a pattern in which atoms move together near equilibrium. In the harmonic approximation its energy surface is a quadratic, spring-like well; ω is its angular frequency in radians per second. Quantum mechanics permits a lowest energy of 21ℏω, rather than a nucleus sitting perfectly still at the bottom: this is zero-point energy. A phonon is a quantum of a crystal's collective vibration. In silicon every vibrational quantum is at most 64.5 meV, so each mode contributes at most 32 meV of zero-point energy. An O–H stretch contributes about 0.23 eV. Phonon calculations can estimate these vibrational corrections after a static relaxation (Lecture 31).
An exchange–correlation functional is a rule taking the electron density as input and returning an energy contribution. Names such as PBE and SCAN specify different practical rules; DFT+U and hybrid methods modify how electronic interactions are represented. We will build those choices later. They do not replace the physical and numerical assumptions already used here.
Keep them apart
PBE, SCAN, DFT+U and HSE are choices made inside the electronic problem (Lecture 11, Lecture 25, Lecture 26, Lecture 27). The approximations in this table come before all of them.
Where does each part of the problem live in VASP?
POSCAR holds the clamped positions; INCAR decides whether and how they move.
| File | Its role in this lecture |
|---|---|
POSCAR | The nuclear positions {RI} and the cell: the parameters of the clamped-nuclei problem |
POTCAR | The electron–nucleus interaction for each species, and which electrons are treated explicitly (Lecture 18) |
INCAR | The approximations and settings, and whether and how the nuclei move (NSW, IBRION, EDIFFG) |
KPOINTS | The Brillouin-zone sampling for the periodic electrons (Lecture 15) |
OSZICAR | Energies at every electronic step, and a summary at every ionic step |
OUTCAR | Full output, including the forces at every ionic step |
CONTCAR | The positions of the last step, in POSCAR format |
DFT & VASP Course · Lecture 115 / 20
So the better mental model of a relaxation is not “minimizing a geometry” but this loop: {RI}→ electronic problem →E, {FI}→ new {RI}. Each file in the table holds one piece of it.
Lab 1: what will you run?
Lab 0's silicon, with one atom pushed about 0.08 Å off its site.
INCAR
ENCUT = 300 ISMEAR = 0 SIGMA = 0.05 EDIFF = 1E-6 IBRION = 2 # conjugate gradient ISIF = 2 # atoms move, cell fixed NSW = 20 # at most 20 ionic steps EDIFFG = -0.01 # forces below 0.01 eV/Å
POSCAR
Si, diamond, one atom displaced 5.431 0.0 0.5 0.5 0.5 0.0 0.5 0.5 0.5 0.0 Si 2 Direct 0.00 0.00 0.00 0.27 0.25 0.25
KPOINTS and POTCAR: as in Lab 0.
DFT & VASP Course · Lecture 116 / 20
The cell is Lab 0's, with the first fractional coordinate of the second atom moved from 0.25 to 0.27. That is a step of 0.02 along the first lattice vector, which is 5.431 × √0.5 = 3.840 Å long, so about 0.08 Å. The first four INCAR lines are Lab 0's; the last four turn the static run into a relaxation.
Direct in POSCAR means fractional coordinates in the real-space lattice: (f₁,f₂,f₃) is the position f₁a₁ + f₂a₂ + f₃a₃. These three numbers are not Cartesian distances in Å. The lattice vectors, scaled by 5.431 Å here, convert them to distances. Reciprocal coordinates in KPOINTS use a different basis, introduced in Lecture 2.
Lab 1: what should you see?
Predict before you run: the forces shrink, and each atom moves half the way back.
- OUTCAR: the largest force in the first and the last
TOTAL-FORCEblock. - OSZICAR: the number of ionic steps (lines with
F=) and electronic steps in each. - CONTCAR: atoms near (0.01, 0, 0) and (0.26, 0.25, 0.25); their difference back to (0.25, 0.25, 0.25).
- Why it stopped: forces below |EDIFFG|, or all NSW steps used?
Bring back
OSZICAR, OUTCAR, CONTCAR. Compare your final E0 with Lab 0's: should they agree? We discuss your numbers in Lecture 21.
DFT & VASP Course · Lecture 117 / 20
Why “half the way back”? The forces on the two atoms are equal and opposite, so the optimizer moves each one by the same amount in opposite directions and the midpoint between them stays put. The difference between the two positions returns to (0.25, 0.25, 0.25), to within the force tolerance, but the atoms themselves end near (0.01, 0, 0) and (0.26, 0.25, 0.25). Moving both atoms together costs no energy, so nothing pulls the pair back to the origin.
Why are the two forces equal and opposite? Moving both atoms together leaves the energy unchanged, so the sum of the slopes, ∂E/∂R1+∂E/∂R2, must be zero: the forces cancel. In any calculation without external fields, the forces on all atoms add up to zero, which is a quick check on your OUTCAR.
Already have a relaxation of your own?
Open it and find the initial geometry (POSCAR), the final geometry (CONTCAR), the number of ionic steps, the final energy, the largest final force, the EDIFFG value, and whether it stopped because the forces were small or because NSW was reached. Then write one paragraph answering: what physical problem was VASP repeatedly solving during this relaxation?
Which misconceptions should you drop now?
Five beliefs about relaxations that this lecture should replace. Click a card to turn it over.
“The atoms know where to go.”
VASP computes forces from the energy model; the optimizer uses them to update the positions. Nothing more.
“Relaxed means globally stable.”
A relaxation stops near where it starts, usually in a local minimum, sometimes on a saddle point held by symmetry.
“Small forces mean the calculation is correct.”
Small forces mean the structure is stationary for the chosen model and settings. The model itself can still be wrong.
“The functional is the first approximation.”
Before any functional: no spin–orbit coupling, Born–Oppenheimer, and classical nuclei.
“If VASP converged, the physics is solved.”
Convergence means the stopping criteria were met. It does not mean the result is physically right.
DFT & VASP Course · Lecture 118 / 20
Check yourself
One question per outcome. Answer aloud, then click to compare.
Which particles and interactions does the full Hamiltonian contain?
Nuclei and electrons. Two kinetic energies, plus nucleus–nucleus and electron–electron repulsion and electron–nucleus attraction.
What does Born–Oppenheimer neglect, and can the nuclei still move?
It neglects coupling between electronic states. Nuclei move on one energy surface and can still be treated quantum mechanically. Large nuclear masses motivate this separation; accuracy depends on the couplings and nuclear motion.
Why does a relaxation solve the electrons again at every step?
Moving the nuclei changes the clamped-nuclei Hamiltonian, so the ground state, energy and forces must be recomputed. The forces, −∂E/∂R, set the next move.
Which approximations come before any functional?
No spin–orbit coupling (scalar-relativistic potentials), Born–Oppenheimer, and classical nuclei without zero-point motion.
DFT & VASP Course · Lecture 119 / 20
What should you remember?
A relaxation asks one question again and again: does moving the nuclei lower the energy?
- A material is nuclei and electrons; the Hamiltonian has two kinetic terms and three Coulomb terms, and electron–electron repulsion makes it many-body.
- Born–Oppenheimer: solve the electrons at fixed geometries, then treat nuclear motion on one electronic energy surface, neglecting coupling to other electronic states.
- Forces are FI=−∂E/∂RI. A relaxation searches for a nearby stationary point, solving the electrons again at every step.
- No spin–orbit coupling, Born–Oppenheimer and classical nuclei come before any choice of functional.
Next: Lecture 2 slows down to ask what H^ψ=Eψ really means.
DFT & VASP Course · Lecture 120 / 20
Key terms
- Operator
- A rule that turns one function into another, written with a hat, A^. In quantum mechanics every observable has a linear, Hermitian operator: position multiplies by x, momentum is −iℏd/dx, energy is the Hamiltonian.
- Hamiltonian
- The operator for the total energy of a system. For a material it collects the kinetic energies of the electrons and nuclei and all their Coulomb interactions.
- Born–Oppenheimer approximation
- Treating nuclear motion on a single electronic energy surface obtained by solving the electrons at fixed nuclear geometries, while neglecting coupling between electronic states. The basic treatment also omits the diagonal finite-nuclear-mass correction. Nuclei can still move quantum mechanically; treating them classically is an additional approximation.
- Nonadiabatic couplings
- Terms, dropped in the Born–Oppenheimer approximation, through which the motion of the nuclei mixes different electronic states. They can become large where electronic states come close in energy.
- Clamped-nuclei Hamiltonian
- The Hamiltonian of the electrons for nuclei held fixed: the full Hamiltonian without the nuclear kinetic energy, in which the nucleus–nucleus repulsion is just a constant.
- Potential-energy surface
- The energy E({RI}) as a function of the positions of all nuclei. Its minima are stable or metastable structures; its first-order saddle points are the transition states, whose energies set the barriers between them.
- Local minimum
- A point where the energy rises in every direction (apart from moving all atoms together), although a lower minimum may exist elsewhere. A relaxation usually ends in a local minimum, not necessarily the global one.
- Force on a nucleus
- FI=−∂E/∂RI, the negative slope of the energy with respect to the position of nucleus I. It points in the direction that lowers the energy fastest; VASP reports it in eV/Å.
- Structural relaxation
- Moving the nuclei step by step downhill, in directions built from the forces, until every force is below a threshold. It stops at a stationary point near the starting structure, usually a local minimum.
- Nuclear quantum effects
- Consequences of the quantum nature of the nuclei themselves, which calculations with classical nuclei leave out. They matter most in systems containing light atoms.
VASP tags in this lecture
LSORBIT- Switches on spin–orbit coupling, which VASP leaves out by default. It requires vasp_ncl and sets LNONCOLLINEAR = .TRUE.Default: .FALSE. · VASP Wiki: LSORBIT
IBRION- How the nuclei are moved between ionic steps: −1 not at all, 0 molecular dynamics, 1 relaxation with RMM-DIIS, 2 relaxation with conjugate gradients, 3 relaxation with damped molecular dynamics.Default: −1 if NSW = −1 or 0, otherwise 0 (molecular dynamics) · VASP Wiki: IBRION
POTIM- In ionic relaxations (IBRION = 1, 2, 3), a scaling constant for the step widths; in molecular dynamics, the time step in fs.Default: 0.5 for IBRION = 1, 2 and 3; 0.015 Å for IBRION = 5 and 6; none for molecular dynamics (must be set) · VASP Wiki: POTIM
NSW- Maximum number of ionic steps. With NSW = 0 the nuclei are not moved: a single-point (static) calculation.Default: 0 · VASP Wiki: NSW
EDIFFG- Stopping criterion of an ionic relaxation. A positive value stops when the total energy changes by less than EDIFFG between ionic steps; a negative value stops when the norms of all forces are below |EDIFFG|. It is not used in molecular dynamics.Default: EDIFF × 10 · VASP Wiki: EDIFFG
ISIF- Which degrees of freedom may change and whether the stress tensor is calculated. ISIF = 2: the atoms move, the cell shape and volume stay fixed, and the stress is calculated; ISIF = 3: atoms, cell shape and volume all change.Default: 0 for molecular dynamics (IBRION = 0) or hybrid functionals (LHFCALC = .TRUE.), otherwise 2 · VASP Wiki: ISIF
ENCUT- Cutoff energy of the plane-wave basis set, in eV. The VASP Wiki strongly recommends setting it explicitly in every INCAR, and checking the convergence of the quantity you report.Default: the largest ENMAX among the POTCAR files · VASP Wiki: ENCUT
ISMEAR- How partial occupancies are assigned to the electronic states. ISMEAR = 0 is Gaussian smearing; ISMEAR = N > 0 is Methfessel–Paxton smearing of order N, which can give erroneous results for insulators.Default: 1 · VASP Wiki: ISMEAR
SIGMA- Width of the smearing, in eV. With Gaussian smearing (ISMEAR = 0) values of 0.03–0.1 are typical; for metals with Methfessel–Paxton smearing, SIGMA can be as large as keeps the entropy term below about 1 meV per atom.Default: 0.2 · VASP Wiki: SIGMA
EDIFF- Stopping criterion of the electronic self-consistency loop, in eV. The loop stops when both the change of the free energy and the change of the band-structure energy between two steps fall below EDIFF.Default: 10−4 eV · VASP Wiki: EDIFF
Further reading
- C. D. Sherrill, “The Born–Oppenheimer approximation”, lecture notes, School of Chemistry and Biochemistry, Georgia Institute of Technology (March 2005). · PDF
- D. Vogtenhuber, “Basics III: Ionic relaxation, stress and cell shapes, phonons and molecular dynamics”, VASP workshop lecture (Rennes, 2016). · PDF