Page 3 of 4

Re: Exact meaning of Strength from sort_and_report

Posted: Tue Sep 08, 2020 4:19 pm
by Daniele Varsano
Dear Fadıl,

it is not straightforward as the summation is done using linear algebra.
In /yambo/src/bse/K_diago_hermitian_residuals.F

you have the following loop.

Code: Select all

tmp_res = BSS_dipoles*sqrt(BSS_eh_f)
...
do i_eh=1,BSS_n_eig
   !
   if (.not.px%element_1D(i_eh)) cycle
   !
   BS_R_left(i_eh) =V_dot_V_omp(BS_H_dim,tmp_res,conjg(BS_mat(:,i_eh)))
   BS_R_right(i_eh)=conjg(BS_R_left(i_eh))
   !
   if (trim(global_gauge)=="velocity") then
     BS_R_left(i_eh) = BS_R_left(i_eh) *BS_E_real(i_eh)
     BS_R_right(i_eh)= BS_R_right(i_eh)*BS_E_real(i_eh)
   endif
   !
   call live_timing(steps=1)
   !
 enddo
where the eigenvector of the BSE are multiplied by the dipoles over all the transitions (bands and k points).
you can anyway make some checks with your script looking at:
/ypp/excitons/excitons_sort_and_report.F

where the strengths are calculated from the residuals by multplying with the BZ multiplication factor and 1/q0^2:

Code: Select all

Residuals(:) = real(BS_R(:)*conjg(BS_R(:)),SP)
...
Residuals(:) = Residuals(:)*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/q0_def_norm**2*HA2EV
And maybe you need to pay attention if you have degenerate excitons as in this case all is summed up.
In order to avoid this you can set in your ypp input:

Code: Select all

Degen_Step=0. eV
Best,
Daniele

Re: Exact meaning of Strength from sort_and_report

Posted: Mon Sep 14, 2020 9:02 pm
by Fadil
Dear Daniele,

Thank you for your response. I have already eliminated the possible degenerate exciton problem by reducing the Degen_Step value.
I'm still having trouble calculating the exact oscillator strength values.

If I understand you well, I need to obtain the following arrays (neglecting the prefactor and the normalization factor);

BS_R_right(i) =\sum_k BS_mat(k,i) * conjg( BSS_dipoles(k) )
BS_R_left(i) = conjg( BS_R_right(i) )

I think they define the formula given in Equation 23 in the article 'yambo: An ab initio tool for excited state calculations';

\sum_i BS_R_right(i) * BS_R_left(i) = (\sum_v,c,k conj(<c|r|v>) * A(cv)_lambda) * (\sum_v',c',k' <c'|r|v'> * conj(A(c'v')_lambda))

the dimension of these arrays should be v*c*k. Please correct me if I'm wrong about this part.

Then, I would like to know how can I extract BS_R_left/right(i) arrays?
Previously, I thought I can obtain <c|r|v> and A(cv)_lambda values by ypp.
However, ypp gives excitonic weights; |A(cv)_lambda|^2.
Is it possible to obtain real and imaginary values of A(cv)_lambda for all transitions using ypp?

Otherwise how can I change the code so that the code writes BS_R_left/right(i) values?

Re: Exact meaning of Strength from sort_and_report

Posted: Tue Sep 15, 2020 8:11 am
by Daniele Varsano
Dear Fadıl,
Is it possible to obtain real and imaginary values of A(cv)_lambda for all transitions using ypp?
You can add a write directive in the ypp source:
ypp/excitons/excitons_amplitudes.F

Code: Select all

77    do neh = 1,BS_H_dim
 78      !
 79      dip_factor=1._SP
 80      !
 81      !if(l_weight_with_dipoles) then
 82       ikbz  = BSS_eh_table(neh,1)
 83       iv    = BSS_eh_table(neh,2)
 84       ic    = BSS_eh_table(neh,3)
 85      !  i_spin= spin(BSS_eh_table(neh,:))
 86      !  dip_factor=conjg(DIP_projected(ic,iv,ikbz,i_spin))*DIP_projected(ic,iv,ikbz,i_spin)
 87      !endif
 88      !
 89      do i_l=BS_E_degs(i_l_grp),BS_E_degs(i_l_grp)+n_lambda_deg-1
 90        A_weight(neh)=A_weight(neh)+BS_mat(neh,i_l)*conjg(BS_mat(neh,i_l))*dip_factor
--->.     write() i_lambda,ik,iv,iv, real(BS_mat(neh,i_l)), aimag(BS_mat(neh,i_l)
 91      enddo
 92      !
 93    enddo
Best,
Daniele

Re: Exact meaning of Strength from sort_and_report

Posted: Sat Oct 03, 2020 10:20 am
by Fadil
Dear Daniele,

I have recompiled Yambo and checked your suggestion, it works perfectly!
Thank you very much for your help!
One last question about oscillator strengths;

Do you have any idea why I get different oscillator strengths with the same parameter sets in different yambo versions? (yambo-4.2 vs yambo-4.4.1)
Resulting dielectric functions are very similar but oscillator strengths vary.

Best

Re: Exact meaning of Strength from sort_and_report

Posted: Sun Oct 04, 2020 9:51 am
by Daniele Varsano
Dear Fadıl,
the 4.2 is a very old version and I discourage its use. As the code evolves bugs are fixed. Now, without looking in details what changed in the oscillator strengths I cannot answer, but again, 4.2 is not supported anymore, maybe you can check if something changed in the definition, normalization etc...
Best,
Daniele

Re: Exact meaning of Strength from sort_and_report

Posted: Sun Oct 04, 2020 12:38 pm
by Fadil
I see.. Thank you again,

Best regards

Re: Exact meaning of Strength from sort_and_report

Posted: Tue Aug 10, 2021 4:22 pm
by Xiaoming Wang
Hi,

Another workaround, to get the exciton oscillator strength (transition dipole) I modified the code

Code: Select all

   ......
   ![--------------------------------------------
   n_elements=n_elements+1
   titles(n_elements)='dipole [Bohr^2]'
   !--------------------------------------------]
   Residuals(:) = real(BS_R(:)*conjg(BS_R(:)),SP)
   if (write_widths)  Residuals(:) = abs(BS_R(:))
   if(iq==1) q_norm=q0_def_norm**2
   if(iq> 1) q_norm=iku_v_norm(BSqpts(:,iq))**2
   ![--------------------------------------------------------------
   ! the oscillator strength
   dipol(:) = Residuals(:)/q_norm/(RL_vol/d3k_factor)
   !----------------------------------------------------------------]
   Residuals(:) = Residuals(:)*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/q_norm*HA2EV
   .......
   ![------------------------------------------
   ! to print
   n_elements=n_elements+1
   rv(n_elements)=dipol(j2)
   !-------------------------------------------]
in ypp/excitons/excitons_sort_and_report.F.

Re: Exact meaning of Strength from sort_and_report

Posted: Wed Jun 22, 2022 10:19 am
by Fadil
Dear Daniele,

Is it possible to extract the oscillator strength values with the iterative, haydock(h) method.
Since my k-point set is very large full diagonalization (d) takes very long times, it still seems to work after a few days but no progress.
I never tried the other BSSmod's. Can I get the oscillator strengths with them?

Re: Exact meaning of Strength from sort_and_report

Posted: Wed Jun 22, 2022 6:20 pm
by Daniele Varsano
Dear Fadıl,

you do not have access to the oscillator strength by using haydock.
You can instead use the slepc solver, this is an iterative method that also provides you the eigenvector of the first excitations.

Best,
Daniele

Re: Exact meaning of Strength from sort_and_report

Posted: Wed Jun 22, 2022 8:42 pm
by Fadil
Thank you I'll try it.