INCAR
go back to Main Page, Group Pages, Núria López and Group, Scripts_for_VASP
By controling some parameters in the INCAR file, you can greatly increase the efficiency of your calculations.
Parameters that all INCAR files should have
The minimum INCAR file must contain at least the following parameters:
general:
SYSTEM = name-of-the-system
ISTART = 0 # 0: new, 2: read WC
ICHARG = 2 # 0: get from WC , 1: get from CHGCAR, 2: new
GGA = PE # PE: PBE
ISPIN = 1 # Use 2 for spin-polarized calculations
electronic steps:
ENCUT = 450 # Energy cutoff.
ISMEAR = 0 # Smearing: 0: Gaussian; 1+: MP.
SIGMA = 0.03 # Smearing width
ALGO = Fast # Normal: general purpouse; Fast: Good for conductors.
LREAL = Auto #
EDIFF = 1E-5 #
ionic steps:
IBRION = 2 # 0: MD; 1,2,3: relaxations; 5: frq.; 44: IDM.
POTIM = 0.150 #
EDIFFG = -0.030 # Positive in eV; negative in eV/Å
NSW = 50 #
The general section has the name of the system, the starting parameters for the wavefunctions and electronic density, the density functional (PBE in the example), and the spin. Optional flags: MAGMOM, NUPDOWN. For DFT+U and hybrid functionals, additional flags may be needed.
The electronic steps section has the energy cutoff, the smearing, the algorithm, the projection scheme, and finishes with the electronic convergence threshold. Optional flags: Maximum/minimum number of electronic cycles (NELM, NELMIN, NELMDL); modifications of mixing scheme (AMIX, BMIX, AMIN).
The ionic steps section contains the algorithm, the stepsize, the convergence threshold for ionic steps, and the maximum number of ionic steps. Its structure differs for NEB, CI-NEB, and IDM calculations, see below.
Back to Núria López and Group / Scripts_for_VASP.
Ionic movement parameters
You can find more information about this topic in the VASP manual [1]
Static (single-point) calculations
For a static calculation (e.g. No ions update), set:
NSW = 1
Ionic relaxation: DIIS algorithm (IBRION=1)
The DIIS algorithm converges fast in systems that:
- Are close to an energy minimum (or maximum).
- Have low degrees of freedom.
Examples of those systems are:
- Molecules in vacuum with short backbones (tert-butanol or shorter).
- Bare metal slabs representing closed surfaces.
- Pre-converged transition states.
For relaxations use:
ionic steps: IBRION = 1 # POTIM = 0.250 # Between 0.10 and 0.40. EDIFFG = -0.020 # In eV/Å. NSW = 100 # Between 50 and 100.
For already pre-converged transition states use:
ionic steps: IBRION = 1 # POTIM = 0.010 # Lower than 0.03. EDIFFG = -0.050 # In eV/Å NSW = 50 # Between 25 and 50.
For more information: [2] [3].
Back to Núria López and Group / Scripts_for_VASP.
Ionic relaxation: CG algorithm (IBRION=2)
Is the recommended algorithm if you don't know what to do (See Ionic Relaxation Methods in [4]). It is faster and more stable than DIIS for medium and large systems, and always converges into a minimum.
ionic steps: IBRION = 2 # POTIM = 0.150 # Between 0.15 and 0.25. EDIFFG = -0.020 # In eV/Å NSW = 100 #
Ionic relaxation: Damped MD and QUICKMIN (IBRION=3)
Recomended to use along NEBs for big systems or in conjunction with NEBs.
ionic steps: IBRION = 3 # POTIM = 0.011 # Always lower than 0.020. EDIFFG = -0.020 # In eV/Å NSW = 100 #
POTIM should be very small, lower than the reciprocal of the highest eigenvalue in the Hessian Matrix. For hydrogen-containing systems, this value is around 0.025. Values lower than 0.017 are usually very safe.
Back to Núria López and Group / Scripts_for_VASP.
Improved dimer method for transition states (IBRION=44)
Dimer method of G. Henkelman and H. Jónsson (J.Chem.Phys.,111,7010(1999)), implemented by Heyden et al[5]. Use these parametres:
electronic steps: EDIFF = 1E-6
improved dimer method: IBRION = 44 EDIFFG = -0.050 # NSW = 100 # Never use more than 200. Check periodically for divergence. POTIM = 0.010 # NFREE = 5 # FINDIFF= 2 # DIMER_DIST=0.010 # MINROT = 0.010 # STEP_SIZE= 0.010 # STEP_MAX= 0.100 #
To check that it is converging well, (1) check with p4vasp that all forces are small, and (2) Check that the curvature is always negative. Normal values are between -1.0 and -30.0:
grep curv OUTCAR
Back to Núria López and Group / Scripts_for_VASP.
Molecular Dynamics (MD) (IBRION=0)
See Molecular Dynamics with VASP VASP manual: [6]
Back to Núria López and Group / Scripts_for_VASP.
Thermodynamics (IBRION=5,6)
See [7]
Tip: If your system was obtained with a tight convergence criteria (eg: EDIFFG=-0.02), you can use NFREE=1 instead of 2. You will have a reasonable accuracy in the frequencies with half the computational cost.
Back to Núria López and Group / Scripts_for_VASP.
Additional parameters
Improving stability: Mixing Parameters
If you have problems to reach convergence in the first electronic loop, and you are not reading WAVECAR, set:
NELMDL = -9 # Number of non self-consistent electronic steps at the beginning (w/o CHG update)
Otherwise, vary these mixing scheme parameters (you can play with them):
AMIX = 0.10 BMIX = 0.01 AMIN = 0.10
If problems persist, increase BMIX and reduce AMIN:
AMIX = 0.10 BMIX = 3.00 AMIN = 0.01
If problems persist, read this [[8]]
Back to Núria López and Group / Scripts_for_VASP.
Parallelization
NPAR
Changing the parameter NPAR could increase the speed of calculation without affecting the global energy. Please see [11] and made some test before set large systems.
NPAR must be exactly equal to (1) the number of cores per node if you are using one node, or (2) the number of nodes if you are using more than one node. NEVER USE THE SQUARE ROOT RULE PROPOSED IN THE VASP MANUAL, that rule become outdated 14 years ago!
Optimal values:
Nº Queue 4 c4m8 ==> NPAR = 4 8 c4m8 ==> NPAR = 2 12 c4m8 ==> NPAR = 3 etc. 8 c8m24 ==> NPAR = 8 16 c8m24 ==> NPAR = 2 24 c8m24 ==> NPAR = 3 etc. 12 c12m48ib ==> NPAR = 12 24 c12m48ib ==> NPAR = 2 36 c12m48ib ==> NPAR = 3 48 c12m48ib ==> NPAR = 4 etc. 48 MareNostrum4 ==> NPAR = 48 96 MareNostrum4 ==> NPAR = 2 144 MareNostrum4 ==> NPAR = 3 192 MareNostrum4 ==> NPAR = 4 etc. 16 MareNostrum3 ==> NPAR = 16 32 MareNostrum3 ==> NPAR = 2 48 MareNostrum3 ==> NPAR = 3 64 MareNostrum3 ==> NPAR = 4 etc.
A calculation running on 8 processors-c8m24 will finish around 30% faster than on 8 processors-c4m8.
Back to Núria López and Group / Scripts_for_VASP.
NSIM
If your INCAR file states the following:
IALGO=48 or ALGO=Fast or ALGO=VeryFast
You can speed up your calculation by ~15% varying the NSIM parameter. There should be no difference in the total energy and the convergence behavior in setting NSIM>1, only the performance should improve. The default value is 4.
In c4m8 ==> NSIM = between 6 and 16 In c8m24 ==> NSIM = between 8 and 16 In c12m48ib ==> NSIM = between 8 and 16 In MareNostrum ==> NSIM = between 10 and 42
Recomended values:
NSIM = 8 for c4m8 & c8m24 NSIM = 12 for c12m48ib NSIM = 32 for MareNostrum
For more information [12]
Advanced parallelization
You can further increase the efficiency of your parallelization by setting KPAR and NBANDS. You must know the kind of processors you are working with, the number of electrons/bands in your calculation, and to read the VASP manual.
It is a must to use advanced parallelization when working in MareNostrum and for big projects where lots of computational hours are spent.
Back to Núria López and Group / Scripts_for_VASP.
Tips for efficient electronic relaxations
For each ionic position, the electronic density and wave functions are updated (Born-Oppenheimer approximation). There are two control commands for this loop, EDIFF and NELM.
EDIFF = 1E-5 # Default: 1E-4. [13] NELM = 100 # Default: 60. [14]
tip: Use values of NELM larger than 60 if you do not reach the energy threshold after 3 ionic steps.
For pre-converge a calculation, set:
EDIFF = 1E-3 # Or 1E-4 for each moving nucleus in your POSCAR file ENCUT = 250 # Or the higher ENMIN value in your POTCAR file NELMIN = 4 # Or 5. To increase this value further may rise computational burden without adding precision to the forces.
For converge a calculation, set:
EDIFF = 1E-5 # ENCUT = 450 # This value must be consistent with all your converged calculations. NELMIN = 3 # Or 2, that is the default.
A rule-of-thumb is EDIFF=EDDIFG*0.1 if EDDIFG is positive (energy criterion), or EDIFF=-EDDIFG*0.001 if EDIFFG is negative (force criterion). Back to Núria López and Group / Scripts_for_VASP.
Back to Núria López and Group / Scripts_for_VASP.
Verbosity
There are several flags to state the files to be written and the verbosity.
FLAG DEFAULT # FILE NWRITE = 2 # Verbosity of the OUTCAR file LWAVE = T # WAVECAR [15] LCHARG = T # CHG / CHGCAR [16] [17] LVTOT = F # LOCPOT [18] LELF = F # ELFCAR [19] PARCHG = F # PARCHG LAECHG = F # Bader AECCAR files LORBIT = 0 # PDOS/LDOS
Tip: Add this segment in your INCAR file to reduce verbosity and avoid writting WAVECAR and CHG(CAR) files:
# Verbosity: NWRITE = 0 # Verbosity LWAVE = F # WAVECAR LCHARG = F # CHG / CHGCAR
Back to Núria López and Group / Scripts_for_VASP.
van der Waals contributions
Check here: VdW_forces
DFT+U
To activate DFT+U calculation you will need these 2 flags:
LDAU = .TRUE. # Switch on LDA+U LDAUTYPE = 2 # LSDA + U Dudarev's approach = type 2 in vasp
You will need to add the U and J term for each atom type. For example to put an effective U=1 for the second type of atom, you will put LDAUU=2 and LDAUJ=1 as follow:
# Add on-site interaction for the respective atoms (same order as in POSCAR) LDAUL = -1 2 -1 # 2 for d-orbital interactions, -1 no on-site interaction LDAUU = 0.0 2.0 0 # Define U-parameters for on-site Coulomb interaction LDAUJ = 0.0 1.0 0 # Define J-parameters for on-site Exchange interaction LDAUPRINT = 0 # 0 to ignore, 1 to print occupation matrix in OUTC
Finally, this flag is used to speed up DFT+U calculation:
LMAXMIX = 4 #DFT+U calculations may require LMAXMIX to 4 for d-electrons (or 6 for f-elements) for faster convergence to the groundstate
Back to Núria López and Group / Scripts_for_VASP.