How to plot excitons with QP database

Post here any question you encounter when running the scripts of the yambo-py suite. Post here problem strictly to the python interface as problem coming from the yambo runs should go in the appropriate subforum.

Moderators: palful, amolina, mbonacci

Post Reply
User avatar
jasonhan0710
Posts: 58
Joined: Wed Dec 23, 2020 6:48 am
Location: China

How to plot excitons with QP database

Post by jasonhan0710 » Sat Mar 19, 2022 8:53 am

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
Jason Han

Assistant Professor
Department of Physics
National University of Defense Technology
Hunan, China

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

Re: How to plot excitons with QP database

Post by palful » Mon Mar 21, 2022 11:41 am

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
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy

Post Reply