abinit / abipy

Open-source library for analyzing the results produced by ABINIT

Home Page:http://abinit.github.io/abipy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

opened this issue · comments

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

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