  Rare-earth nickelates R$^{3+}$Ni$^{3+}$O$_3$ (R=Lu-Pr, Y) show a striking
metal-insulator transition in their bulk phase whose temperature can be tuned
by the rare-earth radius. These compounds are also the parent phases of the
newly identified infinite layer RNiO2 superconductors. Although intensive
theoretical works have been devoted to understand the origin of the
metal-insulator transition in the bulk, there have only been a few studies on
the role of hole and electron doping by rare-earth substitutions in RNiO$_3$
materials. Using first-principles calculations based on density functional
theory (DFT) we study the effect of hole and electron doping in a prototypical
nickelate SmNiO3. We perform calculations without Hubbard-like U potential on
Ni 3d levels but with a meta-GGA better amending self-interaction errors. We
find that at low doping, polarons form with intermediate localized states in
the band gap resulting in a semiconducting behavior. At larger doping, the
intermediate states spread more and more in the band gap until they merge
either with the valence (hole doping) or the conduction (electron doping) band,
ultimately resulting in a metallic state at 25% of R cation substitution. These
results are reminiscent of experimental data available in the literature and
demonstrate that DFT simulations without any empirical parameter are qualified
for studying doping effects in correlated oxides and to explore the mechanisms
underlying the superconducting phase of rare-earth nickelates.
