The input files for VASP are the four basic files: INCAR
, POSCAR
, POTCAR
, KPOINTS
.
INCAR
Parameter SettingsSystem = Si-film # System name, can be freely defined to identify the current calculation system.
# Job Control
ISTART = 0 # Initial state setup:
# 0 Start calculation from scratch.
# 1 Read initial wavefunctions from WAVECAR file.
# 2 Read wavefunctions and charge density from WAVECAR and CHGCAR files.
ISPIN = 1 # Spin polarization options:
# 1 Non-spin-polarized (for non-magnetic materials).
# 2 Spin-polarized (for magnetic materials).
ICHARGE = 2 # Initial charge density selection:
# 2 Start from static charge density provided by POTCAR.
# 1 Generate charge density from scratch.
LWAVE = .FALSE. # Output WAVECAR file:
# .TRUE. Output (store wavefunction data).
# .FALSE. Do not output (save disk space).
LCHARG = .FALSE. # Output CHGCAR file:
# .TRUE. Output (store static charge density).
# .FALSE. Do not output (save disk space).
ISYM = 0 # Symmetry settings:
# 0 Disable symmetry (for systems with defects or asymmetric structures).
# 1 or 2 Preserve symmetry operations.
# Electronic Relaxation
ENCUT = 500 # Plane-wave cutoff energy (eV), determines calculation precision and efficiency.
ISMEAR = 0 # Smearing method:
# -5 (tetrahedron method for metals), 0 (Gaussian smearing for semiconductors), 1 or 2 (Fermi smearing).
SIGMA = 0.05 # Smearing width (eV), recommended values: 0.01 ~ 0.1.
EDIFF = 1E-08 # SCF convergence criterion: stops if energy change between iterations is less than 1E-08 eV.
NELMIN = 6 # Minimum number of electronic iterations to ensure basic convergence.
NELM = 300 # Maximum number of electronic iterations to avoid iteration loops.
GGA = PE # Functional choice, using PBE (Perdew-Burke-Ernzerhof) exchange-correlation functional.
LREAL = .FALSE. # Reciprocal space calculations, increases precision but adds computational cost.
ADDGRID = .TRUE. # Enable additional FFT grid for improved numerical accuracy.
ALGO = N # Electronic relaxation algorithm:
# Normal (standard mode), Fast, or VeryFast (accelerated modes).
PREC = Accurate # Precision settings:
# Accurate (high precision), Normal, or Low (for initial tests).
# Ionic Relaxation
ISIF = 2 # Lattice optimization options:
# 2 Optimize atomic positions only, keep lattice parameters fixed.
# 3 Optimize both atomic positions and lattice shape.
EDIFFG = -0.01 # Ionic convergence criterion:
# Negative values based on force (eV/\u00c5).
# Positive values based on energy.
IBRION = 2 # Ionic relaxation algorithm:
# 2 Conjugate gradient algorithm (suitable for most optimization tasks).
POTIM = 0.5 # Time step, controls optimization speed.
NSW = 200 # Maximum number of ionic steps.
# Parallel Control
NPAR = 4 # FFT grid parallelization dimension (recommended: sqrt(total cores)).
KPAR = 2 # Number of parallel k-points (total cores should be divisible by NPAR \u00d7 KPAR \u00d7 NCORE).
NCORE = 12 # Number of cores per task.
For structural optimization, key parameters in INCAR
include IBRION
, ISIF
, NSW
, EDIFF
, and EDIFFG
.
IBRION
Settings and ApplicationsIBRION = -1
NSW > 0
to prevent wasting resources.IBRION = 1
(RMM-DIIS)
Usage: Suitable for smooth potential energy surfaces in simple systems.
Limitation: May encounter convergence issues for complex or unstable surfaces.
IBRION = 2
(Conjugate Gradient)
Usage: Most commonly used method, suitable for most systems.
Advantage: Performs well for steep and complex surfaces.
IBRION = 3
(Damped Molecular Dynamics)
Usage: Stabilizes optimization paths that oscillate or diverge.
IBRION = 0
a. Finite Difference Method IBRION = 5, 6
Calculates phonon modes using finite difference:
5
: Without symmetry, suitable for defective or low-symmetry structures.6
: Exploits symmetry for efficient calculations in high-symmetry systems.b. Perturbation Theory (DFPT) IBRION = 7, 8
Calculates phonon modes using density functional perturbation theory (DFPT):
7
: Without symmetry optimization, suitable for low-symmetry structures.8
: Utilizes symmetry for faster computation.ISIF
Settings and ApplicationsDefault value (if not set): ISIF = 2
(Optimize atomic positions only, keep lattice shape and volume fixed).
IBRION = 0
(molecular dynamics) or LHFCALC = .TRUE.
(hybrid functional): ISIF = 0
.ISIF = 2
(Most Common)
Optimizes atomic positions only, suitable for 2D materials, fixed lattice constants, or surface/interface systems.
ISIF = 3
(Bulk Optimization)
Optimizes atomic positions, lattice shape, and volume, suitable for bulk material relaxations.
ISIF = 4
(Fixed Volume Optimization)
Optimizes atomic positions and lattice shape while keeping the volume fixed, useful for pressure tests.
ISIF = 6
(Lattice-Only Optimization)
Optimizes lattice shape and volume without relaxing atomic positions, useful for testing lattice parameters.
ISIF = 0
(Position Optimization, No Stress Calculation)NSW
, EDIFF
, and EDIFFG
Parameter | Function | Initial Optimization | High-Precision Optimization | Single Point |
---|---|---|---|---|
NSW |
Max ionic steps | 100-200 | 200-500 | 0 |
EDIFF |
SCF convergence (eV) | 1e-05 | 1e-08 | 1e-06 |
EDIFFG |
Ionic convergence (eV/\u00c5) | -0.1 | -0.01 | Not required |
POSCAR
Below is an example POSCAR
file describing the structure of bulk silicon:
Si-bulk # System name, customizable
1.0 # Global scaling factor (can be used to scale the lattice)
5.430 0.000 0.000 # Lattice vector a
0.000 5.430 0.000 # Lattice vector b
0.000 0.000 5.430 # Lattice vector c
Si # Atom types
2 # Number of atoms for each type
Direct # Coordinate type (Direct: fractional; Cartesian: cartesian)
0.000 0.000 0.000 # Coordinates for atom 1
0.250 0.250 0.250 # Coordinates for atom 2
Example POSCAR File for Silicon Thin Film (Si-film):
Si Thin Film
1.00000000000000
5.4299999999999997 0.0000000000000000 0.0000000000000000
0.0000000000000000 5.4299999999999997 0.0000000000000000
0.0000000000000000 0.0000000000000000 20.8599999999999994
Si
16
Selective dynamics # Enable Selective Dynamics
Direct
0.000000 0.000000 0.200000 F F F # Fixed in all three directions
0.500000 0.500000 0.200000 T T F # Fixed in z-direction, free in x and y
0.500000 0.000000 0.330153 T T T # Free in all directions
0.000000 0.500000 0.330153 T T T
0.250000 0.250000 0.265077 T T T
0.750000 0.750000 0.265077 T T T
0.750000 0.250000 0.395230 T T T
0.250000 0.750000 0.395230 T T T
0.000000 0.000000 0.460307 T T T
0.500000 0.500000 0.460307 T T T
0.500000 0.000000 0.590460 T T T
0.000000 0.500000 0.590460 T T T
0.250000 0.250000 0.525384 T T T
0.750000 0.750000 0.525384 T T T
0.750000 0.250000 0.655537 T T T
0.250000 0.750000 0.655537 T T T
Monkhorst-Pack grids provide a uniform k-point distribution for periodic crystal calculations.
Automatic k-point generation # Automatic k-point generation method (comment)
0 # Ignore total k-point count, use automatic generation
Monkhorst-Pack # Choose Monkhorst-Pack grid
4 4 4 # Grid density in x, y, z directions
0 0 0 # No grid shift
Use Case: Periodic crystals, optimization, DOS calculations, and electronic structure analysis.
Gamma grids center the k-point grid at the Gamma point, suitable for small or asymmetric lattices.
Automatic k-point generation # Automatic k-point generation method (comment)
0 # Ignore total k-point count, use automatic generation
Gamma # Choose Gamma-centered grid
4 4 4 # Grid density in x, y, z directions
0 0 0 # No grid shift
Use Case: Small systems, asymmetric lattices, or fast calculation optimization tasks.
POTCAR contains pseudopotential information required to describe atomic properties in the system.
For a system with atoms like Si and H, concatenate the pseudopotential files:
cat /POT_GGA_PAW/POTCAR_Si /POT_GGA_PAW/POTCAR_H > POTCAR
Content: Optimized crystal structure, including updated atomic coordinates and lattice parameters. Format: Same as POSCAR, can directly serve as input for further calculations. Use Case:
Content:
Use Case:
Content:
Use Case:
Content:
Use Case:
Content: XML-formatted record of all calculation data, suitable for parsing and post-processing.
Use Case:
POSCAR
file.POTCAR
, KPOINTS
, and INCAR
files.EDIFFG
) are satisfied or the maximum number of steps (NSW
) is reached.XDATCAR
file.CONTCAR
file.The convergence of the optimization process can be determined using the following methods:
OUTCAR
File:
Check whether the force on each atom is less than | EDIFFG |
. |
EDIFF
.OSZICAR
File:
E0
and dE
) during the SCF iterations.CONTCAR
File:
CONTCAR
file contains the structure from the last step.pymatgen
or ASE
to parse the vasprun.xml
file and evaluate convergence.Issue: SCF iterations show energy oscillations or divergence.
Possible Causes:
ENCUT
).Solutions:
NELM=200
.ENCUT
to 520 eV or higher.Issue: Optimization reaches the maximum steps (NSW
) but does not meet convergence criteria for force or energy.
Possible Causes:
EDIFFG
) are too strict.POTIM
) is too large.Solutions:
EDIFFG
from -0.01
to -0.02
.POTIM
from 0.5
to 0.2
.Issue: Energy and forces oscillate repeatedly during optimization, preventing stable convergence.
Possible Causes:
POTIM
) is too large.Solutions:
POTIM
to 0.2
or smaller.IBRION=2
.IBRION=3
.Issue: Severe deformation of the structure occurs during optimization, leading to significant energy increases.
Possible Causes:
Solutions:
POTCAR
file to ensure the pseudopotential matches the atomic species.