  We investigate relative stability, structural properties and electronic
structure of various modulated martensites of the magnetic shape memory alloy
Mn$_{2}$NiGa by means of density functional theory. We observe that the
instability in the high-temperature cubic structure first drives the system to
a structure where modulation shuffles with a period of six atomic planes are
taken into account. The driving mechanism for this instability is found to be
the nesting of the minority band Fermi surface, in a similar way as established
for the prototype system Ni$_{2}$MnGa. In agreement with experiments, we find
14M modulated structures with orthorhombic and monoclinic symmetries having
energies lower than other modulated phases with same symmetry. In addition, we
also find energetically favourable 10M modulated structures which have not been
observed experimentally for this system yet. The relative stability of various
martensites is explained in terms of changes in the electronic structures near
the Fermi level, affected mostly by the hybridisation of Ni and Mn states. Our
results indicate that the maximum achievable magnetic field-induced strain in
Mn$_{2}$NiGa would be larger than in Ni$_{2}$MnGa. However, the energy costs
for creating nanoscale adaptive twin boundaries are found to be one order of
magnitude higher than that in Ni$_{2}$MnGa.
