Page 1 of 1

How to plot BSEFATBAND for 2D

Posted: Sat Sep 02, 2023 7:28 am
by hafizadil.qayyum@kfupm.edu.sa
Dear vasp community,
I am trying perform the BSE calculation on the top of GW for 2D hexagonal crystal structure. As a reference of BSE calculations, I am following the reference given in VASPWIKI for BSEFATBAND.
wiki/index.php/Plotting_the_BSE_fatband_structure_of_Si

However, I am having difficulty in understanding how to plot the BSEFATBAND. In the case of Si (bulk)), the following script is used to extract the bands along G to L and G to X.
"
1- #!/bin/bash
2- NBSE=1 #Select the BSE eigenvector of interest.
3- BSIZE=$(head -n 1 BSEFATBAND|awk '{print $1}') # The BSE product basis size.
4- i=`echo "($BSIZE+1)*$NBSE+1"|bc`
5- head -n $i BSEFATBAND | tail -n $BSIZE > BSE-$NBSE.dat #Cut out the selected eigenstate.
6- awk <BSE-$NBSE.dat ' { if ($1==$2 && $3==$2) print sqrt($1*$1+$2*$2+$3*$3), $4, $5, $6 }' >bands-GL.dat
7- awk <BSE-$NBSE.dat ' { if ($1==$3 && $2==0.0) print sqrt($1*$1+$2*$2+$3*$3), $4, $5, $6 }' >bands-GX.dat
"

My first question is from this example.

How the condition (Line#6 and Line#7) are written to extract the bands along G to L and G to X.

My second question is:
How will this condition be modified if I want to extract bands along high symmetry points K → G → M for 2D hexagonal structure like. Kindly help me in this regard.

Re: How to plot BSEFATBAND for 2D

Posted: Mon Sep 04, 2023 9:57 am
by ferenc_karsai
I think the easiest to understand what the script does is to look at the BSEFATBAND file (wiki/index.php/BSEFATBAND).

The first three entries are the compontents of the k-point vectors. Lines 6 and 7 in the script extract only if these k-points fulfil special conditions (for example all three components have same length $1==$2==$3). Of course the order of the k-points is given by the BSEFATBAND file, which is given by the order of the k-points in the KPOINTS file (wiki/index.php/KPOINTS).

Re: How to plot BSEFATBAND for 2D

Posted: Thu Sep 07, 2023 4:49 am
by hafizadil.qayyum@kfupm.edu.sa
Dear Sir,
Thanks for your kind response. So, if I want to extract the bands along the KPATH from K (0.333, 0.333, 0) to G (0.000, 0.000,0.000) or from G (0.000, 0.000,0.000) to M(0.5,0.0,0.0) from BSEFATBAND file. How these conditions will be written. Is it written as
($1==$2 && $3==0) ##extracting bands from K to Gamma
($2==0 && $3==0) ##extracting bands from Gamma to M.
I am attaching here one of my BSE eigenstate file from which I want to extract my bands along K to G and G to M
BSE-22.rar
My KPATH for bandstructure calculation is

K-Path Generated by VASPKIT.
40
Line-Mode
Reciprocal
0.3333333333 0.3333333333 0.0000000000 K
0.0000000000 0.0000000000 0.0000000000 G

0.0000000000 0.0000000000 0.0000000000 G
0.5000000000 0.0000000000 0.0000000000 M

Re: How to plot BSEFATBAND for 2D

Posted: Thu Sep 07, 2023 10:18 am
by ferenc_karsai
Yes this should work.

Re: How to plot BSEFATBAND for 2D

Posted: Thu Sep 07, 2023 11:40 am
by hafizadil.qayyum@kfupm.edu.sa
Thank you