Skip to content

Tutorial 08

Lee Burton edited this page Sep 13, 2025 · 4 revisions

⚛️ VASP

This tutorial provides an introduction to the basics of VASP and its usage. We’ll walk you through running your first VASP calculation using an FCC silicon crystal as an example. 🧪


📂 Required Input Files

Before running VASP, you need four key files in your working directory. Each plays a unique role in the simulation process:

INCAR  POSCAR  KPOINTS  POTCAR

All four are required for VASP to run properly. Let's look at them one by one. 🔍


🧠 INCAR — The Brain of VASP

The INCAR file is the main input file. It controls what kind of calculation VASP performs and how it does it. 🧾 It contains various tags that define algorithms, accuracy settings, and convergence criteria.

Default values exist, but it's best to set parameters yourself. See the VASP INCAR wiki for full documentation.

Example: FCC Silicon INCAR

System = fcc Si
ISTART = 0 ; ICHARG = 2
EDIFF = 1e−4
EDIFFG = 1e-3 # EDIFF × 10
ENCUT = 240
ISMEAR = 0 ; SIGMA = 0.1
NCORE = 4
KPAR  = 1
NSW   = 0

🔑 Key Tags

  • EDIFF: Convergence threshold for electronic steps
  • EDIFFG: Convergence threshold for ionic steps
  • NSW: Max number of ionic steps allowed
  • NCORE: Number of MPI ranks per band group (recommended instead of NPAR in VASP 6).
    • Choose a divisor of your ranks per k-point group (e.g. 2–6).
  • KPAR: Parallelization across k-points.
    • Must divide both the number of k-points and the total MPI ranks.
    • Safe to use in VASP 6; differences in energy are only roundoff-level.

📌 Note:
Older tutorials often suggested NPAR. In VASP 6+, NPAR has been replaced by NCORE. Always use NCORE + KPAR for efficient scaling.

There are over 300 possible parameters! Explore them all in the VASP Manual.


🧱 POSCAR — The Structure File

POSCAR defines the atomic structure and lattice geometry. It’s often the first file you prepare for a new simulation. You can write it manually ✍️ or download it from databases like the Materials Project. 🌐

Example: FCC Silicon POSCAR

fcc Si:
 3.9
 0.5 0.5 0.0
 0.0 0.5 0.5
 0.5 0.0 0.5
   1
cartesian
0 0 0

📌 Notes:

  • Lattice constant: 3.9 Å
  • Primitive FCC unit cell
  • 1 Si atom at origin

🧮 KPOINTS — Brillouin Zone Sampling

The KPOINTS file tells VASP how to sample k-space, which is key to convergence in electronic structure calculations. ⚡

Example: Monkhorst-Pack Grid

k-points
 0
Monkhorst Pack
 11 11 11
 0 0 0

🧾 Format Breakdown

  1. Line 1: Comment
  2. Line 2: 0 = automatic generation
  3. Line 3: Grid type (e.g. Monkhorst Pack)
  4. Line 4: Mesh size in 3 directions
  5. Line 5 (optional): Mesh shift (usually 0 0 0)

🧠 Use finer meshes for better accuracy—at the cost of computation time.


🧪 POTCAR — The Pseudopotentials

The POTCAR file contains element-specific pseudopotentials and exchange-correlation data.

  • Must match the order of elements in your POSCAR file ✅
  • Combine all needed elements into one file using cat 🐱

Example (using PAW PBE 64-bit potentials on the POWER cluster):

/bmd/shared/vasp/recommended-potpawPBE64

🔧 Generate POTCAR

cat /path/to/Si/POTCAR > POTCAR

🎉 Next Steps

Congrats! 🥳 You’ve now learned the basics of setting up a VASP calculation with:

  • 🧠 INCAR
  • 🧱 POSCAR
  • 🧮 KPOINTS
  • 🧪 POTCAR

Ready to run it on a supercomputer? 🚀 Head over to
👉 Tutorial 9: VASP on POWER

Clone this wiki locally