Optical matrix elements

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

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

Re: Optical matrix elements

Post by Davide Sangalli » Tue Sep 27, 2022 10:26 pm

Dear Fadil,
these matrix elements are not stored in any database.

In the code they are stored in memory in the variable

Code: Select all

Xo_scatt%rhotw
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.
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/

Fadil
Posts: 56
Joined: Sun May 24, 2020 1:56 pm

Re: Optical matrix elements

Post by Fadil » Thu Sep 29, 2022 5:26 pm

Thank you Davide!

Best
Dr. Fadıl İYİKANAT
ICFO-The Institute of Photonic Sciences
Barcelona-SPAIN

Fadil
Posts: 56
Joined: Sun May 24, 2020 1:56 pm

Re: Optical matrix elements

Post by Fadil » Mon Nov 14, 2022 5:24 pm

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)?
Dr. Fadıl İYİKANAT
ICFO-The Institute of Photonic Sciences
Barcelona-SPAIN

User avatar
Daniele Varsano
Posts: 3773
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: Optical matrix elements

Post by Daniele Varsano » Tue Nov 15, 2022 11:32 am

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
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Fadil
Posts: 56
Joined: Sun May 24, 2020 1:56 pm

Re: Optical matrix elements

Post by Fadil » Tue Jan 24, 2023 10:29 am

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
Dr. Fadıl İYİKANAT
ICFO-The Institute of Photonic Sciences
Barcelona-SPAIN

Fadil
Posts: 56
Joined: Sun May 24, 2020 1:56 pm

Re: Optical matrix elements

Post by Fadil » Thu Jan 26, 2023 5:09 pm

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
Dr. Fadıl İYİKANAT
ICFO-The Institute of Photonic Sciences
Barcelona-SPAIN

User avatar
Daniele Varsano
Posts: 3773
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: Optical matrix elements

Post by Daniele Varsano » Fri Jan 27, 2023 6:07 pm

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
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Fadil
Posts: 56
Joined: Sun May 24, 2020 1:56 pm

Re: Optical matrix elements

Post by Fadil » Mon Jan 30, 2023 11:30 am

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
Dr. Fadıl İYİKANAT
ICFO-The Institute of Photonic Sciences
Barcelona-SPAIN

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

Re: Optical matrix elements

Post by Davide Sangalli » Mon Jan 30, 2023 4:28 pm

Dear Fadil,

The size of

Code: Select all

 Xo_scatt%rhotw(:) 
depends on the cutoff you set for the local fields in the simulation

Code: Select all

yambo -o c -k hartree
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.
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/

Fadil
Posts: 56
Joined: Sun May 24, 2020 1:56 pm

Re: Optical matrix elements

Post by Fadil » Wed Feb 01, 2023 10:15 pm

Dear Davide,

Now, it is very clear, thank you very much!

Best regards
Dr. Fadıl İYİKANAT
ICFO-The Institute of Photonic Sciences
Barcelona-SPAIN

Post Reply