using scissor operator to mimic the band gap of HSE

Run-time issues concerning Yambo that are not covered in the above forums.

Moderators: myrta gruning, andrea marini, Daniele Varsano, Conor Hogan

Post Reply
shan dong
Posts: 48
Joined: Thu Oct 17, 2019 5:26 am

using scissor operator to mimic the band gap of HSE

Post by shan dong » Fri Oct 18, 2019 7:45 am

Dear all,
I'm calculating the absorption spectrum with Yambo.

When I calculated the band gap based on PBE calculations ,the VBM and CBM are partially overlapped about 0.1 eV .But the HSE open a Eg~0.6eV.To build the BSE Hamiltonian, Can I use a scissor operator ΔE=0.7 eV to mimic the HSE band gap ,and calculate the DFT energies and wavefucntions from PBE band structure?

Waiting for your replay. Thank you.

Shan Dong
PhD student
Beijing Institute of Technology,China
yifei liu
PhD student
Beijing Institute of Technology,China

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

Re: using scissor operator to mimic the band gap of HSE

Post by Daniele Varsano » Fri Oct 18, 2019 8:32 am

Dear Shan Dong,
yes, it is possible to apply a scissor, and eventually a stretching of the bands.
In my opinion, you should apply it both in the calculation of the screening and in the BSE ( XfnQP_E, KfnQP_E respectively), as otherwise the screening will be calculated with a metallic character.
Unfortunately, even if GW/BSE calculations on top of HSE have been coded, this feature has been not yet released because of a small discrepancy in the calculation of the <Vxc> which then reflect in the GW gap. In the case you want just to do a BSE calculation on top of HSE (without GW corrections), this is feasible. Probably p2y will complain but it is possible to overcome the complaint by changing a couple of lines in the code. Let me know if you need it and I will tell you how to do. Some care then has to be taken in the calculation of dipoles as the non-local term of HSE appearing in the commutator for the dipole calculations, it is not taken into account in the standard calculation of dipoles.

Another option is to perform a calculation using Gau-PBE in QE instead of HSE. In most of the cases, it provides similar results to HSE and it is perfectly compatible with Yambo.
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/

shan dong
Posts: 48
Joined: Thu Oct 17, 2019 5:26 am

Re: using scissor operator to mimic the band gap of HSE

Post by shan dong » Fri Oct 18, 2019 10:04 am

Daniele Varsano wrote:Dear Shan Dong,
yes, it is possible to apply a scissor, and eventually a stretching of the bands.
In my opinion, you should apply it both in the calculation of the screening and in the BSE ( XfnQP_E, KfnQP_E respectively), as otherwise the screening will be calculated with a metallic character.
Unfortunately, even if GW/BSE calculations on top of HSE have been coded, this feature has been not yet released because of a small discrepancy in the calculation of the <Vxc> which then reflect in the GW gap. In the case you want just to do a BSE calculation on top of HSE (without GW corrections), this is feasible. Probably p2y will complain but it is possible to overcome the complaint by changing a couple of lines in the code. Let me know if you need it and I will tell you how to do. Some care then has to be taken in the calculation of dipoles as the non-local term of HSE appearing in the commutator for the dipole calculations, it is not taken into account in the standard calculation of dipoles.

Another option is to perform a calculation using Gau-PBE in QE instead of HSE. In most of the cases, it provides similar results to HSE and it is perfectly compatible with Yambo.
Best,

Daniele

Dear Daniele
Thanks for your quick reply and suggestions. Now I want to do a BSE calculation on top of HSE (without GW corrections),can you tell me how to do it ?

Shan Dong
PhD student
Beijing Institute of Technology,China
yifei liu
PhD student
Beijing Institute of Technology,China

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

Re: using scissor operator to mimic the band gap of HSE

Post by Daniele Varsano » Fri Oct 18, 2019 10:12 am

Dear Shan,
depending on the version of QE you are using you need to comment the following lines in
./interface/p2y/mod_p2y.F

Code: Select all

880            else
881              call error('Hybrid functional: Only HF,PBE0, B3LYP and GAUPBE allowed')
or/and

Code: Select all

914          else
915            call error('Hybrid functional: Only HF,PBE0,B3LYP and GAUPBE allowed')
and recompile the interface:
> make interfaces
In this way, the p2y should not stop and store the HSE ground state in your SAVE folder.
I hope this should be enough. If the code then stops in other parts post here the problem.

Next, when running the BSE calculation you should set in the input file:

Code: Select all

DipApproach="Covariant"
If you calculate the dipole in the standard approach, the error should be small. Such an error anyway reflects only in the intensity of the absorption peaks and not in the excitation energies.


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/

shan dong
Posts: 48
Joined: Thu Oct 17, 2019 5:26 am

Re: using scissor operator to mimic the band gap of HSE

Post by shan dong » Fri Oct 18, 2019 2:57 pm

Daniele Varsano wrote:Dear Shan,
depending on the version of QE you are using you need to comment the following lines in
./interface/p2y/mod_p2y.F

Code: Select all

880            else
881              call error('Hybrid functional: Only HF,PBE0, B3LYP and GAUPBE allowed')
or/and

Code: Select all

914          else
915            call error('Hybrid functional: Only HF,PBE0,B3LYP and GAUPBE allowed')
and recompile the interface:
> make interfaces
In this way, the p2y should not stop and store the HSE ground state in your SAVE folder.
I hope this should be enough. If the code then stops in other parts post here the problem.

Next, when running the BSE calculation you should set in the input file:

Code: Select all

DipApproach="Covariant"
If you calculate the dipole in the standard approach, the error should be small. Such an error anyway reflects only in the intensity of the absorption peaks and not in the excitation energies.


Best,
Daniele

Dear Daniele,

Thanks for your reply,I started using qe 6.2 and yambo 4.2.2. In yambo 4.2.2,the mod_p2y.F file dosen't have the lines you mentioned above.They may appear in higher versions. When I performed p2y , there were an error. Please see the attachment.What should I do ,change the version of yambo or the mod_p2y.F of 4.2.2?
You do not have the required permissions to view the files attached to this post.
yifei liu
PhD student
Beijing Institute of Technology,China

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

Re: using scissor operator to mimic the band gap of HSE

Post by Daniele Varsano » Fri Oct 18, 2019 3:03 pm

Dear Shan,
yambo 4.2.2 is a very old version.
I strongly suggest you update to a more recent version:

Code: Select all

git clone https://github.com/yambo-code/yambo.git yambo
Best,
Daniele

PS: You can fill your signature in your user profile in order to avoid to type it at each post.
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/

shan dong
Posts: 48
Joined: Thu Oct 17, 2019 5:26 am

Re: using scissor operator to mimic the band gap of HSE

Post by shan dong » Sat Oct 19, 2019 12:41 pm

Daniele Varsano wrote:Dear Shan,
yambo 4.2.2 is a very old version.
I strongly suggest you update to a more recent version:

Code: Select all

git clone https://github.com/yambo-code/yambo.git yambo
Best,
Daniele

PS: You can fill your signature in your user profile in order to avoid to type it at each post.
Dear Daniele,
Really appreciate your quick reply and suggestions. I updated to the yambo 4.4.0 and commented the lines you mentioned above. It works.
Thank you
yifei liu
PhD student
Beijing Institute of Technology,China

shan dong
Posts: 48
Joined: Thu Oct 17, 2019 5:26 am

Re: using scissor operator to mimic the band gap of HSE

Post by shan dong » Sat Oct 19, 2019 5:04 pm

shan dong wrote:
Daniele Varsano wrote:Dear Shan,
yambo 4.2.2 is a very old version.
I strongly suggest you update to a more recent version:

Code: Select all

git clone https://github.com/yambo-code/yambo.git yambo
Best,
Daniele

PS: You can fill your signature in your user profile in order to avoid to type it at each post.
Dear Daniele,
Really appreciate your quick reply and suggestions. I updated to the yambo 4.4.0 and commented the lines you mentioned above. It works.
Thank you
Dear Daniele,
The p2y is OK . But ,when did the BSE calculation on top of HSE (without GW corrections) there was an error ,and the yambo was stopped.Can you give me some help?

optics # [R OPT] Optics
em1s
bss # [R BSS] Bethe Salpeter Equation solver
bse # [R BSE] Bethe Salpeter Equation.
bsk # [R BSK] Bethe Salpeter Equation kernel
StdoHash= 40 # [IO] Live-timing Hashes
Nelectro= 60.00000 # Electrons number
ElecTemp= 0.000000 eV # Electronic Temperature
BoseTemp=-1.000000 eV # Bosonic Temperature
OccTresh=0.1000E-4 # Occupation treshold (metallic bands)
NLogCPUs=0 # [PARALLEL] Live-timing CPU`s (0 for all)
DBsIOoff= "none" # [IO] Space-separated list of DB with NO I/O. DB=(DIP,X,HF,COLLs,J,GF,CARRIERs,OBS,W,SC,BS,ALL)
DBsFRAGpm= "none" # [IO] Space-separated list of +DB to FRAG and -DB to NOT FRAG. DB=(DIP,X,W,HF,COLLS,K,BS,QINDX,RT,ELP
FFTGvecs= 50 Ry # [FFT] Plane-waves
#WFbuffIO # [IO] Wave-functions buffered I/O
PAR_def_mode= "balanced" # [PARALLEL] Default distribution mode ("balanced"/"memory"/"workload")
BS_CPU= "1 1 72" # [PARALLEL] CPUs for each role
BS_ROLEs= "k eh t" # [PARALLEL] CPUs roles (k,eh,t)
BS_nCPU_LinAlg_INV= 4 # [PARALLEL] CPUs for Linear Algebra
BS_nCPU_LinAlg_DIAGO= 4 # [PARALLEL] CPUs for Linear Algebra
NonPDirs= "none" # [X/BSS] Non periodic chartesian directions (X,Y,Z,XY...)
BSEmod= "retarded" # [BSE] resonant/retarded/coupling
BSKmod= "SEX" # [BSE] IP/Hartree/HF/ALDA/SEX
BSSmod= "d" # [BSS] (h)aydock/(d)iagonalization/(i)nversion/(t)ddft`
DbGdQsize= 1.000000 # [X,DbGd][o/o] Percentual of the total DbGd transitions to be used
BSENGexx= 42 Ry # [BSK] Exchange components
#ALLGexx # [BSS] Force the use use all RL vectors for the exchange part
KfnQPdb= "none" # [EXTQP BSK BSS] Database
KfnQP_N= 1 # [EXTQP BSK BSS] Interpolation neighbours
% KfnQP_E
0.000000 | 1.000000 | 1.000000 | # [EXTQP BSK BSS] E parameters (c/v) eV|adim|adim
%
KfnQP_Z= ( 1.000000 , 0.000000 ) # [EXTQP BSK BSS] Z factor (c/v)
KfnQP_Wv_E= 0.000000 eV # [EXTQP BSK BSS] W Energy reference (valence)
% KfnQP_Wv
0.00 | 0.00 | 0.00 | # [EXTQP BSK BSS] W parameters (valence) eV| 1|eV^-1
%
KfnQP_Wv_dos= 0.000000 eV # [EXTQP BSK BSS] W dos pre-factor (valence)
KfnQP_Wc_E= 0.000000 eV # [EXTQP BSK BSS] W Energy reference (conduction)
% KfnQP_Wc
0.00 | 0.00 | 0.00 | # [EXTQP BSK BSS] W parameters (conduction) eV| 1 |eV^-1
%
KfnQP_Wc_dos= 0.000000 eV # [EXTQP BSK BSS] W dos pre-factor (conduction)
DipApproach= "Covariant" # [Xd] [G-space v/R-space x/Covariant/Shifted grids]
#DipPDirect # [Xd] Directly compute <v> also when using other approaches for dipoles
ShiftedPaths= "" # [Xd] Shifted grids paths (separated by a space)
Gauge= "length" # [BSE] Gauge (length|velocity)
#NoCondSumRule # [BSE] Do not impose the conductivity sum rule in velocity gauge
#MetDamp # [BSE] Define \w+=sqrt(\w*(\w+i\eta))
DrudeWBS= ( 0.00 , 0.00 ) eV # [BSE] Drude plasmon
#Reflectivity # [BSS] Compute reflectivity at normal incidence
BoseCut= 0.10000 # [BOSE] Finite T Bose function cutoff
% BEnRange
0.00000 | 10.00000 | eV # [BSS] Energy range
%
% BDmRange
0.10000 | 0.10000 | eV # [BSS] Damping range
%
BEnSteps= 600 # [BSS] Energy steps
% BLongDir
1.000000 | 0.000000 | 0.000000 | # [BSS] [cc] Electric Field
%
% BSEBands
1 | 88 | # [BSK] Bands range
%
% BSEEhEny
-1.000000 |-1.000000 | eV # [BSK] Electron-hole energy range
%
#WRbsWF # [BSS] Write to disk excitonic the WFs
#BSSPertWidth # [BSS] Include QPs lifetime in a perturbative way
You do not have the required permissions to view the files attached to this post.
yifei liu
PhD student
Beijing Institute of Technology,China

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

Re: using scissor operator to mimic the band gap of HSE

Post by Daniele Varsano » Sat Oct 19, 2019 5:48 pm

Dear Shan Dong,
the error message you posted it comes form the queue system and it is not useful to spot the problem.
More information can be taken looking at the log files.
Anyway, I do not think the problem is related with the use of HSE. From your report/input file I can see the following problem:
You have 30 occupied bands, usually, BSE is calculated considering a few bands across Fermi, adding up them until convergence, here you are using:

Code: Select all

1 | 88 | # [BSK] Bands range
which are a lot, implies enormous BSE matrix and memory consumption, and are most probably useless in order to converge the spectrum in the energy range of interest.
Having said that, I think that your problem is related to this warning in the report:

Code: Select all

[WARNING][RL indx] 2 equivalent points in the rlu grid found
[RL indx] X grid is not uniform. Gamma point only.
Looking at the scf input file you posted above it seems you are assigning a k pint sampling by hand and it turns out to be a grid incompatible for yambo.
My suggestion is to use a regular MP grid:

Code: Select all

K_POINTS {automatic}
Nkx Nky Nkz 0 0 0
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/

shan dong
Posts: 48
Joined: Thu Oct 17, 2019 5:26 am

Re: using scissor operator to mimic the band gap of HSE

Post by shan dong » Tue Oct 22, 2019 9:14 am

Daniele Varsano wrote:Dear Shan Dong,
the error message you posted it comes form the queue system and it is not useful to spot the problem.
More information can be taken looking at the log files.
Anyway, I do not think the problem is related with the use of HSE. From your report/input file I can see the following problem:
You have 30 occupied bands, usually, BSE is calculated considering a few bands across Fermi, adding up them until convergence, here you are using:

Code: Select all

1 | 88 | # [BSK] Bands range
which are a lot, implies enormous BSE matrix and memory consumption, and are most probably useless in order to converge the spectrum in the energy range of interest.
Having said that, I think that your problem is related to this warning in the report:

Code: Select all

[WARNING][RL indx] 2 equivalent points in the rlu grid found
[RL indx] X grid is not uniform. Gamma point only.
Looking at the scf input file you posted above it seems you are assigning a k pint sampling by hand and it turns out to be a grid incompatible for yambo.
My suggestion is to use a regular MP grid:

Code: Select all

K_POINTS {automatic}
Nkx Nky Nkz 0 0 0
Best,
Daniele
Dear Daniele,
Really appreciate your quick reply and suggestions.I corrected the mistake you mentioned above and it works.
Best,
Shan Dong
yifei liu
PhD student
Beijing Institute of Technology,China

Post Reply