bare_qpg() function and vector q and G
Posted: 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
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