Double-grid of Haydock

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

sdwang
Posts: 287
Joined: Fri Apr 09, 2010 12:30 pm

Double-grid of Haydock

Post by sdwang » Mon Jun 20, 2022 9:38 am

Dear developers,
I am trying the new double-grid formalism of Haydock in Yambo 5.1.0. I did the usual bse with Haydock on top of GW results as:

Code: Select all

yambo -r -X s -o b -k sex -y h
and then ran another fine-grid nscf and p2y -w and ypp -m, the ndb.Double_Grid file now in the SAVE directory.
However when I ran a fine-grid Haydock the fine-grid seems not working and in the output some warnings as:

Code: Select all

  [RD./SAVE//ndb.pp]--------------------------------------------------------------
    Brillouin Zone Q/K grids (IBZ/BZ)                :   81  289   81  289
    RL vectors                                       :  31453 [WF]
    Coulomb cutoff potential                         : box z 29.000
    Fragmentation                                    : yes
    *WRN*Electronic Temperature                      :  0.000000 [K]
    Bosonic    Temperature                           :  0.000000 [K]
    PPA    diel. fun.  energies                      : Perdew, Burke & Ernzerhof(X)+Perdew, Burke & Ernzerhof(C)
    wavefunctions                                    : Perdew, Burke & Ernzerhof(X)+Perdew, Burke & Ernzerhof(C)
    Global Gauge                                     : length
    X matrix size                                    :  2827
    X band range                                     :     1   500
    X e/h energy range                               : -1.000000 -1.000000 [eV]
    X Time ordering                                  : R
    X xc-Kernel                                      : none
    X Drude frequency                                :  0.000000  0.000000
    X poles                                          :  100.0000 [o/o]
    RL vectors in the sum                            :  31453
    [r,Vnl] included                                 : no
    Field direction                                  :  0.707107E-5  0.707107E-5   0.00000
    *WRN*BZ energy Double Grid                       : no
    *WRN*BZ energy DbGd points                       : 0
    BZ Q point size factor                           :  1.000000

Of course, the result is the same as the course-grid one. Did I miss something in the fine-grid calculations?

Thanks!

Shudong
S. D. Wang
IMU,HOHHOT,CHINA
E-mail: sdwang@imu.edu.cn

User avatar
Davide Sangalli
Posts: 610
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Double-grid of Haydock

Post by Davide Sangalli » Wed Jun 22, 2022 3:25 pm

Dear Shudong,
first of all threre are two sections where your double grid can enter
a) in the screening, i.e. in the G-space response function
b) in the BSE for the excitonic matrix

The part of the yambo output you reported in the post is related to step a).
Yambo is telling you: warning, I'm going to use a screening function computed without the double grid although I see there exist the database ndb.Double_Grid and I could potentially use it also for the screening.
So, in any case, from that message I get yambo is loading the Double_Grid. However, please attach the complete report file and we will have a look.

Instead, for step b) you should see something like this in your report

Code: Select all

   [07.01.08] Haydock Solver in the optics basis @q1 using the hermitian scheme
   ============================================================================

   Using Double Grid method
   Number of Coarse grid BZ kpts : 256
   Number of Fine grid BZ kpts   : 16640
   Accuracy (requested)      :  0.050000 [o/o]
   Accuracy (reached)        :  0.040236 [o/o]
   Iterations                :  147
If you don't I'm not sure of why. Maybe the reading of the ndb.pp without the double grid disabled something?
Again, please attach the full report file.

Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

sdwang
Posts: 287
Joined: Fri Apr 09, 2010 12:30 pm

Re: Double-grid of Haydock

Post by sdwang » Wed Jun 22, 2022 3:58 pm

Dear Davide,
Thanks for your reply. Attached is the full report file.
Thanks!

Shudong
You do not have the required permissions to view the files attached to this post.
S. D. Wang
IMU,HOHHOT,CHINA
E-mail: sdwang@imu.edu.cn

User avatar
Davide Sangalli
Posts: 610
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Double-grid of Haydock

Post by Davide Sangalli » Wed Jun 22, 2022 4:31 pm

Indeed you can find this in your report

Code: Select all

   [04.01.06] Haydock Solver for abs @q1, scheme hermitian
   =======================================================

   Using Double Grid method
   Number of Coarse grid BZ kpts : 289
   Number of Fine grid BZ kpts   : 4384
   Accuracy (requested)      : -0.020000 [o/o]
   Accuracy (reached)        :  0.017550 [o/o]
   Iterations                :  306
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

sdwang
Posts: 287
Joined: Fri Apr 09, 2010 12:30 pm

Re: Double-grid of Haydock

Post by sdwang » Sat Jul 02, 2022 8:32 am

Dear Davide,
I got both the coarse and the fine-grid absorption of 2D hBN as attached with version 5.1 using the double-grid option of Haydock.
abs.rar
Obviously, the two results are totally different, and the fine-grid Abs. has many peaks. How do I compare the two results? For now, it is hard to say which one is the best.
(I used both 12X12X1 k-point in scf and nscf for coarse-grid calculation , and for fine-grid it is 12X12X1 and 48X48X1)

Thanks!

Best

Shudong
You do not have the required permissions to view the files attached to this post.
S. D. Wang
IMU,HOHHOT,CHINA
E-mail: sdwang@imu.edu.cn

Ignacio Alliati
Posts: 7
Joined: Tue Jul 05, 2022 9:20 am

Re: Double-grid of Haydock

Post by Ignacio Alliati » Tue Jul 05, 2022 11:00 am

Dear Shudong,

Unfortunately, the Double Grid approximation we use in this method is not suitable for h-BN or materials with strongly bound excitons in general. The specifics of why this is the case are laid out in the relevant publication (section 4.3 Limitations). But the gist of it is that h-BN has strong q!=0 contributions in the BSE kernel and that's the case where the so-called diagonal kernel extension (DKE) approximation cannot work.

https://www.frontiersin.org/articles/10 ... 63946/full

As regards deciding which one is best, I'd say none of them are correct. The 48x48x1 DG spectrum because of the reasons above. And the 12x12x1 one is probably underconverged - the first exciton would be converged but you'd expect the second peak to change with, say, a 24x24x1 grid (as your single and only grid).

Please find attached some spectra for (bulk) h-BN, where you can see something very similar happens.
fig7-hBN-DbGd_b.pdf
By the way, I'd expect the DbGd+inversion solver available in yambo to have a similar outcome.

In short, I'd recommend sticking to the single grid regular BSE calculation for this material, with whatever grid is necessary to converge the spectrum. That may require more cores than you are using or splitting the calculation (screening-kernel-haydock) if you are limited by calculation time as well.

Hope that helps,
Ignacio.
You do not have the required permissions to view the files attached to this post.
Ignacio Martin Alliati
Maths and Physics
Queen's University Belfast

sdwang
Posts: 287
Joined: Fri Apr 09, 2010 12:30 pm

Re: Double-grid of Haydock

Post by sdwang » Wed Nov 23, 2022 8:00 am

Dear Ignacio,
Should I need to recalculate the screening with Double-grid instead of just reading the coarse screening results? (I tried the recalculation of the screening with double-grid but it requires more time and memory...)
Thanks!

Shudong
S. D. Wang
IMU,HOHHOT,CHINA
E-mail: sdwang@imu.edu.cn

Ignacio Alliati
Posts: 7
Joined: Tue Jul 05, 2022 9:20 am

Re: Double-grid of Haydock

Post by Ignacio Alliati » Wed Nov 23, 2022 7:32 pm

Dear Shudong,

I'm sorry, but I don't quite understand your question.

In the last message, I advised against using the Double Grid (DbGd) + Haydock solver for h-BN. If you are, nevertheless, attempting a DbGd+Haydock solution, then
  • if you are asking whether you should have an ndb.Double_Grid database in your save before calculating the screening, then the answer is that it doesn't matter. The DbGd+Haydock method takes a coarse grid BSE kernel and extends it to the double grid afterwards. Hence, the kernel is constructed with the coarse grid screening, and if you have the screening matrix elements at a q point in the fine grid, it is irrelevant.
  • If you are asking whether you should calculate the screening on a single (dense) grid equal to the grid you will then using as the double grid of your DbGd+Haydock calculation, then the answer is no (I imagine this is your question, since you say this screening calculation was heavy)
If, on the contrary, you are following the recommendation of solving the BSE on a fine/dense grid (as your only grid, i.e., no double grid), then yes, the screening would have to be calculated on that same grid.

I hope this clarifies a bit,
Ignacio.
Ignacio Martin Alliati
Maths and Physics
Queen's University Belfast

sdwang
Posts: 287
Joined: Fri Apr 09, 2010 12:30 pm

Re: Double-grid of Haydock

Post by sdwang » Thu Nov 24, 2022 12:41 am

Dear Ignacio,
Thanks for your reply.
If I leave the screening as the coarse grid and then calculate the Hyadoc+BSE with DbGg, then in the output when reading the data of em1s I found as follows:
[RD./SAVE//ndb.em1s]------------------------------------------------------------
Brillouin Zone Q/K grids (IBZ/BZ) : 161 1681 161 1681
RL vectors : 10083 [WF]
Coulomb cutoff potential : box z 55.600
Fragmentation : yes
Electronic Temperature : 0.000000 [K]
Bosonic Temperature : 0.000000 [K]
Static diel. fun. energies : Perdew, Burke & Ernzerhof(X)+Perdew, Burke & Ernzerho
f(C)
wavefunctions : Perdew, Burke & Ernzerhof(X)+Perdew, Burke & Ernzerho
f(C)
Global Gauge : length
X matrix size : 1811
X band range : 1 300
X e/h energy range : -1.000000 -1.000000 [eV]
X Time ordering : T
X xc-Kernel : none
X Drude frequency : 0.000000 0.000000
X poles : 100.0000 [o/o]
RL vectors in the sum : 10083
[r,Vnl] included : no
Field direction : 0.707107E-5 0.707107E-5 0.00000
BZ energy Double Grid : no
BZ energy DbGd points : 0


where the DbGg is no. My question is does this matter for the final results with the DbGg method?

Thanks!

Shudong
S. D. Wang
IMU,HOHHOT,CHINA
E-mail: sdwang@imu.edu.cn

Ignacio Alliati
Posts: 7
Joined: Tue Jul 05, 2022 9:20 am

Re: Double-grid of Haydock

Post by Ignacio Alliati » Thu Nov 24, 2022 11:25 am

Dear Shudong,

This should not affect the spectra significantly, or at least it didn't in the cases I've studied (see example with Silicon 8x8x8+48x48x48). Having or not having the ndb.Double_Grid database when calculating the screening will just give you a slightly different screening.
fig-Si_8x8x8+48x48x48.pdf
However, this may be dependent on the system and the quality of the k-grids. If your coarse grid misses crucial features of the screening or the dispersion, then this may have an impact on the final spectrum.

My advice would be
  • If you have a ndb.Double_Grid database, use it for the screening too, just to be on the safe side (it should not take much longer).
  • If you don't use it, do some checks to verify it is not affecting the spectrum significantly.
  • Finally, I said this before but it is worth reiterating - DbGd+Haydock it is not suitable for h-BN as set out in the limitations section of the publication
Hope that helps,
Ignacio.
You do not have the required permissions to view the files attached to this post.
Ignacio Martin Alliati
Maths and Physics
Queen's University Belfast

Post Reply