In this tutorial, We will see how to calculate the DOS and the Band Structure in the same directory and how to combine them to get one plot using the code SUMO.
First, we need to install the sumo code as following:
$ pip install sumo
We need 2 files:
Si.cell
%block lattice_cart
0.000000 2.715000 2.715000
2.715000 0.000000 2.715000
2.715000 2.715000 0.000000
%endblock lattice_cart
%block positions_abs
Si 0.000000 0.000000 0.000000
Si 1.357500 1.357500 1.357500
%endblock positions_abs
kpoints_mp_grid 7 7 7
symmetry_generate
Si.param
task singlepoint
xc_functional pbe
max_scf_cycles 100
basis_precision fine
elec_energy_tol 1e-7
elec_eigenvalue_tol 1e-6
nextra_bands 8
Now run a singlepoint calculation with e.g.
mpirun -np 4 castep.mpi si # for parallel calculation with 4 processorsThis calculation writes eigenvalue data to si.bands. We can obtain a rough DOS by plotting this file with Sumo:
sumo-dosplot --code castep -f si.bands --format PNG
sumo-dosplot --code castep -f si.bands -g 0.1 --format PNG (the “-g” is for “Gaussian”). The result looks a lot better, but is still suspiciously spiky. We need more data points, but our 7x7x7 k-point grid should have been sufficient for a good SCF. To get more DOS points, we reboot CASTEP with a “spectral” task to compute eigenvalues non-self-consistently on a fine k-point mesh.
Create a modified cell file si-dos.cell, using
SPECTRAL_KPOINTS_MP_GRID to set a fine mesh.
%block lattice_cart
0.000000 2.715000 2.715000
2.715000 0.000000 2.715000
2.715000 2.715000 0.000000
%endblock lattice_cart
%block positions_abs
Si 0.000000 0.000000 0.000000
Si 1.357500 1.357500 1.357500
%endblock positions_abs
kpoints_mp_grid 7 7 7
spectral_kpoints_mp_grid 21 21 21
symmetry_generate
In the si-dos.param file we set up a spectral DOS task and REUSE the previous calculation results to avoid unnecessary SCF work. We might also crank up the number of bands to allow more empty states to be created. Strictly, one should not attach much meaning to empty states from Kohn-Sham DFT calculations; in practice, they are very useful.
task spectral
spectral_task dos
reuse si.check
xc_functional pbe
max_scf_cycles 100
basis_precision fine
elec_energy_tol 1e-7
elec_eigenvalue_tol 1e-6
spectral_perc_extra_bands 50
and run with
mpirun -np 4 castep.mpi si-dos # # for parallel calculation with 4 processorsIf we check the si-dos.castep output we see that the SCF converged very quickly. Most of the run time was then spent evaluating spectral k-points. Plotting our new .bands file with Sumo, the DOS should be a lot more complete.
sumo-dosplot --code castep -f si-dos.bands -g 0.1 --format PNG
We can get more detail about the band edges using a band structure calculation. In CASTEP the procedure is similar to a spectral DOS calculation, but we need to specify the paths of k-points to explore. It’s a bit tedious to create these by hand, so we’ll let Sumo do it for us.
sumo-kgen --code castep -p si.cellcreates a band.cell file with the k-point path included. If you
look in the file you can see that the other settings of the .cell
file have been retained. The spectral k-point list includes
some comments to mark high-symmetry points; this information will
be used later for plotting. For now we make a band.param file
which is identical to the DOS parameters except for the
SPECTRAL_TASK:
task spectral
spectral_task bandstructure
reuse si.check
xc_functional pbe
max_scf_cycles 100
basis_precision fine
elec_energy_tol 1e-7
elec_eigenvalue_tol 1e-6
spectral_perc_extra_bands 50
mpirun -np 4 castep.mpi bandThe key data is written to band.bands and can be plotted with
sumo-bandplot --code castep -f band.bands --format PNG
which generates a publication-ready band.pdf including special-point labels read from the .cell file.
We can simultaneously read in the DOS data for a combined plot:
sumo-bandplot --code castep -f band.bands --dos si-dos.bands -g 0.1 --format PNG
Reference: https://github.com/ajjackson/castep-sumo-tutorial/blob/master/castep-sumo.org
0 Comments