non-interacting response for BSE

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
milesj
Posts: 30
Joined: Thu Jan 26, 2023 9:27 pm

non-interacting response for BSE

Post by milesj » Fri Mar 03, 2023 8:10 pm

Simple question here:

I noticed that for uniform k-grids like 4x4x4, 6x6x6, etc, yambo seems to calculate X0 for many q - points as in the picture. If I instead use 2x6x6 or 4x8x8, which I am interested in because I'm working with a layered material (though still in bulk), it seems to skip all these steps and only refers to @q1 in the following steps. Is computing X0 at a bunch of q - points then irrelevant to the optical absorption, and if so is there a way to stop the code from doing that for a uniform grid? If so it would speed up my calculations considerably.

Thanks,
Miles
You do not have the required permissions to view the files attached to this post.
Miles Johnson
California Institute of Technology
PhD candidate in Applied Physics

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

Re: non-interacting response for BSE

Post by Daniele Varsano » Sat Mar 04, 2023 11:39 am

Dear Miles,

can you explain better what's your problem?
In general, Yambo calculates X for all q when it is needed, e.g. to compute the screening interaction.
Please post your input file and we can have a look.

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/

milesj
Posts: 30
Joined: Thu Jan 26, 2023 9:27 pm

Re: non-interacting response for BSE

Post by milesj » Sun Mar 05, 2023 8:19 pm

Hi Daniele,

Below is my input, and I've attached log files for when I run this input on a 662 and 666 grid. I've essentially just followed the BSE tutorial and now I'm trying to converge the k-grid, and hoping that since my material is layered it won't need to be as dense in the z direction, but I noticed it seems to skip computing X0 at a bunch of different q points when I run it on the 662 grid (I also observe this difference when I run it on an 884 vs 888 grid).

Thanks,
Miles

Code: Select all

#                                                                     
# :   :::   :::     ::::    ::::  :::::::::   ::::::::                
# :+:   :+: :+: :+:   +:+:+: :+:+:+ :+:    :+: :+:    :+              
#  +:+ +:+ +:+   +:+  +:+ +:+:+ +:+ +:+    +:+ +:+    +:+             
#   +#++: +#++:++#++: +#+  +:+  +#+ +#++:++#+  +#+    +:+             
#    +#+  +#+     +#+ +#+       +#+ +#+    +#+ +#+    +#+             
#    #+#  #+#     #+# #+#       #+# #+#    #+# #+#    #+#             
#    ###  ###     ### ###       ### #########   ########              
#                                                                     
#                                                                     
# Version 5.1.0 Revision 21422 Hash (prev commit) fde6e2a07           
#                        Branch is                                    
#                MPI+OpenMP+HDF5_IO Build                             
#                http://www.yambo-code.org                            
#
em1s                             # [R][Xs] Statically Screened Interaction
optics                           # [R] Linear Response optical properties
bss                              # [R] BSE solver
bse                              # [R][BSE] Bethe Salpeter Equation.
dipoles                          # [R] Oscillator strenghts (or dipoles)
FFTGvecs= 18995		  RL	 # [FFT] Plane-waves
DIP_Threads=0                    # [OPENMP/X] Number of threads for dipoles
X_Threads=0                      # [OPENMP/X] Number of threads for response functions
K_Threads=0                      # [OPENMP/BSK] Number of threads for response functions
Chimod= "HARTREE"                # [X] IP/Hartree/ALDA/LRC/PF/BSfxc
BSEmod= "resonant"               # [BSE] resonant/retarded/coupling
BSKmod= "SEX"                    # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc
BSSmod= "d"                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft
BSENGexx= 18995           RL     # [BSK] Exchange components
BSENGBlk= 3                Ry    # [BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]
#WehCpl                        # [BSK] eh interaction included also in coupling
KfnQPdb= "none"                  # [EXTQP BSK BSS] Database action
KfnQP_INTERP_NN= 1               # [EXTQP BSK BSS] Interpolation neighbours (NN mode)
KfnQP_INTERP_shells= 20.00000    # [EXTQP BSK BSS] Interpolation shells (BOLTZ mode)
KfnQP_DbGd_INTERP_mode= "NN"     # [EXTQP BSK BSS] Interpolation DbGd mode
% KfnQP_up_E
 0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters UP (c/v) eV|adim|adim
%
KfnQP_up_Z= ( 1.000000 , 0.000000 )      # [EXTQP BSK BSS] Z factor UP (c/v)
KfnQP_up_Wv_E= 0.000000    eV    # [EXTQP BSK BSS] W Energy reference UP (valence)
% KfnQP_up_Wv
 0.000000 | 0.000000 | 0.000000 |        # [EXTQP BSK BSS] W parameters UP (valence) eV| 1|eV^-1
%
KfnQP_up_Wv_dos= 0.000000  eV    # [EXTQP BSK BSS] W dos pre-factor UP (valence)
KfnQP_up_Wc_E= 0.000000    eV    # [EXTQP BSK BSS] W Energy reference UP (conduction)
% KfnQP_up_Wc
 0.000000 | 0.000000 | 0.000000 |        # [EXTQP BSK BSS] W parameters UP (conduction) eV| 1 |eV^-1
%
KfnQP_up_Wc_dos= 0.000000  eV    # [EXTQP BSK BSS] W dos pre-factor UP (conduction)
% KfnQP_dn_E
 0.000000 | 1.000000 | 1.000000 |        # [EXTQP BSK BSS] E parameters DOWN (c/v) eV|adim|adim
%
KfnQP_dn_Z= ( 1.000000 , 0.000000 )      # [EXTQP BSK BSS] Z factor DOWN (c/v)
KfnQP_dn_Wv_E= 0.000000    eV    # [EXTQP BSK BSS] W Energy reference DOWN (valence)
% KfnQP_dn_Wv
 0.000000 | 0.000000 | 0.000000 |        # [EXTQP BSK BSS] W parameters DOWN (valence) eV| 1|eV^-1
%
KfnQP_dn_Wv_dos= 0.000000  eV    # [EXTQP BSK BSS] W dos pre-factor DOWN (valence)
KfnQP_dn_Wc_E= 0.000000    eV    # [EXTQP BSK BSS] W Energy reference DOWN (conduction)
% KfnQP_dn_Wc
 0.000000 | 0.000000 | 0.000000 |        # [EXTQP BSK BSS] W parameters DOWN (conduction) eV| 1 |eV^-1
%
KfnQP_dn_Wc_dos= 0.000000  eV    # [EXTQP BSK BSS] W dos pre-factor DOWN (conduction)
BSEprop= "abs"                   # [BSS] Can be any among abs/jdos/kerr/magn/dich/photolum/esrt
BSEdips= "none"                  # [BSS] Can be "trace/none" or "xy/xz/yz" to define off-diagonal rotation plane
% BSEQptR
 1 | 1 |                             # [BSK] Transferred momenta range
%
% BSEBands
    75 | 90 |                       # [BSK] Bands range
%
% BEnRange
  0.00000 | 2.00000 |         eV    # [BSS] Energy range
%
% BDmRange
 0.0100000 | 0.0100000 |         eV    # [BSS] Damping range
%
BEnSteps= 200                    # [BSS] Energy steps
% BLongDir
 0.000000 | 1.000000 | 1.000000 |        # [BSS] [cc] Electric Field
%
#WRbsWF                        # [BSS] Write to disk excitonic the WFs
XfnQPdb= "none"                  # [EXTQP Xd] Database action
XfnQP_INTERP_NN= 1               # [EXTQP Xd] Interpolation neighbours (NN mode)
XfnQP_INTERP_shells= 20.00000    # [EXTQP Xd] Interpolation shells (BOLTZ mode)
XfnQP_DbGd_INTERP_mode= "NN"     # [EXTQP Xd] Interpolation DbGd mode
% XfnQP_up_E
 0.000000 | 1.000000 | 1.000000 |        # [EXTQP Xd] E parameters UP (c/v) eV|adim|adim
%
XfnQP_up_Z= ( 1.000000 , 0.000000 )      # [EXTQP Xd] Z factor UP (c/v)
XfnQP_up_Wv_E= 0.000000    eV    # [EXTQP Xd] W Energy reference UP (valence)
% XfnQP_up_Wv
 0.000000 | 0.000000 | 0.000000 |        # [EXTQP Xd] W parameters UP (valence) eV| 1|eV^-1
%
XfnQP_up_Wv_dos= 0.000000  eV    # [EXTQP Xd] W dos pre-factor UP (valence)
XfnQP_up_Wc_E= 0.000000    eV    # [EXTQP Xd] W Energy reference UP (conduction)
% XfnQP_up_Wc
 0.000000 | 0.000000 | 0.000000 |        # [EXTQP Xd] W parameters UP (conduction) eV| 1 |eV^-1
%
XfnQP_up_Wc_dos= 0.000000  eV    # [EXTQP Xd] W dos pre-factor UP (conduction)
% XfnQP_dn_E
 0.000000 | 1.000000 | 1.000000 |        # [EXTQP Xd] E parameters DOWN (c/v) eV|adim|adim
%
XfnQP_dn_Z= ( 1.000000 , 0.000000 )      # [EXTQP Xd] Z factor DOWN (c/v)
XfnQP_dn_Wv_E= 0.000000    eV    # [EXTQP Xd] W Energy reference DOWN (valence)
% XfnQP_dn_Wv
 0.000000 | 0.000000 | 0.000000 |        # [EXTQP Xd] W parameters DOWN (valence) eV| 1|eV^-1
%
XfnQP_dn_Wv_dos= 0.000000  eV    # [EXTQP Xd] W dos pre-factor DOWN (valence)
XfnQP_dn_Wc_E= 0.000000    eV    # [EXTQP Xd] W Energy reference DOWN (conduction)
% XfnQP_dn_Wc
 0.000000 | 0.000000 | 0.000000 |        # [EXTQP Xd] W parameters DOWN (conduction) eV| 1 |eV^-1
%
XfnQP_dn_Wc_dos= 0.000000  eV    # [EXTQP Xd] W dos pre-factor DOWN (conduction)
% BndsRnXs
    1 | 200 |                       # [Xs] Polarization function bands
%
NGsBlkXs= 3                Ry    # [Xs] Response block size
% LongDrXs
 1.000000 | 1.000000 | 1.000000 |        # [Xs] [cc] Electric Field
%
XTermKind= "none"                # [X] X terminator ("none","BG" Bruneval-Gonze)


You do not have the required permissions to view the files attached to this post.
Miles Johnson
California Institute of Technology
PhD candidate in Applied Physics

milesj
Posts: 30
Joined: Thu Jan 26, 2023 9:27 pm

Re: non-interacting response for BSE

Post by milesj » Mon Mar 06, 2023 11:44 pm

It seems to be deciding to only work with q1 during the setup. Does this mean there is something incompatible with my quantum espresso calculation? In quantum espresso I've defined the k-grid as 2x6x6 (rather than 6x6x2 - I did this because the magnetization is in plane so to have that along the z direction I have the planes stacked in the x direction). Does yambo require a nonuniform k-grid to only be different in the z direction? From the log it seems to interpret the grid as 6x6x2 rather than 2x6x6.

Thanks,
Miles
You do not have the required permissions to view the files attached to this post.
Miles Johnson
California Institute of Technology
PhD candidate in Applied Physics

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

Re: non-interacting response for BSE

Post by Daniele Varsano » Tue Mar 07, 2023 8:20 am

Dear Miles,

1) Regarding your first post, even if for the absorption you need the response function for q=0 only, as you are doing a BSE calculation you need the RPA response function X to build the screening for all q in order to construct the BSE kernel.

2)As you spotted here the problem is that yambo does not recognize the grid as uniform, in this case it switches to a gamma only calculation. The BZ sampling needs to be uniform:
1. Be sure you set force_symmorphic=.true. in your qe input
2. you can try to repeat the setup by adding the keyword (NoDiagSC) in your yambo setup input file. Before doing that, delete the ndb* file in your directory. See if this solve your problem.

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/

milesj
Posts: 30
Joined: Thu Jan 26, 2023 9:27 pm

Re: non-interacting response for BSE

Post by milesj » Thu Mar 09, 2023 9:07 am

Hi Daniele,

It looks like adding NoDiagSC fixed it, thanks! Out of curiosity, what exactly does adding this keyword do?

Thanks,
Miles
Miles Johnson
California Institute of Technology
PhD candidate in Applied Physics

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

Re: non-interacting response for BSE

Post by Daniele Varsano » Thu Mar 09, 2023 10:49 am

Dear Miles,

great it is solved.
The NoDiagSC trigger an algorithm alternative to the standard one to generate the Q points grid, that sometimes is more accurate when dealing with non diagonal cells.

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/

Post Reply