VASP: TiO₂ surface relaxation¶
This tutorial will teach you how to:
construct a slab for rutile TiO2(001)
set up a geometry optimization job with constraints
set up a DFT+U VASP job to be run via the AMS driver
Download .ams GUI input file
for this tutorial (optional).Download .py PLAMS Python script
that sets up and runs an equivalent job (optional).
See also
Step 1: Check the VASP installation¶
Important
VASP is not distributed together with the Amsterdam Modeling Suite, but needs to be obtained and installed separately.
Verify that you have access to a working installation of VASP 5, on either your local or a remote machine. If you want to run on a remote machine or computer cluster, check that you have set up a working AMSjobs queue for that system.
Check that you can run VASP, for example using one of the following commands:
vasp
mpirun -np 4 vasp #parallelize over 4 cores
If you do not know the proper command to launch VASP, ask your system administrator.
Step 2: Locate the POTCAR library¶
VASP requires the use of pseudopotentials or PAW potentials for each element. These are distributed with VASP in files called POTCAR or POTCAR.Z.
In this tutorial, you will use the Projector Augmented Wave (PAW) potentials for Ti and O constructed for the PBE density functional. You should have obtained those PAW potentials with VASP.
On your local machine (the machine running AMSinput), locate the needed POTCAR files. If you do not have them, you can download them from the VASP website.
For example, if the needed POTCAR or POTCAR.Z files are at
/some/path/PAW_PBE/Ti/POTCAR
/some/path/PAW_PBE/O/POTCAR
then the path /some/path/PAW_PBE/
would be the POTCAR Library that you need
to specify in one of the following steps.
Step 3: Set up the system - a TiO2(001) slab¶
Note
In production calculations, one would normally perform a lattice optimization of the bulk structure before creating a slab. In this tutorial, we will just use the experimental lattice parameters.
Now create a 2-layer (001) slab (because the crystal unit cell contains 2 layers of atoms at different positions along c, the resulting slab will actually be 4 atomic layers thick).
0 0 1
as the Miller indices.2
.This should create a 2-layer slab in the 3D area on the left. Select View → View Direction → Along X from the menu bar, or rotate the system so that the z-axis (shown as a blue line) is roughly displayed vertically, giving you a side view of the slab. The slab is 2c = 5.92 Å thick.
Note
It may happen that bonds are drawn between adjacent Ti ions. These bonds do not affect the VASP calculation and can safely be ignored. If you prefer, you can remove them by clicking on them and pressing Backspace.
In production calculations, one would normally use a much thicker slab.
All VASP calculations are performed under 3D periodic boundary conditions. Therefore, slabs are necessarily separated by a vacuum gap in the surface normal direction.
Note that the vacuum gap is very large. Because VASP uses a planewave basis set, a larger vacuum gap will increase the computational cost. Therefore, it is a good idea to use a smaller vacuum gap, but the vacuum gap should not be so small that one side of the slab interacts with the other side through the vacuum gap. Here, we will set a rather small vacuum gap of about 8 Å.
Note
In production calculations, the vacuum gap should be systematically varied for the particular system at hand, and be large enough such that any calculated quantity (surface energy, adsorption energy, work function, etc.) is converged.
0.0 0.0 14.0
. (Note: this c lattice vector now refers to the slab system including the vacuum gap, and no longer to the original unit cell of the crystal).Step 4: Set the VASP settings¶
Tip
In the panel bar, select Details → Pseudopotentials to see and/or change exactly which POTCAR files that will be used in the calculation.
3 3 1
.Note
In production calculations, the k-point grid dimensions and planewave energy cutoff need to be converged by means of convergence tests.
The main VASP input file, INCAR, allows the user to set an enormous number of settings and have great control over the resulting calculation. AMSinput does not have dedicated panels for all of the settings. Instead, it is possible for you to set arbitrary settings by simply typing them in. In this example, you will change the self-consistent-field algorithm.
ALGO = Fast
in the Additional INCAR options text box.Tip
On the Details → Expert VASP panel, consider checking the Only preprocess box. When you submit your calculation, VASP will then not be executed, but all of the input files that VASP would have seen will be left on disk for you to inspect. This way, you can double-check that the input to VASP is correct before actually running the calculation.
Step 5: Set the AMS settings¶
VASP_PBE_U_TiO2_slab.ams
.Note
When running VASP via the AMS driver, the geometry optimization settings and constraints are set for the AMS driver and not for VASP. This means that VASP’s internal geometry convergence criteria, like the EDIFFG setting in INCAR, should not be set. You also do not need to enable VASP’s “Selective optimization” to keep some atoms fixed. Instead, all geometry optimization settings are handled by the AMS driver.
Step 6: Run your job¶
After the calculation has finished, visualize the geometry optimization in AMSmovie.
Did the top-layer Ti atoms relax “in” towards the bulk or “out” towards the vacuum?