How to plot BSEFATBAND for 2D
Moderators: Global Moderator, Moderator
-
- Newbie
- Posts: 3
- Joined: Mon Jul 12, 2021 3:31 am
How to plot BSEFATBAND for 2D
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.
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.
-
- Global Moderator
- Posts: 460
- Joined: Mon Nov 04, 2019 12:44 pm
Re: How to plot BSEFATBAND for 2D
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).
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).
-
- Newbie
- Posts: 3
- Joined: Mon Jul 12, 2021 3:31 am
Re: How to plot BSEFATBAND for 2D
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
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
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
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
You do not have the required permissions to view the files attached to this post.
-
- Global Moderator
- Posts: 460
- Joined: Mon Nov 04, 2019 12:44 pm
Re: How to plot BSEFATBAND for 2D
Yes this should work.
-
- Newbie
- Posts: 3
- Joined: Mon Jul 12, 2021 3:31 am
Re: How to plot BSEFATBAND for 2D
Thank you