  In this work, we perform first principles DFT calculations to investigate the
interplay between magnetic and structural properties in Ni2MnGa. We demonstrate
that the relative stability of austenite (cubic) and non-modulated martensite
(tetragonal) phases depends critically on the magnetic interactions between Mn
atoms. While standard approximate DFT functionals stabilize the latter phase, a
more accurate treatment of electronic localization and magnetism, obtained with
DFT+U, suppresses the non-modulated tetragonal structure for the stoichiometric
compound, in better agreement with the experiments. We show that the Anderson
impurity model, with Mn atoms treated as magnetic impurities, can explain this
observation and that the fine balance between super-exchange RKKY type
interactions mediated by Ni d and Ga p orbitals determines the equilibrium
structure of the crystal. The Anderson model is also demonstrated to capture
the effect of the number of valence electrons per unit cell on the structural
properties, often used as an empirical parameter to tune the behavior of
Ni2MnGa based alloys. Finally, we show that off-stoichiometric compositions
with excess Mn promote transitions to a non-modulated tetragonal structure, in
agreement with experiments.
