bare_qpg() function and vector q and G

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
hongtang2023
Posts: 48
Joined: Thu Mar 16, 2023 7:02 am

bare_qpg() function and vector q and G

Post by hongtang2023 » Fri Sep 26, 2025 3:41 am

Dear Yambo team,

I have a question about the momentum transfer q in the optical calculations and G1 and G1 in the exchange-correlation kernel fxc in the so-called G-space.

As you told me before, the function "bare_qpg(iq,iG)" is related to Coulomb interaction calculation. and bare_qpg(iq,iG)=|q+G|, where q is the momentum transfer in the optical transition (for q not zero case) and G is the reciprocal lattice vectors used for expanding or evaluating the kernel fxc.

I know that if we konw the index (iq) of q and the index (iG) of G, then can get the length (or magnitude) of |q+G| from bare_qpg, however, My question is that can be get the vector q and vector G from somewhere in the Yambo code when running? I mean for vector q, we may find its three components for the "r_setup" file, where all q are listed by their indexes.

However, how to get the three components of G, if I give you the index of G is iG? For example, fxc calculation as "F_xc_gspace(i1,i2,1)" in file /src/tddft/TDDFT_ALDA_G_space.F, where i1 and i2 are the indexes of the two G. How can I get the three components of those G(s) with the given indexes?


I appreciate your help very much!

Best,
Hong
Dr. Hong Tang
Tulane University
New Orleans, LA
70118, USA

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

Re: bare_qpg() function and vector q and G

Post by Davide Sangalli » Sat Oct 04, 2025 12:43 pm

Dear Dr. Hong Tang,

inside the code there are the variables g_vec(ig,:) and k%pt(ik,:). You can put a print statement in the code.

For g_vec I'd suggest src/setup/G_shells_finder.F
Fot k%pt src/communicate/REPORT_Energies.F

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/

Post Reply