parse_qps.sh script

Concerns issues with computing quasiparticle corrections to the DFT eigenvalues - i.e., the self-energy within the GW approximation (-g n), or considering the Hartree-Fock exchange only (-x)

Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, andrea marini, Daniele Varsano

Post Reply
lamia
Posts: 68
Joined: Mon Dec 05, 2016 5:09 pm

parse_qps.sh script

Post by lamia » Fri Apr 29, 2022 3:18 am

Dear Developers,

I am doing convergence tests to calculate the GW band structure. As a first step, I calculate the convergences related to BndsRnXp and NGsBlkXp, as presented in hBN tutorial. Now, I need to collect the quasiparticle energies. For this purpose, I use 'parse_qps.sh' script given in the tutorial
http://www.yambo-code.org/wiki/index.ph ... sh_scripts
In order to use this script we need to do some changes. In the tutorial input file,
%QPkrange # [GW] QP generalized Kpoint/Band indices
7| 7| 8| 9|

but in my case,

%QPkrange # [GW] QP generalized Kpoint/Band indices
1| 44| 2| 12|
Using this parameter, how could I change the 'parse_qps.sh' script in order to use it in my case?

Note: the last occupied (5) and first unoccupied (6) bands

best,
Lamia
Taouil Lamia
University of Mohammed V
Faculty of science - Rabat
Morocco

User avatar
Daniele Varsano
Posts: 3773
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: parse_qps.sh script

Post by Daniele Varsano » Mon May 02, 2022 8:04 am

Dear Lamia,

the script is just an example to parse the desired file using bash scripting.
You can adapt as you wish depending on what you want to look at (kpoints/bands) changing the strings to grep.
You can also use a different scripting language (e.g. python) or you can also directly inspect your outputs and copy the useful info.

Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

lamia
Posts: 68
Joined: Mon Dec 05, 2016 5:09 pm

Re: parse_qps.sh script

Post by lamia » Tue May 03, 2022 4:25 pm

Dear Daniele,

Thank you for your reply.

-In the hBN example, why has the k-point number 7 been chosen?

-In bash script

qp1=` cat $file | grep "^ *7 *8" | awk '{print $3+$4}' `
qp2=` cat $file | grep "^ *7 *9" | awk '{print $3+$4}' `

I have 44 kpoints so how could I change the two lines above ( grep "^ *7 *8" & grep "^ *7 *9" )?

best,

Lamia
Taouil Lamia
University of Mohammed V
Faculty of science - Rabat
Morocco

User avatar
Daniele Varsano
Posts: 3773
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: parse_qps.sh script

Post by Daniele Varsano » Wed May 04, 2022 8:28 am

Dear Lamia,

if you do not feel comfortable with bash you can inspect the output in the way you prefer. The script you are looking at it is just a possible example to parse the output.
-In the hBN example, why has the k-point number 7 been chosen?
In that example, the minimum direct gap is found at k point 7.
I have 44 kpoints so how could I change the two lines above ( grep "^ *7 *8" & grep "^ *7 *9" )?
Just choose the k point and band indexes you want to parse. If you are looking at convergence wrt bands and Gblk parameters you can inspect a single k point.

Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

lamia
Posts: 68
Joined: Mon Dec 05, 2016 5:09 pm

Re: parse_qps.sh script

Post by lamia » Thu May 05, 2022 8:13 pm

Dear Daniele,

How can I precise the appropriate k point ?
Best,
Lamia
Taouil Lamia
University of Mohammed V
Faculty of science - Rabat
Morocco

User avatar
Daniele Varsano
Posts: 3773
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: parse_qps.sh script

Post by Daniele Varsano » Fri May 06, 2022 8:58 am

Dear Lamia,
this really depends on what do you want to look at:
you should inspect your QP electronic structure and look for instance at the direct (indirect) gap.
When performing convergence studies usually there is no need to calculate QP corrections in the entire BZ, but they can be done on selected k points (e.g. at the minimum gap). That's how it is done in the example where corrections are calculated at a fixed k point. The KS gap is written in the report file.

Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Post Reply