GW+BSE
Moderators: Davide Sangalli, andrea marini, Daniele Varsano, andrea.ferretti, myrta gruning, Conor Hogan

 Posts: 48
 Joined: Thu Sep 06, 2018 7:57 am
 Location: Wuhan University
GW+BSE
Hi all,
I want to perform a fullfrequency GW calculation and then perform a GW+BSE calculation.
If I have performed a fullfrequency GW calculation (realaxis) and have dynamical screening stored in em1d file.
Q1 : I want to know can I use dielectric function from realaxis GW calculation (em1d) to skip the static screening calculation (b) in following BSE calculation ?
From my test, it seem OK for PPA (pp) and COHSEX (em1s). For em1d, I always fail to proceed.
Q2 : Can I just make a BSE calculation without GW Quasiparticle energy correction? in other words, if I don't implement QP database or scissor operator into BSE procedure, is the dielectric function from BSE still meaningful or not ?
Weiqing
I want to perform a fullfrequency GW calculation and then perform a GW+BSE calculation.
If I have performed a fullfrequency GW calculation (realaxis) and have dynamical screening stored in em1d file.
Q1 : I want to know can I use dielectric function from realaxis GW calculation (em1d) to skip the static screening calculation (b) in following BSE calculation ?
From my test, it seem OK for PPA (pp) and COHSEX (em1s). For em1d, I always fail to proceed.
Q2 : Can I just make a BSE calculation without GW Quasiparticle energy correction? in other words, if I don't implement QP database or scissor operator into BSE procedure, is the dielectric function from BSE still meaningful or not ?
Weiqing
Weiqing Zhou
Phd student
Wuhan University
Wuhan, Hubei, 430072
Phd student
Wuhan University
Wuhan, Hubei, 430072
 Daniele Varsano
 Posts: 2719
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: GW+BSE
Dear Weiqing,
Best,
Daniele
A1: In line of principle it is ok to use the static limit of the em1d, but unfortunately, I'm afraid that this has not been implemented so you need to recalculate the static filectric matrix (em1s)Q1 : I want to know can I use dielectric function from realaxis GW calculation (em1d) to skip the static screening calculation (b) in following BSE calculation ?
From my test, it seem OK for PPA (pp) and COHSEX (em1s). For em1d, I always fail to proceed.
A2: I do not know if I have well understood your question. In line of principle you can do that. Note that QP energies or scissorcorrected energies enter in the diagonal part of the BSE kernel and not in the screening function which is calculated at RPA level unless you do not opt for a partial selfconsistency. Anyway, the BSE equation is meant for quasiparticle and quasielectron, let's in a standard derivation (e.g. from the vertex of the Hedin equation you recognize that QP corrections should be considered).Q2 : Can I just make a BSE calculation without GW Quasiparticle energy correction? in other words, if I don't implement QP database or scissor operator into BSE procedure, is the dielectric function from BSE still meaningful or not ?
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 48
 Joined: Thu Sep 06, 2018 7:57 am
 Location: Wuhan University
Re: GW+BSE
Dear Daniele,
Thanks for your kind reply.
I try to do a expensive GW+BSE calculation with thousand kpoints. For realaxis GW calculation, I use 64 CPUs in fat node. In principle, the memory should be enough since there is 4TB memory in a fat node. The weird point is that my GW calculations usually exit without any error. I assume it is about memory problem. Q1: How can I estimate RAM before a Yambo calculation to ensure there is no problem in memory?
Besides that, when I use a QP energy from GW in BSE calculation by setting KfnQPdb,
Q2: is it possible to use a GW quasiparticle with a different kmesh from BSE calculation? f.e 24*24*8 for BSE while 12*12*4 for GW.
Best,
Weiqing
Thanks for your kind reply.
I try to do a expensive GW+BSE calculation with thousand kpoints. For realaxis GW calculation, I use 64 CPUs in fat node. In principle, the memory should be enough since there is 4TB memory in a fat node. The weird point is that my GW calculations usually exit without any error. I assume it is about memory problem. Q1: How can I estimate RAM before a Yambo calculation to ensure there is no problem in memory?
Besides that, when I use a QP energy from GW in BSE calculation by setting KfnQPdb,
Q2: is it possible to use a GW quasiparticle with a different kmesh from BSE calculation? f.e 24*24*8 for BSE while 12*12*4 for GW.
Best,
Weiqing
Weiqing Zhou
Phd student
Wuhan University
Wuhan, Hubei, 430072
Phd student
Wuhan University
Wuhan, Hubei, 430072
 Daniele Varsano
 Posts: 2719
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: GW+BSE
Dear Weiqing,
What you can do is the following:
1. Configure adding the following line:
enablememoryprofile
and next recompile. The code will print memory information at the moment of the allocation and in this way hopefully, you can have an idea.
2. Next, the run stops in the calculation of the screening or in the GW loop? In the first case, in order to distribute memory, the advise is to parallelize to "c" and "v" the more you can. If the second, it is better parallelize over "b".
1) You calculate the GW corrections for the 12*12*4
2) Next, you generate a QP database containing that value, paying attention to the corresponding K index from the two calculations. In order to generate the database, you need to use the ypp executable, ypp q g and follow the syntax of the generated input file.
Best,
Daniele
It is not very easy to do an estimation beforehand also because the memory per node strongly depends on the parallelization strategy.Q1: How can I estimate RAM before a Yambo calculation to ensure there is no problem in memory?
What you can do is the following:
1. Configure adding the following line:
enablememoryprofile
and next recompile. The code will print memory information at the moment of the allocation and in this way hopefully, you can have an idea.
2. Next, the run stops in the calculation of the screening or in the GW loop? In the first case, in order to distribute memory, the advise is to parallelize to "c" and "v" the more you can. If the second, it is better parallelize over "b".
Unfortunately not as you endup in a different qgrid so the two setups are not compatible. Anyway, I can see a workaround:Q2: is it possible to use a GW quasiparticle with a different kmesh from BSE calculation? f.e 24*24*8 for BSE while 12*12*4 for GW.
1) You calculate the GW corrections for the 12*12*4
2) Next, you generate a QP database containing that value, paying attention to the corresponding K index from the two calculations. In order to generate the database, you need to use the ypp executable, ypp q g and follow the syntax of the generated input file.
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 48
 Joined: Thu Sep 06, 2018 7:57 am
 Location: Wuhan University
Re: GW+BSE
Dear Daniele,
Thanks for you quick reply!
I tried realaxis GW calculation again and there is error information this time.
[ERROR] STOP signal received while in :[06.01] G0W0 on the real axis
[ERROR]Allocation of QP_W failed
Please check input and report in the attachment. Is it related with memory problem? What can I do to solve it ?
Best,
Weiqing
Thanks for you quick reply!
I tried realaxis GW calculation again and there is error information this time.
[ERROR] STOP signal received while in :[06.01] G0W0 on the real axis
[ERROR]Allocation of QP_W failed
Please check input and report in the attachment. Is it related with memory problem? What can I do to solve it ?
Best,
Weiqing
You do not have the required permissions to view the files attached to this post.
Weiqing Zhou
Phd student
Wuhan University
Wuhan, Hubei, 430072
Phd student
Wuhan University
Wuhan, Hubei, 430072
 Daniele Varsano
 Posts: 2719
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: GW+BSE
Dear Weiqing,
yes, it seems a memory problem.
As a solution you can try the following:
1)
SE_ROLEs= "q qp b"
SE_CPU= "8 2 4"
move all/or nearly all l the cpu distributions over b i.e.
SE_CPU= "1 1 64" or
SE_CPU= "1 2 32" or
this shoudl distribute the memory!
2)
QPkrange # [GW] QP generalized Kpoint/Band indices
1 1214 1118
%
These amre many corrections: 9712!
Are you sure you need the correction for all the k points? In any case you can split the load in different calculations and next merge the databases:
input1
1 200 1118
input2
201 400 1118
etc...
By the way I can see that you are using 1000 energy step:
ETStpsXd= 1000 # [Xd] Total Energy steps
This is a huge number, usually by using 200/300 frequencies convergence is reached.
In any case you have already calculated the screening so you need to be consistent.
Best,
Daniele
yes, it seems a memory problem.
As a solution you can try the following:
1)
SE_ROLEs= "q qp b"
SE_CPU= "8 2 4"
move all/or nearly all l the cpu distributions over b i.e.
SE_CPU= "1 1 64" or
SE_CPU= "1 2 32" or
this shoudl distribute the memory!
2)
QPkrange # [GW] QP generalized Kpoint/Band indices
1 1214 1118
%
These amre many corrections: 9712!
Are you sure you need the correction for all the k points? In any case you can split the load in different calculations and next merge the databases:
input1
1 200 1118
input2
201 400 1118
etc...
By the way I can see that you are using 1000 energy step:
ETStpsXd= 1000 # [Xd] Total Energy steps
This is a huge number, usually by using 200/300 frequencies convergence is reached.
In any case you have already calculated the screening so you need to be consistent.
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 48
 Joined: Thu Sep 06, 2018 7:57 am
 Location: Wuhan University
Re: GW+BSE
Dear Daniele,
Many thanks! When I only take 50 kpoints into account, Yambo can proceed well.
I assume it is impossible to get GW qp energy for all kpoints in BZ.
Q1: Can Yambo use incomplete GW database (not all kpoints qp energy corrected by GW) to do following BSE+GW calculation? If the answer is yes, what is the method to interpolate qp energy of other kpoints' state in Yambo?
Q2 : So how can I choose some certain kpoints to be corrected in GW to obtain reasonable BSE+GW dielectric function. Only highsymmetric kpoints ? or there is some other strategy to choose kpoint.
Q3 : By the way, similarly to Q1, can I plot a GW band structure (ypp b) with incomplete GW database ?
Best,
Weiqing
Many thanks! When I only take 50 kpoints into account, Yambo can proceed well.
I assume it is impossible to get GW qp energy for all kpoints in BZ.
Q1: Can Yambo use incomplete GW database (not all kpoints qp energy corrected by GW) to do following BSE+GW calculation? If the answer is yes, what is the method to interpolate qp energy of other kpoints' state in Yambo?
Q2 : So how can I choose some certain kpoints to be corrected in GW to obtain reasonable BSE+GW dielectric function. Only highsymmetric kpoints ? or there is some other strategy to choose kpoint.
Q3 : By the way, similarly to Q1, can I plot a GW band structure (ypp b) with incomplete GW database ?
Best,
Weiqing
Weiqing Zhou
Phd student
Wuhan University
Wuhan, Hubei, 430072
Phd student
Wuhan University
Wuhan, Hubei, 430072
 Daniele Varsano
 Posts: 2719
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: GW+BSE
Dear Weiking,
Best,
Daniele
OK good.Many thanks! When I only take 50 kpoints into account, Yambo can proceed well.
I assume it is impossible to get GW qp energy for all kpoints in BZ.
Yes, it is possible, and you do not have to do anything as Yambo will interpolate them using a scissor plus stretching parameters for valence and conduction bands. You will have in the report the details of the fit and in the output the results of the fit.Q1: Can Yambo use incomplete GW database (not all kpoints qp energy corrected by GW) to do following BSE+GW calculation? If the answer is yes, what is the method to interpolate qp energy of other kpoints' state in Yambo?
It is hard to consider high symmetry points as you need the corrections on a regular grid (the k point grid of your calculation). You can think about to calculate the corrections for a looser grid or calculate them for all the k points but for fewer bands than the ones you consider for the BSE:Q2 : So how can I choose some certain kpoints to be corrected in GW to obtain reasonable BSE+GW dielectric function. Only highsymmetric kpoints ? or there is some other strategy to choose kpoint.
Yes you can, it is an interpolation so of course, the denser the more are the calculated value the more accurate will be the extrapolation on the missing points (segment of your path).Q3 : By the way, similarly to Q2, can I plot a GW band structure (ypp b) with incomplete GW database ?
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 48
 Joined: Thu Sep 06, 2018 7:57 am
 Location: Wuhan University
Re: GW+BSE
Dear Daniele,
Many thanks! It helps me a lot.
I plan to finish my GW calculation by splitting it into many parts. Firstly, I set QPkrange by 1 164 14 14 to correct valence band. After that, I would change QPkrange to 1 164 15 15 to correct conduction band. Through this procedure, I want to get the same qp file ndb.QP as QPkrange 1 164 14 15. But I find ndb.QP would be recalculated instead of adding new corrected qp into previous ndb.QP.
For sake of future BSE+GW calculation, I want to obtain a full ndb.QP near the Fermi level. Is it possible to get a ndb.QP by many GW calculation with varying QPkrange ?
Best,
Weiqing
Many thanks! It helps me a lot.
I plan to finish my GW calculation by splitting it into many parts. Firstly, I set QPkrange by 1 164 14 14 to correct valence band. After that, I would change QPkrange to 1 164 15 15 to correct conduction band. Through this procedure, I want to get the same qp file ndb.QP as QPkrange 1 164 14 15. But I find ndb.QP would be recalculated instead of adding new corrected qp into previous ndb.QP.
For sake of future BSE+GW calculation, I want to obtain a full ndb.QP near the Fermi level. Is it possible to get a ndb.QP by many GW calculation with varying QPkrange ?
Best,
Weiqing
Weiqing Zhou
Phd student
Wuhan University
Wuhan, Hubei, 430072
Phd student
Wuhan University
Wuhan, Hubei, 430072
 Daniele Varsano
 Posts: 2719
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: GW+BSE
Dear Weiqing,
yes, it is possible.
You need to perform different calculations redirecting the ndb.QP in different directories, or reaming the ndb.QP file in the same directory in order to not overwrite it.
Let's say
>yambo F yambo.in J QP1
>yambo F yambo.in J QP1
etc.
next use ypp to merge the different databases:
> ypp q m
will generate a ypp.in of the form:
in order to merge multiple ndb.QP file the syntax is:
next by running:
> ypp F ypp.in
ypp will produce a unique QP file containing all the quasiparticle corrections that can be used for BSE calculations.
Best,
Daniele
~
~
yes, it is possible.
You need to perform different calculations redirecting the ndb.QP in different directories, or reaming the ndb.QP file in the same directory in order to not overwrite it.
Let's say
>yambo F yambo.in J QP1
>yambo F yambo.in J QP1
etc.
next use ypp to merge the different databases:
> ypp q m
will generate a ypp.in of the form:
Code: Select all
QPDBs # [R] Quasiparticle databases
QPDB_merge # [R] Mergering
%Actions_and_names # [QPDB] Format is "what""OP""prefactor""DB". OP can be +//x(ony for Z).
"E"  "+"  "1"  "none" 
%
Code: Select all
"E"  "+"  "1"  "./QP1/ndb.QP" 
"E"  "+"  "1"  "./QP2/ndb.QP" 
...
> ypp F ypp.in
ypp will produce a unique QP file containing all the quasiparticle corrections that can be used for BSE calculations.
Best,
Daniele
~
~
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/