SMTG-Bham/sumo

sumo phonon plot erro

Asif-Iqbal-Bhatti opened this issue · 2 comments

Hello,

I keep on getting this error
" sumo-phonon-bandplot --seekpath --no-base-style --dim 1 1 1 -u THz
Using supercell with dimensions:
[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]

Calculating force constants...
Structure information:
Space group number: 1
International symbol: P1
Lattice type: triclinic

k-point path:
\Gamma -> X | Y -> \Gamma -> Z | R -> \Gamma -> T | U -> \Gamma -> V

k-points:
Z: 0.0 0.0 0.5
T: 0.0 0.5 0.5
R: 0.5 0.5 0.5
X: 0.5 0.0 0.0
Y: 0.0 0.5 0.0
V: 0.5 0.5 0.0
U: 0.5 0.0 0.5
\Gamma: 0.0 0.0 0.0
Traceback (most recent call last):
File "/home/asifem/miniconda3/bin/sumo-phonon-bandplot", line 8, in
sys.exit(main())
File "/home/asifem/miniconda3/lib/python3.10/site-packages/sumo/cli/phonon_bandplot.py", line 719, in main
phonon_bandplot(
File "/home/asifem/miniconda3/lib/python3.10/site-packages/sumo/cli/phonon_bandplot.py", line 265, in phonon_bandplot
plt = plotter.get_plot(
File "/home/asifem/miniconda3/lib/python3.10/site-packages/sumo/plotting/init.py", line 58, in wrapper
return get_plot(*args, **kwargs)
File "/home/asifem/miniconda3/lib/python3.10/site-packages/sumo/plotting/phonon_bs_plotter.py", line 167, in get_plot
_plot_lines(data, ax, color=color)
File "/home/asifem/miniconda3/lib/python3.10/site-packages/sumo/plotting/phonon_bs_plotter.py", line 159, in _plot_lines
range(len(data["distances"])), range(self._nb_bands)
AttributeError: 'SPhononBSPlotter' object has no attribute '_nb_bands'. Did you mean: 'n_bands'?"

It was not before. Did anyone what this mean?

I'm having the same problem.

`
(base) gabriel@nexus$ sumo-phonon-bandplot --filename FORCE_CONSTANTS --kpoints "0.0 0.0 0.0, 0.5 0.0 0.0, 0.333333 0.333333 0.0, 0.0 0.0 0.0" --labels "Γ, M, K, Γ" --dos --width 5 --dim 3 3 1
Using supercell with dimensions:
[[3. 0. 0.]
[0. 3. 0.]
[0. 0. 1.]]

Structure information:
Space group number: 164
International symbol: P-3m1
Lattice type: hexagonal

k-point path:
Γ -> M -> K -> Γ

k-points:
Γ: 0.0 0.0 0.0
M: 0.5 0.0 0.0
K: 0.333333 0.333333 0.0
Γ: 0.0 0.0 0.0
Traceback (most recent call last):
File "/var/home/gabriel/miniforge3/bin/sumo-phonon-bandplot", line 10, in
sys.exit(main())
File "/var/home/gabriel/miniforge3/lib/python3.10/site-packages/sumo/cli/phonon_bandplot.py", line 720, in main
phonon_bandplot(
File "/var/home/gabriel/miniforge3/lib/python3.10/site-packages/sumo/cli/phonon_bandplot.py", line 265, in phonon_bandplot
plt = plotter.get_plot(
File "/var/home/gabriel/miniforge3/lib/python3.10/site-packages/sumo/plotting/init.py", line 62, in wrapper
return get_plot(*args, **kwargs)
File "/var/home/gabriel/miniforge3/lib/python3.10/site-packages/sumo/plotting/phonon_bs_plotter.py", line 167, in get_plot
_plot_lines(data, ax, color=color)
File "/var/home/gabriel/miniforge3/lib/python3.10/site-packages/sumo/plotting/phonon_bs_plotter.py", line 159, in _plot_lines
range(len(data["distances"])), range(self._nb_bands)
AttributeError: 'SPhononBSPlotter' object has no attribute '_nb_bands'. Did you mean: 'n_bands'?

`

utf commented

Thanks for raising this. I pushed a new version of sumo. If you update it should fix your problem.