Guide · VASP · 13 min read
How do I read OSZICAR and OUTCAR while a VASP job runs?
Checked against the docs · VASP wiki · Last checked 12 November 2026 · Spot a mistake? Tell us
Short answer
OSZICAR (and the job's standard output) has one line per electronic step, labeled by the algorithm (DAV:, RMM:, CGA:), and one line per ionic step with F= and E0=; watch how many electronic steps each ionic step takes against NELM, and whether dE and rms(c) fall steadily. OUTCAR holds the detail: the forces under TOTAL-FORCE, the energies under free energy TOTEN, the stress and external pressure, and the eigenvalues with their occupations.
What are OSZICAR and OUTCAR?
OSZICAR holds information about how fast the calculation is converging and where it is now. The OSZICAR page asks you to always keep a copy of it, because it may hold important information. The same lines go to the job's standard output (stdout); the Terminal output page says that after the line entering main loop, the standard output is essentially equivalent to OSZICAR. On a cluster, the scheduler writes the standard output to a file (on SLURM, slurm-<jobid>.out unless your script names another).
OUTCAR is VASP's detailed, human-readable output. The OUTCAR page lists what it holds: a summary of the input (the INCAR tags, the starting structure, the k-point mesh, the potentials), the electronic steps and Kohn-Sham eigenvalues, the stress tensor, the forces on the atoms, local charges and magnetic moments, and dielectric properties when you ask for them. Its parts are separated by lines of dashes.
How much goes into OUTCAR is set by NWRITE (default 2). With the default, VASP writes the energy, stress, forces and eigenvalues at every ionic step; the NWRITE page recommends NWRITE = 0 or 1 for long molecular-dynamics runs, and says NWRITE = 3 might give information if something goes wrong.
Two words used below: an electronic step is one pass of the inner loop that makes the electrons self-consistent for a fixed arrangement of atoms; an ionic step is one pass of the outer loop that moves the atoms (in a relaxation or molecular dynamics). Every ionic step runs a full electronic loop, up to NELM steps (60 by default).
What does each OSZICAR line mean?
The electronic steps
The ALGO page prints this example: one line per electronic step, under a header that names the columns.
N E dE d eps ncg rms rms(c)
DAV: 1 0.230591997322E+03 0.23059E+03 -0.16471E+04 13824 0.142E+03
DAV: 2 0.128984547176E+02 -0.21769E+03 -0.20617E+03 12600 0.334E+02
DAV: 3 -0.871201735783E+01 -0.21610E+02 -0.21211E+02 14288 0.100E+02
DAV: 4 -0.952629881459E+01 -0.81428E+00 -0.81287E+00 15680 0.208E+01
DAV: 5 -0.954352651394E+01 -0.17228E-01 -0.17224E-01 15640 0.295E+00 0.119E+01| Column | What it is, from the ALGO page |
|---|---|
Label (DAV:) | The algorithm used in that step (table below). |
N | The number of the electronic step. |
E | The total (free) energy in eV at this step. |
dE | The change in the total energy since the previous step. |
d eps | The change in the band-structure energy (the sum of the one-electron eigenvalues) in this step; it should be comparable with the next step's dE. |
ncg | How many times the Hamiltonian acted on an orbital in this step: a measure of the work done. |
rms | The size of the residual: how well the current orbitals solve the eigenvalue problem. |
rms(c) | The root-mean-square change of the charge density in the mixer. It appears only once density mixing has started, after the first NELMDL steps at fixed density. With ALGO = All or Damped this column is headed ort instead and reports the orbitals' orthonormality error. |
The label tells you which algorithm made the step:
| Label | Algorithm |
|---|---|
DAV: | Blocked Davidson: ALGO = Normal, and the first steps of Fast, VeryFast, All and Damped |
RMM: | RMM-DIIS: ALGO = VeryFast, and the main phase of Fast |
SDA: / CGA: | Steepest-descent and conjugate-gradient all-band steps: ALGO = All or Conjugate |
DMP: | Damped dynamics: ALGO = Damped |
So a run with ALGO = Fast normally shows a few DAV: lines and then RMM: lines; that is the algorithm switching phase, not a problem.
The line that ends each ionic step
When the electronic loop has converged, VASP writes one summary line. The VASP wiki's O₂ dimer tutorial (a relaxation with ISPIN = 2) prints:
DAV: 14 -0.985349953776E+01 -0.15177E-03 -0.57546E-06 64 0.125E-02 0.371E-03
DAV: 15 -0.985357023804E+01 -0.70700E-04 -0.22439E-06 64 0.741E-03
1 F= -.98535702E+01 E0= -.98535702E+01 d E =-.985357E+01 mag= 2.0000From the OSZICAR page:
- the first number is the ionic step;
F=is the total free energy (with the energy of the reference atoms already subtracted, which is why an isolated atom comes out near zero);E0=is the energy extrapolated to zero smearing (σ → 0);d Eis the change in the total energy since the last ionic step; for a static run, it is the electronic entropy times σ;mag=appears in this spin-polarized run: it is the total magnetic moment of the cell. The wiki's NiO example says the total magnetic moment "should be 0 in the OSZICAR file" and showsmag= 0.0000on this line; in a noncollinear run (Fcc Ni (revisited)) it has three components, x, y and z.
Extra lines in a relaxation
With the conjugate-gradient relaxer (IBRION = 2), VASP writes the progress of its line search between ionic steps. From the O₂ dimer tutorial:
curvature: -0.09 expect dE=-0.900E-05 dE for cont linesearch -0.900E-05
trial: gam= 0.00000 g(F)= 0.969E-04 g(S)= 0.000E+00 ort =-0.331E-02 (trialstep = 0.828E+00)
search vector abs. value= 0.969E-04
reached required accuracy - stopping structural energy minimisationThe Structure optimization page explains the trial: line: g(F) and g(S) are the norms of the remaining forces and stress, ort checks that the forces are orthogonal to the previous search direction (it should be small), and trialstep is the step size in units of POTIM. reached required accuracy is the line you want: the forces (or energy) met EDIFFG. Occasional ZBRENT lines are the line search being refined; when VASP stops with ZBRENT: fatal error, see What does the ZBRENT error mean?
The line that ends each molecular-dynamics step
With IBRION = 0, the summary line has more fields. The OSZICAR page prints:
1 T= 1873.0 E= -.13382154E+04 F= -.13401522E+04 E0= -.13397340E+04
EK= .19368E+01 SP= .00E+00 SK= .00E+00T is the current temperature; E is the total free energy including the ions' kinetic energy and the energy of the Nosé thermostat; F and E0 are as above; EK is the kinetic energy; SP and SK are the potential and kinetic energy of the Nosé thermostat. The Molecular-dynamics calculations page asks you to monitor E: in NVE runs and in deterministic NVT runs such as Nosé-Hoover, it should show no systematic drift. The Molecular-dynamics calculations page's newer example prints all of it on one line (29 T= 339. E= -.40079922E+02 F= ...).
What is in OUTCAR, and how do I find it?
OUTCAR repeats the electronic steps in detail and adds blocks the short log does not have. These are the ones people look for most, as the wiki prints them.
The forces on every atom. After each ionic step, a table of positions and forces (in eV/Å, as the heading says), closed by the total drift. From the Ni(100) surface relaxation tutorial:
POSITION TOTAL-FORCE (eV/Angst)
-----------------------------------------------------------------------------------
0.00000 0.00000 0.00000 0.000000 0.000000 0.391352
0.00000 1.76500 1.76500 0.000000 0.000000 -0.397024
...
-----------------------------------------------------------------------------------
total drift: 0.000000 0.000000 0.016391The first three columns are the atom's position, the last three the force on it. A negative EDIFFG stops a relaxation when the norm of every atom's force is below its absolute value (the EDIFFG page), so this is the block to read when you want to know how close a relaxation is.
The energy. At the end of each ionic step. From the VASP wiki's O atom tutorial:
FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV)
---------------------------------------------------
free energy TOTEN = -0.31463722 eV
energy without entropy= -0.00611258 energy(sigma->0) = -0.16037490TOTEN is the same free energy as F= in OSZICAR, and energy(sigma->0) the same as E0=. The electronic steps in OUTCAR print a similar block whose heading reads free energy TOTEN (one space after "free"); the Volume relaxation page's script uses grep "free e" with two spaces to pick out the ionic steps' line only.
The stress and pressure. For each ionic step, the stress tensor in eV and in kB, then one summary line. From the O atom tutorial:
in kB -2.33695 -2.33695 -2.33695 0.00000 -0.00000 -0.00000
external pressure = -2.34 kB Pullay stress = 0.00 kBThe Volume relaxation page uses this external pressure line to estimate the Pulay stress; see What cutoff energy should I use?
The eigenvalues and occupations. For each k-point, each band's energy and how many electrons occupy it, after the Fermi energy. From the O atom tutorial:
E-fermi : -8.8431 XC(G=0): -0.8043 alpha+bet : -0.1463
k-point 1 : 0.0000 0.0000 0.0000
band No. band energies occupation
1 -23.8439 2.00000
2 -8.9040 1.33333
...
8 1.8633 0.00000The highest bands should have zero occupation; if they are partly filled, VASP has too few empty bands (see How do I fix a relaxation that won't converge?).
The input VASP actually used. The top of OUTCAR summarizes the tags, the structure, the k-points and the potentials as VASP read them, which is the place to check that a tag you set was understood.
To pull these out:
grep " F= " OSZICAR # one line per ionic step: energies
grep "free e" OUTCAR # the ionic steps' TOTEN lines
grep "external pressure" OUTCAR # the pressure at each ionic step
grep -A 7 "TOTAL-FORCE" OUTCAR | tail -n 8 # the last forces block, for 5 atoms
grep "reached required accuracy" OUTCAR # a relaxation that converged
tail -f OSZICAR # follow a running job; Ctrl+C stops followingThe -A number is how many lines grep prints after the heading: the dashed line, one line per atom and the closing dashed line, so the number of atoms plus 2; tail keeps the last block (one more line, for the heading). Set both from your atom count.
How do I tell, while it runs, that the job is healthy?
Count the electronic steps per ionic step. Every ionic step should end well before NELM. The NELM page says that a loop that does not converge within 40 steps will probably not converge at all. An ionic step whose last electronic line is numbered NELM (60 unless you changed it) stopped at its limit, not because it converged. This one-liner prints the count for each ionic step:
awk '/^ *(DAV|RMM|CGA|SDA|DMP):/ {n=$2} / F= / {print "ionic step", $1 ":", n, "electronic steps"}' OSZICARWatch dE fall. The ALGO page's test of a healthy electronic loop: plot E minus the final E against the step number; the decay should be exponential. A noisy decay can mean the loop stopped by accident or is converging very slowly. The loop stops when the energy change falls below EDIFF (the EDIFF page: both the total energy and the band-structure energy).
Watch rms(c). Large values mean the density is still changing and perhaps sloshing back and forth (charge sloshing), the ALGO page says. If it stays large or jumps, see How do I fix a relaxation that won't converge?
In a relaxation, watch the forces shrink. g(F) on the trial: lines, and the TOTAL-FORCE block in OUTCAR, should fall from step to step. The run is done when reached required accuracy appears. If the number of ionic steps reaches NSW without it, the relaxation ran out of steps.
In molecular dynamics, watch T and E. The Molecular-dynamics calculations page: T should fluctuate around the target in a thermostatted run, EK should evolve smoothly, and E should show no systematic drift in NVE and deterministic NVT runs. It lists warning signs: repeated electronic non-convergence, large force spikes, a steady temperature drift in NVT, strong energy drift in NVE. More in How do I spot an MD run that has gone wrong?
Read the warnings. The Terminal output page advises checking the standard output (or OUTCAR) for warnings after every calculation: "Often a small oversight can lead to plausible, but incorrect results." Warnings come in boxes of W's; errors that stop VASP in boxes of E's. See What do VASP's error messages mean?
What do people mix up?
| Mix-up | What you would see | What to do |
|---|---|---|
Taking F as the energy of a molecule or atom | A free energy that includes an electronic entropy term the system should not have | The O atom tutorial says the relevant energy for molecules and atoms is the energy without entropy (energy without entropy in OUTCAR). |
Reading dE on the F= line as a convergence error | A large d E on the first ionic step | It is the change since the last ionic step; on the first step it is close to the whole energy. In a static run it is entropy × σ. |
Treating the first DAV: lines of an ALGO = Fast run as a wrong algorithm | DAV: lines, then RMM: lines | That is Fast working as documented: Davidson first, then RMM-DIIS. |
Missing rms(c) in the first steps and thinking the output is broken | Only six numbers on the first few lines | The density is held fixed for the first NELMDL steps; rms(c) appears once mixing starts. |
Grepping free energy TOTEN with single spaces | Dozens of lines per ionic step | Use two spaces (free energy or grep "free e") to get only the ionic steps' line. |
Reading the last line of OSZICAR as "finished" | An F= line and nothing after it | A relaxation that met EDIFFG says reached required accuracy; without that line it stopped on NSW, the walltime or an error. |
Setting NWRITE = 0 for a short run and then looking for the forces | Forces only at the first and last ionic step | The NWRITE page: with 0, forces are written for the first and last step only; keep the default 2 for short runs. |
While a job runs, Monitor shows the latest lines of the job's output, and Analyze's Graphs chart the energy per ionic step, the largest force and the pressure as Verlet reads them from OSZICAR and OUTCAR. You can also drop in an OSZICAR and OUTCAR from any finished run to see the same charts, and Files copies the path of the run's folder on the cluster, where the full OUTCAR stays. Everything above works without it.