Coulomb divergency cases

Various technical topics such as parallelism and efficiency, netCDF problems, the Yambo code structure itself, are posted here.

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

Post Reply
Franz Fischer
Posts: 48
Joined: Wed Jul 20, 2022 9:36 am

Coulomb divergency cases

Post by Franz Fischer » Mon Jun 02, 2025 3:41 pm

Dear Developers,

this will be a very technical question.
I am dealing with 2D materials, so I am always using the RIM and the Coulomb cutoff technique (slab z) for the construction of the Coulomb kernel.

I was looking through the source code, specifically src/coulomb, and carefully reading "rim_integrate_v.F". As I understand it for q = G = 0, you perform an average of the 2D-truncated Coulomb potential within a sphere with an area corresponding to 20% of the area of Monkhorst cells, so to say. For anything outside this area you employ the RIM. In the end, this is all put into a variable called “RIM_qpg”.

Simultaneously, in “cutoff_slab.F”, you create “bare_qpg”, and in this case for q = G ‎ = 0, you perform average of the 2D-truncated Coulomb potential within a sphere with an area corresponding to 100% of the area of the Monkhorst cells.

I checked the values of RIM_qpg(0,0,0) and bare_qpg(0,0) and they really are vastly different.

So already I'm a little confused - why do you use 20% of the area to construct RIM_qpg and not 100%, like you do for bare_qpg?


Then, you proceed to construct “gamp_p” in src/wf_and_fft/scatter_Gamp.F, which is used to construct the screened interaction kernel, W. Here there are a few case, and from what I can gather, it seems that:

For G = G’ < G_rim:
gamp_p = RIM_qpg
Else:
gamp_p = bare_qpg

This is just a crude way to write how I understand it, but I think it sums up what is in there quite nicely.
What is the reason behind this? Why are you only using RIM_qpg on the G=G’ entries?

Thanks in advance.

Best,
Franz Fischer
Franz Fischer
PhD student / IMPRS-UFAST fellow
Institute of Physical Chemistry
University of Hamburg

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

Re: Coulomb divergency cases

Post by Daniele Varsano » Tue Jun 03, 2025 7:52 am

Dear Franz,

bare_qpg is meant for bare potential (eventually truncated), RIM_qpg is the coulomb integrated in the mini-BZ, coorresponding to a give q.
Note that depending on the calculation, you want to integrate the potential, or you want to use the non-integrated quantity.
In the case the coulomb potential is not integrated, the q-->0 component it is regularized.
why do you use 20% of the area to construct RIM_qpg and not 100%
Here, a small sphere is considered to integrate the divergence analytically on a small sphere, and the rest is integrated stochastically. This will avoid noise when dealing with stochastic integration near the divergence. When RIM is not used, then you approximate the BZ with a sphere of equivalent volume, and this is an approximation.
For G = G’ < G_rim:
gamp_p = RIM_qpg
Else:
gamp_p = bare_qpg
Else gamp_p=bare_qpg*Vol_q
here the potential is considered smooth enough and you consider it constant in the mini-Bz.

This is in general, more specific answer can be provided by the author of this part of the code.

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/

Alberto Guandalini
Posts: 9
Joined: Thu Jun 24, 2021 9:10 am

Re: Coulomb divergency cases

Post by Alberto Guandalini » Tue Jun 03, 2025 12:00 pm

Dear Franz,

first comment:
if you are calculating a semiconducting 2D system, I advice you to use the RIM_W together with RIM (see https://www.nature.com/articles/s41524-023-00989-7 and https://wiki.yambo-code.eu/wiki/index.p ... _2D_system).
The combined use of both RIM and RIM-W is the updated way the code use to regularize the Coulomb integration, and the code is optimized to work in this way.

|Why are you only using RIM_qpg on the G=G’ entries?

In the calculation of the x self-energy term, only the components G=G' are needed. In the c self-energy term, RIM-W perform better than RIM, thus RIM-W is used instead of RIM with G \neq G', due to the sharp behavior of the inverse dielectric function.

This is how the code proceed when you use RIM+RIM_W at q=0:
- bare_qpg: calculates the truncated Coulomb interaction at q = 10^-5. Needed when you need v(q=0) with no integration (e.g. in the calculation of \chi(q=0))
- RIM_qpg: integral of the truncated Coulomb interaction over the miniBZ for G < G_lim (for G over a certain G_lim the Coulomb interaction is smooth in q).
As the Coulomb interaction cannot be evaluated too near q=0, the spherical approximation is employed for a 20% area of the miniBZ.

The spherical approximation for the q=0 term in bare_qpg for the 100% of the miniBZ is an approximation employed by the code only when RIM is not used, and I advice
not to use it as RIM requires low additional computational cost.

Best,
Alberto

Post Reply