Hi yamboers,
I wanted to plot the electron-phonon matrix element over the BZ using yambopy. My python version is 3.10.14. The yambo version used for this calculation was from: https://github.com/attacc/yambo.git yambo-excph.
My SAVE folder contains: ndb.elph_gkkp_expanded* (from 1-324), ndb.PH_Double_Grid, ns.nlcc_pp_pwscf, ns.db1, ndb.gops, ndb.kindx, ns.kb_pp_pwscf*, ns.wf and ns.wf_fragments*
While running the python elph_plot.py, I get this error:
(yambopy) sitangshubhattacharya@Sitangshus-iMac databases_yambopy % python elph_plot.py
37 kpoints expanded to 324
Traceback (most recent call last):
File "/Users/sitangshubhattacharya/yambopy/tutorial/databases_yambopy/elph_plot.py", line 34, in <module>
yelph = YamboElectronPhononDB(ylat,folder_gkkp=save_path+'/SAVE',save=save_path+'/SAVE')
File "/opt/anaconda3/envs/yambopy/lib/python3.10/site-packages/yambopy/dbs/elphondb.py", line 97, in __init__
self.ibz_kpoints_elph = database.variables['HEAD_KPT'][:].T
KeyError: 'HEAD_KPT'
I have tested that the gkkp* files are not bad. I can use them (unexpanded) to obtain all QP energies at variety of temperatures.
I used these parameters in the elph_plot.py script:
i_n, i_m = [25,26] #i_n =25 -> valence band, i_n = 26 -> conduction band
i_nu = 3 # LA phonon mode at K (ZO mode at Gamma); LO, TO modes are i_nu=4,5
i_q = 323 # This is the K-point in the hexagonal BZ
i_k = 323
I tried with the hBN database, but it did not give me this error. Is it related to yambo version? I realized that the hBN database was done on a different version. It does not have ns.nlcc_pp_pwscf file.
A little advise will be very much appreciated.
Regards,
Sitangshu
elphondb.py 'HEAD_KPT' error!
Moderators: palful, amolina, mbonacci
-
- Posts: 183
- Joined: Thu Jan 05, 2017 8:08 am
elphondb.py 'HEAD_KPT' error!
Sitangshu Bhattacharya
Indian Institute of Information Technology-Allahabad
India
Web-page: http://profile.iiita.ac.in/sitangshu/
Institute: http://www.iiita.ac.in/
Indian Institute of Information Technology-Allahabad
India
Web-page: http://profile.iiita.ac.in/sitangshu/
Institute: http://www.iiita.ac.in/
- palful
- Posts: 68
- Joined: Tue Jan 26, 2016 11:23 am
- Location: Modena and Milan
Re: elphondb.py 'HEAD_KPT' error!
Dear Sitangshu,
This is strange. I have checked with a recent yambo version and the 'HEAD_KPT' variable seems to be there in the expanded databases. Are you reading the expanded "ndb.elph_gkkp_expanded*" files or the unexpanded matrix elements?
If you attach the head database (the one without *_fragment* in the name) and the ns.db1 file from the SAVE directory, I could investigate further. The presence or absence of other databases beyond ns.db1 in the SAVE does not affect this part of yambopy.
Best,
Fulvio
This is strange. I have checked with a recent yambo version and the 'HEAD_KPT' variable seems to be there in the expanded databases. Are you reading the expanded "ndb.elph_gkkp_expanded*" files or the unexpanded matrix elements?
If you attach the head database (the one without *_fragment* in the name) and the ns.db1 file from the SAVE directory, I could investigate further. The presence or absence of other databases beyond ns.db1 in the SAVE does not affect this part of yambopy.
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: 183
- Joined: Thu Jan 05, 2017 8:08 am
Re: elphondb.py 'HEAD_KPT' error!
Thank you Fulvio for your response. I have the I checked this and found that I need to comment gkkp_db in the input. By doing this, I can plot the matrix elements.
Regards,
Sitangshu
Regards,
Sitangshu
Sitangshu Bhattacharya
Indian Institute of Information Technology-Allahabad
India
Web-page: http://profile.iiita.ac.in/sitangshu/
Institute: http://www.iiita.ac.in/
Indian Institute of Information Technology-Allahabad
India
Web-page: http://profile.iiita.ac.in/sitangshu/
Institute: http://www.iiita.ac.in/