-
Notifications
You must be signed in to change notification settings - Fork 874
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
For band structure, how to correctly display the symbol of the \Gamma point #4214
For band structure, how to correctly display the symbol of the \Gamma point #4214
Comments
Dear @phyfang , could you further describe how you try to plot the bandstructure? |
I guess it's related to #4025 (looks like |
yeah, as you gave me access to your fork, let's fix this together. Or was that not intended? When it's just escaping the |
It was 100% intended, free feel to commit to my other/future PRs as well :)
Yep, I guess it wouldn't be a hard fix, but I would need to fix some data (perhaps from current tests) to recreate this as I don't have data at hand right now. Update: I just tried the BS plotter at pymatgen/tests/electronic_structure/test_plotter.py Lines 163 to 184 in 31f1e1f
And it seems to work as expected. Also tried the BSDOS plotter at pymatgen/tests/electronic_structure/test_plotter.py Lines 223 to 233 in 31f1e1f
And worked as expected as well. Also tried the ipynb at https://github.com/materialsvirtuallab/matgenb/blob/master/notebooks/2017-09-03-Analyze%20and%20plot%20band%20structures.ipynb and not seeing any issue either (but the
@phyfang Yes it would really help us if you could provide the code snippet (and data if possible) to recreate this issue. |
Thanks for your reply, I changed the 'GAMMA' in KPOINTS to '\Gamma' and it solved. |
@phyfang If you don't mind, can you share the code you used to generate the plot? |
Sure 🤗 let's see how and where I can help out.
I also remembered that I didn't have a problem with the BSplotter before (and there were no recent changes I guess), as you can see at the end of the following page: https://autoatml.github.io/autoplex/user/phonon/flows/flows.html |
I'm not sure if phonopy uses the KPOINTS file, but probably in the KPOINTS file, instead of using the mesh, putting the kpoint path explicitly with labels for the critical points. |
ok
original KPOINTS
changed
|
Thank you a lot for sharing your code @phyfang 😃 |
I think we can safely close this issue as no PR is needed. |
Hi @QuantumChemist sorry for the delay but I don't think that really resolves the issue, as VASP docs also use As far as I know, this is an encoding issue in Windows (i.e. the encoding is not explicitly set in pymatgen/src/pymatgen/io/vasp/inputs.py Lines 908 to 909 in 31f1e1f
You could check the encoding with I know you're working on Linux, and the default encoding on Windows is a bit complicated and dependent on locale encoding:
So in a word, that issue is not specific to plotter but more general to file parsing where the user's default encoding is not "UTF-8" with non-ASCII char present, I guess we still need to fix it. Explanation moved to #4218 for visibility |
Hi @DanielYang59 , oh I see where the issue arises from then. |
Python version
python--3.12
Pymatgen version
2024.11.13
Operating system version
Win-11
Current behavior
When I was drawing the band structure, I found some problems that the gamma points were not displayed correctly.
Expected Behavior
How should I solve this problem?
Minimal example
No response
Relevant files to reproduce this bug
No response
The text was updated successfully, but these errors were encountered: