energy (eV)
  ------ ------------------- ---------------------
    W        $6s^15d^5$             188.192
    O        $2s^22p^4$             395.994
    H          $1s^1$               200.000
    Li         $2s^1$               76.254
    Na         $3s^1$               48.686
    K          $4s^1$               70.923
    Rb         $5s^1$               63.093
    Cs         $6s^1$               47.697
    C        $2s^22p^2$             286.744
    N        $2s^22p^3$             348.097

To study the effect of fractional doping in the Na$_x$WO$_3$ system, we used a supercell method consisting of up to eight primitive WO$_3$ cells, with between 1-7 of these cells occupied by sodium ions in a pseudo-random fashion. Similarly for the oxygen-deficient WO$_{3-x}$ system, 3-6 cells were used with one oxygen vacancy in each case. In all cases the basis vectors of the cell were chosen to avoid the creation of lines or planes of dopants.

$k$-point meshes between 4$\times$4$\times$4 and 15$\times$15$\times$15 were used to relax the various systems, corresponding respectively to 24-36 and 120-455 $k$-points in the irreducible Brillouin zone. As a general rule, the simplest bronze structures with few (1-4) formula units per cell used finer $k$-point meshes (more $k$-points) than the larger non-metallic WO$_{3-x}$ and hybrid structures. In all cases the $k$-point mesh was varied at the end of the relaxation and the energy was found to converge to better than 10 meV in all cases. The cell parameters and atomic positions 