Density of states calculation gives me density of states equal to 0?

Hello all,
Below is my input.xml file. I am trying to calculate the density of states for lithium and when I perform the exciting_smp calculation, I get values of 0. Since this should not be possible for lithium, what’s wrong with my input file? I would appreciate a prompt answer, I’m kind of desperate since I need this data for a paper I’m writing. Thanks.

<input>
<title>Lithium</title>
<structure speciespath="/root/exciting/species">
<crystal scale="6.6329">
<basevect>0.0 0.5 0.5</basevect>
<basevect>0.5 0.0 0.5</basevect>
<basevect>0.5 0.5 0.0</basevect>
</crystal>
<species speciesfile="Li.xml" rmt="1.6">
<atom coord="0.00 0.00 0.00"/>
<atom coord="0.5 0.5 0.5"/>
</species>
</structure>
<groundstate ngridk="8 8 8" outputlevel="normal" xctype="GGA_PBE_SOL"> </groundstate>
<properties>
<dos nsmdos="2" nwdos="100000" winddos="-0.3 40" inttype="tetra"> </dos>
</properties>
<xs xstype="TDDFT" ngridk="8 8 8" vkloff="0 0 0" nempty="5" gqmax="3.0" broad="0.04" tevout="true">
<energywindow intv="0.0 40.0" points="10000"/>
<tddft fxctype="ALDA" intraband="true"/>
<qpointset>
<qpoint> 0.0 0.0 0.00 </qpoint>
<qpoint> 0.0 0.0 0.1 </qpoint>
<qpoint> 0.0 0.0 0.20 </qpoint>
<qpoint> 0.0 0.0 0.3 </qpoint>
<qpoint> 0.0 0.0 0.40 </qpoint>
<qpoint> 0.0 0.0 0.5 </qpoint>
<qpoint> 0.0 0.0 0.60 </qpoint>
<qpoint> 0.0 0.0 0.7 </qpoint>
<qpoint> 0.0 0.0 0.80 </qpoint>
<qpoint> 0.0 0.0 0.9 </qpoint>
<qpoint> 0.0 0.0 1 </qpoint>
</qpointset>
</xs>
</input>

Hi Angela,

If I use a stripped-down input, where I’ve used less k-points for speed, and removed the TDDFT calc:

<input>
  <title>Lithium</title>
  <structure speciespath=".">
  <crystal scale="6.6329">
    <basevect>0.0 0.5 0.5</basevect>
    <basevect>0.5 0.0 0.5</basevect>
    <basevect>0.5 0.5 0.0</basevect>
  </crystal>
<species speciesfile="Li.xml" rmt="1.6">
<atom coord="0.00 0.00 0.00"/>
<atom coord="0.5 0.5 0.5"/>
</species>
</structure>
<groundstate ngridk="2 2 2" outputlevel="normal" xctype="GGA_PBE_SOL"> </groundstate>
<properties>
  <dos nsmdos="2" nwdos="100000" winddos="-0.3 40" inttype="tetra"> </dos>
</properties>
</input>

I have no problem running with serial or smp exciting. Although interesting mpi_smp hangs… I guess there’s some erroneous blocking MPI call.

There is data in the dos file, but I note that the cell vectors (basevect) should be in Bohr by default (see Structure - exciting). If I compare to the materials project, FCC Lithium primitive cell, I think you’ve used Angstrom instead. Please check this.

Otherwise, to plot your DOS data, you can use tools/exciting_tools (pip install it)

import numpy as np
import matplotlib.pyplot as plt

from excitingtools.exciting_dict_parsers.properties_parser import parse_dos

dos_dict = parse_dos('dos.xml')
n_points = 100000
dos = np.empty(shape=(n_points, 2))

for i in range(0, n_points):
    #unnecessary nesting structure to dict
    point_value = dos_dict['totaldos']['diagram']['point'][str(i+1)]
    dos[i, :] = np.array([point_value['e'], point_value['dos']])

fig, ax = plt.subplots()
ax.plot(dos[:, 0], dos[:, 1])
# Reduce x range, for erroneous-looking result
ax.set_xlim([0, 2])
plt.show()

I recommend doing the TDDFT calc as a separate input, and use the mpi_smp binary for this, else you don’t get k-point parallelisation.

Cheers,
Alex