>Fine. But be careful with the PBE. Check when running p2y which kind of XC functional is using >Yambo. Most probably it using some LDAlike.
I had noted that yambo reports that is it using LDA. As for RPA dielectric function all that is needed is to integrate the wavefunctions, I thought it does not matters what functional was used to generate them.
In the case of GW eigenvalues, I thought that yambo calculates the LDA igenvalues and the GW corrections using the slightly different PBE wavefunctions. As I have never met any great difference between PBE and LDA I do not worry too much. Should I ?
Thanks, Eduardo
memory issue in RPA calculation
Moderators: Daniele Varsano, andrea marini, Conor Hogan, myrta gruning

 Posts: 10
 Joined: Tue Apr 24, 2012 10:35 pm
Re: memory issue in RPA calculation
Eduardo Menendez Proupin
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez

 Posts: 10
 Joined: Tue Apr 24, 2012 10:35 pm
Re: memory issue in RPA calculation
Aaahh!! OK. The velocity commutator is different for LDA and PBE, and this may be the reason to have bad results for CdTe. My test with Si were with LDA all the time.
Eduardo
Eduardo
Eduardo Menendez Proupin
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez
 andrea marini
 Posts: 445
 Joined: Mon Mar 16, 2009 4:27 pm
 Contact:
Re: memory issue in RPA calculation
It depends on how different is the wavefunction. If the LDA and PBE functions are very different you should see a difference in both the RPA and the GW corrections.eariel99 wrote: I had noted that yambo reports that is it using LDA. As for RPA dielectric function all that is needed is to integrate the wavefunctions, I thought it does not matters what functional was used to generate them.
How did you judge that differences between LDA and PBE are small ? Can you check the matrix elements of the xc potential, for example ?eariel99 wrote: As I have never met any great difference between PBE and LDA I do not worry too much. Should I ?
Hmmm. Yoi are right. The PBE functional depends also on the gradient. Therefore the expression for the commutator will change. GOOD OBSERVATION!eariel99 wrote: The velocity commutator is different for LDA and PBE, and this may be the reason to have bad results for CdTe. My test with Si were with LDA all the time.
Ok. Step by step ....
Can you first do a pure LDA calculation and check that the effect of the commutator is small ? And, regarding doing GW on top of PBE if you are interested in doing it properly drop me an Email.
Andrea
Andrea MARINI
Istituto di Struttura della Materia, CNR, (Italy)
Istituto di Struttura della Materia, CNR, (Italy)

 Posts: 10
 Joined: Tue Apr 24, 2012 10:35 pm
Re: memory issue in RPA calculation
Hi Andrea,
Thanks again for your answer. Let me answer and ask more.
Yes. this is the calculation for silicon. For PBE with nonlocal contributions the order of magnitude is terrible, although the shape is OK. For CdTe, the LDA calculations are here. The NL calculation increases somewhat the values, the shape is not bad. With PBE the shape was absolutely wrong, as seen in a former post.
Please, let me ask a few more questions about the GW calculations, even if its beyond the title of this post. I am following again the tutorial of Basic concepts of the GW approximation (http://www.yambocode.org/tutorials/GW/index.php). Three weeks ago in Lausanne I was primarily worried about compiling yambo with quantum espresso and I miss this part.
In the section of COHSEX, one reads that firsts it is needed the static screened interaction ( I guess, W(r,r',E=0 ) . For that one needs yambo b and quasiparticle energies with yambo b g n. I am confused because it appears in a paragraph and later on, the COHSEX calculation is configured with yambo g n p c (without b ). Then I have a few doubts
1) Does yambo b g n makes a SEX calculation, i.e., without the CO part?
2) Is it the same to perform
yambo b;yambo;yambo g n;yambo
as
yambo b g n;yambo
?
3) Do b and x act like adding ingredients to the calculations? If I do a COHSEX calculation without
calculating first the HartreeFock selfenergy and the static screeing, what happens? Are them calculated on the fly ?
Note: I see that "yambo p c g n F testcohsex" and "yambo x b p c g n F testcohsexxb" produce the same input file but the order of some lines is different, I guess the order does not matter. Also,
"yambo p p g n F testppa" and "yambo x b p p g n F testppaxb" produce the same inputs.
but
"yambo b o b y h" (from the CPC yambo article) produce a different input file than "yambo o b y h".
So, is there a general rule or a flexibility for BSE?
4) What is the interest in doing the COHSEX with empty bands? Is it to fix the parameter GbndRnge for later use in PPA or real axis calculation?
5) Hi Andrea,
Thanks again for your answer. Let me answer and ask more.
Yes. this is the calculation for silicon. For PBE with nonlocal contributions the order of magnitude is terrible, although the shape is OK. For CdTe, the LDA calculations are here. The NL calculation increases somewhat the values, the shape is not bad. With PBE the shape was absolutely wrong, as seen in a former post.
Please, let me ask a few more questions about the GW calculations, even if its beyond the title of this post. I am following again the tutorial of Basic concepts of the GW approximation (http://www.yambocode.org/tutorials/GW/index.php). Three weeks ago in Lausanne I was primarily worried about compiling yambo with quantum espresso and I miss this part.
In the section of COHSEX, one reads that firsts it is needed the static screened interaction ( I guess, W(r,r',E=0 ) . For that one needs yambo b and quasiparticle energies with yambo b g n. I am confused because it appears in a paragraph and later on, the COHSEX calculation is configured with yambo g n p c (without b ). Then I have a few doubts
1) Does yambo b g n makes a SEX calculation, i.e., without the CO part?
2) Is it the same to perform
yambo b;yambo;yambo g n;yambo
as
yambo b g n;yambo
?
3) Do b and x act like adding ingredients to the calculations? If I do a COHSEX calculation without
calculating first the HartreeFock selfenergy and the static screeing, what happens? Are them calculated on the fly ?
Note: I see that "yambo p c g n F testcohsex" and "yambo x b p c g n F testcohsexxb" produce the same input file but the order of some lines is different, I guess the order does not matter. Also,
"yambo p p g n F testppa" and "yambo x b p p g n F testppaxb" produce the same inputs.
but
"yambo b o b y h" (from the CPC yambo article) produce a different input file than "yambo o b y h".
So, is there a general rule or a flexibility for BSE?
4) What is the interest in doing the COHSEX with empty bands? Is it to fix the parameter GbndRnge for later use in PPA or real axis calculation?
5) And turning back to the Im(eps) calculation. Can I obtain the GW dielectric function using the G0W0 energies, and not with the scissor operator and valence/conduction stretching via %XfnQP_E? How ?
Best regards
Eduardo
Thanks again for your answer. Let me answer and ask more.
I have not, in this specific case. I only know iron as example that LDA predicts a wrong crystalline structure, and in my work I have not found significant differences in band diagrams and other magnitudes when I have used both LDA and PBE. I have never evaluated numerical differences between wavefunnction. Of course, it is not consistent to mix the PBE wave functions with the LDA calculation.How did you judge that differences between LDA and PBE are small ? Can you check the matrix elements of the xc potential, for example ?
Can you first do a pure LDA calculation and check that the effect of the commutator is small ?
Yes. this is the calculation for silicon. For PBE with nonlocal contributions the order of magnitude is terrible, although the shape is OK. For CdTe, the LDA calculations are here. The NL calculation increases somewhat the values, the shape is not bad. With PBE the shape was absolutely wrong, as seen in a former post.
I think it is safer to swith to LDA. I have too many atoms to calculate and the complications with PBE are too much for me. In any case, I have to generate new pseudpotentials for Cd that include 4s and 4p in the valence, and the task for LDA and PBE is the same. For the moment I just want to proof that I can obtain the quasiparticle gap in the known case of CdTe.And, regarding doing GW on top of PBE if you are interested in doing it properly drop me an Email.
Please, let me ask a few more questions about the GW calculations, even if its beyond the title of this post. I am following again the tutorial of Basic concepts of the GW approximation (http://www.yambocode.org/tutorials/GW/index.php). Three weeks ago in Lausanne I was primarily worried about compiling yambo with quantum espresso and I miss this part.
In the section of COHSEX, one reads that firsts it is needed the static screened interaction ( I guess, W(r,r',E=0 ) . For that one needs yambo b and quasiparticle energies with yambo b g n. I am confused because it appears in a paragraph and later on, the COHSEX calculation is configured with yambo g n p c (without b ). Then I have a few doubts
1) Does yambo b g n makes a SEX calculation, i.e., without the CO part?
2) Is it the same to perform
yambo b;yambo;yambo g n;yambo
as
yambo b g n;yambo
?
3) Do b and x act like adding ingredients to the calculations? If I do a COHSEX calculation without
calculating first the HartreeFock selfenergy and the static screeing, what happens? Are them calculated on the fly ?
Note: I see that "yambo p c g n F testcohsex" and "yambo x b p c g n F testcohsexxb" produce the same input file but the order of some lines is different, I guess the order does not matter. Also,
"yambo p p g n F testppa" and "yambo x b p p g n F testppaxb" produce the same inputs.
but
"yambo b o b y h" (from the CPC yambo article) produce a different input file than "yambo o b y h".
So, is there a general rule or a flexibility for BSE?
4) What is the interest in doing the COHSEX with empty bands? Is it to fix the parameter GbndRnge for later use in PPA or real axis calculation?
5) Hi Andrea,
Thanks again for your answer. Let me answer and ask more.
I have not, in this specific case. I only know iron as example that LDA predicts a wrong crystalline structure, and in my work I have not found significant differences in band diagrams and other magnitudes when I have used both LDA and PBE. I have never evaluated numerical differences between wavefunnction. Of course, it is not consistent to mix the PBE wave functions with the LDA calculation.How did you judge that differences between LDA and PBE are small ? Can you check the matrix elements of the xc potential, for example ?
Can you first do a pure LDA calculation and check that the effect of the commutator is small ?
Yes. this is the calculation for silicon. For PBE with nonlocal contributions the order of magnitude is terrible, although the shape is OK. For CdTe, the LDA calculations are here. The NL calculation increases somewhat the values, the shape is not bad. With PBE the shape was absolutely wrong, as seen in a former post.
I think it is safer to swith to LDA. I have too many atoms to calculate and the complications with PBE are too much for me. In any case, I have to generate new pseudpotentials for Cd that include 4s and 4p in the valence, and the task for LDA and PBE is the same. For the moment I just want to proof that I can to obtain the quasiparticle gap in the known case of CdTe.And, regarding doing GW on top of PBE if you are interested in doing it properly drop me an Email.
Please, let me ask a few more questions about the GW calculations, even if its beyond the title of this post. I am following again the tutorial of Basic concepts of the GW approximation (http://www.yambocode.org/tutorials/GW/index.php). Three weeks ago in Lausanne I was primarily worried about compiling yambo with quantum espresso and I miss this part.
In the section of COHSEX, one reads that firsts it is needed the static screened interaction ( I guess, W(r,r',E=0 ) . For that one needs yambo b and quasiparticle energies with yambo b g n. I am confused because it appears in a paragraph and later on, the COHSEX calculation is configured with yambo g n p c (without b ). Then I have a few doubts
1) Does yambo b g n makes a SEX calculation, i.e., without the CO part?
2) Is it the same to perform
yambo b;yambo;yambo g n;yambo
as
yambo b g n;yambo
?
3) Do b and x act like adding ingredients to the calculations? If I do a COHSEX calculation without
calculating first the HartreeFock selfenergy and the static screeing, what happens? Are them calculated on the fly ?
Note: I see that "yambo p c g n F testcohsex" and "yambo x b p c g n F testcohsexxb" produce the same input file but the order of some lines is different, I guess the order does not matter. Also,
"yambo p p g n F testppa" and "yambo x b p p g n F testppaxb" produce the same inputs.
but
"yambo b o b y h" (from the CPC yambo article) produce a different input file than "yambo o b y h".
So, is there a general rule or a flexibility for BSE?
4) What is the interest in doing the COHSEX with empty bands? Is it to fix the parameter GbndRnge for later use in PPA or real axis calculation?
5) And turning back to the Im(eps) calculation. Can I obtain the GW dielectric function using the G0W0 energies, and not with the scissor operator and valence/conduction stretching via %XfnQP_E? How ?
Best regards
Eduardo
You do not have the required permissions to view the files attached to this post.
Eduardo Menendez Proupin
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez

 Posts: 10
 Joined: Tue Apr 24, 2012 10:35 pm
Re: memory issue in RPA calculation
opps, I accidentally pasted the clipboard on 5 and my post was almost doubles. The final question was just
5) And turning back to the Im(eps) calculation. Can I obtain the GW dielectric function using the G0W0 energies, and not with the scissor operator and valence/conduction stretching via %XfnQP_E? How ?
5) And turning back to the Im(eps) calculation. Can I obtain the GW dielectric function using the G0W0 energies, and not with the scissor operator and valence/conduction stretching via %XfnQP_E? How ?
Eduardo Menendez Proupin
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez
 andrea marini
 Posts: 445
 Joined: Mon Mar 16, 2009 4:27 pm
 Contact:
Re: memory issue in RPA calculation
Ok. The check of the matrix elements of the PBE vs LDA is a test to do... but if you do not see any differnce in the energies maybe it is not that important. And you are absolutely right regarding mixing LDA and PBE!eariel99 wrote: I have not, in this specific case. I only know iron as example that LDA predicts a wrong crystalline structure, and in my work I have not found significant differences in band diagrams and other magnitudes when I have used both LDA and PBE. I have never evaluated numerical differences between wavefunnction. Of course, it is not consistent to mix the PBE wave functions with the LDA calculation.
GREAT TEST! Thanks! I have sent your post to the other developers. We will look into the problem shortly. PBE is now supported in the devel version of the GPL source that we will release in a matter of week. But thanks to your post we will, in the meantime, switch off the calculation of the nonlocal commutator.eariel99 wrote: Yes. this is the calculation for silicon. For PBE with nonlocal contributions the order of magnitude is terrible, although the shape is OK.
That's fine. In any case in matter of week we will release the new GPL source that supports GW ontop of GGAlike xcfunctionals.eariel99 wrote: I think it is safer to swith to LDA. I have too many atoms to calculate and the complications with PBE are too much for me. In any case, I have to generate new pseudpotentials for Cd that include 4s and 4p in the valence, and the task for LDA and PBE is the same. For the moment I just want to proof that I can obtain the quasiparticle gap in the known case of CdTe.
No. Carefull. Each option corresponds to a piece of the run. I mean b means "Yambo calculates W(r,r',E=0)". g n means I do GW using the Newton solver. p c means the kind of GW I do is COHSEX. p p the kind of GW is Plasmonpole.eariel99 wrote: In the section of COHSEX, one reads that firsts it is needed the static screened interaction ( I guess, W(r,r',E=0 ) . For that one needs yambo b and quasiparticle energies with yambo b g n. I am confused because it appears in a paragraph and later on, the COHSEX calculation is configured with yambo g n p c (without b ). Then I have a few doubts
1) Does yambo b g n makes a SEX calculation, i.e., without the CO part?
Therefore yambo g n p c does COHSEX, or COH+SEX.
yes. Try yourself it this is the case.eariel99 wrote: 2) Is it the same to perform
yambo b;yambo;yambo g n;yambo
as
yambo b g n;yambo ?
WoW. Too many questions Ok, step by stepeariel99 wrote: 3) Do b and x act like adding ingredients to the calculations? If I do a COHSEX calculation without
calculating first the HartreeFock selfenergy and the static screeing, what happens? Are them calculated on the fly ?
Note: I see that "yambo p c g n F testcohsex" and "yambo x b p c g n F testcohsexxb" produce the same input file but the order of some lines is different, I guess the order does not matter. Also,
"yambo p p g n F testppa" and "yambo x b p p g n F testppaxb" produce the same inputs.
but
"yambo b o b y h" (from the CPC yambo article) produce a different input file than "yambo o b y h".
So, is there a general rule or a flexibility for BSE?
1. The order of the variables in the input file does not matter
2. each option is a piece. x does HF. b calculates the statically screened interaction.
3. Sometimes Yambo selects automatically some logicals. For example if you want to do COHSEX you do need HF, therefore Yambo switches on automatically x. These bindings are hard coded inside the code.
4. Similary you cannot do BSE without the statically screened interaction. Therefore when you do o b yambo switches on also the b option.
Is it more clear now?
This is an idea that must be checkd on the ground. Also because there is no actual energy dependence in COHSEX. But you can try. Run the COHSEX using empties and compare the convergence as a function of the empty bands with the PPA. And let us knoweariel99 wrote: 4) What is the interest in doing the COHSEX with empty bands? Is it to fix the parameter GbndRnge for later use in PPA or real axis calculation?
If you did a GoWo calculation that you should have somewhere a ndb.QP databases. Let's assume it is in the TEST folder. Then to load the GoWo energies insted of doing a scissor f by using the V qp verbosity and the QPdb option. In this case you should useeariel99 wrote: 5) And turning back to the Im(eps) calculation. Can I obtain the GW dielectric function using the G0W0 energies, and not with the scissor operator and valence/conduction stretching via %XfnQP_E? How ?
Code: Select all
"E < TEST/ndb.QP"
Andrea MARINI
Istituto di Struttura della Materia, CNR, (Italy)
Istituto di Struttura della Materia, CNR, (Italy)

 Posts: 10
 Joined: Tue Apr 24, 2012 10:35 pm
Re: memory issue in RPA calculation
I am sorry, I did not understand what calculation is done by
yambo b g n;yambo
I got confused reading
All is clear now, until the next opportunity for Murphy's action.
Best wishes
Eduardo
yambo b g n;yambo
I got confused reading
I had interpreted "yambo b g n" as a calculation with the static Screened EXchange selfenergy, without the coulomb hole correlation. Looking at the report file, I see it really does Real Axis GW and it uses the dynamical dielectric matrix db.em1d. After reading the following tutorial (realaxis GW) and running yambo without b, I realized that it is the same.In order to calculate the COHSEX selfenergy with yambo you need first the static screened interaction yambo b. As for the V(r) case, also W(r,r',E=0) will depend from the number of Gvectors, and the kgrid, but this time also the number of conduction bands XsBndsRn will enter in the screening calculation through the polarization function, see The Interacting response function: ManyBody and TDDFT section. Notice however that there are not any additional dependence of the selfenergy operator from the conduction bands. After you obtained the screened interaction you are ready to build the selfenergy operator and solve the corresponding Dyson equation, have a look to the Dyson Equation solvers in Yambo. In order to get the quasiparticle energies, just do yambo b g n. After calculation are completed Yambo will produce an output file o.qp which contains the values of the bare and renormalized energy levels.
All is clear now, until the next opportunity for Murphy's action.
Best wishes
Eduardo
Eduardo Menendez Proupin
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez
Departamento de Química Fisica Aplicada
Facultad de Ciencias
Universidad Autónoma de Madrid
28049 Madrid, Spain
On leave from: Departamento de Fisica, Facultad de Ciencias, Universidad de Chile URL: www.gnm.cl/emenendez