Page 1 of 1
Excitonic wavefunctions in reciprocal space
Posted: Sat Aug 24, 2024 6:38 am
by WangFuyou
Dear yambo developers,
I'm trying to plot the distribution of the wave function in k space and the weights of the wave function based on this website:
https://www.yambo-code.eu/wiki/index.ph ... ption_(BN).
I found a script called excitiondb.py on github based on the site. I tried to modify and run the script, but I never got the correct result. I would like to ask the correct way to use this script. Or how do I get the image I want if I don't need a script. Here I enclose the results of my error.
I would be most grateful if my question could be answered.
Yours,
WangFuyou
Re: Excitonic wavefunctions in reciprocal space
Posted: Mon Sep 02, 2024 10:21 am
by palful
Dear Wang Fuyou,
It is not easy to understand what is happening without information about your system. Could you maybe post a minimal example including your modified script and the related databases?
Cheers,
Fulvio
Re: Excitonic wavefunctions in reciprocal space
Posted: Fri Sep 06, 2024 10:37 am
by WangFuyou
Dear Palful
Thank you for your reply. My script is as follows, and I want to know how to use it.
Yours,
WangFuyou
Re: Excitonic wavefunctions in reciprocal space
Posted: Mon Sep 09, 2024 10:04 am
by palful
Dear Wang Fuyou,
the file excitondb.py is part of the yambopy source code so, unless if you find bugs or want to add new features, it would be better not to modify it.
We already provide a script for the user to edit in order to make the plots you're interested in, which is in tutorial/databases_yambopy/exc_kspace_plot.py.
Instructions on how to use this script can be found in this tutorial:
https://www.yambo-code.eu/wiki/index.ph ... _structure
I would suggest that you keep excitondb - the python class to read the yambo BSE databases - as it is, and work with exc_kspace_plot.py by using excitondb as a module. I must add that I don't see anything obviously wrong in the second plot that you posted (the one with the band structure), but of course I don't know your system. The first plot (on the 2D-BZ) probably must be adapted to the fact your system does not have an hexagonal lattice.
If you have more trouble, please post your modified version of exc_kspace_plot plus the files ns.db1 and ndb.BS_diago_Q1 from yambo.
Cheers,
Fulvio
Re: Excitonic wavefunctions in reciprocal space
Posted: Tue Sep 10, 2024 9:33 am
by WangFuyou
Dear Palful
Thank you for your reply. So should I now install yambopy on my server and enter the command excitondb exc_kspace_plot.py?Thank you for your reply. So should I now install yambopy on my server and enter the command excitondb exc_kspace_plot.py?
Yours,
WangFuyou
Re: Excitonic wavefunctions in reciprocal space
Posted: Wed Sep 18, 2024 4:05 pm
by WangFuyou
Dear Palful,
I modified the lattice into a square, but the result is still wrong, I attached my picture,and script. However, the ndb.BS diago Q1 file is too large to upload.
Yours,
WangFuyou
Re: Excitonic wavefunctions in reciprocal space
Posted: Mon Oct 07, 2024 2:52 pm
by palful
Dear Wang Fuyou,
As you are dealing with a 3D system, may it be possible that you are plotting all the kpoints with different z-coordinate on top of each other? This would explain why the band plot looks correct, but the 2D k-space plot looks fully dark.
The function "yexc.plot_exciton_2D_ax" assumes a 2D k-point grid like (k_x,k_y,0). If this you are in 3D space, my suggestion would be to do your own version of the same function, with the modification that it accepts slices of the kpoint coordinates. You can code the function on top of your script starting from the original one. In your plot function, instead of relying directly on the full kpoint grid read by yambopy, you could supply as input arguments a sublist of k-points at a certain value of k_z (such as k_z=0), along with the relative indices, in order to plot 2D sections of the full 3D BZ.
Best,
Fulvio