Personal tools
Document Actions

Using VASP

by pul7 last modified January 28, 2008 04:00 PM

This document is an introduction to using VASP on HPC systems. VAMP/VASP is a package for performing ab-initio quantum-mechanical molecular dynamics (MD) using pseudopotentials and a plane wave basis set. The approach implemented in VAMP/VASP is based on a finite-temperature local-density approximation (with the free energy as variational quantity) and an exact evaluation of the instantaneous electronic ground state at each MD-step using efficient matrix diagonalization schemes and an efficient Pulay mixing. These techniques avoid all problems occurring in the original Car-Parrinello method which is based on the simultaneous integration of electronic and ionic equations of motion. The interaction between ions and electrons is described using ultrasoft Vanderbilt pseudopotentials (US-PP) or the projector augmented wave method (PAW). Both techniques allow a considerable reduction of the necessary number of plane-waves per atom for transition metals and first row elements. Forces and stress can be easily calculated with VAMP/VASP and used to relax atoms into their instantaneous groundstate.


Contents


Introduction

VASP is a complex package for performing ab-initio quantum-mechanical molecular dynamics (MD) simulations using pseudopotentials or the projector-augmented wave method and a plane wave basis set. The approach implemented in VASP is based on the (finite-temperature) local-density approximation with the free energy as variational quantity and an exact evaluation of the instantaneous electronic ground state at each MD time step.

Beginning users are advised to read slides prepared for the hand-on sections. The User guide provides more details for experienced users.

If you are publicizing results obtained from the use of VASP software, please refer to the software for proper citation information.


Setting Up Your Environment

To use VASP you must first be added to the msc group. If you wish to use VASP you may request that you be added to the msc group by contacting the HPC group via e-mail at beatnic@cac.psu.edu. There is no charge to use VASP on HPC clusters.

VASP is installed in the directory /usr/global/msc/vasp/, the default version is 4.26.

To start VASP you simply need to type in the command mscrun vasp. Optionally you may execute mscrun vasp serial for serial execution.


Input Files

There are four essential input files, and must exist in the work directory before VASP can be executed. The following is a sample input for fcc Silicon available from VASP hand-on section.


  • INCAR file

    The INCAR file is the central input file of VASP. It determines 'what to do and how to do it'. It is a tagged format free-ASCII file: Each line consists of a tag (i.e. a string) the equation sign '=' and one or several values. Defaults are supplied for most parameters. i.e.
    general:        
    System = fcc Si
    ISTART = 0 ; ICHARG=2
    ENCUT = 240
    ISMEAR = 0; SIGMA = 0.1;
  • POSCAR
    The POSCAR file contains the positions of the ions. For the Silicon example, the POSCAR file contains the following lines:
    fcc Si:          comment line
    3.9 universal scaling factor
    0.5 0.5 0.0 first Bravais lattice vector
    0.0 0.5 0.5 second Bravais lattice vector
    0.5 0.0 0.5 third Bravais lattice vector
    1 number of atoms per species; The ordering must be consistent with the POTCAR and the INCAR file.
    direct direct or cart (only first letter is significant)
    0.0 0.0 0.0 positions
    The positions can be given in direct (fractional) or Cartesian coordinates. In the second case, positions will be scaled by the universal scaling factor supplied in the second line. The lattice vectors are always scaled by the universal scaling factor.

  • KPOINTS
    The KPOINTS files determines the k-points setting
    K-Points         Comment
    0 0 = automatic generation of k-points
    Monkhorst M use Monkhorst Pack
    11 11 11 grid 11x11x11
    0 0 0 shift (usually 0 0 0)
    The first line is a comment. If the second line equals zero, k-points are generated automatically using the Monkhorst-Pack's technique (first character in third line equals ``M''). With the supplied KPOINTS file a 11x11x11 Monkhorst-Pack grid is used for the calculation.

  • POTCAR
    The POTCAR file contains the pseudopotentials (for more then one species simply concatenate POTCAR files using the UNIX command cat, if compressed, use zcat). The POTCAR file also contains information about the atoms (i.e. their mass, their valence, the energy of the atomic reference configuration for which the pseudopotential was created etc.).
     > zcat /usr/global/msc/vasp/potpaw_PBE/Si/POTCAR.Z > POTCAR


Running VASP interactively or in PBS

1) To run VASP interactively, change to the working directory containing all the input files and execute the command,
> mscrun vasp serial

After starting VASP, you will get a output similar to


Materials Simulation Center startup script
(type mscrun on terminal to see all options)
--------------------------------------------------
Started at
Tue Sep 11 11:39:25 EDT 2007
Script has 2 arguments.
Argument 1 (program): vasp
No parallel environment detected, only serial run possible.
Argument 2 (network): serial
------------------------------------
Starting vasp in serial...
vasp.4.6.12 27Jun03 complex
POSCAR found : 1 types and 1 ions
LDA part: xc-table for Pade appr. of Perdew
POSCAR, INCAR and KPOINTS ok, starting setup
WARNING: wrap around errors must be expected
entering main loop
N E dE deps ncg rms rms(c)
DAV: 1 -0.307499124361E+01 -0.30750E+01 -0.12475E+03 732 0.285E+02
DAV: 2 -0.488660020615E+01 -0.18116E+01 -0.17027E+01 1008 0.280E+01
DAV: 3 -0.489743971945E+01 -0.10840E-01 -0.10837E-01 756 0.231E+00
DAV: 4 -0.489744703745E+01 -0.73180E-05 -0.73185E-05 1014 0.616E-02
DAV: 5 -0.489744704006E+01 -0.26100E-08 -0.30595E-08 666 0.796E-04 0.759E-01
DAV: 6 -0.488461678265E+01 0.12830E-01 -0.40786E-03 744 0.369E-01 0.453E-01
DAV: 7 -0.487733700929E+01 0.72798E-02 -0.89233E-03 726 0.544E-01 0.253E-02
DAV: 8 -0.487732011826E+01 0.16891E-04 -0.31809E-05 600 0.500E-02
1 F= -.48773201E+01 E0= -.48757892E+01 d E =-.306176E-02
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).


2) To run VASP in parallel mode, it is better to use PBS script to submit job.


The PBS script would look like the following.

#PBS -l nodes=4:ppn=2
#PBS -l walltime=00:30:00
#PBS -j oe

cd $PBS_O_WORKDIR
TMPDIR=/tmp
exprot TMPDIR

echo " "
echo "Job started on `hostname` at `date`"

#Build host file for parallel execution

`cat $PBS_NODEFILE | sort -r | uniq > $TMPDIR/pbs_hostfile.$$`

echo "Machines to be used are:"
cat "$TMPDIR/pbs_hostfile.$$"

# go go go

time mscrun vasp

# remove host file
rm $TMPDIR/pbs_hostfile.$$

echo " "
echo "Job Ended on `hostname` at `date`"
echo " "

Pseudopotentials and PAW potentials

The POTCAR files are located in several directories under /usr/global/msc/vasp.

  • Pseudopotentials generated with LDA are located in
    /usr/global/msc/vasp/pot_LDA
  • Pseudopotentials generated with GGA-PW91 are located in
    /usr/global/msc/vasp/pot_GGA
  • PAW potentials generated with LDA are located in
    /usr/global/msc/vasp/potpaw_LDA
  • PAW potentials generated with GGA-PW91 are located in
    /usr/global/msc/vasp/potpaw_GGA
  • PAW potentials generated with GGA-PBE are located in
    /usr/global/msc/vasp/potpaw_PBE


Citations

Please remember to cite the following references when publishing results obtained with VASP:

  • G. Kresse and J. Hafner. Ab initio molecular dynamics for liquid metals. Phys. Rev. B, 47:558, 1993.
  • G. Kresse and J. Hafner. Ab initio molecular-dynamics simulation of the liquid-metal-amorphous-semiconductor transition in germanium. Phys. Rev. B, 49:14251, 1994.
  • G. Kresse and J. Furthmüller. Efficiency of ab-initio total energy calculations for metals and semiconductors using a plane-wave basis set. Comput. Mat. Sci., 6:15, 1996.
  • G. Kresse and J. Furthmüller. Efficient iterative schemes for ab initio total-energy calculations using a plane-wave basis set. Phys. Rev. B, 54:11169, 1996.

Depending on the potentials used you should also include the following citations:

Ultra-soft pseudopotentials

  • D. Vanderbilt. Soft self-consistent pseudopotentials in a generalized eigenvalue formalism. Phys. Rev. B, 41:7892, 1990.
  • G. Kresse and J. Hafner. Norm-conserving and ultrasoft pseudopotentials for first-row and transition-elements. J. Phys.: Condens. Matter, 6:8245, 1994.

PAW potentials

  • P. E. Blochl. Projector augmented-wave method. Phys. Rev. B, 50:17953, 1994.
  • G. Kresse and D. Joubert. From ultrasoft pseudopotentials to the projector augmented-wave method. Phys. Rev. B, 59:1758, 1999.

The references to the exchange and correlation approximations implemented in VASP are:

Local Density Approximation (LDA)

  • J. P. Perdew and A. Zunger. Self-interaction correction to density-functional approximations for many-electron systems. Phys. Rev. B, 23:5048, 1981.

Generalized Gradient Approximation PW91 (GGA-PW91)

  • J.P. Perdew, J.A. Chevary, S.H. Vosko, K.A. Jackson, M.R. Pederson, D.J. Singh, and C. Fiolhais. Atoms, molecules, solids, and surfaces: Applications of the generalized gradient approximation for exchange and correlation. Phys. Rev. B, 46:6671, 1992.
  • J.P. Perdew, J.A. Chevary, S.H. Vosko, K.A. Jackson, M.R. Pederson, D.J. Singh, and C. Fiolhais. Erratum: Atoms, molecules, solids, and surfaces: Applications of the generalized gradient approximation for exchange and correlation. Phys. Rev. B, 48:4978, 1993.

Generalized Gradient Approximation PBE (GGA-PBE)

  • J. P. Perdew, K. Burke, and M. Ernzerhof. Generalized gradient approximation made simple. Phys. Rev. Lett., 77:3865, 1996.
  • J. P. Perdew, K. Burke, and M. Ernzerhof. Erratum: Generalized gradient approximation made simple. Phys. Rev. Lett., 78:1396, 1997.

For your convenience you can download here a BibTeX file or an EndNote library with this citations.

Always remember to acknowledge the Materials Simulation Center with this standard text:

"Supported in part by the Materials Simulation Center, a Penn-State MRSEC and MRI facility."

And, please send us a copy of your publications.


More Information