Skip to content
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

Why bandplot add --project error? #254

Open
FINEAR opened this issue Dec 16, 2024 · 4 comments
Open

Why bandplot add --project error? #254

FINEAR opened this issue Dec 16, 2024 · 4 comments

Comments

@FINEAR
Copy link

FINEAR commented Dec 16, 2024

sumo-bandplot --project Cr --ymin -1.0 --ymax 1.0 --zero-line

Traceback (most recent call last):
File "/public/home/acboth6nmf/.conda/envs/SUMO/bin/sumo-bandplot", line 8, in
sys.exit(main())
File "/public/home/acboth6nmf/.conda/envs/SUMO/lib/python3.8/site-packages/sumo/cli/bandplot.py", line 886, in main
bandplot(
File "/public/home/acboth6nmf/.conda/envs/SUMO/lib/python3.8/site-packages/sumo/cli/bandplot.py", line 421, in bandplot
plt = plotter.get_projected_plot(
File "/public/home/acboth6nmf/.conda/envs/SUMO/lib/python3.8/site-packages/sumo/plotting/init.py", line 62, in wrapper
return get_plot(*args, **kwargs)
File "/public/home/acboth6nmf/.conda/envs/SUMO/lib/python3.8/site-packages/sumo/plotting/bs_plotter.py", line 555, in get_projected_plot
proj = get_projections_by_branches(self.bs, selection, normalise=normalise)
File "/public/home/acboth6nmf/.conda/envs/SUMO/lib/python3.8/site-packages/sumo/electronic_structure/bandstructure.py", line 68, in get_projections_by_branches
projections = get_projections(bs, selection, normalise=normalise)
File "/public/home/acboth6nmf/.conda/envs/SUMO/lib/python3.8/site-packages/sumo/electronic_structure/bandstructure.py", line 153, in get_projections
el_orb_proj = [
File "/public/home/acboth6nmf/.conda/envs/SUMO/lib/python3.8/site-packages/sumo/electronic_structure/bandstructure.py", line 154, in
[all_proj[spin][nb][nk][element][orbital] for nk in range(nkpts)]
File "/public/home/acboth6nmf/.conda/envs/SUMO/lib/python3.8/site-packages/sumo/electronic_structure/bandstructure.py", line 154, in
[all_proj[spin][nb][nk][element][orbital] for nk in range(nkpts)]
KeyError: <Spin.up: 1>

Looking forward to your early reply.

@ajjackson
Copy link
Member

Can you provide input files that reproduce this error, or (preferably) find an example in the Sumo test data?

@FINEAR
Copy link
Author

FINEAR commented Dec 16, 2024

sumo_error_project_band.zip
Thank you

Can you provide input files that reproduce this error, or (preferably) find an example in the Sumo test data?

@FINEAR
Copy link
Author

FINEAR commented Dec 22, 2024

@ajjackson

@ajjackson
Copy link
Member

It looks like there is no orbital projection data in the calculation: LORBIT is commented out in the INCAR.

When Sumo calls get_projections_on_elements_and_orbitals from Pymatgen, it returns an empty dictionary.

Try recalculating with LORBIT=11?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants