# How to generate KPOINTS file for HSE06 band-structure calculations?

I have had a look at the example of Silicon provided here in the WIKIVASP website, and I noticed that the KPOINTS file used for HSE06 bandstructure contains two parts as follows:

Automatically generated mesh
26
Reciprocal lattice
0.00000000000000    0.00000000000000    0.00000000000000             1
0.16666666666667    0.00000000000000    0.00000000000000             8
0.33333333333333    0.00000000000000    0.00000000000000             8
0.50000000000000    0.00000000000000    0.00000000000000             4
0.16666666666667    0.16666666666667    0.00000000000000             6
0.33333333333333    0.16666666666667    0.00000000000000            24
0.50000000000000    0.16666666666667    0.00000000000000            24
-0.33333333333333    0.16666666666667    0.00000000000000            24
-0.16666666666667    0.16666666666667    0.00000000000000            12
0.33333333333333    0.33333333333333    0.00000000000000             6
0.50000000000000    0.33333333333333    0.00000000000000            24
-0.33333333333333    0.33333333333333    0.00000000000000            12
0.50000000000000    0.50000000000000    0.00000000000000             3
0.50000000000000    0.33333333333333    0.16666666666667            24
-0.33333333333333    0.33333333333333    0.16666666666667            24
-0.33333333333333    0.50000000000000    0.16666666666667            12
0.00000000 0.00000000 0.00000000 0.000
0.00000000 0.05555556 0.05555556 0.000
0.00000000 0.11111111 0.11111111 0.000
0.00000000 0.16666667 0.16666667 0.000
0.00000000 0.22222222 0.22222222 0.000
0.00000000 0.27777778 0.27777778 0.000
0.00000000 0.33333333 0.33333333 0.000
0.00000000 0.38888889 0.38888889 0.000
0.00000000 0.44444444 0.44444444 0.000
0.00000000 0.50000000 0.50000000 0.000

My question is: could you explain to me what is the meaning of the second part of this file that contains zeros at the end? And how can one generate a file like this for calculating the HSE06 bandstructure for any material?

In order to generate the k-path for any material, the first thing to know is the crystal system (a,b) of it. This information can be obtained experimentally via X-ray diffraction analysis, form the crystallographic information file (CIF) or from material databases.

Knowing the crystal system, then you have to look for the corresponding Brillouin zone. The Brillouin zone page from wikipedia is a good starting point (if you know French, you can read the original work from Léon Brillouin). The wiki page is based on the work of Stefano Curtarolo1.

Now that you know the Brillouin zone, you need to select the high symmetry points to start building the k-path. In the reference 1, the authors already suggest a path for each system.

Finally, you have to define the number of points between the high symmetry points in your k-path (the greater this number are, better the band structure graphics definition is).

### A practical example: Silicon.

The crystal system of silicon is face-centered cubic (FCC):

From reference 1, the Brillouin zone is:

The positions of the high symmetry points Γ, X, W, K, L, U are shown in the figure. In this case, the authors recommend the path Γ–X–W–K–Γ–L–U–W–L–K|U–X. In order to get a continuity in the band structure graph, it is necessary to choose the path were the symmetry points are in direct sequence.

From table 3 in reference 1, we have the coordinates of each symmetry point:

$$\begin{array}{*{20}{c}} {}&{x{b_1}}&{x{b_2}}&{x{b_3}}\\ \Gamma &0&0&0\\ K&{3/8}&{3/8}&{3/4}\\ L&{1/2}&{1/2}&{1/2}\\ U&{5/8}&{1/4}&{5/8}\\ W&{1/2}&{1/4}&{3/4}\\ X&{1/2}&0&{1/2} \end{array}$$

Lets create the k-path between the Γ and L points. The coordinate for Γ is $$(0,0,0)$$ and for L is $$(0.5,0.5,0.5)$$, using 6 points in between:

(this calculation can be done with a manual calculator or using a spreadsheet program)

$$\begin{array}{*{20}{c}} 0&0&0&{(\Gamma )}\\ {0.1}&{0.1}&{0.1}&{}\\ {0.2}&{0.2}&{0.2}&{}\\ {0.3}&{0.3}&{0.3}&{}\\ {0.4}&{0.4}&{0.4}&{}\\ {0.5}&{0.5}&{0.5}&{(L)} \end{array}$$

Following these steps, you are in full control of the k-path selecting the high symmetry points to be used and the quality of the path (the number of points between the high symmetry points).

1. W. Setyawan, S. Curtarolo, High-throughput electronic band structure calculations: Challenges and tools. Computational Materials Science. 49 299–312 (2010) (DOI: 10.1016/j.commatsci.2010.05.010). arXiv:1004.2974.

The usual strategy to perform a band structure calculation in DFT has two steps:

1. Perform a self-consistent calculation using a uniform $$\mathbf{k}$$-point grid to determine the self-consistent potential.
2. Perform a non-self-consistent calculation using the potential determined in step 1 for some $$\mathbf{k}$$-point path along the Brillouin zone.

In VASP, the above strategy works in a somewhat convoluted way if you are using a hybrid functional: you have to do both steps at once. The two blocks in the $$\mathbf{k}$$-points file that you show perform these two steps.

The first block corresponds to the uniform $$\mathbf{k}$$-point grid to perform the self-consistent calculation. The last column of integers in the file gives the multiplicity of the $$\mathbf{k}$$-points: you are only doing calculations in the irreducible Brillouin zone, and the multiplicity tells you how many other points in the full Brillouin zone are related to that one, so that when you calculate Brillouin zone averages (for example to determine the self-consistent potential) you need to weight each $$\mathbf{k}$$-point by that number.

The second block corresponds to the non-uniform $$\mathbf{k}$$-point path along which you want to calculate the band structure. The bands are also calculated for these points, so you get the corresponding eigenvalues in the output and you can plot the band structure from those. But because their weight (fourth column) is zero, they don't contribute to averages over the Brillouin zone, so they don't contribute to the self-consistent potential. You want to enforce this because in the calculation of BZ averages you want a uniform grid, not the highly non-uniform sampling that a path provides.

With this strategy, at the end of the self-consistent calculation you have essentially reproduced the two steps above in one go: the first block of $$\mathbf{k}$$-points is used for determining the self-consistent potential, and the second block does not contribute to the self-consistent potential but you still get the bands so that you can calculate the band structure.

How can you generate such a file? I am not sure if there is an automatic way of generating it. However, an easy option is to first do a band structure calculation using a non-hybrid functional, say PBE. You first do the self-consistent calculation, where you give the $$\mathbf{k}$$-point grid you want (say $$n_1\times n_2\times n_3$$) in the KPOINTS file, and then the OUTCAR file has a list of the $$\mathbf{k}$$-points in the irreducible BZ with the corresponding weights, that you can copy-paste as the first block. Similarly, you can then do a PBE band structure calculation specifying the high symmetry points in the BZ, and the VASP OUTCAR file will contain the specific points along the path. You can then copy-paste these as the second block, and remember to add the "0" weights as a fourth column.

• I have tried to fill the first block with IBZKPT from SCF calculation, and the second block with k-points from OUTCAR of PBE bandstructure calculation (changing the weights to 0). Then, I got a zigzag bandstructure not a smooth one :-/ – Chi Kou Aug 13 at 7:37
• @ChiKou, the bands that you will get from this calculation will include both the uniform grid (first block) and the path (second block). The first block will certainly give you a zig-zag band structure. What you need to do is to remove the k-points corresponding to the first block in the EIGENVAL file before you try to plot the band structure, so that only those from the second block (the actual band structure along the required path) are included – ProfM Aug 13 at 7:52
• @ChiKou, I think most people have their own scripts to make this sort of plot. If the plotting tool you are using uses the vasprun.xml file rather than the EIGENVAL file, then you should remove the unnecessary k-points from the vasprun.xml file. I guess another option is to do the full plot, and then simply set your axis range to the relevant subset of k-points. – ProfM Aug 13 at 19:38
• @ChiKou, glad it worked! Improving the band structure plot is a question that mostly boils down to personal preference. I typically use xmgrace or gnuplot for such plots, but I am sure there are many other options. Something I like is to clearly distinguish the valence bands from the conduction bands, for example by using different colors for each group. Perhaps this may be a good topic for another question: what are good band structure plotting tools/styles (or similar)? – ProfM Aug 14 at 8:42
• @ChiKou: I would do the usual energy cutoff and k-point grid (first block in KPOINTS file) convergence tests. Another thing to consider is that if your system contains heavy elements, then perhaps spin-orbit coupling is important. Beyond these general points, it is hard to be more precise without knowing more details about your system and what your goals are. If you have further questions along these lines I would suggest starting a new question (we are in need of more questions in the beta) and providing details like material/aims/etc. – ProfM Aug 14 at 8:50

To add to ProfM's answer, you can generate lists of k-points along high-symmetry paths in the Brillouin zone using XCrySDen. Open your structure (you can format it as a XYZ file) and go to the Tools menu, and open k-path selection. Now you will be shown your Brillouin zone, and you can click the points you want to include in your path. After you're satisfied with that, you'll be able to specify how many points you want along each segment of the path, and save the file. You can use that output file to create the second block you refer to in your question.

There may also be other programs that can do this!

• I still don't know how to fill the second block with the correct 0 weight k-points. – Chi Kou Aug 13 at 7:38
• @Kevin Xcrysden doesn't show the symbols of high symmetry points. How to know them? – Chi Kou Aug 14 at 8:43
• @ChiKou This site is a good resource: cryst.ehu.es/cryst/get_kvec.html and you can also check the literature for band structures of your material, or other materials with the same space group. – Kevin J. M. Aug 14 at 18:32