Ase espresso calculator to compute DOS with linear thetrahedron interpolation
Dear developers, I noticed that while the DOS with Gaussian smearing (and the band structure) calculation in espresso has been correctly implemented in the newest ASE, still the calculation of the DOS with the linear tetrahedron interpolation (width = 0) does not work. The reason is that the function calc.get_bz_k_points() (called by the DOS initialization class) does not return anything.
For example:
dos = ase.dft.dos.DOS(atms.calc, 0)
~/anaconda3/lib/python3.7/site-packages/ase/dft/dos.py in __init__(self, calc, width, window, npts)
53 if width == 0.0:
54 bzkpts = calc.get_bz_k_points()
---> 55 size, offset = get_monkhorst_pack_size_and_offset(bzkpts)
56 bz2ibz = calc.get_bz_to_ibz_map()
57 shape = (self.nspins,) + tuple(size) + (-1,)
~/anaconda3/lib/python3.7/site-packages/ase/dft/kpoints.py in get_monkhorst_pack_size_and_offset(kpts)
28 The set of k-points must not have been symmetry reduced."""
29
---> 30 if len(kpts) == 1:
31 return np.ones(3, int), np.array(kpts[0], dtype=float)
32
TypeError: object of type 'NoneType' has no len()
I attach an example to replicate the error. I do not know if this is affecting only the espresso calculator or if it is a more general problem of the SinglePointDFTCalculator class.test_dos_tetrahedron_espresso.tar.gz
Bests, Lorenzo