Osman Goni Ridwan

VASP cheat sheet · Applications

What VASP can calculate

A map of the properties you can get from VASP, with the tags each needs, the run that must come first and the tool that does the analysis, plus copy-ready recipes for the most common ones and a table of which methods work with which functional.

Checked against VASP 6.6.1 · Updated

The short version

  1. Almost every property is a recipe of two or three runs: relax, a careful static run, then the property run reading its CHGCAR or WAVECAR.
  2. Use the same ENCUT, POTCARs, functional and k-point density in every run you compare.
  3. Check your functional first: with r²SCAN or a hybrid, LEPSILON and VASP's own perturbation-theory phonons (IBRION = 7, 8) are not available; use LCALCEPS and finite differences (IBRION = 6).
  4. Many properties need an external tool: phonopy for phonon bands, LOBSTER for bonding, the Bader program for charges, pymatgen for convex hulls.

Find a property

What VASP can calculate

Native means VASP computes it; an external tool is named where one is needed.

PropertyKey tagsNeeds firstAnalysis
Formation energy, convex hullnone special; identical settingsrelaxed compound and elemental referencespymatgen PhaseDiagram
Cohesive energyisolated atom: ISPIN = 2, ISMEAR = 0, non-cubic box, Γ onlybulk energyby hand
Surface energyISIF = 2, k-mesh n × m × 1, LDIPOL for asymmetric slabsbulk reference with the same in-plane cellγ = (Eslab − N Ebulk) / 2A
Adsorption energysame cutoff in every run; dipole correctionclean slab, molecule in a boxby hand
Charged point defectNELECT, ISPIN = 2bulk, its band edges and dielectric constantdoped, sxdefectalign (finite-size corrections)
Equation of state, bulk modulusISIF = 4 at fixed volumesrelaxed cellpymatgen EOS, ASE
Elastic constantsIBRION = 6, ISIF = 3cell relaxed with the same settingspymatgen ElasticTensor, VASPKIT
DOS, projected DOSICHARG = 11, ISMEAR = −5, LORBIT = 11, NEDOSCHGCARpy4vasp, sumo, pymatgen
Band structureline-mode KPOINTS or KPOINTS_OPTCHGCAR (GGA)py4vasp, sumo, pymatgen
Band gapBANDGAP (6.4.3 and later)static runOUTCAR, py4vasp, pymatgen
Effective massfine band path near the extremaband structuresumo-bandstats (external)
Work function, band alignmentLVHAR, LDIPOL, IDIPOL = 3, LVACPOTAVslab with vacuumLOCPOT plane average, py4vasp
Bader chargesLAECHGstatic runbader, chgsum.pl (external)
Electron localization functionLELF with NPAR = 1static runVESTA
COHP, bonding analysisLWAVE, ISYM = 0, NBANDS setstatic runLOBSTER, LobsterPy (external)
Partial charge, STM imageLPARD, IBAND or EINTWAVECARVESTA; py4vasp STM (6.5.0, HDF5)
Fermi surfacedense uniform non-SCF meshCHGCARIFermi (external)
Band unfolding (supercells, alloys)non-SCF on generated k-pointsWAVECAReasyunfold (external)
Wannier functionsLWANNIER90, or VASP's own LOCPROJ / SCDMconverged runWannier90
HSE06 gap and bandsLHFCALC, HFSCREEN = 0.2PBE WAVECARas for bands
GW quasiparticles, BSE opticsALGO = EVGW0, BSE …DFT run with many empty bandspy4vasp
RPA total energiesALGO = RPA (and its preparation runs)exact diagonalizationOUTCAR
van der Waals correctionsIVDW (DFT-D3, …) or vdW-DF functionals——
Optical absorptionLOPTICS, CSHIFT, many bandsstatic runpy4vasp, vasprun.xml
Dielectric tensor, Born charges, piezoelectric tensorLEPSILON or LCALCEPS; + IBRION = 6 for the ionic partrelaxed structureOUTCAR
Γ-point phonons, force constantsIBRION = 6 (or 8 for GGA)tightly relaxed structureOUTCAR (THz, f/i = imaginary)
Phonon bands, DOS, thermal propertiessupercell forces with phonopy; VASP's own LPHON_DISPERSION gives the bands onlyrelaxed cellphonopy
Thermal expansion (quasi-harmonic)phonons at several volumesE–V curvephonopy-qha
Lattice thermal conductivitythird-order force constantsphononsphono3py (external)
IR and Raman spectraBorn charges and phonons (IR); Raman needs external scriptsdielectric runPhonopy-Spectroscopy (external)
Electron–phonon coupling, mobilityELPH tags (native from 6.5.0)supercell phonon potentialspy4vasp
Electronic transport (Seebeck, conductivity)dense uniform meshCHGCARBoltzTraP2 (external)
Magnetic moments, orderings, anisotropy, exchangeISPIN, MAGMOM, LSORBIT …see the magnetism sheet—
NMR chemical shieldingLCHIMAGrelaxed structureOUTCAR
Electric field gradientsLEFG—OUTCAR
Hyperfine couplingLHYPERFINE, ISPIN = 2—OUTCAR
Core-level shifts, XASICORELEVEL (core hole in a supercell); BSE-based XAS from 6.6.0supercellOUTCAR, vasprun.xml
Ferroelectric polarizationLCALCPOL (Berry phase)polar and reference structuresby hand
Finite electric fieldEFIELD_PEADgapped systemOUTCAR
Implicit solvationLSOL (VASPsol patch)a patched VASP—
Migration and reaction barriersIMAGES, SPRINGrelaxed end pointssee the NEB sheet
Diffusion, melting, finite-temperature structureIBRION = 0, MDALGO—see the AIMD sheet

Which methods work with which functional

MethodLDA, GGAr²SCANHybrids
LEPSILON (perturbation theory)yesnono
LCALCEPS (finite field)yes (gapped)yes (gapped)yes (gapped)
Phonons IBRION = 7, 8yesnono
Phonons IBRION = 6, phonopyyesyesyes (expensive)
LOPTICSyes6.6.0 and later; with spin-orbit set LPEAD = .TRUE.yes
Band structure with ICHARG = 11yes6.6.0 and laternever
Band structure with KPOINTS_OPT6.3.0 and later6.3.0 and later6.3.0 and later (HFRCUT = −1 for gapped systems)

Recipes

Density of states and projected DOS

Run a static calculation with LCHARG = .TRUE., then the run below with its CHGCAR on a denser Γ-centred mesh (the INCAR sheet has both). The gap appears in OUTCAR with VASP 6.4.3 and later.

DOS from CHGCAR
ICHARG  = 11
ISMEAR  = -5
NEDOS   = 2001
LORBIT  = 11
NSW     = 0
LMAXMIX = 4            ! same as the static run

Bader charges, ELF and charge-density differences

Static run that writes the all-electron densities and the ELF
NSW    = 0 ; IBRION = -1
LAECHG = .TRUE.        ! AECCAR0 (core) and AECCAR2 (valence)
LELF   = .TRUE.        ! ELFCAR
NPAR   = 1             ! required with LELF
LCHARG = .TRUE.
Bader analysis (Henkelman group's bader program)
chgsum.pl AECCAR0 AECCAR2            # reference density CHGCAR_sum
bader CHGCAR -ref CHGCAR_sum         # charges in ACF.dat: electrons per atom

The net charge of an atom is its ZVAL minus the Bader electron count. If the total charge is off, refine the FFT grid (NGXF, NGYF, NGZF). For a density difference ρ(AB) − ρ(A) − ρ(B), compute all three at the same positions, cell and FFT grid.

Work function of a slab

Static slab run with the dipole correction
NSW       = 0 ; IBRION = -1
LDIPOL    = .TRUE.
IDIPOL    = 3          ! correction along c, the vacuum direction
DIPOL     = 0.5 0.5 0.5  ! the slab's centre of mass; this line assumes a centred slab
LVHAR     = .TRUE.     ! electrostatic potential (no exchange-correlation) to LOCPOT
LVACPOTAV = .TRUE.     ! vacuum levels on both sides in OUTCAR

Work function Φ = Vvacuum − EF. Leave 8–12 Å of vacuum on each side, relax first without the correction if it destabilizes the SCF, and take EF from the same run.

Elastic constants

Elastic tensor by finite differences
IBRION = 6             ! finite differences with symmetry
ISIF   = 3             ! needed for the elastic tensor
NFREE  = 2             ! or 4
POTIM  = 0.015
PREC   = Accurate
EDIFF  = 1E-7
NSW    = 1

Use a cutoff about 30% above ENMAX and start from a cell relaxed with the same settings. OUTCAR gives “TOTAL ELASTIC MODULI” in kBar (divide by 10 for GPa). VASP orders the columns XX YY ZZ XY YZ ZX. For the standard Voigt order (XX YY ZZ YZ ZX XY), move the 4th row and column (XY) to the end, that is, reorder them as 1 2 3 5 6 4. Perturbation theory (IBRION = 7, 8) does not give elastic constants.

Dielectric tensor, Born charges, piezoelectric tensor

GGA: perturbation theory (LEPSILON)
LEPSILON = .TRUE.
IBRION   = 8           ! adds the ionic contribution (GGA only)
EDIFF    = 1E-8
NSW      = 1
r2SCAN or hybrids: finite field (LCALCEPS)
LCALCEPS = .TRUE.      ! gapped systems only
IBRION   = 6           ! adds the ionic contribution
NFREE    = 2
POTIM    = 0.015
EDIFF    = 1E-8
NSW      = 1

OUTCAR prints the electronic dielectric tensor, the Born effective charges and the piezoelectric tensor; the ionic parts appear under their own headings. LCALCEPS needs a regular Γ-centred mesh. Don't combine LEPSILON with LOPTICS in one run.

Optical absorption

Frequency-dependent dielectric function
LOPTICS = .TRUE.
NBANDS  = 96           ! 2-3 x the default: empty bands are needed
NEDOS   = 2001
CSHIFT  = 0.1          ! broadening in eV (the default)
ISMEAR  = 0 ; SIGMA = 0.05
NSW     = 0 ; IBRION = -1

This is the independent-particle spectrum; excitonic effects need BSE. The real and imaginary parts are in vasprun.xml and vaspout.h5.

Phonons

Force calculation in a phonopy supercell
IBRION = -1 ; NSW = 0  ! one static run per displaced supercell
PREC   = Accurate
EDIFF  = 1E-8
ISMEAR = 0 ; SIGMA = 0.05
LREAL  = .FALSE.
LWAVE  = .FALSE. ; LCHARG = .FALSE.

Relax first with tight forces (EDIFFG ≈ −0.001). phonopy generates the displaced supercells, collects their forces and gives bands, DOS and thermal properties; imaginary frequencies at Γ or elsewhere signal an instability or an under-converged relaxation. For Γ-point modes only, VASP alone with IBRION = 6 is enough.

COHP with LOBSTER

Static run for LOBSTER
NSW    = 0 ; IBRION = -1
ISYM   = 0             ! LOBSTER needs the full (time-reversal-reduced) mesh
LWAVE  = .TRUE.
NBANDS = 128           ! at least the number of LOBSTER basis functions
LORBIT = 11

LOBSTER reads WAVECAR and writes COHPCAR.lobster and ICOHPLIST.lobster; LobsterPy automates the analysis.

Partial charges and STM images

Charge density of states near the Fermi level
LPARD = .TRUE.
EINT  = -0.5 0         ! window in eV
NBMOD = -3             ! window relative to the Fermi energy
NSW   = 0 ; IBRION = -1

Read the WAVECAR of a converged run with the same ENCUT and symmetry settings. VASP writes PARCHG (or, from 6.5.0, to vaspout.h5 with LPARDH5 for py4vasp's STM plots).

Formation energy and convex hull

pymatgen: energy above the hull from your own runs
from pymatgen.analysis.phase_diagram import PhaseDiagram, PDEntry
from pymatgen.core import Composition
entries = [PDEntry(Composition("Fe"), -8.47),        # energies per formula unit from your runs
           PDEntry(Composition("O2"), -9.86),        # same POTCARs, ENCUT, functional
           PDEntry(Composition("Fe2O3"), -38.0)]
pd = PhaseDiagram(entries)
for e in entries:
    print(e.composition, pd.get_form_energy_per_atom(e), pd.get_e_above_hull(e))

The numbers above are placeholders, not results. Compute every reference yourself with the same settings and its own magnetic ground state. Mixing your energies with Materials Project data, or GGA with GGA+U, needs their correction scheme.

Common mistakes

  • LEPSILON or IBRION = 8 with r²SCAN or a hybrid: not supported. Use LCALCEPS and IBRION = 6.
  • Elastic constants read in VASP's column order as if it were Voigt order.
  • Comparing energies from runs with different POTCARs, cutoffs, U values or functionals.
  • A DOS or optical spectrum with too few empty bands, too coarse a mesh or the default 301 NEDOS points.
  • LELF without NPAR = 1; Bader charges on a coarse grid; COHP without enough bands.
  • Work functions with LVTOT (it includes the exchange-correlation potential) instead of LVHAR.
  • Phonons from a structure relaxed only to 0.02 eV/Å: small imaginary modes that are not physical.

Other tags on this sheet

NELECT
Total number of electrons; set it for charged cells (fewer electrons for a positive charge).Default: the valence electrons of the POTCARs (neutral cell) · VASP Wiki: NELECT
BANDGAP
How VASP reports the band gap in OUTCAR (VASP 6.4.3 and later).Default: COMPACT · VASP Wiki: BANDGAP
LVHAR
Write the ionic plus Hartree potential to LOCPOT (no exchange-correlation): the choice for work functions.Default: .FALSE. · VASP Wiki: LVHAR
LDIPOL
Dipole correction of the potential and forces for slabs and molecules.Default: .FALSE. · VASP Wiki: LDIPOL
IDIPOL
Direction of the dipole correction: 1, 2 or 3 along a lattice vector, 4 in all directions.Default: not set · VASP Wiki: IDIPOL
LVACPOTAV
Print the vacuum potential on both sides of a slab to OUTCAR.Default: .FALSE. · VASP Wiki: LVACPOTAV
LAECHG
Write the all-electron core and valence densities (AECCAR0, AECCAR2) for Bader analysis.Default: .FALSE. · VASP Wiki: LAECHG
LELF
Write the electron localization function to ELFCAR.Default: .FALSE. · VASP Wiki: LELF
LPARD
Write band- or energy-resolved partial charge densities (PARCHG), e.g. for STM images.Default: .FALSE. · VASP Wiki: LPARD
IBAND
The bands for LPARD.Default: not set · VASP Wiki: IBAND
EINT
The energy window for LPARD.Default: not set · VASP Wiki: EINT
IVDW
Empirical van der Waals correction, e.g. 11 for DFT-D3 with zero damping, 12 for Becke–Johnson damping.Default: 0 (none) · VASP Wiki: IVDW
LOPTICS
Frequency-dependent dielectric function in the independent-particle picture.Default: .FALSE. · VASP Wiki: LOPTICS
CSHIFT
Complex shift (broadening) in eV used for LOPTICS.Default: 0.1 (for LOPTICS) · VASP Wiki: CSHIFT
LEPSILON
Static dielectric tensor, Born effective charges and piezoelectric tensor by density-functional perturbation theory (LDA and GGA only).Default: .FALSE. · VASP Wiki: LEPSILON
LCALCEPS
The same quantities as LEPSILON from finite electric fields; works for hybrids and meta-GGA, gapped systems only.Default: .FALSE. · VASP Wiki: LCALCEPS
LPHON_DISPERSION
Phonon dispersion along the QPOINTS path, for the primitive cell, from the supercell force constants of the same run (6.3.2 and later).Default: .FALSE. · VASP Wiki: LPHON_DISPERSION
LCHIMAG
NMR chemical shielding tensors by linear response.Default: .FALSE. · VASP Wiki: LCHIMAG
LEFG
Electric field gradients at the nuclei.Default: .FALSE. · VASP Wiki: LEFG
LHYPERFINE
Hyperfine coupling constants (spin-polarized runs).Default: .FALSE. · VASP Wiki: LHYPERFINE
ICORELEVEL
Core-level energies: 1 initial state, 2 final state with a core hole.Default: 0 · VASP Wiki: ICORELEVEL
LCALCPOL
Berry-phase electronic polarization.Default: .FALSE. · VASP Wiki: LCALCPOL
EFIELD_PEAD
A finite homogeneous electric field (eV/Å), also used internally by LCALCEPS.Default: 0.01 in each direction with LCALCEPS, otherwise 0 · VASP Wiki: EFIELD_PEAD

The physics behind this sheet

Further reading

  1. VASP Wiki, “Category: Linear response” (dielectric tensors, Born charges, piezoelectric tensors). · www.vasp.at
  2. VASP Wiki, “Phonons from finite differences”. · www.vasp.at
  3. VASP Wiki, “Computing the work function”. · www.vasp.at
  4. The official VASP tutorials, with worked examples for most properties. · www.vasp.at