Tuning the magnetic phase diagram of Ni-Mn-Ga by Cr and Co substitution

Ni-Mn-based Heusler alloys have a high technical potential related to a large change of magnetization at the structural phase transition. These alloys show a subtle dependence of magnetic properties and structural phase stability on composition and substitution by 3d elements and although they have been extensively investigated, there are still ambiguities in the published results and their interpretation. To shed light on the large spread of reported properties, we perform a comprehensive study by means of density functional theory calculations. We focus on Cr and Co co-substitution whose benefit has been predicted previously for the expensive Ni-Mn-In-based alloy and study the more abundant iso-electronic counterpart Ni-Mn-Ga. We observe that substituting Ni partially by Co and/or Cr enhances the magnetization of the Heusler alloy and at the same time reduces the structural transition temperature. Thereby, Cr turns out to be more efficient to stabilize the ferromagnetic alignment of the Mn spins by strong antiferromagnetic interactions between Mn and Cr atoms. In a second step, we study Cr on the other sublattices and observe that an increase in the structural transition temperature is possible, but depends critically on the short-range order of Mn and Cr atoms. Based on our results, we are able to estimate composition dependent magnetic phase diagrams. In particular, we demonstrate that neither the atomic configuration with the lowest energy nor the results based on the coherent potential approximation are representative for materials with a homogeneous distribution of atoms and we also predict a simple method for fast screening of different concentrations which can be viewed as a blueprint for the study of high entropy alloys. Our results help to explain the large variation of experimentally found materials properties.

All applications ask for a detailed understanding and control of the magnetic structure, its stability and its coupling to structural properties. In particular, large elastic and caloric responses are possible if the external magnetic field induces the structural phase transition. In these cases, a large change of magnetization ∆M and a large shift of the structural transition temperature T M with the field dT M /dH are beneficial. Another key point is that T M should be close to room temperature for many applications and a systematic way to manipulate T M is desired. Off-stoichiometric Heusler systems and their potential for applications is a very active field with many different facets. In particular, ab initio calculations are frequently used to understand and optimize Heusler alloys [5,[15][16][17][18][19]. It has been predicted that T M depends on the number of valence electrons per atom (e/a) and thus can be tuned by substitution with excess Mn [19][20][21][22], in accordance to experimental results for Ni 8 Mn 1−x Ga x (with x ≤ 0.25) [10,18]. The trends of T M with other substituents are still under debate. Experiments, as well as theoretical studies, show that Co substitution can work both ways and lead to an increase or decrease of T M [23][24][25]. For Mn substitution by Cr, the enhancement of T M contrary to the e/a trend has been observed in Ni-Mn-In [26], Ni 2 MnGa [27,28] and for small concentrations of Cr in Ni-Mn-Sb [29]. However, a large reduction of T M due to Cr, i.e. the decrease of e/a has been reported for Ni 8−x Cr x Mn 7.2 Sn 0.8 [30]. Recently, atomic ordering has been predicted as one of the sources of these discrepancies [31][32][33] and with the increasing complexity of the compounds, it became obvious that the preparation process plays a crucial role [34,35]. So far, the investigations are restricted to small Cr concentrations (a few atomic percent) since the limited solubility of Cr hinders the investigations of larger Cr concentrations. In Ni-Mn-In [36] and in Ni-Mn-Sb it was observed that the amount of a second (unwanted) γ-phase grows with increasing Cr concentration [30].
Another important fact is that, both atomic ordering and the formation of competing phases in Heusler alloys, strongly depend on the synthesizing route and the thermal treatment [35,37]. Recently, even the thermodynamic stability of the well-known off-stoichiometric Ni-Mn-(Ga,Sn,In) system has been refuted [38][39][40]. Therefore restricting the investigations to the ground state or the known phases on the Hull line does probably not allow to sample all relevant phases and atomic orderings of a real sample.
It has been shown that substitution has a large impact on the magnetic structure, in particular that compensation of ferromagnetic (FM) with antiferromagnetic (AF) interactions by substitution may enhance the change of the magnetization at T M [41]. Furthermore, Co is often added to improve the magnetic properties in view of a larger Curie temperature or an improved hysteretic behavior, i.e. Co is viewed to reduce the hysteresis loss which denotes the energy loss in form of heat during the magnetization process [23,42]. Here, we focus on the question of how one can optimize T M and the magnetic structure simultaneously by co-doping with elements which favour FM (Co) or AF (Cr) phases. Having two impurities which favor opposite magnetic trends opens up a large range of possible magnetic configurations and has a potentially large magnetocaloric effect if the magnetization (M) changes at the structural transition [22,43,44].
So far, large changes of magnetization have been predicted by means of ab initio simulations for Co/Cr co-substitution in Ni-Mn-In and Ni-Mn-Sn for 5% Co/Cr substitution and specific atomic ordering in [43,45]. A recent study [46] on Co/Ni and Cr/Mn substitution in Ni-Mn-(In,Sn) underlines the complexity of the system and poses new questions as non-linear trends between T M and Cr-concentration have been found for particular quasi-random structures. Experimentally, a paramagnetic or AF gap below T M has been observed in case of Cr substitution for Mn in Ni-Mn-In [26] and Ni-Mn-Sn [47].
It is worth to check the impact of Co/Cr substitution in the Ga sister compound, because compared to Sn, and particular In, Ga is cheap and far more abundant [48,49]. Neutron diffraction revealed that Co substitution may result in a complex magnetic ordering similar to Cr substitution and AF ordering in the low temperature martensite with different ordering temperatures for the Ni and Mn sublattices have been reported [50,51]. We note that such temperature dependent phenomena are beyond the scope of the present work. Some investigations for the Ga-based system have been made by Zagrebin et al. They have shown that if averaging over possible isomers is taken into account, Cr in Ni 8 Mn 2 Cr 2 Ga 4 [52] leads to ferrimagnetic and FM cubic and tetragonal phases, respectively. Furthermore, they have predicted that the structural transition temperature in Ni 2 Mn 1−x Cr x Ga increases with x [53]. However, the influence of excess Mn as well as the effect of Co co-doping have to our knowledge not been studied so far. In order to close this gap, we discuss the influence of atomic structure and ordering on the relative energies of different magnetic phases in Ga-based Heusler alloys and depict concentration ranges allowing for large changes of magnetization during a structural phase transition. In particular, we discuss how replacing atoms by Cr and Co impurities affects the magnetic structure, the stability of the tetragonal phase, and the strength of the magneto-structural coupling. For functional responses, e.g. caloric response, materials with large changes in magnetization and/or structure at a given temperature are of special interest. In order to depict such systems or regions in the phase diagram, it is of eminent importance to consider also the impact of the substituents on T M . The paper is organized as follows: after the computational details are given in section 2, we present the impact of Cr substitution on the Ni sublattice in section 3.1 and on the Mn sublattice in section 3.2. In both cases Co impurities on the Ni sublattice have been taken into consideration. Based on the findings in sections 3.1 and 3.2 structural and magnetic phase diagrams are extrapolated and discussed in section 3.3. Conclusions and outlook are given in section 4. Detailed information on lattice constants and energy differences are summarized in the appendix.

Computational details
The calculations of the total energy and the atomic relaxation have been performed self-consistently with the plane wave pseudopotential code VASP [55]. Projector augmented wave potentials [56] treating Ga 4s 2 4p 1 3d 10 , Mn 3p 6 3d 5 4s 2 , Ni 3p 6 3d 8 4s 2 , Co 3d 8 4s 1 [57], and Cr 3p 6 3d 5 4s 1 states as valence have been employed in combination with the generalized gradient approximation of Perdew, Burke, and Ernzerhof [58]. For static simulations and relaxation of the ions we utilize the tetrahedron method [59] and smearing with the Methfessel-Paxton method of the electronic states of 0.1 eV, respectively, in combination with an energy cutoff of 460 eV, an energy convergence of 10 −7 eV, and for the ionic relaxation the cutoff criterion was chosen as 10 −5 eV. The k-mesh has been constructed with the Monkhorst-Pack scheme [60] with a 8×8×8 k-points mesh. Test results for larger meshes gave changes in the range of 0.3 meV f.u. −1 , i.e. per formula unit, which corresponds to 4 atoms in the case of the Heusler alloys. Local magnetic moments were obtained by projecting the wave functions onto spherical harmonics within spheres of 1.22, 1.32, 1.06, 1.32, and 1.30 Å for Ga, Mn, Ni, Cr and Co atoms, respectively. Since consideration of non-collinear magnetic structures does not only increase the numerical effort by a multiple, but would also overlap with the relation between impurity concentration and position and the magnetic phase, we restrict our study to collinear spin arrangements.
Substitution lowers symmetry and introduces disorder through the different local arrangements of atoms. For each concentration we consider all possible short-range atomic arrangements (isomers) up to a distance of about 10 Å using simulation cells of 16 atoms, see figures 1 and 11. Note that Mn on the Y sublattice is denoted as Mn Y while the excess Mn on the Z sublattice is named Mn Z throughout this work. First, volume and atomic positions of the cubic phases have been optimized for each configuration and magnetic state. Subsequent static simulations are used to sample the energy landscape under tetragonal distortion [61]. Our calculations show that the energy differences between different isomers can be quite small so that it is questionable whether the most stable configuration determined for T = 0 K is the only relevant geometry at elevated temperatures. These small energy differences hint that all configurations may be relevant to a certain extent. Therefore, we consider not only the lowest configuration but use a homogeneous average over all possible configurations in our unit cell. We determine the energies for a   [54], and up to four different magnetic variants (uu, ud, du, dd) are given by the relative alignment of Mn Z and Cr spins. Ga is non-magnetic and not included. homogeneous distribution of atoms on the sublattices by averaging the energies of all isomers and weighting them with the number of possible realizations in our simulation cell, see table 1. In the case of tetragonal distortions we also take the different relative alignment of the bonds and the tetragonal axis into account, see detailed discussion in section 3.3. The obtained lattice parameters have been furthermore used to determine the pairwise magnetic exchange parameters (J ij ) using Liechtenstein's formula [62] as implemented in the Munich SPRKKR code [63,64]. These calculations have been performed within the coherent potential approximation (CPA), using lattice constants which have been averaged over all isomers obtained from our VASP calculations. The calculations have been performed in the scalar relativistic mode employing the same exchange-correlation functional as for the VASP calculations. The orbital expansion was set to l max = 4 and at least 32 3 k-points were used for the derivation of the exchange parameters.

Discussion and results
In Ni-Mn-Ga samples, typically the Ni sublattice has a high degree of ordering while the preparation details determine whether the Mn/Ga sublattices are fully disordered (B2) or ordered (L2 1 ) [65]. If not stated otherwise, we refer to the ordered phase throughout the paper. The L2 1 structure of Ni 2 MnGa can be understood in terms of four staggered sublattices with the full point symmetry O h of the cubic lattice, see figure 1. Two of the sublattices are occupied by Ni (denoted as X-lattice), one sublattice is occupied by Mn atoms (denoted as Y lattice). The fourth sublattice (denoted as Z lattice) is occupied by the nonmagnetic main group element Ga. In a preparatory first step, one Ga atom is replaced by an extra Mn z atom, assuming an otherwise perfect L2 1 ordering (Ni 8 Mn 5 Ga 3 ). Previous studies have shown that the excess Mn drives T M closer to room temperature and that complex magnetic martensitic phases such as 14 M can be avoided, see phase diagram in reference [66]. It has been further discussed in literature that Co tends to occupy Ni positions [31,67,68] whereas different Cr positions may be possible depending on processing conditions [44,69]. The framework for our investigation are the three alloys Ni 8−x1−x2 Co x1 Cr x2 Mn 5 Ga 3 (section 3.1), Ni 8−x1 Co x1 Mn 5−y Cr y Ga 3 and Ni 8−x1 Co x1 Mn 5−y Cr z Ga 3 (section 3.2).
The relevant magnetic structures are summarized in figure 1(d): the spins of Ni, Co, and Mn Y atoms are always aligned in parallel and define the FM background of the alloy while the Ga atoms are basically non-magnetic and can be neglected. Against this background, the magnetic alignment of Mn z and Cr define up to four (meta)-stable magnetic variants uu, ud, du, dd. Here we use the nomenclature u (d) for FM (AF) aligned spins where the first character corresponds to the orientation of the Mn Z spin relative to the FM background.
For ordered Ni 8 Mn 5 Ga 3 , we find the tetragonal phase with c/a = 1.3 to be 75 meV f.u. −1 lower in energy than the cubic phase. As discussed in literature the cubic phase is stabilized at high temperatures by entropy and this energy difference, translated via ∆E = Nk B T E , with N being the number of atoms, and the Boltzmann constant k B , gives a rough estimate of the transition temperature T M [15]. Using this approximation for Ni 8 Mn 5 Ga 3 we obtain a transition temperature of about 218 K which is in fairly good agreement with the findings by Gruner et al [15]. Deviations in absolute values may arise from different structure optimization techniques. In both phases, the d configuration is lower in energy than the u alignment of all spins in accordance with previous experimental and theoretical findings [31,70]. This can be understood in terms of the AF coupling between Mn y and Mn z nearest neighbours, see blue diamonds in figure 2.  Starting from ordered Ni 8 Mn 5 Ga 3 , we replace up to two Ni atoms with Cr x or Co x (x = 1, 2). In all cases, the magnetic moments depend only weakly on the structure and the Co and Cr spins are parallel and antiparallel to the background for all configurations. Thus, two different magnetic phases with FM Mn Z (u) and AF Mn Z (d) can be distinguished. Before we discuss the systematic trends with substitution, it is important to understand the impact of atomic ordering on the material properties. For convenience we first focus on disorder effects among magnetic ions, i.e. Mn-Cr or Mn-Co, and discuss the minor influence of Mn-Ga ordering afterwards.
For x = 1 the atoms on the X-lattice have one Mn Z and four Mn Y nearest neighbours along the space diagonals with a distance of √ 3a/4, see figure 1(b). If two Ni atoms are replaced, three different nearest-neighbour configurations (isomers) can be realized, which are characterized by the spatial relationship of both substituting atoms, see table 1. In the latter cases one furthermore may distinguish tetragonal strain along or perpendicular to the connection line of both substituents. By way of example, the energy variation with tetragonal distortion of Cr 1 Co 1 is illustrated in figure 3(a) and all energy curves are provided in figure 12. For all cases, we find isomer 1 to be lowest in energy. This isomer is also lowest in symmetry and thus the largest atomic relaxations occur. However, the energy differences between isomers in the cubic phase are usually not exceeding 25 meV f.u. −1 [71], i.e. an energy difference which is rarely relevant for the ordering of atoms during the sample preparation at several hundreds Kelvin. The energy curve of the most favourable configuration, isomer 1 with the Cr-Co bond along the tetragonal axis, deviates considerably from the mean energies for a homogeneous distribution of atoms (shaded areas) marked as separate lines in figure 3(a), but has Colours encode the magnetic state of Mn Z u (blue) and d (red) and symbols encode stoichiometry: triangles: a low impact due to its low probability of realization (1:7), see table 1. Except for the single outlier with the bond along the tetragonal axis, the overall trend, i.e. shape of the c/a variation and energy differences, shows a similar behaviour for all cases despite different Co-Cr distances, see table 1. Considering the limited solubility of Cr in these systems [36], larger Cr concentrations have been excluded from our study. Figure 3(b) summarizes the results for different concentrations of Co/Cr substituents for a homogeneous distribution. In the cubic phase, Cr and/or Co impurities in the Ni sub-lattice tend to stabilize the FM alignment of the Mn z atoms and thus lead to an increase of the magnetization. Hereby, Cr is more efficient in stabilizing the FM Mn Y -Mn Z configuration, as can be seen in the ordering of ∆E. For one Co atom, u and d states are of the same energy in agreement to previous work [72], but ∆E increases to about 21, 50, 71, and 92 meV f.u. −1 for Co 2 , Cr 1 , Cr 1 /Co 1 , and Cr 2 , respectively. In the u state, the magnetization is larger in case of Co substitution as each Ni moment (0.3-0.4 µ B ) is replaced by a moment of about 1.0 µ B /atom and of about −2 µ B for Co and Cr substitution, respectively.
The underlying mechanism for the stabilization of the u phase by Cr and Co is different, as can be understood by means of the magnetic exchange interactions, see figure 2. On the one hand, Co adds FM couplings by the direct FM Co-Mn exchange (green circles), exceeding the FM Ni-Mn exchange (open black circles) roughly by a factor of two. Though the size of the Co-Mn coupling does not change within our concentration range, the number of couplings does. That means with increasing amount of Co, the FM alignment of Mn spins becomes slightly more favourable, for a detailed discussion see section 3.2. On the other hand, Cr induces large AF Cr-Mn couplings (filled purple circles), which exceed the Mn Y -Mn Z (blue diamonds) couplings roughly by a factor of four. Already for one Cr-atom in the simulation cell, five Cr-Mn pairs (compared to 4 Mn Y -Mn Z ) exist and thus the AF Mn Y -Mn Z interaction is frustrated and Mn spins align parallel to each other to optimize their alignment with Cr.
If one of eight Ni atoms is substituted, the mean energetic ground state is tetragonal with T E ≈ 46 K and T E ≈ 96 K for Cr and Co substitution, respectively. These trends of the structural transition temperature qualitatively agree with experimental findings for Ni 8−x Co x Mn 5 Ga 3 [23], showing a significant decrease of T E with x (x = 0 : 376 K and x = 1.1: 182 K). The larger reduction of T E with Cr is in line with the larger reduction of the number of electrons per atom (e/a) with Cr rather than Co substitution. Indeed, for one Cr the value of e/a = 7.5 corresponds to the value of Ni 2 MnGa, for which a similar T E of about 90 K has been predicted [66]. For two out of eight substituents, the cubic phase with Mn u always is the global minimum of the mean energy, while remnants of the tetragonal minima around c/a = 1.2 at lower level of substitution can only be found as extrema of higher order. For pure Co substitution, we observe the systematic trend in accordance with e/a when going to 2 dopants. Importantly, the distribution of atoms plays an equally important role for the relative energies of cubic and tetragonal phases. Thus, states with low but finite T E , shown for figure 4, occur for single orientations of ordered isomers, e.g. in case of x 1 = x 2 = 1 (one Co and one Cr impurity), only the configuration isomer 1 with both substituents aligned along the tetragonal axis has a small tetragonal minimum at c/a = 1.04. The same holds for the case of two Co impurities. This effect averages out assuming that in a real sample all configurations exist to a certain extent. The impact of atomic ordering is even more important for the case of two Cr atoms. In this case, all three isomers show a tetragonal minimum for specific directions of the tetragonal axis which would result in a finite T E , see figure 4. But again, their weight is not sufficient to keep the minimum for a random distribution of substituents and more than one impurity on the Ni lattice destroys the phase transition unless the method of synthesis favours specific isomers, in this case isomer 2 with Cr-Cr bonds along the tetragonal axis as well as isomer 3. With an experimental method which allows for a selective synthesis, the system with Cr impurities bears the potential for a reasonable T E .
To summarize, replacing Ni by Cr and/or Co reduces e/a and T E drops to lower temperatures or vanishes completely, as is commonly expected. This is in full agreement to previous observations on Ni 50 Mn 37 In 13 where Cr on Ni reduces T M and, except for very small impurity concentrations, this substitution reduces the total entropy change at the structural transition temperature T M [69]. However, this holds only if we average over all possible isomers and orientations. In all cases, impurities reduce e/a compared to Ni 8 Mn 5 Ga 3 , but though the e/a for Ni 7 CrMn 5 Ga 3 is larger then for Ni 6 Cr 2 Mn 5 Ga 3 , the latter has configurations with significantly higher T E , see figure 4. One possible explanation could be that structural changes depend not only on the electronic structure, but also on the magnetic interactions. Especially the strong Mn-Cr interaction might play a role here.

Ni 8−x1 Cox 1 Mn 5−y CryGa 3 : substituting Cr for Mn and Co for Ni
As shown in the previous section, substituting Ni by Cr either reduces T E significantly or the tetragonal ground state vanishes completely already for a moderate concentration of substituents. In the next step, Cr impurities occupying the other sublattices are investigated in order to understand the impact of Cr-Mn and Mn-Mn distances on the structural and magnetic properties. Experimentally, Sharma et al found an increase of the structural phase transition temperature, an increase of AF couplings and the change of the magnetic moment at T E , if Cr replaces Mn in the In-based alloy [44]. They argue that the smaller size of Cr will cause a positive pressure in the system and thus reduce the Mn-Mn distances, which results in such preferable properties. Because our Ga-Heusler alloy is iso-electronic to the In system, we test whether a similar improvement is possible and whether the assumed mechanism is still valid if the smaller Ga is used instead of In.
In the following we discuss the stoichiometry Ni 8−x Co x Mn 4 CrGa 3 . Replacing Mn for Cr, leaves us with two possible scenarios, since Cr can occupy a regular Mn site (Y lattice) or replace the excess Mn on the Z lattice. In our simulation cell this can be realized with two Cr Y isomers and one Cr Z configuration, see figure 1 and table 1. Figure 5(a) illustrates the mean energy curves (lines with symbols) and the range of energies for different isomers (shaded areas) for Mn Y while figure 5(b) shows the single realization for Mn Z . In analogy to the discussion in the previous section, we construct the mean energy by averaging over the energies of all structures weighted with their probabilities, see table 1. For Cr Y all four possible magnetic states (dd: are at least metastable and Cr Z spins may align u and d. For the cubic phase the energy differences of all spin structures are below 25 meV f.u. −1 for Cr Y , while the anti-parallel alignment of Cr Z is about 60 meV f.u. −1 more favourable. Under tetragonal distortion, the energy differences between the magnetic phases increase. For a fixed stoichiometry, the tetragonal Cr Z d phase is lowest in energy and the tetragonal du phase is the most favourable Cr Y phase. For all distributions of Cr, the Mn-Mn and Mn-Cr interactions between different sublattices increase in the x-y plane and dominate the tetragonal phase, although the interactions along z-axis become FM with tetragonal distortion. One may speculate that the reduction of T E with increasing disorder, i.e. going from Cr Z to Cr Y and probably to B2, may be related to the increasing frustration, as more and more AF interactions occur already in the cubic phase (figures 6(a)-(c)) and are even stronger in the tetragonal phase (figures 6(c) and (e)).
As discussed in section 3.1, additional Co impurities on the Ni lattice are taken into account since this element will most likely be added in experimental realizations to avoid hysteresis losses and other effects which reduce the magnetic performance in such Heusler alloys at finite temperatures [42]. In the following, we discuss the influence of additional doping with Co X using the stoichiometry Ni 7 CoMn 4 CrGa 3 as example, see figure 1. In case of Cr Z , one may expect that Co X substitution successively stabilizes the u phase, however, due to the rather large energy difference between both phases, we expect that larger Co concentrations are needed to stabilize the u state, but which are most likely not showing any tetragonal distortion anymore. Therefore, we restrict the discussion to the complex magnetic phases of Cr Y . For Co 1 , one of the nearest Ni-Cr neighbours is replaced and all possible Co sites of isomers (a) and (b) have the same symmetry. In the case of two Co atoms, we reduce the large configurational space of possible isomers and consider only the Co-Co distribution with the highest symmetry (isomer 3 in the last section) for isomers (a) and (b). This is justified by the small impact of the Co-Co distribution on the energies and the magnetic phases discussed in the previous section, see also figure 12.
Adding one Co X atom to the Cr Y system does not alter the most favourable magnetic state for any value of c/a (du state). However, for the cubic phase uu and du are nearly degenerated and at the tetragonal minimum the dd phase becomes low in energy, see figure 5(c). These trends continue with increasing Co concentration, as the uu phase is now most favourable for the cubic structure for Co 2 while du and dd are degenerate and correspond to the local energy minimum, around c/a ≈ 1.25 in this case. Thus, with an increasing amount of Co, the preference for parallel spin alignments (dd, uu) between Cr and excess Mn grows successively. To understand the role of Co impurities on the magnetic properties, we compare the exchange parameters J ij for the Co free system Ni 8 Mn 4 CrGa 3 (figures 6(c) and (e)) to the system with 1 (cf (d) and (f)) and 2 (not shown) of all Ni atoms replaced by Co. First, the Mn Y -Mn Z and Cr Y -Mn Z interactions are barely modified by Co addition, making the du and dd phases the most favourable cubic state for low Co concentrations. Second, the discussed increase of the overall AF interactions in the tetragonal phase is independent from the Co concentration (compare figures 6(c) and (e) with (d) and (f)). Considering the existence of a plethora of magnetic phases, isomers, and competing interactions, a frustrated magnetism at low temperatures seems very likely. Third, Co successively stabilizes the cubic uu phase by a FM coupling between Co and Mn of about +10.4 meV. Fourth, the Cr-Co interaction is negligible in the cubic phase, but induces additional AF interactions under tetragonal strain, thus stabilizing the dd state with an increasing number of Co atoms.
Similar trends have been found for Ni 7.2 Co 0.8 Mn 5.9 In 2.1 [43]. However, a slightly higher Co-Mn coupling (18 meV) as well as FM and negligible Co-Cr couplings for cubic and tetragonal state, respectively, stabilize the uu/dd t states already for a smaller Co concentration in the In system. These differences could partially be related to the smaller volume in the Ga case, but one should also note that the ratio of Mn/Ga atoms is different which may considerably modify the couplings. In particular the missing additional FM couplings and the fact that the Co-Mn couplings in the cubic phases are about 20% smaller in the Ga system compared to the In system (see [43]), might hinder the increase of T C which is otherwise observed for Co impurities.
Importantly, the impact of atomic ordering on magnetic exchange interactions and energy differences between magnetic and structural phases underlines the failure of the simple discussion of T E in terms of the number of electrons per atom. Although there is some arbitrariness in the definition of T E the results show that the stability of the tetragonal phase is strongly correlated with Cr-Mn and Mn-Mn distances in the system, depending not only on the stoichiometry but also on the atomic ordering. Taking the case of Ni 8 CrMn 4 Ga 3 , where a single Mn atom has been replaced by Cr, there it comes with a plethora of possible configurations which all lead to different T E . For Cr on the Mn sublattice, T E would increase by about 55 K compared to the Cr free-case Ni 8 Mn 5 Ga 3 for isomer (a), while a realization of isomer (b) would reduce the temperature to only 90 K [74]. As discussed before in experiment, depending on the synthesis or growth process, it is very likely that both isomers occur, i.e. Cr is homogeneously distributed on the Y lattice, which would lead to T E = 196 K (including the different weight of isomer a and b). So the temperature seems to decrease slightly with e/a. However, taking into account that Cr could replace Mn on the Z lattice, changes the picture. Cr on the Z lattice stabilizes the tetragonal phase and would push T E to 305 K. Including this in the homogeneous average, T E increases to 286 K, see figure 7. This is in contrast to the common trend of T E increasing with e/a but agrees with experimental observations for Cr substituting Mn in Ni 50 Mn 33.66 Cr 0.34 In 16 [44]. It thus becomes obvious that looking at a single isomer or a single orientation in theoretical investigations can again be misleading. Though isomer (a) follows the trend of the homogeneous average, isomer (b) shows a slight increase of T E in case of Co 1 [75], however since this configuration has a low weight it does not influence the overall trend.
Despite the fact that the exact values of T E depend on which configurations are considered and whether we average over different configurations, the calculations reveal trends in T E depending on the impurity atoms, see figure 7. Cr has the tendency to increase the transition temperature, whereas adding additional Co on the Ni lattice results in the reduction of T E , i.e. the same trends as discussed in section 3.1, see figure 7. A destabilization of the tetragonal phase is observed for all configurations in both isomers with T E . If 12.5% of the Ni atoms have been replaced by Co, T E decreases to 111 K for a homogeneous distribution of Cr on the Y lattice (Cr on Ga has not been considered in combination with Co impurities) and almost vanishes for 25% of Co.
In agreement with the experimental findings by Sharma [44], we find stable T E for substitution of Mn by Cr and an increase of the overall AF coupling. Sharma et al conclude that the changing Mn-Mn distances due to Cr outweighs the electronic effect due to the decreasing number of valence electrons. However, in our system, the overall lattice constant is rarely modified for small concentrations of Cr on the Y lattice, i.e. Cr only acts as internal pressure if (partly) sitting on the Z lattice, see tables of 2 and 3. Internal pressure is thus less important than predicted in the case of In, possibly because the Ga ion is more similar in size to the transition metals than In. However, our calculations reveal that the number of Cr-Mn and Mn-Mn pairs is the determining factor for T E in the Ga alloy whereby the Cr-Mn interactions are as important as the pure Mn couplings.
In summary, substitution of Cr for Mn allows to modify the magnetic structure of the alloy while keeping a proper T E for applications and might allow to stabilize a large jump of the magnetization from an AF tetragonal phase to FM (uu) cubic phase. But, AF couplings are still present in the cubic phase and depending on atomic ordering (isomers) ud or dd are more stable.

Phase diagrams
In order to maximize the change of the magnetization at T E and at the same time keeping T E large and avoiding the miscible limit for the case of Cr asks for fine tuning the concentration of dopants. It turned out that the determination of the energy differences between the magnetic phases in doped Heusler system is quite challenging for smaller Co/Cr concentrations. The CPA approach would usually be the preferred choice to study small changes in the concentration of dopants. However, it has been shown, e.g. in reference [25], and confirmed by test calculations within the present work, that the energy differences between magnetic phases are not well described by this approach due to missing atomic relaxation and the impact of the short-range structure. In order to avoid computationally heavy simulations of different isomers in larger supercells, we instead use the energies found for the chosen system size in combination with linear interpolation to construct approximate phase diagrams for the homogeneous distribution of atoms on the sublattice and for specific isomers. Thereby, we focus separately on cubic and tetragonal states. For those configurations, where the energy does not show a minimum for c/a > 1, we use higher order extrema which are still present in our data as remainders of the local minima of the Co/Cr free parent system. Figure 8 illustrates the linear interpolation for the example of Cr X substitution and a collection of all interpolations can be found in the appendix (figures 14 and 15). We use the cubic u state as reference and plot the energy differences for cubic d (red) and tetragonal u (green) and down (orange) states. As mentioned before, the Cr spins are always aligned AF to the FM background in case of substitution for Ni. Without Cr (x = 0) the magnetic d states are most favourable. However, their energies increase relative to the reference state with x, and for x ≈ 0.2 and 0.8 we observe a transition to the u states being lower in energy for the cubic and tetragonal phase, respectively. It is important to note that this is a rather rough estimate, only meant to narrow down interesting concentration ranges for further studies. We do not expect any quantitative predictive power from such a simple approximation. For example, extending the interpolation to the range between x = 0 and x = 2 would change the stability range by about 0.2 for the Cr case. Fortunately, the linear interpolation between two data points also yields a good estimate of the third data point if available in case of Co substitution.
The resulting approximate phase diagrams for Ni 8−y Cr x Co y Mn 5−x Cr x Ga 3 are shown in figure 9. There, black stars mark concentrations for which explicit simulations have been performed and background colours indicate the magnetic phase with the lowest interpolated energy. Without Cr and/or Co impurities, the cubic structure favours the d phase with a magnetic moment of 3.1 µ B . With the substitution of Ni by Cr and Co, the Mn u state becomes favourable, see figure 9(a). As discussed based on the magnetic interactions, more than 1 Co atom is needed to stabilize the FM state while 0.2 Cr are sufficient. Figure 9(b) illustrates which state is most favourable at T = 0 K within our simulations. The tetragonal state is no longer stable for large Co/Cr concentrations, and the stability range of the d phase is larger in the tetragonal than in the cubic state. Finally, these two diagrams are superimposed in figure 9(c). For area (I) and (I b ), a structural transition at finite temperatures can be expected, however both phases share the same magnetic ground state, i.e. the change in magnetization between both structures is smaller than 0.6 µ B f.u. −1 In area (II) the largest changes in magnetization are likely, since here a transition from cubic u to tetragonal d is favourable and for all investigated systems the difference of the total moment between the d and u solution is about 2 µ B f.u. −1 In area (III), i.e. large Cr and Co concentrations, the ground state at T = 0 K is already cubic. Unfortunately, region (II) is restricted to a small range of Cr concentrations, challenging its experimental realization. Although the magnetic states are less sensitive to the Co concentration, T E is drastically reduced and thus also the Co concentration needs to be adjusted carefully.
In the same way, the phase diagrams for Co X and a homogeneous distribution of Cr on the Y-lattice are illustrated in figures 10(a)-(c). It has to be noted that one cannot distinguish between Cr u and d states without Cr and thus the choice of the ground state for small Cr concentration is not well defined. For the cubic structure (figure 10(a)), the du and uu phases are most favourable for Co concentrations below and above 1, respectively. The ground state at T = 0 K is given in figure 10(b). For concentrations below the line Co 1.5 Cr 0 -Co 2 Cr 1 , the tetragonal du t phase is found to be stable whereas no phase transition is likely for higher concentrations of substituents. Extrapolation to higher Cr concentrations (not shown) hints to a change from du to ud phase in agreement to the findings for Ni 8 Mn 2 Cr 2 Ga 4 by Zagrebin et al [52]. This is plausible considering the fact that Mn Y -Mn Z and Cr-Mn pairs stabilize AF Mn Z or AF Cr alignment, respectively, and their number decrease and increase with Cr concentration. Finally, the combined diagram in figure 10(c) allows to distinguish three different regions: in region (I), i.e. for low Co concentration, a structural phase transition within the du state is the most likely scenario (∆M ≈ 0.3µ B f.u. −1 ). In region (II) the magnetic ground state changes from uu to du t during the structural transition (∆M ≈ 2.5µ B f.u. −1 ), and in region (III), i.e. for high Co concentration, the phase transition is unlikely. Thus, the largest jump of the magnetization and largest T E can be Note that the legends show only the relative orientation of Mn Z spins, Cr is always d and not added in the notation. expected for Co concentrations slightly above 1 in combination with a finite substitution of Cr for Mn.
The stability of magnetic phases is rather insensitive to small changes of Co/Cr concentrations. However the phase diagram changes drastically if we assume that a specific atomic ordering could be stabilized, as shown for the isomer and tetragonal direction with lowest energy in figures 10(d)-(f). In this case, the favourable cubic phase for large Cr and small Co concentrations is dd with the smallest magnetic moment of 1.2 µ B f.u. −1 , see figure 10(d). Furthermore, a finite T E is possible in the whole Co/Cr concentration range and for large concentrations of Cr and Co the ud t phase is lower in energy rather than the du t phase found for smaller concentrations of dopants or in case of the homogeneous distribution, cf subfigure (e). In turn also the combined phase diagram for this specific atomic distribution differs considerably from its counterpart for homogeneous distributions, see subfigures (c) and (f). The concentration range (I) with du c to du t transition is reduced and one may depict region (I a ) with a slightly larger change of M ≈ 0.5µ B f.u. −1 , given by a du c to ud t transition. Furthermore, for high Co and Cr concentrations (range II a ) the potential jump of magnetization is reduced from 2.5 µ B f.u. −1 to 1.8 µ B f.u. −1 for uu to ud t transition and in the lower right corner of the diagram (region II b ) we find a dd to du t transition with ∆M = 1.5 µ B f.u. −1 Interestingly in the latter two cases, the magnetization of the tetragonal phase is potentially larger than the magnetization in the cubic phase.
The phase diagrams in figure 10 are restricted to Cr Y since results for Cr Z only exist for the Co-free system. However, the inclusion of Cr Z in the homogeneous solution would probably further stabilize the ud t solution found for Cr Y and high Co/Cr concentrations. Between averaging over all isomers or using only the most stable isomer, one might also think of different scenarios reflecting the experimental realization of different weights of the atomic positions. For example the assumption of a homogeneous distribution of Cr atoms on the Y-lattice in the cubic phase and an increase of the weight of the E(c/a) branches lowest in energy could be realistic and could result in a transition with ∆M ≈ 4 µ B f.u. −1 between cubic uu and tetragonal dd t phase for small Co concentrations. This magnetization jump would exceed the ones observed in figure 10, however it would require a targeted stabilization of certain atomic orderings.
For Ni 7 Co 1 Mn 5 Cr 1 In 2 a large change of magnetization between cubic uu and dd t state has been predicted for a favourable large value of T E [45] which we cannot find for Ni 7 Co 1 Mn 4 Cr 1 Ga 3 . This prediction was however based only on the one isomer and tetragonal direction with lowest energy, and was thus not representative for the alloy prepared with standard synthesis conditions at high temperatures due to the small energy differences between the atomic orderings. Following the same procedure, we would find a transition from du to dd t for Co 1 and from uu to dd t for Co 2 also for our system. In conclusion, both Cr and Co substitution have a large impact on the stability of structural and magnetic phases. Importantly, the details of the atomic distribution thereby outperform small changes in the Mn concentration or the choice of the Z element.

Conclusions and outlook
Aiming for compositions which provide a large change of the magnetization (∆M) at a structural phase transition around ambient temperatures and which are thus promising for magnetocaloric applications, we studied co-doping Cr/Co in Mnrich Heusler compounds. Promising results have already been reported for this alloy family and it seems natural to replace the expensive In by the isoelectronic more abundant Ga. Therefore, we explored the magnetic structure as well as the transition temperature of its structural phase transition of Ni-Mn-Ga co-doped with Cr/Co, by means of ab initio simulations.
Our study based on simulation cells with 16 atoms and different atomic orderings underlines the importance of taking different isomers into account for such a highly frustrated system. Neither the lowest-energy configurations nor the results based on the CPA are representative for the trends found for a homogeneous distribution of atoms, which is more likely for most production processes due to the small energy differences between different isomers. This has to be considered to interpret reported values of transition temperatures and changes in magnetization based on density functional theory. Furthermore, the strong dependence of magnetic phases and tetragonal minimia on the atomic ordering has important consequences for the interpretation of experimental results: depending on exact process conditions, e.g. quenching rates, the local atomic ordering may be dominated by B2 or by L2 1 order . Furthermore, the energetically most favourable isomer may have a higher weight and therefore dominate the systems properties either globally or locally. All scenarios result in different transition temperatures and different magnetic ground states, even for perfect stoichiometry of the sample, a fact which may also contribute to the thermal hysteresis of the transition.
The simple method used here opens also a route to handle complex multicomponent systems, such as high entropy alloys in a similar scheme by using relatively small unit cells and building homogeneous configuration by averaging over many configurations.
For Mn-rich Ni-Mn-Ga we find that both Cr and Co stabilize a full FM alignment of Mn spins and can thus potentially stabilize a large magnetization in the cubic structure. However, both dopants have advantages and disadvantages regarding the tuning of ∆M and T E . In case of Co, the induced additional FM interactions are rather weak and Co tends to reduce the structural transition temperature T E . Cr instead imposes large AF interactions which already stabilize the FM alignment of Mn for low concentrations while introducing frustration into the system. In particular in case of the tetragonal phase, the high level of frustration most likely leads to non-collinear spin structures or at least low T C for an ordered magnetic phase. In addition, we observe that the frustration of the magnetic system increases with the Cr concentration and for a more quantified understanding it might be illuminating-although beyond the scope of the present paper-to scan the Cr rich region with Monte-Carlo simulations of the Heisenberg model; with magnetic exchange interactions taken from density functional theory simulations to study its magnetic structure in more detail.
In order to narrow down concentration ranges of interest, we have constructed approximate phase diagrams which can serve as a starting point for further systematic simulations in larger simulation cells and experiment. The largest magnetization changes at the phase transition in case of the substitution of Ni by Cr/Co (X lattice) are likely in case of 6% by Cr and 0%-19% by Co. All other concentrations have transitions with a small change of the magnetization or show no phase transition at all. Differently than for Ni 7.2 Co 0.8 Mn 5.9 In 2.1 with Cr substitution, for which a transition between the uu cubic phase and the du t or dd t phases with maximal ∆M has been predicted [43], for the Mn-Ga system, the largest magnetization jump occurs only from uu to du t (about 2.5 µ B f.u. −1 ) for the homogeneous distribution of Cr on the Y lattice, whereas no stable dd t state is observed. Although co-substitution with Co on the X lattice and Cr on the Y lattice reduces the energy of this state relative to the other magnetic phases, the structural phase transition is probably suppressed already for smaller concentrations of dopants. In summary, large changes of the magnetization at the structural phase transition are likely in the co-doped Ni-Mn-Ga system making this material interesting for applications in the predicted concentration ranges. However the maximal change of magnetization between the ordered magnetic phases are smaller than previous reports on In in literature.

Data availability statement
The data that support the findings of this study are available upon reasonable request from the authors.  Collection of magnetic moments (M) and energy differences between magnetic states and structural phases for all isomers of Ni 8−x−y CrxCoyMn 5 Ga 3 . Energies are given relative to the state with the highest moment at c/a = 1 and are also converted to an approximate transition temperature, T E . Indices t refer to tetragonal structures and for isomers with two relative alignments between the characteristic bond and the tetragonal axis, first the values for perpendicular orientation are given.        cell. The expression for averaging the energy for two substituents on the X lattice is then: E mean = (E 1,|| + 2 * E 1,⊥ + E 2,⊥ + 2 * E 2,|| + E 3 )/7 . (1) and for Cr on Mn: One may also consider the homogeneous distribution of Cr on Y and Z lattice. Keeping the stoichiometry of Ni 8 Mn 4 CrGa, the mean energy in this case amounts to: with E Z the energy of the configuration with Cr on one of the four degenerated Ga positions. Finally, figures 14 and 15 illustrate in more detail how the phase diagrams have been constructed. First, we plot the energy differences of all magnetic states for cubic and tetragonal phases relative to the cubic uu (or if not stable ud) state in dependency of Cr and Co concentrations. Hereby, the mean energies of all relevant isomers are used and if the tetragonal phase is no longer stable, we instead use the energy of the remanent extrema of higher order. Second, linear interpolation between the data points for x = 0 and x = 1 is used for an approximate determination of stability ranges. The crossings of the interpolations are used to assign the stability ranges of the different magnetic states for the cubic structure and the energetic ground state at 0 K.
For Co substitution on the X lattice, we find that if three data points exist they are following this linear trend. For Cr on the X sublattice, the energy difference is not fully linear for d and d t . The deviations of the data points for x = 2 from the linear fit (made from data for x = 0 and 1) are about 25 meV f.u. −1 However, this has minor influence on the results and no change in the order of the phases is observed.

Appendix C. Magnetic background
In our manuscript we assume that the spins in Ni, Mn Y and Co sublattices always align parallel to each other. This assumption is justified by the FM exchange interactions between Mn Y and Co or Ni. We furthermore tested different alignments of the sublattice magnetization in random samples and systematically for all isomers of Ni 6 CoCrMn 5 Ga 3 in the cubic and tetragonal structures. In all these cases, the configuration with antiparallel Mn Y and Co or Ni magnetization are not stable already during static simulations at T = 0 K and result in one of magnetic structures included in our manuscript.

Appendix D. Magnetic exchange interactions
To demonstrate the effect of the exchange correlation potential on the magnetic properties, we compare our CPA-KKR results obtained by PBE to calculations using the Vosko-Wilk-Nussair functional [76]. As examples, table 4 and figure 16 compare the obtained magnetic moments and J ij for Ni 7 CoMn 4 CrGa 3 and Ni 6 CoCrMn 5 Ga 3 . As expected, the moments in GGA are slightly larger compared to ones obtained by LDA. The biggest change is observed for Cr in (Ni 6 CoCr)Mn 5 Ga 3 . In this case the moment is 15% smaller in LDA simulations. The J ij values follow this trend. While for Cr on Y, hardly any change can be observed; small changes are visible in the Cr on X case (right hand side) in figure 16. Also, here the largest changes occur for the Cr couplings. However, none of the changes alters the observed trends or would lead to different conclusions.