  Transition metals implanted in single crystal MgO can precipitate out at
grain boundaries or remain embedded in bulk. Using first-principles
calculations based on density functional theory we have calculated the
thermodynamic stability and diffusion coefficients of the implanted ions to
explain Fe and Ni precipitation in MgO. Experimentally it has been observed
that some of the Fe atoms precipitate out, while few Fe atoms in 2+ and 3+
charge states remain embedded in the lattice. Our simulation shows that at 600
K (typical annealing temperature) while neutral iron in MgO would migrate 1
$\mu$m in few microseconds, it takes several years for the charged Fe ions to
migrate the same distance. On the other hand, Ni ions in all its charge states
(neutral, 1+, 2+, and 3+) would migrate 1 $\mu$m in just few microseconds, at
600 K. This explains the experimental observation that implanted Ni always
precipitates out. Our study paves a way forward to predict if ions implanted in
stable oxide will be stable or will precipitate out.
