Dear all,
I used yambopy to plot the exciton weights on the bands, and the weights seems very small as attached.
The script related to the exciton weifghts as:
...
## [3.B] Interpolate the values
if Bands_Plot_Interpolate:
fig = plt.figure(figsize=(4,6))
ax = fig.add_axes( [ 0.15, 0.15, 0.80, 0.80 ])
# In case of problems with the interpolation, try to increase lpratio
exc_on_bands = yexc.interpolate(yel,path,states,lpratio=20,f=None,size=1.0,verbose=True)
exc_on_bands.plot_ax(ax,color_bands='grey',c_weights='red',alpha_weights=1.0)
I increased 'size' but it does not work. If I reduced lpratio, the weights are bigger, but the bands are crossed heavily.
How to solve the problem?
Thanks!
SD
Exciton weights
Moderators: palful, amolina, mbonacci
-
- Posts: 298
- Joined: Fri Apr 09, 2010 12:30 pm
Exciton weights
You do not have the required permissions to view the files attached to this post.
- palful
- Posts: 77
- Joined: Tue Jan 26, 2016 11:23 am
- Location: Modena and Milan
Re: Exciton weights
Dear S. D. Wang,
You are right. There is a slight inconsistency in the tutorial script: the "size" parameter should be given as argument to the "plot_ax" function (method of the bandstructure object "exc_on_bands") and not to the "interpolate" function (method of the excitondb object "yexc").
If you add the "size" argument to "exc_on_bands.plot_ax(...,size=4.,...)", you will see that now the plot will work as intended. Thanks for noticing. The wiki and the script should probably be updated to clarify this point.
Best,
Fulvio
You are right. There is a slight inconsistency in the tutorial script: the "size" parameter should be given as argument to the "plot_ax" function (method of the bandstructure object "exc_on_bands") and not to the "interpolate" function (method of the excitondb object "yexc").
If you add the "size" argument to "exc_on_bands.plot_ax(...,size=4.,...)", you will see that now the plot will work as intended. Thanks for noticing. The wiki and the script should probably be updated to clarify this point.
Best,
Fulvio
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy
-
- Posts: 298
- Joined: Fri Apr 09, 2010 12:30 pm
Re: Exciton weights
Dear Fulvio,
I have successfully produced the PBE bands with right weights. How could we import the QP corrections in the 'exc_kspace_plot.py' to obtain the weight on the QP band?
Thanks!
SD
I have successfully produced the PBE bands with right weights. How could we import the QP corrections in the 'exc_kspace_plot.py' to obtain the weight on the QP band?
Thanks!
SD
- palful
- Posts: 77
- Joined: Tue Jan 26, 2016 11:23 am
- Location: Modena and Milan
Re: Exciton weights
Dear SD,
You could just read the quasiparticle database instead of the Kohn-Sham energies, replacing the call to YamboElectronsDB with YamboQPDB such as:
and then providing the yqp object to the yexc.interpolate function.
Cheers,
Fulvio
You could just read the quasiparticle database instead of the Kohn-Sham energies, replacing the call to YamboElectronsDB with YamboQPDB such as:
Code: Select all
yqp = YamboQPDB.from_db(filename='ndb.QP',folder='location/of/database')
Cheers,
Fulvio
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy
-
- Posts: 298
- Joined: Fri Apr 09, 2010 12:30 pm
Re: Exciton weights
Dear Palful,
I revised the python script as:
...
exc_on_bands = yexc.interpolate(yqp,path,states,lpratio=55,f=None,size=50,verbose=True)
exc_on_bands.plot_ax(ax,c_bands='black',c_weights='red',size=20,alpha_weights=1.0,linewidths=500,s=300)
...
but it does not work and interpolation stops as:
...
exc_on_bands = yexc.interpolate(yqp,path,states,lpratio=55,f=None,size=50,verbose=True)
File "/home/hipeson/intel/oneapi/intelpython/latest/lib/python3.9/site-packages/yambopy/dbs/excitondb.py", line 1122, in interpolate
k1,k2,k3 = energies.expand_kpts()
AttributeError: 'YamboQPDB' object has no attribute 'expand_kpts'
...
Thanks!
Best
SD
I revised the python script as:
...
exc_on_bands = yexc.interpolate(yqp,path,states,lpratio=55,f=None,size=50,verbose=True)
exc_on_bands.plot_ax(ax,c_bands='black',c_weights='red',size=20,alpha_weights=1.0,linewidths=500,s=300)
...
but it does not work and interpolation stops as:
...
exc_on_bands = yexc.interpolate(yqp,path,states,lpratio=55,f=None,size=50,verbose=True)
File "/home/hipeson/intel/oneapi/intelpython/latest/lib/python3.9/site-packages/yambopy/dbs/excitondb.py", line 1122, in interpolate
k1,k2,k3 = energies.expand_kpts()
AttributeError: 'YamboQPDB' object has no attribute 'expand_kpts'
...
Thanks!
Best
SD
- palful
- Posts: 77
- Joined: Tue Jan 26, 2016 11:23 am
- Location: Modena and Milan
Re: Exciton weights
Dear SD,
I have just released an updated version of yambopy (v0.4). If you reinstall the new version, now the inclusion of YamboQPDB in the band plot should work properly. Please let me know if this isn't the case.
Best,
Fulvio
I have just released an updated version of yambopy (v0.4). If you reinstall the new version, now the inclusion of YamboQPDB in the band plot should work properly. Please let me know if this isn't the case.
Best,
Fulvio
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy