Q dependence of exciton eigenvalues
Moderators: Davide Sangalli, andrea marini, Daniele Varsano, andrea.ferretti, myrta gruning, Conor Hogan

 Posts: 61
 Joined: Sat Jun 06, 2020 10:43 am
Q dependence of exciton eigenvalues
Dear Developers,
I am performing GW+BSE computations on 1D systems (with the Coulomb cutoff). I am using a dinamical dielectric matrix obtained from the GW computation via the PPA.
The BSE kernel is computed in the Resonant correlation exchange, so I am not taking into account the offdiagonal coupling term.
I am trying to understand the q dependence of the exciton dispersion I obtain. If I am not wrong, in the approximation used, the q dependence should come from the screened Coulomb interaction W as the exchange term is not dependent on q looking at the equation on the wiki (http://www.yambocode.org/wiki/index.ph ... ter_kernel).
Therefore, it would be useful to plot this quantity. Is it possible to extract it and plot it as a function of q (exciton momentum)?
Best,
Davide Romanin

Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05
I am performing GW+BSE computations on 1D systems (with the Coulomb cutoff). I am using a dinamical dielectric matrix obtained from the GW computation via the PPA.
The BSE kernel is computed in the Resonant correlation exchange, so I am not taking into account the offdiagonal coupling term.
I am trying to understand the q dependence of the exciton dispersion I obtain. If I am not wrong, in the approximation used, the q dependence should come from the screened Coulomb interaction W as the exchange term is not dependent on q looking at the equation on the wiki (http://www.yambocode.org/wiki/index.ph ... ter_kernel).
Therefore, it would be useful to plot this quantity. Is it possible to extract it and plot it as a function of q (exciton momentum)?
Best,
Davide Romanin

Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05

Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05
Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05
 Daniele Varsano
 Posts: 3069
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: Q dependence of exciton eigenvalues
Dear Davide,
What quantity are you exactly interested in? Wgg'(q) or the kernel matrix elements <vckVv'c'k'> and <vckWv'c'k'> ?
Best,
Daniele
Well, there is an implicit dependence both in V (exchange term) and W (direct term) as the matrix elements are calculated between states (vck, v'c'k') with k'k=q.If I am not wrong, in the approximation used, the q dependence should come from the screened Coulomb interaction W as the exchange term is not dependent on q looking at the equation on the wiki
What quantity are you exactly interested in? Wgg'(q) or the kernel matrix elements <vckVv'c'k'> and <vckWv'c'k'> ?
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 61
 Joined: Sat Jun 06, 2020 10:43 am
Re: Q dependence of exciton eigenvalues
Dear Daniele,
Thank you for your rapid response.
Indeed I have already looked at the strengths of my excitons and I have already identified the bands and k points which contribute the most.
So I would like to obtain the kernel matrix elements <vckVv'c'k'> and <vckWv'c'k'> in order to see how they change effectively as a function of q for the selected bands.
Best,
Davide Romanin
Thank you for your rapid response.
Indeed I have already looked at the strengths of my excitons and I have already identified the bands and k points which contribute the most.
So I would like to obtain the kernel matrix elements <vckVv'c'k'> and <vckWv'c'k'> in order to see how they change effectively as a function of q for the selected bands.
Best,
Davide Romanin

Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05
Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05
 Daniele Varsano
 Posts: 3069
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: Q dependence of exciton eigenvalues
Dear Davide,
actually this is not implemented as what it is stored in the database is the kernel ie the sum of the two contributions.
In principle you could enter into the code and print the two contribution separately but it is not straightforward.
What you can do is to perform two separate calculation (exchange only and correlation only) and next read the ndb.BS_* databases.
I do not know if yambopy can do that, or you need to write a python script for reading the databases.
Perhaps someone else more expert than me on that can provide you more info.
Best,
Daniele
actually this is not implemented as what it is stored in the database is the kernel ie the sum of the two contributions.
In principle you could enter into the code and print the two contribution separately but it is not straightforward.
What you can do is to perform two separate calculation (exchange only and correlation only) and next read the ndb.BS_* databases.
I do not know if yambopy can do that, or you need to write a python script for reading the databases.
Perhaps someone else more expert than me on that can provide you more info.
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 61
 Joined: Sat Jun 06, 2020 10:43 am
Re: Q dependence of exciton eigenvalues
Dear Daniele,
Ok thanks!
Should I write another post in yambopy? Or do I keep this post?
Best,
Davide
Ok thanks!
Should I write another post in yambopy? Or do I keep this post?
Best,
Davide

Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05
Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05
 Daniele Varsano
 Posts: 3069
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: Q dependence of exciton eigenvalues
No need to write another post.
Let's see if some yambopy guy will answer soon.
Best,
Daniele
Let's see if some yambopy guy will answer soon.
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
 palful
 Posts: 21
 Joined: Tue Jan 26, 2016 11:23 am
 Location: Rome and Milan
Re: Q dependence of exciton eigenvalues
Hi Davide,
At the moment it is not possible to read the excitonic Hamiltonian in the transition basis in yambopy  i.e., the quantity <cvkKc'v'k'> where K is the BSE kernel which may be only W (correlation part) or only v (exchange part) as Davide Sangalli suggested.
We are working on expanding the breadth of data that yambopy can read and convert and this feature may be available in the future.
In principle, it would not be exceedingly difficult to implement it and I see two ways:
(1) Make yambopy read the specific yambo netCDF databases which contain these data and obtain <cvkKc'v'k'> directly.
(2) Go "back" to the transition basis starting from quantities in the exciton basis that yambopy can already read (i.e., exciton energies E_a and weights A_a^cvk).
For example, in this case you would construct <cvkKc'v'k'> = \sum_a A_a^cvk E_a (A_a^c'v'k')^*  [e_ck  e_vk]\delta_cvk,c'v'k', where e_nk are the singleparticle energies.
I think method (1) is certainly the most straightforward and desirable  we will go in this direction for yambopy  while method (2) can be employed by any user since it avoids relying on additional netCDF databases, though it requires more python coding and testing.
Best,
Fulvio
At the moment it is not possible to read the excitonic Hamiltonian in the transition basis in yambopy  i.e., the quantity <cvkKc'v'k'> where K is the BSE kernel which may be only W (correlation part) or only v (exchange part) as Davide Sangalli suggested.
We are working on expanding the breadth of data that yambopy can read and convert and this feature may be available in the future.
In principle, it would not be exceedingly difficult to implement it and I see two ways:
(1) Make yambopy read the specific yambo netCDF databases which contain these data and obtain <cvkKc'v'k'> directly.
(2) Go "back" to the transition basis starting from quantities in the exciton basis that yambopy can already read (i.e., exciton energies E_a and weights A_a^cvk).
For example, in this case you would construct <cvkKc'v'k'> = \sum_a A_a^cvk E_a (A_a^c'v'k')^*  [e_ck  e_vk]\delta_cvk,c'v'k', where e_nk are the singleparticle energies.
I think method (1) is certainly the most straightforward and desirable  we will go in this direction for yambopy  while method (2) can be employed by any user since it avoids relying on additional netCDF databases, though it requires more python coding and testing.
Best,
Fulvio
Fulvio Paleari
Istituto di Struttura della Materia (CNR)
Area della Ricerca Roma 1
Istituto di Struttura della Materia (CNR)
Area della Ricerca Roma 1

 Posts: 61
 Joined: Sat Jun 06, 2020 10:43 am
Re: Q dependence of exciton eigenvalues
Dear Fulvio,
Thanks for your answer!
Otherwise, as Daniele was saying, how could I modify the code for printing this information?
Because I could do a BSE computation for the singlet and for the triplet: in this way I could print the sum of V and W when computing the singlet and only W when computing the triplet since the exchange is zero. Then by a simple difference I could extract V.
Best,
Davide
Thanks for your answer!
Otherwise, as Daniele was saying, how could I modify the code for printing this information?
Because I could do a BSE computation for the singlet and for the triplet: in this way I could print the sum of V and W when computing the singlet and only W when computing the triplet since the exchange is zero. Then by a simple difference I could extract V.
Best,
Davide

Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05
Postdoctoral fellow
Institut des NanoSciences de Paris
Sorbonne Université, CNRS
4 place Jussieu,
75252 PARIS Cedex 05
 palful
 Posts: 21
 Joined: Tue Jan 26, 2016 11:23 am
 Location: Rome and Milan
Re: Q dependence of exciton eigenvalues
Ok, then you would need the following:
(1) Yambopy installed and working.
(2) Perform the yambo calculations using the parallel IO (enablehdf5pario option while running the configure to compile yambo).
Then, the BSE run with step (2) should produce several databases. Let us use the case of Q=1 (Gamma point) as an example. Then you should get the database ndb.BS_diago_Q1 (assuming diagonalization solver) which contains the excitonic quantities, and also ndb.BS_PAR_Q1 which contains the quantity you want. Yambopy already reads ndb.BS_diago_Q1 with the class YamboExcitonDB. We need to read the other one.
You can list the variables in the various databases with the netcdf command ncdump h db_name. You will see that ndb.BS_PAR_Q1 contains the variable BSE_RESONANT (assuming you used resonant mode for the kernel). This variable is exactly what you need: a list of complex numbers <t1K(Q)t2> where t> is a particular cvk> transition.
In order to understand how to read this with python, go in the yambopy repository and then check yambopy/dbs/excitondb.py. This is the class to read ndb.BS_diago_Q1 and you can copy the netcdfreading functions that you will find there in order to adapt them to the new database. The new class to read ndb.BS_PAR_Q1 will be a much simpler one than YamboExcitonDB since you only have to read the variable BSE_RESONANT.
It can just be a class where you provide as arguments the index of the momentum Q and the path of the database to be read, and then it gives as output a numpy array containing the values of K.
A final note: in order to convert from t1> to the cvk> indices, a variable BS_TABLE is provided in ndb.BS_diago_Q1 and it's already read by yambopy (by just instancing the YamboExcitonDB class you will get it as a class attribute). You can use this to translate the transition index to the electronhole indices.
If you develop this feature, don't hesitate to let us know and we will incorporate in yambopy.
Cheers,
Fulvio
(1) Yambopy installed and working.
(2) Perform the yambo calculations using the parallel IO (enablehdf5pario option while running the configure to compile yambo).
Then, the BSE run with step (2) should produce several databases. Let us use the case of Q=1 (Gamma point) as an example. Then you should get the database ndb.BS_diago_Q1 (assuming diagonalization solver) which contains the excitonic quantities, and also ndb.BS_PAR_Q1 which contains the quantity you want. Yambopy already reads ndb.BS_diago_Q1 with the class YamboExcitonDB. We need to read the other one.
You can list the variables in the various databases with the netcdf command ncdump h db_name. You will see that ndb.BS_PAR_Q1 contains the variable BSE_RESONANT (assuming you used resonant mode for the kernel). This variable is exactly what you need: a list of complex numbers <t1K(Q)t2> where t> is a particular cvk> transition.
In order to understand how to read this with python, go in the yambopy repository and then check yambopy/dbs/excitondb.py. This is the class to read ndb.BS_diago_Q1 and you can copy the netcdfreading functions that you will find there in order to adapt them to the new database. The new class to read ndb.BS_PAR_Q1 will be a much simpler one than YamboExcitonDB since you only have to read the variable BSE_RESONANT.
It can just be a class where you provide as arguments the index of the momentum Q and the path of the database to be read, and then it gives as output a numpy array containing the values of K.
A final note: in order to convert from t1> to the cvk> indices, a variable BS_TABLE is provided in ndb.BS_diago_Q1 and it's already read by yambopy (by just instancing the YamboExcitonDB class you will get it as a class attribute). You can use this to translate the transition index to the electronhole indices.
If you develop this feature, don't hesitate to let us know and we will incorporate in yambopy.
Cheers,
Fulvio
Fulvio Paleari
Istituto di Struttura della Materia (CNR)
Area della Ricerca Roma 1
Istituto di Struttura della Materia (CNR)
Area della Ricerca Roma 1
 Daniele Varsano
 Posts: 3069
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: Q dependence of exciton eigenvalues
Just a note to clarify: if I well understood what do you want to calculate is the Kx and Kc contribution to the excitation <Psi_lambda  K  Psi_lambda> and not the single kernel element <cvkKc'v'k'>. Here lambda is the excitation index.
So the quantity you want to calculate can be expressed in terms of kernel matrix elements and BSE eigenvectors as:
<Psi_lambda  Kx  Psi_lambda>=\sum_cvk \sum_c'vk'' A_lambda^cvk A*_lambda^c'v'k' <cvkKxc'v'k'>.
Similarly for Kd.
Here the expression is written for q=0
Best,
Daniele
So the quantity you want to calculate can be expressed in terms of kernel matrix elements and BSE eigenvectors as:
<Psi_lambda  Kx  Psi_lambda>=\sum_cvk \sum_c'vk'' A_lambda^cvk A*_lambda^c'v'k' <cvkKxc'v'k'>.
Similarly for Kd.
Here the expression is written for q=0
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/