-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Band Unfolding for Quantum-Espresso code #134
Comments
Hello Amir, at the current moment, it is not working for qe. I just did an example of MgB2 in a supercell, the bands are what I expected (This is in comparison to VASP) but the unfolding is not. I am going to try to get in contact with on of the QE developers to see if we can find a solution for this. I'll keep you updated on the status of this. And yes you can generate plots of orbital band projections after obtaining the unfolded band structure. There was a small bug in the code, I am going to update it today. pyprocar.unfold( Logan Lang |
Hello, Thank you very much for your response! Cell In[7], line 2 File ~/anaconda3/lib/python3.11/site-packages/pyprocar/scripts/scriptUnfold.py:117, in unfold(procar, poscar, outcar, vaspxml, abinit_output, dirname, transformation_matrix, kpoints, elkin, code, mode, unfold_mode, spins, atoms, orbitals, items, projection_mask, unfold_mask, fermi, interpolation_factor, interpolation_type, vmax, vmin, kticks, knames, kdirect, elimit, ax, show, savefig, old, savetab, **kwargs) AttributeError: 'str' object has no attribute 'has_phase' Could you please tell me how can I solve this error? Thanks, |
Did you use the right flag in VASP to store the phase in the PROCAR file? It seems that PyProcar does not have access to the phase… did you check that? (LORBIT=12)
…______________________________________::::__________________________________________
Prof. Aldo Humberto Romero
Director Research Computing, West Virginia University
Eberly Family Distinguished Professor
Fellow American Physical Society
Editor Physica B, Assistant Editor EPJB, Editor Frontiers in Physics
Section Editor Papers in Physics
Member of the Editorial Board of “Materials” and “Symmetry Physics”
Physics and Astronomy Department
West Virginia University
135 Willey Street, PO Box 6315
111 White Hall
Morgantown, WV 26506
Phone: 304-293-6317
Fax: 304-293-5732
email: ***@***.***
From: DFTmagnetism ***@***.***>
Date: Monday, November 6, 2023 at 9:59 AM
To: romerogroup/pyprocar ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [romerogroup/pyprocar] Band Unfolding for Quantum-Espresso code (Issue #134)
Hello,
Thank you very much for your response!
But there is an error:
Cell In[7], line 2
1 import numpy as np
----> 2 pyprocar.unfold(
3 code='vasp',
4 mode='parametric',
5 unfold_mode='both',
6 dirname=data_dir,
7 orbitals=[1,2,3],
8 elimit=[-15,5],
9 supercell_matrix=np.diag([2, 2, 2]))
File ~/anaconda3/lib/python3.11/site-packages/pyprocar/scripts/scriptUnfold.py:117, in unfold(procar, poscar, outcar, vaspxml, abinit_output, dirname, transformation_matrix, kpoints, elkin, code, mode, unfold_mode, spins, atoms, orbitals, items, projection_mask, unfold_mask, fermi, interpolation_factor, interpolation_type, vmax, vmin, kticks, knames, kdirect, elimit, ax, show, savefig, old, savetab, **kwargs)
113 ebs_plot = EBSPlot(ebs, kpath, ax, spins)
116 if mode is not None:
--> 117 if not procar.has_phase :
118 raise ValueError("The provided electronic band structure file does not include phases")
119 ebs_plot.ebs.unfold(
120 transformation_matrix=transformation_matrix, structure=structure)
AttributeError: 'str' object has no attribute 'has_phase'
Could you please tell me how can I solve this error?
Thanks,
Amir
—
Reply to this email directly, view it on GitHub<#134 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB24DTO4NQBCL2XSMA6WRCTYDD3MLAVCNFSM6AAAAAA6ML4THGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJVGAZDMMRTG4>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Yes. When I add LORBIT=12, I have: File ~/anaconda3/lib/python3.11/site-packages/pyprocar/scripts/scriptUnfold.py:110, in unfold(procar, poscar, outcar, vaspxml, abinit_output, dirname, transformation_matrix, kpoints, elkin, code, mode, unfold_mode, spins, atoms, orbitals, items, projection_mask, unfold_mask, fermi, interpolation_factor, interpolation_type, vmax, vmin, kticks, knames, kdirect, elimit, ax, show, savefig, old, savetab, **kwargs) File ~/anaconda3/lib/python3.11/site-packages/pyprocar/io/parser.py:27, in Parser.init(self, code, dir) File ~/anaconda3/lib/python3.11/site-packages/pyprocar/io/parser.py:49, in Parser.parse(self) File ~/anaconda3/lib/python3.11/site-packages/pyprocar/io/parser.py:239, in Parser.parse_vasp(self) File ~/anaconda3/lib/python3.11/site-packages/pyprocar/io/vasp.py:613, in Procar.init(self, filename, structure, reciprocal_lattice, kpath, n_kx, n_ky, n_kz, efermi, interpolation_factor) File ~/anaconda3/lib/python3.11/site-packages/pyprocar/io/vasp.py:756, in Procar._read(self) File ~/anaconda3/lib/python3.11/site-packages/pyprocar/io/vasp.py:1108, in Procar._read_phases(self) ValueError: cannot reshape array of size 4723200 into shape (30,96,1,41,20) |
Dear Logan Lang, Could you please tell me, could you solve the problem? Best, |
Hello Amir, For the unfolding in QE, we are still trying to diagnose the issue. It has to do with how QE uses different a different basis than in vasp. As for the above issue with vasp, the issue is coming from line 1110 ( int(self.bandsCount / 2)) and 1117 ( int(self.bandsCount / 2)). There should be no division by 2. I have changed this in the main branch GitHub. I have not updated pypi with this change, I want to finish other work before updating pypi. Logan Lang |
Dear Sir/Madam,
I would like to inquire about the usage of the PyProcar tool for unfolding band structures in conjunction with the Quantum Espresso code.
Additionally, I am interested in knowing whether it is possible to generate plots of orbital band projections after obtaining the unfolded band structure.
Best regards,
Amir
The text was updated successfully, but these errors were encountered: