BSE kernel 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

Post Reply
aseemrajan
Posts: 10
Joined: Mon Nov 18, 2019 11:44 am

BSE kernel elements

Post by aseemrajan » Thu Oct 27, 2022 1:59 pm

Dear Yambo developers,

In my BSE calculations with parallel I/O, ndb.BS_PAR_Q1 stores the BSE Kernel elements. I guess that the sum of both exchange and coupling terms << K_x + K_d >> is stored. How can I access individual K_x or K_d part of the kernel? Also, what is the order of the kernel matrix elements?
Thanks in advance!

Regards,
Aseem Rajan Kshirsagar,
Postdoctoral researcher,
Department of Physics and Material Science,
University of Luxembourg
Aseem Rajan Kshirsagar,
Postdoctoral researcher,
Department of Physics and Material Science,
University of Luxembourg (Limpertsberg campus)

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

Re: BSE kernel elements

Post by Daniele Varsano » Fri Oct 28, 2022 5:44 am

Dear Aseem,

you can run two separate runs using K_x or K_d only.
-BSKmod="Hartree" will give you K_x
-BSKmod="SEX" will give you K_d when setting BSENGexx=0 eV

The structure is not straightforward and it is CPU dependent unless you use a parallel I/O.
Probably it should be possible to extract them directly from the database using yambopy.
Other option is to have a look to the source:
You can have a look in ./src/bse/K.F
around lines 574-590

Some expert in yambopy can give you suggestion here below.

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/

User avatar
palful
Posts: 56
Joined: Tue Jan 26, 2016 11:23 am
Location: Modena and Milan

Re: BSE kernel elements

Post by palful » Fri Oct 28, 2022 9:50 am

Dear Aseem,

Run the yambo calculations as Daniele suggested if you want the kernel parts in a basis in which they are diagonal, i.e., solving the BSE with either K_d or K_x only. K_d only gives you "irreducible" excitons (see e.g. review by Strinati), while K_x only is just the random phase approximation.

By the way, in the next yambo release the treatment of K_x will be controlled by a specific variable (with options for full K_x, only local field effects K_x - K^macroscopic_x, or K_x=0). So far you would need to use the BSENGexx=0 trick.

If you want to get the kernel parts in the transition basis, i.e., <cvk| K_d/x|c'v'k>, you first need to compile yambo with parallel IO, then run the K_d/K_x calculation in the "RESONANT" mode and finally use yambopy. There is a new class available called

Code: Select all

YamboBSEKernelDB
which reads the kernel matrix elements. So far there is no specific tutorial but it's well commented, you can find it in yambopy/dbs/bsekerneldb.py.

If you never used yambopy, in order to familiarise with it I would advise to follow this tutorial.

Cheers,
Fulvio
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy

aseemrajan
Posts: 10
Joined: Mon Nov 18, 2019 11:44 am

Re: BSE kernel elements

Post by aseemrajan » Fri Oct 28, 2022 4:22 pm

Dear Daniele and Fulvio,

Thank you very much!
For my purpose, Daniele's suggestion works well.
I only want to calculate the expectation value of K^x and K^d corresponding to each exciton using the BSE (SEX) eigenstates.
I am calculating K^x using BSKmod='Hartree' and then I can do the following sum: sum_[kcv,k'c'v]' A*_kcv (K^x_kcv,k'c'v') A_k'c'v'
Since I am not using any symmetries, the order of k,c,v seems to be the same in ndb.BS_diago_Q1 and ndb.BS_PAR_Q1 as long as the same SAVE directory is used.
I guess, I can use the yambopy solution if I use symmetries.

Regards,
Aseem
-------------------
Aseem Rajan Kshirsagar,
Postdoctoral researcher,
Department of Physics and Material Science,
University of Luxembourg (Limpertsberg campus)

Post Reply