Page 5 of 5
Re: Optical matrix elements
Posted: Tue Sep 27, 2022 10:26 pm
by Davide Sangalli
Dear Fadil,
these matrix elements are not stored in any database.
In the code they are stored in memory in the variable
subroutine src/pol_function/X_irredux_residuals.F
The variable is a function of G. Other indexes are in the loop.
Around the line 200 you can add a write(*,*) to print them
Code: Select all
Xo_scatt%is=(/ic,ik,is,i_spin/)
Xo_scatt%os=(/iv,ikp,isp,i_spin/)
Xo_scatt%qs=(/qindx_X(iq,ikbz,2),iq,1/)
!
call DEV_SUB(scatter_Bamp)(Xo_scatt)
!
endif
!
write(*,*) Xo_scatt%rhotw(:)
Best,
D.
Re: Optical matrix elements
Posted: Thu Sep 29, 2022 5:26 pm
by Fadil
Thank you Davide!
Best
Re: Optical matrix elements
Posted: Mon Nov 14, 2022 5:24 pm
by Fadil
Dear all,
In the optical limit, yambo uses Eq. 15 of 'A. Marini et al. Computer Physics Communications, 180(8), 1392-1403' paper to calculate the dynamical polarizability.
Which formula is used to calculate the finite momentum polarizability(q,\omega)?
Re: Optical matrix elements
Posted: Tue Nov 15, 2022 11:32 am
by Daniele Varsano
Dear Fadil,
it is the same expression calculated in the q value of interest taking into account momentum coservation.
You find it in Eq.1 of the 2019 Yambo paper:
https://iopscience.iop.org/article/10.1 ... b15d0/meta
Best,
Daniele
Re: Optical matrix elements
Posted: Tue Jan 24, 2023 10:29 am
by Fadil
Dear Daniele,
I am trying to extract excitonic dipoles from /src/bse/K_IP.F.
After compilation with the following write command to the code, my runs stop with segmentation fault.
DIP_Smins = 0.5_SP*(DIP_expanded(1)-cI*DIP_expanded(2)) ! S- for c\up> transitions: <v\dn|c\up>
!
endif
write(*,*) BSE_scatt%rhotw(1)
!
! c.2 Store Dipoles
!====================
!
! Absorption, KERR, Dichroism, PL
Do you have any idea about the problem?
Best
Re: Optical matrix elements
Posted: Thu Jan 26, 2023 5:09 pm
by Fadil
Dear Davide,
Xo_scatt%is=(/ic,ik,is,i_spin/)
Xo_scatt%os=(/iv,ikp,isp,i_spin/)
Xo_scatt%qs=(/qindx_X(iq,ikbz,2),iq,1/)
!
call DEV_SUB(scatter_Bamp)(Xo_scatt)
!
endif
!
write(*,*) Xo_scatt%rhotw(:)
In this form, it prints matrix elements with ic, ik, iv, ikp etc. indexes.
My first question why the index ordering is random here.
Secondly, how can I extract these elements as a function of G?
If I am not wrong, Xo_scatt%rhotw belongs to ic, ik, iv, ikp etc. indexes not G.
Best regards
Re: Optical matrix elements
Posted: Fri Jan 27, 2023 6:07 pm
by Daniele Varsano
Dear Fadil,
it is not clear to me what do you want to look at.
Previously, you mentioned the matrix elements <nk| exp(i(q+G)r) | mk-q>', now you are talking about excitonic dipoles.
The <nk| exp(i(q+G)r) | mk-q>' are stored in Xo_scatt%rhotw as Davide said.
These are functions of the G vector, the ck,vk' and q (k-k') are reported in the lines above:
Code: Select all
Xo_scatt%is=(/ic,ik,is,i_spin/). --> ck
Xo_scatt%os=(/iv,ikp,isp,i_spin/) --> vk'
Xo_scatt%qs=(/qindx_X(iq,ikbz,2),iq,1/) --> q
Best,
Daniele
Re: Optical matrix elements
Posted: Mon Jan 30, 2023 11:30 am
by Fadil
Dear Daniele,
I am trying to extract excitonic oscillators, '<nk| exp(i(q+G)r) | mk-q>' (BSE_scatt%rhotw), as a function of vb, cb, k, q and G.
However, I am getting some errors when I try to extract these matrix elements from /src/bse/K_IP.F, and it looks like these matrix elements only in the first Brillouin zone there.
Then, I tried to extract them from 'src/pol_function/X_irredux_residuals.F', as 'Xo_scatt%rhotw' should basically have the same information (please correct me if I am wrong) with all bands and kpoints.
This is why I asked both matrix elements separately.
But when I tried to extract them as a function of Gvectors;
Code: Select all
write(*,*) real(Xo_scatt%rhotw(1)),real(Xo_scatt%rhotw(3)),real(Xo_scatt%rhotw(16))
except the first G-vector (before the band and kpoint ordering were not clear but now they are ok) it gives very meaningless results;
Code: Select all
0.205618E+00 0.316202-321 0.490989+253
Maybe the G-vector order I got from the DFT code is wrong, or I'm trying to extract these matrices as a function of the Gvector in an incorrect way.
I'm sorry for the confusion.
Best regards
Re: Optical matrix elements
Posted: Mon Jan 30, 2023 4:28 pm
by Davide Sangalli
Dear Fadil,
The size of
depends on the cutoff you set for the local fields in the simulation
Try to increase the cutoff in input and also the other variables should be defined.
Also please check that you are not distributing over the G-vectors if you run in parallel.
Instead in the BSE case they are always defined of size 1, so from a BSE run you can get only the G=0 component.
Best,
D.
Re: Optical matrix elements
Posted: Wed Feb 01, 2023 10:15 pm
by Fadil
Dear Davide,
Now, it is very clear, thank you very much!
Best regards