Page 1 of 1

BSE kernel elements

Posted: Thu Oct 27, 2022 1:59 pm
by aseemrajan
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

Re: BSE kernel elements

Posted: Fri Oct 28, 2022 5:44 am
by Daniele Varsano
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

Re: BSE kernel elements

Posted: Fri Oct 28, 2022 9:50 am
by palful
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

Re: BSE kernel elements

Posted: Fri Oct 28, 2022 4:22 pm
by aseemrajan
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
-------------------