Page 1 of 1

parse_qps.sh script

Posted: Fri Apr 29, 2022 3:18 am
by lamia
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

Re: parse_qps.sh script

Posted: Mon May 02, 2022 8:04 am
by Daniele Varsano
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

Re: parse_qps.sh script

Posted: Tue May 03, 2022 4:25 pm
by lamia
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

Re: parse_qps.sh script

Posted: Wed May 04, 2022 8:28 am
by Daniele Varsano
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

Re: parse_qps.sh script

Posted: Thu May 05, 2022 8:13 pm
by lamia
Dear Daniele,

How can I precise the appropriate k point ?
Best,
Lamia

Re: parse_qps.sh script

Posted: Fri May 06, 2022 8:58 am
by Daniele Varsano
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