Yambopy- Converge

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
Sam-2025
Posts: 27
Joined: Mon Jan 06, 2025 1:23 pm

Yambopy- Converge

Post by Sam-2025 » Wed May 21, 2025 4:11 am

Dear Dr. Daniele Varsano,


I also, tried to use yambopy to converge parameters as the following link: https://wiki.yambo-code.eu/wiki/index.p ... ption_(BN) and modifies the python script (bse_conv_bn.py) and produced the adsorption spectrum for different amount of each variable, but the script doesn't give me the plots and return the following error :

File "/gpfs1/home/s/g/sghanbar/Yambo/back-tem1/bse_conv_bn.py", line 180, in <module>
if args.plot: plot(what)
^^^^^^^^^^
File "/gpfs1/home/s/g/sghanbar/Yambo/back-tem1/bse_conv_bn.py", line 133, in plot
y.plot_bse(['eps','FFTGvecs'],ax=ax)
File "/users/s/g/sghanbar/yamboenv/lib/python3.11/site-packages/yambopy/analyse.py", line 270, in plot_bse
x = data['E/ev[1]']
~~~~^^^^^^^^^^^
KeyError: 'E/ev[1]' means what step by step each line



even though I went : "/users/s/g/sghanbar/yamboenv/lib/python3.11/site-packages/yambopy/analyse.py" and changed ev to eV , but this time making eV as a problem. Could you please look at also this one. In my "o-FFTGvecs_00010.eps_q1_diago_bse" files , the E is based on eV! (bse_conv_bn.txt file attached for your consideration)


I sincerely appreciate your help.
You do not have the required permissions to view the files attached to this post.
Samira Ghanbarzadeh (she/her)
PhD Student
Mechanical Engineering Department / UVM

rreho
Posts: 15
Joined: Mon Apr 26, 2021 3:39 pm

Re: Yambopy- Converge

Post by rreho » Fri May 23, 2025 10:01 am

Dear Sam,
I reproduced your error and understood the problem.
The issue was related to an inconsistency between the key value extracted from the 'o-' file and the one expected in the `YamboAnalyser` class.

I fixed it and created a pull request (https://github.com/yambo-code/yambopy/pull/65) to main `yambopy` repo.
Once it is accepted, you can edit your `bse_conv_bn.py` script line 133 to
`y.plot_bse(['eps','FFTGvecs'],ax=ax, x_key = 'E[1]', y_key = 'Im(eps_o)')`

Best,
R

Sam-2025
Posts: 27
Joined: Mon Jan 06, 2025 1:23 pm

Re: Yambopy- Converge

Post by Sam-2025 » Fri May 23, 2025 4:33 pm

Thank you so much for your time and help. I sincerely, appreciate it.
Samira Ghanbarzadeh (she/her)
PhD Student
Mechanical Engineering Department / UVM

Post Reply