-
Notifications
You must be signed in to change notification settings - Fork 1
Tutorial 08
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. 🧪
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. 🔍
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.
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-
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 ofNPARin 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 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. 🌐
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
The KPOINTS file tells VASP how to sample k-space, which is key to convergence in electronic structure calculations. ⚡
k-points
0
Monkhorst Pack
11 11 11
0 0 0
- Line 1: Comment
- Line 2: 0 = automatic generation
-
Line 3: Grid type (e.g.
Monkhorst Pack) - Line 4: Mesh size in 3 directions
-
Line 5 (optional): Mesh shift (usually
0 0 0)
🧠 Use finer meshes for better accuracy—at the cost of computation time.
The POTCAR file contains element-specific pseudopotentials and exchange-correlation data.
- Must match the order of elements in your
POSCARfile ✅ - 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
cat /path/to/Si/POTCAR > POTCARCongrats! 🥳 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