next up previous contents index
Next: The installation of VASP Up: Tutorial, first steps Previous: Tutorial, first steps   Contents   Index


Copy all files from the tutor/diamond directory to a work directory, and proceed step by step:

  1. The following four files are the central input files, and must exist in the work directory before VASP can be exceuted. Please, check each of these files using an editor.
  2. Run VASP by typing
    > vasp
    Again this command will work properly only, if the vasp excecutable is located somewhere in the search path. The search path is usually supplied in the PATH variable of your UNIX shell. For more details, the user is refered to a UNIX manual.

    After starting VASP, you will get a output similar to

     VASP.4.4.3 10Jun99
     POSCAR found :  1 types and    2 ions
     LDA part: xc-table for CA standard interpolation
     file io ok, starting setup
     WARNING: wrap around errors must be expected
     entering main loop
           N     E             dE            d eps    ncg     rms        rms(c)
    CG :   1   0.1209934E+02  0.120E+02  -0.175E+03   165   0.475E+02 
    CG :   2  -0.1644093E+02 -0.285E+02  -0.661E+01   181   0.741E+01 
    CG :   3  -0.2047323E+02 -0.403E+01  -0.192E+00   173   0.992E+00  0.416E+00
    CG :   4  -0.2002923E+02  0.444E+00  -0.915E-01   175   0.854E+00  0.601E-01
    CG :   5  -0.2002815E+02  0.107E-02  -0.268E-03   178   0.475E-01  0.955E-02
    CG :   6  -0.2002815E+02  0.116E-05  -0.307E-05   119   0.728E-02 
       1 F= -.20028156E+02 E0= -.20028156E+02  d E =0.000000E+00 
     writing wavefunctions
    VASP uses a self-consistency cycle with a Pulay mixer and an iterative matrix diagonalisation scheme to calculate the Kohn Sham (KS) ground-state. Each line corresponds to one electronic step, and in each step the wavefunctions are iteratively improved a little bit, and the charge density is refined once. A copy of stdout (that's what you see on the screen) is also written to the file OSZICAR.

    The columns have the following meaning: Column N is counter for the the electronic iteration step, E is the current free energy, dE the change of the free energy between two steps, and d eps the change of the band-structure energy. The column ncg indicates how often the Hamilton operator is applied to the wavefunctions. The column rms gives the initial norm of the residual vector ( $ R= ({\bf H} - \epsilon {\bf S}) \vert \phi \rangle $) summed over all occupied bands, and is an indication how well the wavefunctions are converged. Finally the column rms(c) indicates the difference between the input and output charge density. During the first five steps, the density and the potentials are not updated to pre-converge the wavefunctions (therefore rms(c) is not shown). After the first five iterations, the update of the charge density starts. For the diamond example, only three updates are required to obtain a sufficiently accurate ground-state. The final line shows the free electronic energy F after convergence has been reached.

    More information (for instance the forces and the stress tensor) can be found in the OUTCAR file. Please check this file in order to get an impression which information can be found on the OUTCAR file.

    Another important file is the WAVECAR file which stores the final wave functions. To speed up calculations, VASP usually tries to read this file upon startup. At the end of calculations, the file is written (or if it exists overwritten).

  3. To calculate the equilibrium lattice constant try to type ./run. The shell script run is a simple shell script, which runs vasp for different lattice parameters. You can check the contents of this script with an editor.

  4. Determine the equilibrium volume (for instance using a quadratic fit of the energy). The equilibrium lattice constant should be close to 3.526.

  5. Now set the equilibrium lattice constant in the POSCAR file and move the ion located at 0.25 0.25 0.25 to 0.24 0.24 0.24, and relax it back to the equilibrium position using VASP. You have to add the lines
     NSW    = 10  !   allow 10 steps
     ISIF   = 2   !   relax ions only
     IBRION = 2   !   use CG algorithm
    to the INCAR file. (At this point you might find it helpful to read section 6.22).

    In order to find the minimum, VASP performs a line minimisations of the energy along the direction of the forces (see 6.22). The line minimisation, requires VASP to take a "small" trial step into the direction of the force, then the total energy is re-evaluated. From the energy change and the initial and final forces, VASP calculates the position of the minimum. For carbon, the automatically chosen trial step is much too large, and VASP can run more efficiently, if the parameter POTIM is set in the INCAR file:

     POTIM  = 0.1 !   reduce trial step
    Do that and start once again from a more exited structure (i.e. 0.20,0.20,0.20).

    At the end of any job, VASP writes the final positions to the file CONTCAR. This file has the same format as the POSCAR file, and it is possible to continue a run, by copying CONTCAR to POSCAR and running VASP again.

  6. As a final exercise, change the lattice constant in the POSCAR file to 3.40, and change ISIF in the INCAR file to
     ISIF   = 3   ! relax ions + volume
     POTIM  = 0.1 ! you need to specify POTIM as well
    and start once again. If ISIF is set to 3, VASP relaxes the ionic positions and the cell volume.

    Do not forget to check the OUTCAR file from time to time.

  7. The final lattice constant will be quite accurate (around 3.510 Å). The small difference to the lattice constant obtained by fitting the energy volume curve is due to the Pulay stress (see section 7.6): the stress tensor is only correct if the calculations are fully converged with respect to the basis set. There are several possibilities to solve this problem:
  8. Increase the plane wave cutoff by $ 30\%$ with respect to the standard value in the INCAR file (ENMAX=550). Now the basis set is almost converged, and more accurate results for the lattice constant can be obtained. Try this for carbon, and increase the accuracy of the electronic ground-state calculation by setting
     EDIFF  = 1E-7 ! very high accuracy required 10^-7 eV
    in the INCAR file. Start from the CONTCAR file of the last calculation (i.e. copy CONTCAR to POSCAR).

  9. The Pulay error is independent of the structure, so it can be evaluated once and for ever using first a large basis-set and than a small one. Start at the equilibrium structure, with a high cutoff (ENCUT=550). The stress tensor should be zero.

    Then use the default cutoff. The stress is now -43 kBar. This yields an estimation of the possible errors caused by the basis set incompleteness. (You might correct the relaxation by setting

     PSTRESS = -43  ! Pulay stress = -43 kB
    in the INCAR file, but it is usually preferable to increase ENCUT).
Hopefully this small example has given you an idea how VASP works. More details tutorials can be found in the minutes of the VASP workshop (we strongly urge all newbies to run through those tutorials, step by step, takes maybe a couple of days, but should pay off).

next up previous contents index
Next: The installation of VASP Up: Tutorial, first steps Previous: Tutorial, first steps   Contents   Index
N.B. Requests for support are to be addressed to: