Page 1 of 1

How to plot excitons with QP database

Posted: Sat Mar 19, 2022 8:53 am
by jasonhan0710
Dear all,

I want to use yambopy to plot the excitonic weight with QP correction. In my calculation, I use 64 k-points in GW calculation, while 421 k-points in BSE calculation. However, yambopy cannot interpolate the QP database automatically.

When I load QP database

Code: Select all

yqp = YamboQPDB.from_db(filename='ndb.QP')
and replace it in

Code: Select all

exc_bands = yexc.get_exciton_bs(yqp,path,states,size=0.1)
the calculation aborted and reporting that

Code: Select all

pad_energies = energies.eigenvalues_qp[self.lattice.kpoints_indexes]
IndexError: index 64 is out of bounds for axis 0 with size 64
Is there any way to interpolated the QP database in order the match the exciton db?

Best,
Jason

Re: How to plot excitons with QP database

Posted: Mon Mar 21, 2022 11:41 am
by palful
Dear Jason,

Indeed, the function get_exciton_bs only accepts a band structure with the same kpoint grid as the BSE.

I think probably the fastest way to do what you want is to make another python script in which you read the data you need from yambopy, but then do your own plot.

For example you could initially interpolate the GW band structure to the density you want using a feature of ypp (check ypp -electron b), and then read the output in python.
Then, you could read the excitonic quantities with YamboExcitonDB. You can also look at the functions that select high-symmetry paths in the BZ in order to select the correct elements.
Finally, you can put these together in your own plot.

You may take a look at the yambopy scripts and code to set up your script.

Cheers,
Fulvio