Page 1 of 1

Frequency dependent tddft kernel calculation in Yambo 5.1.1

Posted: Fri Sep 22, 2023 3:58 am
by hongtang2023
Dear Yambo masters,

I am using Yambo 5.1.1 and trying to put into a frequency dependent tddft kernel (home made).
I have a basic question about the subroutine TDDFT_ALDA_G_space(E,k).

1. As I understand, the subroutine TDDFT_ALDA_G_space(E,k) is frequency independent. It only calculates the F_xc_gspace(i1,i2,1) for the one frequency point (which is zero). Since F_xc_gspace is allocated as " YAMBO_ALLOC(F_xc_gspace,(FXC_n_g_corr,FXC_n_g_corr,1)) ".
Is this understanding correct?

2. the subroutine TDDFT_ALDA_G_space(E,k) is also q independent. Although we can input different q by using " % QpntsRXd
1 | 1 | # [Xd] Transferred momenta
% " ,
however, subroutine TDDFT_ALDA_G_space(E,k) will calculate and get the same F_xc_gspace(i1,i2,1) for different q.
Is this understanding correct?

3. if I modify subroutine TDDFT_ALDA_G_space(E,k) as subroutine tddft_alda_g_space(E,k,iq,wv) ,
where iq for the index of q, and wv for the frequency. iq is just an integer, for optic calculations, iq=1.

for wv, I use " type(w_samp) :: wv ".
then I do " allocate(F_xc_gspace(FXC_n_g_corr,FXC_n_g_corr,wv%n_freqs)) " to make F_xc_gspace includes all the frequency points.

I understand iq and wv will get values from the subroutine who calls " tddft_alda_g_space(E,k,iq,wv) ". However, in order to be easy to do the calculations for F_xc_gspace in subroutine tddft_alda_g_space(E,k,iq,wv), I read the " % EnRngeXd " and " ETStpsXd= " from the input file, and let the real (not complex) frequency points be calculated in the subroutine tddft_alda_g_space(E,k,iq,wv), then I calculate the F_xc_gspace for each real frequency point in the subroutine tddft_alda_g_space(E,k,iq,wv).

Then, once the call for subroutine tddft_alda_g_space(E,k,iq,wv) is done, I got the needed F_xc_gspace(FXC_n_g_corr,FXC_n_g_corr,wv%n_freqs) for all frequency points.

Then, the rest code will calculate the optic properties (such as eels) with the frequency dependent tddft kernel.

Is the above processing correct?

Please help me!

I appreciate your help very much!


Best,
Hong

Re: Frequency dependent tddft kernel calculation in Yambo 5.1.1

Posted: Fri Sep 22, 2023 2:30 pm
by Davide Sangalli
Dear Hong,
I'd say all you wrote is correct.

After you generate your frequency dependent Fxc you just need to change the call inside X_redux, and put the proper frequency index.
You might need to pay attention to the parallelization in case the code is parallelized over frequencies.

Best,
D.