Page 1 of 1
plot of |A(v,c,k)| on the electronic band structure
Posted: Fri Mar 28, 2025 2:08 am
by widad
Dear developers,
I am trying to plot of |A(v,c,k)| on the electronic band structure for exciton state of a WSe₂ monolayer using the plot-exciton.py script. However, I am encountering an issue where a spot extends vertically towards the bands instead of following the expected band shape.
Could you please help me understand what might be causing this and how to resolve it?
Best regards,
Re: plot of |A(v,c,k)| on the electronic band structure
Posted: Fri Mar 28, 2025 9:25 am
by Daniele Varsano
Dear Widad,
please sign your post with your complete name and affiliation, this is a rule of the forum and you can do once for all by filling your signature in the suer profile.
Can you please post an example so that we can better understand the problem? From what you write it seems a problem of symbol size in the plot, and you can adjust it by changing/adding the size in exc_kspace_plot.py script, or maybe you need to activate the interpolation.
Best,
Daniele
Re: plot of |A(v,c,k)| on the electronic band structure
Posted: Fri Mar 28, 2025 12:41 pm
by widad
Dear Dr. Varsano ,
Thank you very much for your reply , please find the attached example of WSe2 monolayre image , Could you please explain which parameter I have to adjust?
This is my script "plot-exciton.py"
---------------------------------------------------------------------------------------------------------------------------
# Load databases
# Electron energies database
elec = YamboElectronsDB.from_db_file(folder='')
# Lattice information
lat = YamboLatticeDB.from_db_file(filename='ns.db1')
# Exciton database read from db file
if os.path.isfile('BSE/ndb.BS_diago_Q01'):
yexc = YamboExcitonDB.from_db_file(lat,filename='ndb.BS_diago_Q01',folder='BSE')
if os.path.isfile('BSE/ndb.BS_diago_Q1'):
yexc = YamboExcitonDB.from_db_file(lat,filename='ndb.BS_diago_Q1',folder='BSE')
print("Ground state energy: %lf" % yexc.eigenvalues[0].real )
print("Intensity: %lf" % (yexc.get_intensities()[0].real+yexc.get_intensities()[1].real) )
print("1st-excited state energy: %lf" % yexc.eigenvalues[2].real )
print("Intensity: %lf" % (yexc.get_intensities()[2].real+yexc.get_intensities()[3].real) )
# List of states to be merged
states = [1,2]
# 1. Plot exciton weights in band structure NOT interpolated
exc_bands = yexc.get_exciton_bs(elec,path,states,size=1.0)
exc_bands.plot_ax(ax,c_bands='grey',c_weights='red')
plt.savefig('plot1.png')
plt.show()
# 2. Plot exciton weights in band structure INTERPOLATED
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_bands_inter = yexc.interpolate(elec,path,states,lpratio=10,f=None,size=10,verbose=True)
exc_bands_inter.plot_ax(ax,c_bands='black',c_weights='red',alpha_weights=0.5,c_label='$X_1$')
ax.set_ylim(-3.0,3.0)
plt.savefig('plot2.png')
plt.show()
# 3. Plot exciton weights in a 2D map of the BZ
fig = plt.figure(figsize=(4,4))
ax = fig.add_axes( [ 0.15, 0.15, 0.80, 0.80 ])
#yexc.plot_exciton_2D_ax(ax,states,mode='hexagon',limfactor=0.8,scale= 600)
yexc.plot_exciton_2D_ax(ax,states,limfactor=0.8,scale= 600)
plt.savefig('plot3.png')
plt.show()
------------------------------------------------------------------------------------------------------------------------------------------
Best wishes
Widad
Re: plot of |A(v,c,k)| on the electronic band structure
Posted: Fri Mar 28, 2025 4:15 pm
by palful
Dear Widad,
in exc_bands_inter.plot_ax() you can add a parameter called `size` (default is 1) to control the height of the weights.
Best,
Fulvio