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

ValueError: Kpoint weights should sum up to one while sum_weights is 0.000 #217

Closed
ghost opened this issue Apr 19, 2021 · 1 comment
Closed

Comments

@ghost
Copy link

ghost commented Apr 19, 2021

I try to plot DOS+BANDS from my GSR file, and i give in pycharm this error:

ValueError: Kpoint weights should sum up to one while sum_weights is 0.000
The list of kpoints does not represent a homogeneous sampling of the BZ
<class 'abipy.core.kpoints.Kpath'>
K-path contains 3 lines. Number of k-points in each line: [11, 13, 17]
Снимок экрана 2021-04-20 в 00 17 20

@gmatteo
Copy link
Member

gmatteo commented Apr 19, 2021

To compute a DOS, you need to evaluate an 3d integral in the BZ.
In your case, you ebands object contains k-points along a high-symmetry path.
You can plot a band structure along the k-path by calling ebands.plot() but it's not possible to obtain the DOS from the same ebands object.

To get the DOS, you need a second ebands object with energies in the IBZ.
You can obtain this ebands_kmesh from the GSR.nc file produced by the GS run.

See e.g. this tutorial

@gmatteo gmatteo closed this as completed Apr 28, 2021
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

1 participant