Plotting Fatband from a BSE calculation

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
basant_ali
Newbie
Newbie
Posts: 21
Joined: Thu Jun 27, 2024 3:43 pm

Plotting Fatband from a BSE calculation

#1 Post by basant_ali » Sun Aug 25, 2024 10:09 pm

Hi,

I used the following batch file to extract the fatband data from an mBSE calculation for the second BSE state.

Code: Select all

#!/bin/bash
NBSE=2 #Select the BSE eigenvector of interest.
BSIZE=$(head -n 1 BSEFATBAND|awk '{print $1}') # The BSE product basis size.
i=`echo "($BSIZE+1)*$NBSE+1"|bc`
head -n $i BSEFATBAND | tail -n $BSIZE > BSE-$NBSE.dat #Cut out the selected eigenstate.
awk <BSE-$NBSE.dat  ' { if ($1==$2 && $3==$2) print sqrt($1*$1+$2*$2+$3*$3), $4, $5, $6 }' >bands-GR.dat
awk <BSE-$NBSE.dat  ' { if ($1==$3 && $2==0.0) print sqrt($1*$1+$2*$2+$3*$3), $4, $5, $6 }' >bands-GM.dat

However, the generated files give a zero value for the K axis (x-axis) as attached.

Please, advise,

Also, I would like to know how to change the KPATH in the batch file.

Thank you in advance.

Best Regards,
Basant

You do not have the required permissions to view the files attached to this post.

michael_wolloch
Global Moderator
Global Moderator
Posts: 102
Joined: Tue Oct 17, 2023 10:17 am

Re: Plotting Fatband from a BSE calculation

#2 Post by michael_wolloch » Mon Aug 26, 2024 9:45 am

Dear Basant,

The script you are using seems to not correspond to your structure. I see that you have copied it from our wiki page: Plot BSE fatbands, where the high-symmetry directions are from Γ to L and from Γ to X.

In the Si (diamond lattice) example from the wiki. The diamond lattice is an fcc lattice with two atoms in the basis, and the high symmetry directions for an fcc lattice
can be viewed e.g. on Wikipedia. From the graphic at the bottom of the page, it is straightforward to see that the Γ-L high-symmetry line is defined by Kx=Ky=Kz and Γ-L by Kx=Kz and Ky=0.

These conditions are enforced in the script by the statements:

Code: Select all

if ($1==$2 && $3==$2)

and

Code: Select all

if ($1==$3 && $2==0.0)

In your system this is probably only true for the Γ point itself, that's why you are getting no other values than 0 in your k (or x) axis. You have to adapt example scripts from the wiki to your specific problem.

In this case, you need to analyze the Brillouin zone of your structure and its high symmetry lines (simple with a tool like SeeK-path) and modify the last two lines of the script accordingly. Of course, if you have more than 2 high-symmetry directions you want to plot, you need to add more lines.

Generally I would advise to use the fatband capabilities of py4vasp and look at the corresponding tutorial example on Exciton analysis.

Please let me know if this resolves your question so I can lock the post,
Michael


basant_ali
Newbie
Newbie
Posts: 21
Joined: Thu Jun 27, 2024 3:43 pm

Re: Plotting Fatband from a BSE calculation

#3 Post by basant_ali » Mon Aug 26, 2024 1:44 pm

Thank you so much for your reply.

I tried the fatband capabilities of py4vasp, which gave me many errors upon running the code.
Py4vasp needs a file named vaspout.h5 which I do not have and what I found out is that I need to recompile VASP and run the job again. I am almost running out of core hours on the HPC I am using and have no way to repeat any unnecessary jobs.

for the bash file,

The high symmetry points I have are

Code: Select all

0.0000000000     0.5000000000     0.0000000000     X 
0.0000000000     0.0000000000     0.0000000000     GAMMA

0.0000000000     0.0000000000     0.0000000000     GAMMA
0.5000000000     0.5000000000     0.5000000000     R 

I wonder how to input them to the bash file.

Thank you,
Basant


michael_wolloch
Global Moderator
Global Moderator
Posts: 102
Joined: Tue Oct 17, 2023 10:17 am

Re: Plotting Fatband from a BSE calculation

#4 Post by michael_wolloch » Mon Aug 26, 2024 2:11 pm

Dear Basant,

it is not only about the Γ, X, and R points, but also about the reciprocal cell and what relations Kx, Ky, and Kz have to each other for each high symmetry direction. Take the example of the Wiki alongside the other resources I linked to in my last post to understand why the if-conditions in the awk commands are set as they are. Then work out the corresponding settings for your cell.

Please understand that we can help you with conceptual questions and understanding the problem, but not write postprocessing scripts for your specific calculation.

If my first reply was unclear, or you do not understand a specific part of it, please do not hesitate to ask further questions.

Michael


Post Reply