This is a general question about how we treat unbalanced charges in density functional theory (DFT), which might arise when we model charged defects. In VASP, I would just change the NELECT variable (number of valence electrons), but I'm interested in how this changes the implementation (if any). Some hints can be found in the NELECT VaspWiki page.

If the number of electrons is not compatible with the number derived from the valence and the number of atoms a homogeneous background charge is assumed.

I don't quite understand what assuming a "homogeneous background charge" entails. Is there a change to the implementation (e.g. additional terms to consider due to the "homogeneous background charge", such as the Thomas-Fermi kinetic energy for the background charge", the "background charge" - "background charge", "background charge" - "valence electrons", and "background charge" - "ion core" interactions) or would we just proceed with the usual Kohn-Sham DFT scheme, but solving for more or less bands depending on whether electrons are added or removed (the assumption of the "homogeneous background charge" being some conceptual tool that doesn't affect the implementation)?


1 Answer 1


In periodic boundary conditions, the electrostatic energy of a charged unit cell diverges, so any attempt to calculate it will result in infinity. The solution is to add a "neutralising" homogeneous background charge, which makes the simulated cell charge-neutral and allows the energy to be well-defined again.

This neutralising background charge is literally just a charge distribution, not a uniform electron gas or any other physical system, so there are no other terms required in the Hamiltonian. In fact, some simulation software (e.g. CASTEP) deals with this entirely implicitly, by not including the mean electrostatic potential contributions at all (the ion-ion, electron-electron, and electron-ion Coulomb contributions exactly cancel out, so the nett contribution is zero). Some care is required in the implementation, for example with non-Coulombic local pseudopotential contributions, but it's generally quite straightforward.

The presence of the neutralising background does not change the charge density or the Kohn-Sham states, since it's a constant background field; however, it does change the energies, bands etc. so they aren't directly comparable between different charge states.

  • $\begingroup$ Thanks for the prompt answer! To clarify, if the implementation already neglects the mean electrostatic potential contributions (e.g. G=0 terms that diverge are ignored in FFT implementations of the Hartree energy and electron-ion Coulomb energy), is the only implementation-wise difference between a calculation for the original neutral system and the "neutralized" system with one less/more electron that the original is whether one less/more band of Kohn-Sham eigenstates and eigenvalues are solved for? (which is the cause of the change in "energies, bands, etc" in your last paragraph?) $\endgroup$
    – CW Tan
    Commented Jan 3, 2023 at 17:28
  • 1
    $\begingroup$ @CWTan that would be correct if you used bare Coulomb potentials. For pseudopotentials you also have to correct the non-Coulombic local pseudopotential term (the G=0 contribution, in reciprocal space). $\endgroup$ Commented Jan 4, 2023 at 11:22
  • 2
    $\begingroup$ Got it, thank you for the comprehensive answer! $\endgroup$
    – CW Tan
    Commented Jan 4, 2023 at 13:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .