Table of Contents

VASP was developed by Georg Kresse, Martijn Marsman, and Jürgen Furthmüller Computational Physics, Faculty of Physics, Universität Wien, Austria

VASP is is a DFT code using plane waves as the basis set. Both the projector augmented waves (PAW) and the ultrasoft pseudo-potential methods are implemented in VASP.

VASP documentation

There is a lot of documentation for VASP available on the internet. A few useful links:

VASP basics

The basic VASP calculation consists of three steps.

  1. Setting up the required in files INCAR, POSCAR, KPOINTS, and POTCAR
  2. Extracting and checking the results in the out files OSZICAR, OUTCAR, and etc

Input files

INCAR

INCAR is the central input file of VASP. It determines 'what to do and how to do it', and can contain a relatively large number of parameters. Most of these parameters have convenient defaults, and a user unaware of their meaning should not change any of the default values. Be very careful in dealing with the INCAR file, it is the main source of errors and false results!

INCAR
System  = system description        # A description of the calculation, not important 
ISTART  = 0                         # Read old wavefunctions? 0 no,
ISMEAR  = -5                        # -5 tetrahedron method with Blöchl corrections, good for semiconductors
ISIF    = 2                         # 2 = relax ionic positions only  
IBRION  = 2                         # 2 = use CG algorithm
PREC    = ACCURATE                  # The general level of accuracy in the calculate. 
                                    # Possible values: Low | Medium | High | Normal | Single | Accurate   
NSW     = 20                        # Defines the maximum number of relaxation steps.
NELMIN  = 6                         # Do a minimum of 6 SCF iterations
NELM    = 100                       # Do a maximum of 100 SCF iterations 
EDIFF   = 5E-6                      # Convergence criteria for the SCF iterations in eV 
ENCUT   = 300                       # Cut-off energy, determines the number of plane waves in the basis set, system dependent.
                                    # Defaults to the largest value of ENMAX in the POTCAR.
NBANDS  = 50                        # Number of bands in the calculation, system and temperature dependent. 
                                    # There should always be some empty bands. One can check the occupancy in the OUTCAR.
IALGO   = 48                        # The algorithm used for the SCF iterations
                                    # 38 = Blocked-Davidson algorithm (DAV), default, most stable method.
                                    # 48 = Residual minimization method direct inversion in the iterative subspace (RMM-DIIS), faster then (DAV)
LCHARG  = .FALSE.                   # Whether or not the charge density output file CHGCAR should be written, often a quite large file. 
LWAVE   = .FALSE.                   # Whether or not the wave function output file WAVECAR should be written, often a quite large file. 

When doing calculations it is important to check that VASP reaches a solution before “NELM” SCF iterations or “NSW” ionic steps has been reached.

A list of INCAR parameters http://cms.mpi.univie.ac.at/wiki/index.php/Category:INCAR

POSCAR

The POSCAR input file determines the geometry to be simulated. It consists of the following lines

  1. An arbitrary comment line describing the system
  2. A scaling factor for the lattice vectors, usually the lattice constant. If it is given with a minus sign it's interpreted as the unit cell volume instead
  3. The first lattice vector
  4. The second lattice vector
  5. The third lattice vector
  6. A list of the elements in the system i.e. “Ti” or “Ti N”. This line is new for version 5 of VASP.
  7. A list of the number of elements if each species in the above line
  8. Determines the the atomic coordinates are given in “direct coordinates” i.e. as a fraction of the lattice vectors, or in cartesian coordinates in Ångström. Possible values: Direct | Cartesian
  9. The following lines contain the atomic coordinates for each atom.
POSCAR
Cubic BN
   3.57
 0.0 0.5 0.5
 0.5 0.0 0.5
 0.5 0.5 0.0
   B N
   1 1
Direct
 0.00 0.00 0.00 
 0.25 0.25 0.25

A detailed description of the format: http://cms.mpi.univie.ac.at/vasp/vasp/POSCAR_file.html

KPOINTS

The KPOINTS file specify which points to use in the integration over the Brillouin zone. It can look in many different way but a common way it the following:

  1. A comment line describing the KPOINT mesh
  2. 0 = An automatic generation scheme
  3. The automatic generation scheme either “Monkhorst Pack” (default) or “Gamma”, for hexagonal lattices Gamma should be used.
  4. The number of k-points in each direction of the reciprocal lattice. The total number of points is usually reduced by using the lattice symmetry.
KPOINTS
Comment
 0
Monkhorst Pack
 35 35 35 
 0  0  0 

A detailed description of the format: http://cms.mpi.univie.ac.at/vasp/vasp/KPOINTS_file.html

POTCAR

The POTCAR file contains the parametrization of the pseudo-potential for each element, and hence the number of electrons (ZVAL) that are threaten for each species. The number of electrons in the system is of importance when choosing the number of bands (NBAND in INCAR file) to use among other things. It also specifies which functional that's used (LDA or PBE). The POTCAR file contains the individual species POTCARs concatenated after each others in the same order as in the POSCAR.

On NSC machines the POTCAR files can be found in

To generate the POTCAR the “cat” tool can be used:

 cat POTCAR_1 POTCAR_2 ... POTCAR_n > POTCAR 

First lines of Iron POTCAR:

 PAW_PBE Fe 06Sep2000
 8.00000000000000000
 parameters from PSCTR are:
   VRHFIN =Fe:  d7 s1
   LEXCH  = PE
   EATOM  =   594.4687 eV,   43.6922 Ry
 
   TITEL  = PAW_PBE Fe 06Sep2000
   LULTRA =        F    use ultrasoft PP ?
   IUNSCR =        1    unscreen: 0-lin 1-nonlin 2-no
   RPACOR =    2.000    partial core radius
   POMASS =   55.847; ZVAL   =    8.000    mass and valenz
   RCORE  =    2.300    outmost cutoff radius
   RWIGS  =    2.460; RWIGS  =    1.302    wigner-seitz radius (au A)
   ENMAX  =  267.883; ENMIN  =  200.912 eV
   RCLOC  =    1.701    cutoff for local pot
   LCOR   =        T    correct aug charges
   LPAW   =        T    paw PP
   EAUG   =  511.368
   DEXC   =    -.022
   RMAX   =    2.817    core radius for proj-oper
   RAUG   =    1.300    factor for augmentation sphere
   RDEP   =    2.442    radius for radial grids
   QCUT   =   -4.437; QGAM   =    8.874    optimization parameters
 
   Description
     l     E      TYP  RCUT    TYP  RCUT
     2   .000     23  2.300
     2   .000     23  2.300
     0   .000     23  2.300
     0   .000     23  2.300
     1  -.200     23  2.300
     1   .000     23  2.300
     3   .000      7   .000
   Error from kinetic energy argument (eV)
   NDATA  =      100
   STEP   =   20.000   1.050
  97.7      96.4      95.6      94.1      93.3      91.6      89.9      88.9
  87.0      85.0      84.0      81.9      79.7      77.4      75.1      72.7
  70.3      67.9      65.4      61.7      59.2      56.6      52.9      50.4
  47.9      44.3      40.8      38.4      35.1      31.9      28.8      25.9
  23.2      20.6      18.2      16.0      13.3      11.5      9.41      8.01
  6.38      5.01      3.88      2.94      2.20      1.60      1.15      .727
  .490      .288      .162      .101      .573E-01  .367E-01  .282E-01  .268E-01
  .268E-01  .258E-01  .231E-01  .190E-01  .144E-01  .102E-01  .691E-02  .438E-02
  .323E-02  .271E-02  .262E-02  .260E-02  .239E-02  .203E-02  .152E-02  .106E-02
  .729E-03  .564E-03  .513E-03  .508E-03  .481E-03  .409E-03  .300E-03  .215E-03
  .160E-03  .144E-03  .142E-03  .131E-03  .105E-03  .764E-04  .571E-04  .504E-04
  .494E-04  .447E-04  .342E-04  .254E-04  .210E-04  .204E-04  .186E-04  .144E-04
  .107E-04  .960E-05  .924E-05  .776E-05
END of PSCTR-controll parameters
 local part
 81.2582175088937078
   .86360772E+02   .86347328E+02   .86306975E+02   .86239767E+02   .86145770E+02
   .86025081E+02   .85877820E+02   .85704132E+02   .85504188E+02   .85278179E+02
   .85026322E+02   .84748853E+02   .84446029E+02   .84118129E+02   .83765451E+02
   ...
   ...
   ...

Running VASP

To carry out the actual simulation a job script is usually created and submitted to the cluster for execution. The job file and how to submit it is described in the Basics section.

job
#SBATCH -A liu1
#SBATCH -p green
#SBATCH -J MY_FIRST_RUN
#SBATCH -N 1 
#SBATCH -t 10:00:00
 
cd /path/to/simulation/dir
 
mpprun /software/apps/vasp/5.3.2-13Sep12/default/vasp-half

The last line calls VASP using the mpprun utility to manage the MPI parallelization. In the “/software/apps/vasp/5.3.2” directory, on NSCs clusters, there are many different version of VASP for different porpoises.

Output files

The VASP calculation will generate a number of different output files:

OSZICAR and standard out

The OSZICAR and standard out (redirected to the slurm-<job number>.out file) contains important information about how the simulation has proceeded. A detailed description can be found at http://cms.mpi.univie.ac.at/vasp/vasp/stdout_OSZICAR_file.html.

mpprun INFO: Starting openmpi run on 1 nodes (8 ranks)...
 running on    8 nodes
 distr:  one band on    1 nodes,    8 groups
 vasp.5.2.8 07Jul10 complex 
 POSCAR found type information on POSCAR  Ti N 
 POSCAR found :  2 types and    8 ions
 LDA part: xc-table for Ceperly-Alder, standard interpolation
 POSCAR, INCAR and KPOINTS ok, starting setup
 WARNING: small aliasing (wrap around) errors must be expected
 FFT: planning ...(           1 )
 reading WAVECAR
 entering main loop
       N       E                     dE             d eps       ncg     rms          rms(c)
DAV:   1     0.303618115885E+03    0.30362E+03   -0.12398E+04   960   0.118E+03
DAV:   2    -0.457474106077E+00   -0.30408E+03   -0.29460E+03  1000   0.309E+02
DAV:   3    -0.937031702450E+02   -0.93246E+02   -0.91504E+02  1568   0.163E+02
DAV:   4    -0.987826784141E+02   -0.50795E+01   -0.50670E+01  1232   0.443E+01
DAV:   5    -0.989208737402E+02   -0.13820E+00   -0.13815E+00  1376   0.736E+00    0.242E+01
DAV:   6    -0.797499355133E+02    0.19171E+02   -0.17124E+02  1392   0.760E+01    0.115E+01
DAV:   7    -0.778572721217E+02    0.18927E+01   -0.21580E+01  1496   0.321E+01    0.410E+00
DAV:   8    -0.780775434854E+02   -0.22027E+00   -0.87662E+00  1128   0.234E+01    0.421E+00
DAV:   9    -0.775039116726E+02    0.57363E+00   -0.21855E+00  1104   0.119E+01    0.848E-01
DAV:  10    -0.774891689351E+02    0.14743E-01   -0.10357E-01  1328   0.218E+00    0.462E-01
DAV:  11    -0.774831413887E+02    0.60275E-02   -0.31284E-02  1136   0.123E+00    0.149E-01
DAV:  12    -0.774830500968E+02    0.91292E-04   -0.10262E-02  1528   0.620E-01    0.135E-01
DAV:  13    -0.774826562241E+02    0.39387E-03   -0.20010E-03  1488   0.280E-01    0.259E-02
DAV:  14    -0.774826542175E+02    0.20066E-05   -0.27251E-05  1128   0.311E-02
   1 F= -.77482654E+02 E0= -.77479348E+02  d E =-.992006E-02

OUTCAR

The OUTCAR file contains most of the important results that you will want to look at although it is very long and things can often be a bit hard to find in the beginning. The format of the OUTCAR can vary a lot depending on the set off supplied parameters in the INCAR but it often consist of the following major elements:

  1. A small header containing the VASP version
  2. A description of the POTCARs that are used
  3. A description of the POSCAR
  4. A description of the reciprocal lattice with k-points, here is also the number of k-points that are left after the symmetry reduction.
  5. A long description with the parameters from the INCAR, and also most other parameters that have default values.
  6. A few short sections containing details on the simulation that is to be performed.
  7. After this the calculation starts a block of information is written with information about each SCF step.
  8. When SCF convergence is reached a block with results is written containing energies and various information. This is usually the part you are looking for.
  9. If more ionic steps are to be performed the last to steps are repeated. In this case you usually want the results from the last one.
  10. A final section containing some statistics from the simulation. Here it is possible to see how much memory and time the simulation consumed.

Part of the OUTCAR result block after SCF convergence has been reached:

  FREE ENERGIE OF THE ION-ELECTRON SYSTEM (eV)
  ---------------------------------------------------
  free  energy   TOTEN  =       -77.482654 eV
 
  energy  without entropy=      -77.472734  energy(sigma->0) =      -77.479348
 
    CHARGE:  cpu time    0.04: real time    0.04
    FORLOC:  cpu time    0.00: real time    0.00
    FORNL :  cpu time    0.30: real time    0.30
    STRESS:  cpu time    0.85: real time    0.85
    FORCOR:  cpu time    0.02: real time    0.02
    FORHAR:  cpu time    0.00: real time    0.00
    MIXING:  cpu time    0.00: real time    0.00
 
  FORCE on cell =-STRESS in cart. coord.  units (eV):
  Direction    XX          YY          ZZ          XY          YZ          ZX
  --------------------------------------------------------------------------------------
  Alpha Z   184.02489   184.02489   184.02489
  Ewald    -505.23404  -505.23404  -505.23404     0.00000     0.00000     0.00000
  Hartree    80.47130    80.47130    80.47130     0.00000     0.00000     0.00000
  E(xc)    -148.55374  -148.55374  -148.55374     0.00000     0.00000     0.00000
  Local     -87.15080   -87.15080   -87.15080     0.00000     0.00000     0.00000
  n-local   -58.89710   -58.41662   -52.53501    -0.37058    -0.19271    -0.14650
  augment    30.71091    30.71091    30.71091     0.00000     0.00000     0.00000
  Kinetic   468.22941   493.33300   502.86392     1.76093     1.26206     0.50026
  Fock        0.00000     0.00000     0.00000     0.00000     0.00000     0.00000
  -------------------------------------------------------------------------------------
  Total     -14.20563   -14.20563   -14.20563     0.00000     0.00000     0.00000
  in kB    -267.18553  -267.18553  -267.18553     0.00000     0.00000     0.00000
  external pressure =     -267.19 kB  Pullay stress =        0.00 kB

Convergence

In an VASP calculation, when the Kohn-Sham equations are solved, the equation system are expanded in a basis set of plane waves. And the infinite lattice is replaced by a unit cell and a sum over reciprocal lattice vectors (k-points) using the Block theorem. In principle the number of k-points and the size of the basis could be infinite, but in practice it has to be limited to a finite number.

Energy cut off

The energy cut off (ENCUT in the INCAR) determines how many plane wave to use in the expansion of the wave functions. The more wave the better the expansion and hence the result, but the larger the equation system to solve. Hence a compromise has to be found. Usually there is a number of planes wave where the result will not change in any significant way when more waves are added. So this is the number of plane wave will give good results while resulting in a as small as possible equation system. The POTCAR contains default values for the ENCUT for each elements. But in some cases and depending on what information that are to be calculated this value might need to be adjusted by specifying it in the INCAR.

K-points

When the Bloch theorem is used, the infinite lattice is reduced to a sum of unit cell calculation for each reciprocal lattice vector. In principle there are an infinite number of reciprocal lattice vectors, but it turns out we can get very good results just by considering a small sample of them. The size if this sample is specified in the K-POINTS file. The result of the simulation should not depend on the selection of K-POINTS, hence the sample size needs to be increased until the result is invariant of the number of K-POINTS.

Example

Example of the energy dependence on k-points and energy cut off