  The design of novel cathode materials for Li-ion batteries would greatly
benefit from accurate first-principles predictions of structural, electronic,
and magnetic properties as well as intercalation voltages in compounds
containing transition-metal elements. For such systems, density-functional
theory (DFT) with standard (semi-)local exchange-correlation functionals is of
limited use as it often fails due to strong self-interaction errors that are
especially relevant in the partially filled $d$ shells. Here, we perform a
detailed comparative study of the phospho-olivine cathode materials
Li$_x$MnPO$_4$, Li$_x$FePO$_4$, and the mixed transition metal
Li$_x$Mn$_{1/2}$Fe$_{1/2}$PO$_4$ ($x=0, 1/4, 1/2, 3/4, 1$) using four
electronic-structure methods: DFT, DFT+$U$, DFT+$U$+$V$, and HSE06. We show
that DFT+$U$+$V$, with onsite $U$ and intersite $V$ Hubbard parameters
determined from first principles and self-consistently with respect to the
structural parameters by means of density-functional perturbation theory
(linear response), provides the most accurate description of the electronic
structure of these challenging compounds. In particular, we demonstrate that
DFT+$U$+$V$ displays very clearly "digital" changes in oxidation states of the
transition-metal ions in all compounds, including the mixed-valence phases
occurring at intermediate Li concentrations, leading to voltages in remarkable
agreement with experiments. We show that the inclusion of intersite Hubbard
interactions is essential for the accurate prediction of thermodynamic
quantities, balancing the drive for localization induced by the onsite $U$ with
intersite $V$ orbital hybridizations.
