It has already been shown in chapter that the choice of electron-electron interaction is fundamental, if one is to control the Coulomb finite size effects introduced when attempting to simulate a bulk system using a model system consisting of a few 10's of electrons in a simulation cell with periodic boundary conditions. Therefore, when performing QMC calculations for the gap energy as given in Eq.(), the new electron-electron interaction described in section was used both in the wavefunction optimisation procedure for each of the systems and then in the subsequent QMC calculations. The new energy expression for an N-electron system as stated in Eq.() naturally extends to systems containing electrons in the following way,
where is the LDA charge density of a simulation cell containing X=N or electrons. The sum in the first term now extends over all electron-electron pairs including those involving the additional electron. The Hamiltonian associated with this energy expression is
and the electron-electron energy in a VMC calculation is then given by