Electronic band structure calculation using plane wave expansion: what are the diagonal matrix elements for a coulomb potential? I'm trying to do a plane wave basis expansion calculation for the band structure / wavefunctions of electrons in a periodic solid, using a coulomb potential for the nuclei.  I'm working from Ashcroft and Mermin, mainly.  Equation 11.3 on page 194 gives the potential energy term:
$$U_K \approx -\left( \frac{4\pi Z_a e^2}{K^2} \right) \frac{1}{v}$$
$K$ (my understanding) is the length of the difference between any 2 reciprocal lattice vectors (NB of course the difference between any 2 reciprocal lattice vectors is itself a reciprocal lattice vector)
$v$ is the volume of the unit cell
$Z_a$ is the charge on the nuclei
$e$ is the charge of an electron
For off-diagonal elements $K$ is non-zero, however for the diagonal it is $0$ and hence the above goes to negative infinity.  What is the value for the potential for the diagonal elements?
One idea I had was to integrate just the Coulomb potential over the unit cell, but that seems to contradict Ashcroft & Mermin eqn. 9.34, p. 167, which they indicate is where they get the above from, and which indicates the integral should be over all space:
$$\phi(K) = \int_{all\ space} dr\ e^{-iKr}\phi(r)$$
$\phi(r)$ is the potential produced by an individual ion/nuclei in the lattice
Any help much appreciated!
 A: I do not know if I can add much, but I can try to explain how these matrix elements arise. The integral should indeed be over all space, but the lattice structure manifests itself in that the momentum $K$ only takes discrete values: the reciprocal lattice vectors. If you make a Fourier transform of the Coulomb potential, you indeed encounter a problem of the singularity at $r=0$. This can be addressed by modifying the Coulomb potential by multiplying it by a factor $e^{- \lambda r}$, performing the Fourier transform, and then letting the parameter $\lambda \rightarrow 0$ (other forms of obtaining the result are also available).
The result that you get is the $U(K)$ (Eq. 113) that you quote above, where $K$ is a reciprocal lattice vector. This is well-behaved at all points except $K=0$. You can set the $U(K=0) = 0$ by hand. If this seems rather arbitrary, the $K=0$ value is related to the mean charge of the unit cell, which is indeed zero for physical cases (otherwise the electrostatic energy of the crystal would indeed diverge).
