how to change the energy range of interpolated energy band

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: amolina, miranda.henrique, mbonacci, palful

Post Reply
Yuan Pang
Posts: 17
Joined: Fri Mar 05, 2021 2:26 pm

how to change the energy range of interpolated energy band

Post by Yuan Pang » Wed Apr 13, 2022 1:33 pm

Dear developers,

I want to plot exciton weights on interpolated band structure by yambopy. Firstly, I obtained exciton weights in band structure not interpolated as shown in following figure (Fig1). Next, I abtianed exciton weights in interpolated band structure (Fig2). However, I find that the energy range of y axis in Fig2 is significantly different from the Fig1. I inspected the excitondb.py, but I still don't have an idea as to what is causing this problem, as well as how can I adjust this range. Please give me some advice.

Best regards,
Pang
You do not have the required permissions to view the files attached to this post.
School of Physics, Shandong University
Jinan, CHINA

User avatar
amolina
Posts: 130
Joined: Fri Jul 15, 2011 11:23 am
Location: Valencia, Spain
Contact:

Re: how to change the energy range of interpolated energy band

Post by amolina » Wed Apr 13, 2022 2:32 pm

Dear Pang,

In order to plot the interpolated bands I guess that you are using the function plot_ax. In this function you are passing as variable the figure object of matplotlib, usually named "ax".
You can change all the attributes of this object. For instance, for the ylim you can change by setting (after calling plot_ax function):
ax.set_ylim(-1.0,3.0)

Hope it helps.

Alejandro
Alejandro Molina-Sánchez
Institute of Materials Science (ICMUV)
University of Valencia, Spain

Yuan Pang
Posts: 17
Joined: Fri Mar 05, 2021 2:26 pm

Re: how to change the energy range of interpolated energy band

Post by Yuan Pang » Thu Apr 14, 2022 8:35 am

Dear Alejandro,

Thanks for your reply.

I found my bug. As you said, I did use the function of plat_ax. Although I changed ylim settings before asking the question, however, I forgot that it needs to work after calling plot_ax function. Thanks again for your helpful reply.

Best regards,
Pang
School of Physics, Shandong University
Jinan, CHINA

Post Reply