Use state-resoved QP corrections from other codes

Deals with issues related to computation of optical spectra in reciprocal space: RPA, TDDFT, local field effects.

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

Post Reply
JunqingXu
Posts: 3
Joined: Tue Mar 05, 2019 12:27 am

Use state-resoved QP corrections from other codes

Post by JunqingXu » Sat Apr 13, 2019 11:01 pm

Dear developers,
In Yambo’s RPA/BSE calculations, I want to use spin-, k- and band-resolved QP (qusi-particle) corrections obtained using another GW code (WEST code). Could anyone tell me how to do that?

Personally, I tried to modify the PWSCF output files eigenval1(2).xml to add state-resolved QP corrections onto the stored eigen energies. However, I found that with the modified eigenval1(2).xml files, the calculated RPA absorption spectra by Yambo has right peak positions but wrong (low) peak heights or amplitudes.

Please find the attached figure to see the problem. In the figure, I compared three Yambo RPA spectra: (i) grey - no QP corrections; (ii) red - QP corrections set by KfnQP_up_E and KfnQP_dn_E; (iii) blue – QP corrections are added to eigenval1(2).xml files of PWSCF.
RPA_QP_corrections.jpg
The studied system is a supercell of h-BN with a defect. The first peak in the spectra corresponds to a transition between two defect states.

Could anyone help to explain why adding QP corrections to PWSCF output files eigenval1(2).xml does not work? Is this trouble related to a kind of sum rule?

I also attached one RPA input file using variables KfnQP_up_E and KfnQP_dn_E.

Code: Select all

rim_cut                      # [R RIM CUT] Coulomb potential
optics                       # [R OPT] Optics
bse                          # [R BSE] Bethe Salpeter Equation.
bsk                          # [R BSK] Bethe Salpeter Equation kernel
bss                          # [R BSS] Bethe Salpeter Equation solver
RandQpts= 100000             # [RIM] Number of random q-points in the BZ
RandGvec= 10          RL    # [RIM] Coulomb interaction RS components
CUTGeo= "box z"              # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere X/Y/Z/XY..
% CUTBox
 0.0 | 0.0 | 19.0 |          # [CUT] [au] Box sides
%
CUTRadius= 0.000000          # [CUT] [au] Sphere/Cylinder radius
CUTCylLen= 0.000000          # [CUT] [au] Cylinder length
BSEmod= "retarded"           # [BSE] resonant/retarded/coupling
BSKmod= "Hartree"            # [BSE] IP/Hartree/HF/ALDA/SEX
BSSmod= "d"                  # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`
BSENGBlk= 1           Ry    # [BSK] Screened interaction block size
% KfnQP_up_E
 3.200000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters UP (c/v) eV|adim|adim
%
% KfnQP_dn_E
 3.800000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters UP (c/v) eV|adim|adim
%
WRbsWF
% BEnRange
  0.00000 |  9.00000 | eV    # [BSS] Energy range
%
% BDmRange
  0.02000 |  0.02000 | eV    # [BSS] Damping range
%
BEnSteps= 9001                # [BSS] Energy steps
% BLongDir
 1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field
%
% BSEBands
 131 | 162 |                 # [BSK] Bands range
%
Junqing
You do not have the required permissions to view the files attached to this post.
Junqing Xu
Department of Chemistry and Biochemistry, University of California, Santa Cruz, California 95064, USA
jxu153@ucsc.edu

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

Re: Use state-resoved QP corrections from other codes

Post by Daniele Varsano » Sun Apr 14, 2019 4:51 pm

Dear Junqing,
in my opinion, if the hacking of the eigenval.xml is done correctly the results should be equivalent.
Please note that two calculations could be not totally equivalent as in one case you use a scissor the energy associated with each state is not the same you use assigning a QP correction.
In particular, in the presence of defects, the use of the scissor could be problematic as defect states have usually different corrections than valence and conduction states.
Also note that your input it is not an RPA calculation, as you are using 1Ry in the Screened interaction block size (BSENGBlk= 1 Ry) and you are not considering BSENGexx.
My suggestion is to make some check for an IP calculation.
Another check would be to look at the yambo setup report when using the modified eigenvalues.xml file if the reported energies are indeed the modified one in the two spin channel.
Next, consider that you can create a QP database by hand by using ypp (ypp -q g). You can insert in input the QP correction calculated externally and ypp will generate the corresponding database,
I'm not 100% sure this feature is implemented for a spin-resolved calculation.

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/

JunqingXu
Posts: 3
Joined: Tue Mar 05, 2019 12:27 am

Re: Use state-resoved QP corrections from other codes

Post by JunqingXu » Mon Apr 15, 2019 6:06 am

Dear Daniele,
Thank you for your detailed answer.

Indeed assigning state-resolved QP corrections is different from applying a scissor.
I realized that in spin-polarized case, even for only band edges, these two operators are not the same.
I observed that for spin-up states, the QP corrections of valence band maximum (VBM) and conduction band minimum (CBM) are -1.6 and 1.6 eV, respective.
While for spin-down state, the QP corrections of VBM and CBM are -2.3 and 1.5 eV, respectively.
Those 4 numbers cannot be fully described by two scissor parameters KfnQP_up(dn)_E.

I think I had better firstly check:
Instead of assign state-resolved QP corrections in eigenval1(2).xml files, apply scissor operators determined by KfnQP_up(dn)_E into PWSCF output eigenval1(2).xml files.

I will then do IP tests following your suggestions.

I had checked output of Yambo RPA calculations with modified eigenval1(2).xml files,
in the part "[02.05] Energies [ev] & Occupations", I have seen that the Gaps for spin-up and spin-down are indeed what expected.

I will update my checks later.

Concerning the use of ypp to create a QP database, I had seen some descriptions in websites but I had never tried it and don't know how to do it for spin-polarized case.
I am wondering whether it is a good idea to write a script to convert QP-correction files from other codes directly to ndb.QP. However, I had troubles in understanding the format of ndb.QP file. Could anyone tell me such information?

Thank you,
Junqing
Junqing Xu
Department of Chemistry and Biochemistry, University of California, Santa Cruz, California 95064, USA
jxu153@ucsc.edu

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

Re: Use state-resoved QP corrections from other codes

Post by Daniele Varsano » Mon Apr 15, 2019 6:28 am

Dear Junqing,
in my previous post, I told you the two way of considering the QP correction should be equivalent but now I realized this is not the case.

Dipole matrix elements are calculated as <r>=<p>/deltaE, and the energy difference is calculated using the KS eigenvalues. This explains why, when you use QP corrections in the eigenval.xml you obtain a smaller oscillator strength.
Concerning the use of ypp to create a QP database, I had seen some descriptions in websites but I had never tried it and don't know how to do it for spin-polarized case.
I need to have a look, I do not use it frequently, and eventually extend to spin-polarized case.
I am wondering whether it is a good idea to write a script to convert QP-correction files from other codes directly to ndb.QP. However, I had troubles in understanding the format of ndb.QP file

Yes, this can be done, maybe the easiest way is to look what does the ypp when generating the database, essentially read the values in input and fill the QP database.
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/

JunqingXu
Posts: 3
Joined: Tue Mar 05, 2019 12:27 am

Re: Use state-resoved QP corrections from other codes

Post by JunqingXu » Mon Apr 15, 2019 4:55 pm

Dear Daniele,
Thank you for pointing out the issue!
So we need to work on creating a ndb.QP file. I will think about it.
Any help in building a spin-polarized ndb.QP file will be greatly appreciated.

Junqing
Junqing Xu
Department of Chemistry and Biochemistry, University of California, Santa Cruz, California 95064, USA
jxu153@ucsc.edu

Post Reply