p2y reading of "hybrid" calculations

Come here to discuss issues with using the p2y converter from PWscf to Yambo, how to best run PWscf , link with the IOTK library, and so on.

Moderators: andrea.ferretti, Conor Hogan

Forum rules
Before posting, make sure to first read carefully all the detailed steps and suggestions given in the main documentation:
https://www.yambo-code.eu/learn/#learn-forum
Jiale Shen
Posts: 7
Joined: Sun Dec 18, 2022 3:17 am

Re: p2y reading of "hybrid" calculations

Post by Jiale Shen » Mon Apr 17, 2023 8:57 am

Dear Daniele,
I would like to ask some questions about Yambo-based hybrid functional computation. Currently I want to use PBE0 hybrid functional calculations, for the exxdiv_treatment parameter, your suggestion is to use "vcut_spherical" or "vcut_ws'". But when I use this parameter, QE gets the following error:
Error in routine vcut_init (1):
non-orthorombic case untested
I asked QE's technicians, and their explanation was:
exxdiv_treatment='vcut_ws', requires that the three axis are orthogonal (or, more exactly: nobody has ever tested that it works if axis are not orthogonal).

I also tested and it is true that only orthogonal primitive cell can run smoothly. So if the system I want to calculate is not orthogonal primitive cell (e.g. triclinic primitive cell), is there any other way?

Best wishes!
Jiale Shen
Taiyuan University of Technology, China

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

Re: p2y reading of "hybrid" calculations

Post by Daniele Varsano » Mon Apr 17, 2023 2:17 pm

Dear Jiale Shen,

first, let me ask you to sign your post with your name and affiliation, this is a rule of the forum and you can do once for all by filling your signature in the user profile.

Is your system a bulk or a 2D system?

If it is a bulk, as I presume, you can probably set exxdiv_treatment='gygi-baldereschi'.
There will be a mismatch between how QE and Yambo treat the divergencies but the error hopefully should be small.

Contrary, if your system is 2D you can probably modify your cell making it orthogonal paying the price to add atoms in your cell.

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/

Jiale Shen
Posts: 7
Joined: Sun Dec 18, 2022 3:17 am

Re: p2y reading of "hybrid" calculations

Post by Jiale Shen » Fri Apr 21, 2023 11:25 am

Dear Daniele,
Thanks for your reply! My system is a bulk, the version I'm using is yambo5.0.3. I did the PBE0 calculation following your proposed method. When preparing the calculation input file for BSE, I found that the parameters of the output were not complete. I also didn't find another effective way to complete it, or is there something wrong with the command I entered? Or is its full parameter like this? Here's the whole process I output with yambo:

Code: Select all

 p2y
 
 <---> DBs path set to : .
 <---> detected QE data format : qexsd
 <---> == PWscf v.6.x generated data (QEXSD fmt) ==
 <---> Header/K-points/Energies... done
 <03s> Cell data...
 <04s> [WARNING]Two or more crystal structures fit the given cell done
 <04s> Atomic data... done
 <04s> Symmetries...[SI yes]...[I yes]...[-I no]...[TR yes]
 <06s> [WARNING]For Hybrids and HF the vcut_ws/spherical divergence treatment  are recommended, Gigy-Baldereschi treatment can lead to a loss of precision
 <06s> XC functional...PBEH (PBE0)(XC)
 <06s> EXX fraction...:  0.250000
 <06s> EXX screening...: -1.000000
 <06s> K-points mesh... done
 <07s> RL vectors... done
 <07s> IGK arrays... done
 <08s> Energies... done
 <09s>  Electrons             :  26.00000
 <09s>  Temperature           :  0.000000 [eV]
 <09s>  Lattice factors       :  10.92092   9.10060   9.10060 [a.u.]
 <09s>  K-points              :  1000
 <09s>  Bands                 :   60
 <09s>  Spinor components     :  1
 <09s>  Spin polarizations    :  1
 <09s>  Spin orbit coupling    : no
 <09s>  Symmetries   [spatial]:  1
 <09s>                 [T-rev] : yes
 <09s>  Max WF components     :  2815
 <09s>  RL vectors        (WF):   4079
 <09s>  RL vectors    (CHARGE):  31137
 <09s>  XC potential           : PBEH (PBE0)(XC)
 <09s>  Atomic species        :  2
 <09s>  Max atoms/species     :  2
 <09s> == DB1 (Gvecs and more) ...
 <09s> ... Database done
 <09s> == DB2 (wavefunctions)  ...
 <40s> [p2y] WF I/O |########################################| [100%] 30s(E) 30s(X) done ==
 <40s> == DB3 (PseudoPotential) ... done ==
 <01m-10s>  == P2Y completed ==

Code: Select all

 yambo
 
 <---> [01] MPI/OPENMP structure, Files & I/O Directories
 <---> [02] CORE Variables Setup
 <---> [02.01] Unit cells
 <---> [02.02] Symmetries
 <---> [02.03] Reciprocal space
 <---> Shells finder |########################################| [100%] --(E) --(X)
 <---> [02.04] K-grid lattice
 <---> Grid dimensions      :  10  10  10
 <---> [02.05] Energies & Occupations
 <---> [03] Transferred momenta grid and indexing
 <---> [WARNING][RL indx] 2 equivalent points in the rlu grid found
 <---> [RL indx] X grid is not uniform. Gamma point only.
 <---> [04] Timing Overview
 <---> [05] Memory Overview
 <---> [06] Game Over & Game summary

Code: Select all

yambo -r -d s -y d -o b -k sex -V all

rim_cut                          # [R] Coulomb potential
bss                              # [R] BSE solver
optics                           # [R] Linear Response optical properties
bse                              # [R][BSE] Bethe Salpeter Equation.
StdoHash=  40                    # [IO] Live-timing Hashes
Nelectro= 26.00000               # Electrons number
ElecTemp= 0.000000         eV    # Electronic Temperature
BoseTemp=-1.000000         eV    # Bosonic Temperature
OccTresh= 0.100000E-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
MEM_tresh= 191203          Kb    # [MEMORY] Treshold on traced memory allocations/deallocations
FFTGvecs=  60            Ry    # [FFT] Plane-waves
#WFbuffIO                      # [IO] Wave-functions buffered I/O
PAR_def_mode= "memory"         # [PARALLEL] Default distribution mode ("balanced"/"memory"/"workload")
BS_CPU= ""                       # [PARALLEL] CPUs for each role
BS_ROLEs= ""                     # [PARALLEL] CPUs roles (k,eh,t)
BS_nCPU_LinAlg_INV=-1            # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)
BS_nCPU_LinAlg_DIAGO=-1          # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)
DIP_CPU= ""                      # [PARALLEL] CPUs for each role
DIP_ROLEs= ""                    # [PARALLEL] CPUs roles (k,c,v)
NonPDirs= "none"                 # [X/BSS] Non periodic chartesian directions (X,Y,Z,XY...)
% MolPos
 0.000000 | 0.000000 | 0.000000 |        # [X/BSS] Molecule coord in supercell, 0.5 is the middle
%
RandQpts=200000                       # [RIM] Number of random q-points in the BZ
RandGvec= 1                RL    # [RIM] Coulomb interaction RS components
#QpgFull                       # [F RIM] Coulomb interaction: Full matrix
% Em1Anys
 0.000000 | 0.000000 | 0.000000 |        # [RIM] X Y Z Static Inverse dielectric matrix
%
IDEm1Ref=0                       # [RIM] Dielectric matrix reference component 1(x)/2(y)/3(z)
CUTGeo= "ws XYZ"                   # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere/ws X/Y/Z/XY..
% CUTBox
 10.800000 | 9.000000 | 9.000000 |        # [CUT] [au] Box sides
%
CUTRadius= 0.000000              # [CUT] [au] Sphere/Cylinder radius
CUTCylLen= 0.000000              # [CUT] [au] Cylinder length
CUTwsGvec= 1.000000              # [CUT] WS cutoff: number of G to be modified
#CUTCol_test                   # [CUT] Perform a cutoff test in R-space
BSEmod= "resonant"               # [BSE] resonant/retarded/coupling
BSKmod= "HARTREE"                # [BSE] IP/Hartree/HF/ALDA/SEX/BSfxc
Lkind= "Lbar"                    # [BSE] Lbar (default) / full
BSSmod= "d"                      # [BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`
DbGdQsize= 1.000000              # [X,DbGd][o/o] Percentual of the total DbGd transitions to be used
DipApproach= "G-space v"         # [DIP] [G-space v/R-space x/Covariant/Shifted grids]
DipComputed= "R P V"             # [DIP] [default R P V; extra P2 Spin Orb]
#DipPDirect                    # [DIP] Directly compute <v> also when using other approaches for dipoles
ShiftedPaths= ""                 # [DIP] Shifted grids paths (separated by a space)
Gauge= "length"                  # [BSE/X] Gauge (length|velocity)
#AnHall                        # [BSE] Add the anomalous Hall effect to eps if using length gauge
BSENGexx= 60            Ry    # [BSK] Exchange components
#ALLGexx                       # [BSS] Force the use use all RL vectors for the exchange part
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_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.000000 | 0.000000 | 0.000000 |        # [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.000000 | 0.000000 | 0.000000 |        # [EXTQP BSK BSS] W parameters  (conduction) eV| 1 |eV^-1
%
KfnQP_Wc_dos= 0.000000     eV    # [EXTQP BSK BSS] W dos pre-factor  (conduction)
#NoCondSumRule                 # [BSE/X] Do not impose the conductivity sum rule in velocity gauge
#MetDamp                       # [BSE] Define \w+=sqrt(\w*(\w+i\eta))
BSEprop= "abs"                   # [BSS] abs/kerr/magn/dichr trace
% PL_weights
 1.000000 | 1.000000 | 1.000000 |        # [PL] [cc] Weights of the carthesian components of the emitted radiation
%
DrudeWBS= ( 0.000000 , 0.000000 )  eV    # [BSE] Drude plasmon
#Reflectivity                  # [BSS] Compute reflectivity at normal incidence
BoseCut= 0.100000                # [BOSE] Finite T Bose function cutoff
% BSEQptR
 1 | 1 |                             # [BSK] Transferred momenta range
%
% BSEBands
   10 |  17 |                         # [BSK] Bands range
%
BSKCut= 0.000000                 # [BSK] Cutoff on the BSE Kernel, 0=full 1=none
% BSEEhEny
-1.000000 |-1.000000 |         eV    # [BSK] Electron-hole energy range
%
% BSehWind
 100.0000 | 100.0000 |               # [BSK] [o/o] E/h coupling pairs energy window
%
% BEnRange
  0.00000 | 5.00000 |         eV    # [BSS] Energy range
%
% BDmRange
 0.100000 | 0.100000 |         eV    # [BSS] Damping range
%
BDmERef= 0.000000          eV    # [BSS] Damping energy reference
BEnSteps= 1000                    # [BSS] Energy steps
% BLongDir
 1.000000 | 0.000000 | 0.000000 |        # [BSS] [cc] Electric Field
%
WRbsWF                        # [BSS] Write to disk excitonic the WFs
#BSSPertWidth                  # [BSS] Include QPs lifetime in a perturbative way
All the input parameters of BSE are here, and these parameters are obviously not enough. I compared it with the BSE that I had successfully run with PBE before, and the command was the same and found that the following parameters were missing:

Code: Select all

X_and_IO_CPU= "1 1 1 24 1"                 # [PARALLEL] CPUs for each role
X_and_IO_ROLEs= "q g k c v"               # [PARALLEL] CPUs roles (q,g,k,c,v)
X_and_IO_nCPU_LinAlg_INV=-1      # [PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)

XfnQPdb= "none"                # [EXTQP Xd] Database
XfnQP_N= 1                     # [EXTQP Xd] Interpolation neighbours
% XfnQP_E
 0.000000 | 1.000000 | 1.000000 |        # [EXTQP Xd] E parameters  (c/v) eV|adim|adim
%
XfnQP_Z= ( 1.000000 , 0.000000 )       # [EXTQP Xd] Z factor  (c/v)
XfnQP_Wv_E= 0.000000   eV      # [EXTQP Xd] W Energy reference  (valence)
% XfnQP_Wv
 0.00     | 0.00     | 0.00     |        # [EXTQP Xd] W parameters  (valence) eV| 1|eV^-1
%
XfnQP_Wv_dos= 0.000000 eV      # [EXTQP Xd] W dos pre-factor  (valence)
XfnQP_Wc_E= 0.000000   eV      # [EXTQP Xd] W Energy reference  (conduction)
% XfnQP_Wc
 0.00     | 0.00     | 0.00     |        # [EXTQP Xd] W parameters  (conduction) eV| 1 |eV^-1
%
XfnQP_Wc_dos= 0.000000 eV      # [EXTQP Xd] W dos pre-factor  (conduction)
% QpntsRXs
    1 |  504 |                 # [Xs] Transferred momenta
% BndsRnXs
   1 | 200 |                   # [Xs] Polarization function bands
%
NGsBlkXs= 10            Ry      # [Xs] Response block size
GrFnTpXs= "T"                  # [Xs] Green`s function (T)ordered,(R)etarded,(r)senant,(a)ntiresonant [T, R, r, Ta, 
Ra]
% DmRngeXs
  0.10000 |  0.10000 | eV      # [Xs] Damping range
%
CGrdSpXs= 100.0000             # [Xs] [o/o] Coarse grid controller
% EhEngyXs
-1.000000 |-1.000000 | eV      # [Xs] Electron-hole energy range
%
% LongDrXs
 1.000000 | 0.000000 | 0.000000 |        # [Xs] [cc] Electric Field
%
DrudeWXs= ( 0.00     , 0.00     )  eV  # [Xs] Drude plasmon
XTermKind= "none"              # [X] X terminator ("none","BG" Bruneval-Gonze)
XTermEn= 40.00000      eV      # [X] X terminator energy (only for kind="BG")
I don't know which step went wrong, please help me correct it. Thank you very much!
Taiyuan University of Technology, China

Jiale Shen
Posts: 7
Joined: Sun Dec 18, 2022 3:17 am

Re: p2y reading of "hybrid" calculations

Post by Jiale Shen » Mon Apr 24, 2023 9:45 am

In addition, there is another problem that when I use the above input calculation, the data in the SAVE is not read successfully.
Here is the output file:

Code: Select all

 <---> P1: [01] MPI/OPENMP structure, Files & I/O Directories
 <---> P1: MPI Cores-Threads   : 60(CPU)-1(threads)-1(threads@X)-1(threads@DIP)-1(threads@SE)-1(threads@RT)-1(threads@K)-1(threads@NL)
 <---> P1: [02] CORE Variables Setup
 <---> P1: [02.01] Unit cells
 <---> P1: [02.02] Symmetries
 <---> P1: [02.03] Reciprocal space
 <---> P1: [02.04] K-grid lattice
 <---> P1: Grid dimensions      :  10  10  10
 <---> P1: [02.05] Energies & Occupations
 <---> P1: [03] Transferred momenta grid and indexing
 <---> P1: [04] Coloumb potential Random Integration (RIM)
 <---> P1: [04.01] RIM initialization
 <---> P1: Random points |                                        | [000%] --(E) --(X)
 <---> P1: Random points |########################################| [100%] --(E) --(X)
 <---> P1: [04.02] RIM integrals
 <---> P1: [WARNING] Empty workload for CPU 1
 <---> P1: Momenta loop |                                        | [***%] --(E) --(X)
 <---> P1: [05] Coloumb potential CutOffws
 <---> P1: [WARNING] Empty workload for CPU 1
 <---> P1: WS setup |                                        | [000%] --(E) --(X)
 <---> P1: WS setup |########################################| [100%] --(E) --(X)
 <---> P1: WS-cutoff |                                        | [000%] --(E) --(X)
 <---> P1: WS-cutoff |########################################| [100%] --(E) --(X)
  <---> P1: [06] Dipoles
 <---> P1: DIPOLES parallel ENVIRONMENT is incomplete. Switching to defaults
 <---> P1: [PARALLEL DIPOLES for K(ibz) on 5 CPU] Loaded/Total (Percentual):200/1000(20%)
 <---> P1: [PARALLEL DIPOLES for CON bands on 3 CPU] Loaded/Total (Percentual):2/4(50%)
 <---> P1: [PARALLEL DIPOLES for VAL bands on 4 CPU] Loaded/Total (Percentual):1/4(25%)
 <---> P1: [DIP] Checking dipoles header
 <---> P1: [WARNING] DIPOLES database not correct or missing
 <02s> P1: [x,Vnl] computed using 44 projectors
 <02s> P1: Dipoles: P, V and iR (T) |                                        | [000%] --(E) --(X)
 <02s> P1: [PARALLEL distribution for Wave-Function states] Loaded/Total(Percentual):3/8(38%)
 <07s> P1: Dipoles: P, V and iR (T) |######################                  | [056%] 05s(E) 08s(X)
 <10s> P1: Dipoles: P, V and iR (T) |########################################| [100%] 08s(E) 08s(X)
 <19s> P1: [DIP] Writing dipoles header
 <28s> P1: [WARNING] [r,Vnl^pseudo] included in position and velocity dipoles.
 <28s> P1: [WARNING] In case H contains other non local terms, these are neglected
 <28s> P1: [WARNING] BSE calculation with minimal memory utilization
 <28s> P1: [07] Bethe Salpeter Equation @q1
 <28s> P1: Response_T_space parallel ENVIRONMENT is incomplete. Switching to defaults
 <28s> P1: [PARALLEL Response_T_space for K(ibz) on 5 CPU] Loaded/Total (Percentual):200/1000(20%)
 <28s> P1: [PARALLEL Response_T_space for (e/h) Groups on 12 CPU] Loaded/Total (Percentual):200/12000(2%)
 <28s> P1: [MEMORY] Alloc px%element_2D( 562.5000 [Mb]) TOTAL:  581.2160 [Mb] (traced)  43.66000 [Mb] (memstat)
 <29s> P1: [PARALLEL Response_T_space for (e/h)->(e/h)' Transitions (ordered) on 1 CPU] Loaded/Total (Percentual):1200200/72006000(2%)
 <29s> P1: [PARALLEL Response_T_space for CON bands on 12 CPU] Loaded/Total (Percentual):1/4(25%)
 <29s> P1: [PARALLEL Response_T_space for VAL bands on 1 CPU] Loaded/Total (Percentual):4/4(100%)
 <29s> P1: [07.01] Transition Groups build-up @q1
  <01m-19s> P1: [MEMORY] Parallel distribution of BS_MAT on HOST b101r4n1 with size   1984.20 [Mb]
 <01m-23s> P1: [BSK] Size (resonant):   31872
 <01m-23s> P1: [BSK]         (total):   31872
 <01m-23s> P1: [BSK] Matricies      :  1
 <01m-23s> P1: [PARALLEL Response_T_space for Kernel matrix elements] Loaded/Total(Percentual): 0.949904E+7/ 0.507928E+9 (2%)
 <01m-24s> P1: [07.02] Independent Particles properties @q1
 <01m-24s> P1: [DIP] Checking dipoles header
 <01m-27s> P1: [07.03] BSE Kernel @q1 (Resonant EXCHANGE)
 <01m-27s> P1: [MEMORY] Alloc WF%c( 1.045351 [Gb]) TOTAL:  2.877553 [Gb] (traced)  43.66000 [Mb] (memstat)
 <01m-27s> P1: [PARALLEL distribution for Wave-Function states] Loaded/Total(Percentual):6798/8000(85%)
 <01m-27s> P1: [FFT-BSK] Mesh size:  27  27  27
 <01m-39s> P1: [07.04] Main kernel loop
Taiyuan University of Technology, China

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

Re: p2y reading of "hybrid" calculations

Post by Daniele Varsano » Mon Apr 24, 2023 11:18 am

Dear Jiale,

the problems you are encountering are due to the fact that your k point grid is not seen as uniform:

Code: Select all

 <---> [RL indx] X grid is not uniform. Gamma point only.
You can try the following:
1. Delete all your database ./SAVE/ndb*
2. Repeat the setup run (yambo -i) adding the keyword: NoDiagSC
3. run yambo
4. Check in the report file is you have k-point grid uniform:

Code: Select all

X grid is uniform     :yes, 
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/

Jiale Shen
Posts: 7
Joined: Sun Dec 18, 2022 3:17 am

Re: p2y reading of "hybrid" calculations

Post by Jiale Shen » Wed Apr 26, 2023 4:03 pm

Thanks for your reply! I'll try again.
Taiyuan University of Technology, China

Post Reply