## Introduction

Smart materials like multiferroic materials with enhanced coupling between different degrees of freedom (e.g., mechanical, electronic, and magnetic) are promising for engineering devices for future applications such as sensors, transducers, memories, and spintronics1,2,3. Cubic antiperovskite (APV) compounds host the two most appealing aspects of multiferroics, e.g., magnetoelectric coupling and piezomagnetic effect (PME)3,4. In APV materials, the strong magnetoelectric coupling is achieved by combining piezoelectric and piezomagnetic heterostructure composites5,6,7. A significant PME is reported for Mn-based nitrides like Mn3SnN, making such compounds a suitable component for fabricating magnetoelectric composite8,9. The PME in APVs can be attributed to the strong magnetostructural coupling, which manifests itself also as giant negative thermal expansion (NTE)10,11,12 and magnetocaloric/barocaloric effect9,13,14,15,16,17. From the materials perspective, many Mn-based APV carbides go through a first-order magnetic phase transition and possess a large magnetocaloric effect14,18. For instance, Mn3GaC exhibits a huge magnetic entropy change (ΔSM) of 15 J/kgK under an applied magnetic field of 2T16. The strong magnetostructural coupling in APVs is driven by the cubic-to-cubic first-order transition wherein a change in the crystal volume brings about a change in the frustrated magnetic states. Last but not least, APVs have been investigated recently due to the presence of a treasury of multifunctionality such as superconductivity19, thermoelectric20, magnetostriction21.

Particularly, from the topological transport properties point of view, the existence of finite anomalous Hall conductivity (AHC) in noncollinear antiferromagnets has attracted noticeable attention due to possible applications in AFM spintronics for information storage and data processing22,23,24,25. The spin-dependent transport phenomena can provide spin-polarized charge current and large pure spin current, which could be achieved premised on two fundamental properties, i.e., AHC and spin Hall conductivity. The kagome lattice turns out to be an elementary model to host giant AHC26,27,28. Recently, Mn-based APV nitrides have been proposed to exhibit large AHC in frustrated AFM kagome lattice29,30,31,32. It is observed that Mn3GaN exhibits vanishing and non-vanishing AHC for two different magnetic ordering Γ5g and Γ4g, respectively29,30. In this regard, for magnetic materials with noncollinear AFM ground states, the non-vanishing AHC is only feasible with specific magnetic space group symmetry, i.e., the AHC tensor depends on the magnetic group symmetry33. For instance, Mn3X (X = Ga, Ge, and Sn) and Mn3Z (Z = Ir, Pt, and Rh) have been reported to have a different form of AHC tensor as a result of different magnetic ordering22,34,35,36. A possible phase transition (Γ5g ↔ Γ4g) attained by strain or chemical modification could make these materials suitable for AFM spintronic applications. The spin-polarized current could also be generated by temperature gradient instead of the applied electric fields, resulting in anomalous Nernst conductivity (ANC), also termed as spin caloritronics37,38. A large ANC in noncollinear AFMs could be useful for establishing spin caloritronics devices that exhibit useful prospects in energy conversion and information processing. Noticeably, a large ANC of 1.80 AK−1m−1 has been reported for APV Mn3NiN at 200 K39, which is slightly less than half of the highest reported ANC of 4.0 AK−1m−1 in Co2MnGa40,41. Enhancing the AHC and ANC by applying strain could be crucial for realizing AFM spintronic devices.

In this work, we carried out a systematic analysis of 54 cubic APV systems (Pm$$\bar{3}$$m) with chemical formula M3XZ (see Supplementary Fig. 1) to determine their magnetic ground states, tunability via biaxial strain, and the resulting spintronic properties (Fig. 1). The selected 54 cubic APVs are stable, i.e., fulfilling all three stability criteria such as thermodynamical, mechanical, and dynamical stabilities, which were recently evaluated in our high-throughput screening42. Explicit calculations were performed to obtain the energies of eight phases, i.e., Γ4g, Γ5g, non-magnetic (NM), ferromagnetic (FM), collinear AFM-1 (cAFM-1), collinear AFM-2 (cAFM-2), collinear AFM-3 (cAFM-3), and M-1 configurations. Moreover, the magnetic anisotropy energy (MAE) defined as the energy difference between Γ5g and Γ4g is examined to understand the origin of the noncollinear magnetic states with the help of spin-orbit coupling (SOC) energy. Moreover, a detailed analysis of the lattice constant variation with respect to the magnetic states reveals that the paramagnetic (PM) state is critical in the magnetic phase transition, enabling us to predict potential NTE and magnetocaloric materials. Last but not least, the PME was studied by introducing biaxial strains (compressive and tensile), which causes possible phase transitions between Γ5g ↔ Γ4g, and leads to a significant modification in the AHC and ANC, dubbed as a piezospintronic effect30,43. In-depth analysis on symmetry analysis and electronic structure suggests that the piezospintronic effect is originated from the existence of Weyl nodes whose position can be tailored by strain, resulting in promising applications for future spintronic devices.

## Results

### Validation and prediction of magnetic ground state

As the magnetic transition metal atoms are located at the face centers of the cubic cell for magnetic APVs, it leads to a frustrated kagome lattice in the (111)-plane. Correspondingly, noncollinear magnetic structures are expected when the interatomic exchange interaction is AFM for the nearest neighbors. As shown in Fig. 2, Γ4g and Γ5g are the two most common magnetic configurations reported for APVs, resulting in 120° magnetic angle configurations within the (111)-plane between three magnetic moments. The Γ4g state can be obtained from Γ5g by simultaneously rotating the moments of three metal atoms within the (111)-plane by 90°. The APVs with the noncollinear magnetic ground state are listed in Table 1, in comparison to the available experimentally measured results. Interestingly, all the APVs with noncollinear magnetic ground states are nitrides including Cr and Mn, while all carbides end up with the FM and cAFM-2 ground state except Mn3SnC, which exhibits the Γ5g state (see Supplementary Table 1).

Mn3GaC44 and Mn3Ga0.95N0.9415 are reported to adopt collinear AFM and M-1 magnetic configurations, respectively. Thus, we considered additionally cAFM-1, cAFM-2, cAFM-3, and M-1 configurations (see Fig. 2e–h). It is confirmed that Mn3GaC exhibit the cAFM-2 magnetic ground state, the same as Mn3AlC and Mn3InC. This is in contrast to the previous experimental reports on both Mn3AlC45 and Mn3InC46 with a FM configuration. Moreover, Cr3SnN and Mn3SnN exhibit the cAFM-3 magnetic ground state, where it is demonstrated that Mn3SnN shows four different magnetic and crystallographic phases (see Supplementary Note 1)47,48. Such discrepancies might be attributed to the temperature effect, indicating a strong interplay between magnetism and crystal structures at finite temperatures that deserves further detailed investigations. Interestingly, none of the APV is stabilized in the M-1 phase (see Supplementary Table 1). It is noted that there are also other magnetic configurations such as ferrimagnetic and canted states for Mn3XC (X = Sn and Zn), which will be saved for future investigations.

The magnetic ground states of noncollinear APVs are in good agreement with the experimental measurements. For instance, both Mn3GaN13 and Mn3ZnN47,49 have the Γ5g magnetic ground state, which are consistent with our density functional theory (DFT) calculations. Interestingly, many Mn-based APVs exhibit a mixed Γ4g + Γ5g magnetic ordering, with a possible meta-magnetic transition to the other magnetic phases47. For instance, Mn3AgN is characterized by two distinct magnetic phase transitions. A mixed Γ4g + Γ5g phase exists below 55 K, whereas pure Γ5g state persists at intermediate temperature range (55 K < T < 290 K), and lastly, it undergoes the magnetic transition to PM state at 290 K47. Likewise, Mn3NiN displays such mixed magnetic phases47.

The mixed magnetic ordering can be attributed to the MAE between the Γ5g and Γ4g states, which can be expressed as:

$${\rm{MAE}}={{\rm{E}}}_{{{{\Gamma }}}_{5g}}-{{\rm{E}}}_{{{{\Gamma }}}_{4g}},$$
(1)

where E indicates the total energy of the corresponding magnetic configuration. For Mn3AgN and Mn3 NiN with experimentally observed mixed magnetic states, the corresponding MAE is 0.063 and 0.144 meV, respectively. Nevertheless, it is still unclear why Mn3AgN is stabilized in the Γ5g state between 55 and 290 K. We suspect that those compounds with MAE greater than 0.2 meV between Γ4g and Γ5g should have pure noncollinear magnetic states. In our study, the Mn-based APVs Mn3XN with X = Ag, Co, Ir, Ni, Pd, and Rh exhibit Γ4g while those with X = Au, Ga, Hg, In, Pt, and Zn display the Γ5g as the magnetic ground state (see Table 1 and Supplementary Table 1). This is consistent with the recent DFT calculations for Mn3XN (X = Ni, Zn, Ga, and Pt)50, except for Mn3XN (X = In, Pd, and Ir). In ref. 50, Mn3InN exhibit Γ4g state while Mn3XN (X = Ir and Pd) display Γ5g state. The MAE for Mn3InN calculated by Huyen et al. is 74.6 meV, which is much larger than our MAE (–1.84 meV). As detailed below, a large MAE could be expected for the compound with strong SOC; thus, it is questionable for Mn3InN with such a large MAE of 74.6 meV50. To clarify the discrepancy, we performed calculations of the MAE using the Quantum Espresso (QE) code51 with the same parameters consider in Huyen et al. study. The QE and VASP calculations provide the same magnetic ground state and MAE for Mn3XN (X = Ir and Pt) systems, which is in contradiction to the Huyen study performed using QE50.

Lastly, based on our high-throughput calculations42, two unreported Cr-based APVs are stable, our calculations reveal that Cr3IrN and Cr3PtN have Γ4g as the lowest energy magnetic configuration (see Table 1 and Supplementary Table 1). While among APV nitrides, Mn3AuN and Mn3HgN are the other two unreported noncollinear systems with Γ5g magnetic ground state. To the best of our knowledge, there is no experimental neutron diffraction measurement available till now for such APVs, making them interesting for future studies. To shed more light on the origin of MAE, we performed detailed calculations of the SOC energy in order to obtain atomically resolved contributions to the MAE. Like MAE, the change in the total SOC energy (ΔESOC) of M3XN can be defined as the difference between the SOC energy (ESOC) of the Γ5g and Γ4g magnetic states52.

$${{\Delta }}{{\rm{E}}}_{{\rm{SOC}}}={{\rm{E}}}_{{\rm{SOC}}}({{{\Gamma }}}_{5g})-{{\rm{E}}}_{{\rm{SOC}}}({{{\Gamma }}}_{4g}),$$
(2)

In the same way, the atomically resolved change of SOC energy (δESOC) can also be defined for each atomic species, as shown in Table 1 and Supplementary Table 3. The positive (negative) values of MAE and ΔESOC indicate the Γ4g5g) magnetic ground state. On the one hand, it is found that the sign of MAE is the same as that of ΔESOC (see Table 1). That is, both the ΔESOC and MAE are equally valid to characterize the magnetic ground states, with a linear scaling behavior observed (see Supplementary Fig. 2). For example, Cr3PtN has Γ4g magnetic ground state with an MAE of 2.868 meV and ΔESOC of 4.70 meV. The atomic resolved δESOC of Pt and Cr are 5.639 and –0.938 meV. Evidently, the δESOC of Pt is larger than Cr δESOC originating in the strong SOC of Pt. As a result, the δESOC of Pt is a determining factor for the MAE and ΔESOC sign. On the other hand, for most APVs, the contribution of the X elements to MAE is more significant than that of the magnetic elements M, as indicated by the atomic resolved δESOC (see Table 1). Taking the Mn3XN with X = Co, Rh, and Ir as examples, the MAE are 1.22, 1.70, and 10.55 meV, corresponding to the dominant δESOC of X as 1.72, 3.46, and 20.31 meV, respectively. It is noted that δESOC of Mn is smaller than 3% of ΔESOC for such compounds. This can be attributed to the enhanced strength of atomic SOC of the X elements, e.g., the strength of atomic SOC for Co, Rh, and Ir atoms is about 0.065, 0.152, and 0.452 eV, respectively53. Therefore, the enhanced atomic SOC strength of the X elements is favorable for the strong MAE of the APV compounds.

### NTE and barocaloric

Turning now to the magnetostructural coupling, which can be best represented for APVs by the NTE, magnetocaloric, and PME. NTE materials exhibit contraction in the lattice parameters with respect to temperature in contrast to most materials.49 To study NTE of APVs, we evaluated the relative change in the lattice constants Δa/a0 on the transition from the noncollinear magnetic ground state to PM state (where a0 is the lattice constant of Γ4g or Γ5g noncollinear state and Δa is lattice constant difference between PM and Γ4g or Γ5g state) and compared with the Δa/a0 values obtained from the experimental measurement at their transition temperature (see Fig. 3a)11,12,49. The average of the evaluated Δa/a0 is in good agreement with the experimental observation except for Mn3GaN (see 3a). Together with the mismatch for the other cases, we suspect it may be due to the finite temperature effect, as our DFT calculations are done at zero Kelvin.

Importantly, it is found that the PM state is critical and cannot be approximated as the NM state, e.g., the Δa/a0 between the noncollinear and NM states is about five times as large as the experimental value (see Fig. 3a). An ameliorated estimation could be achieved by defining the PM phase as a collinear AFM arrangement generated by using the disordered local moment (DLM) theory54. The Δa/a0 of Cr3IrN and Cr3PtN on the transition from Γ4g magnetic ground state to PM are –0.0053 and –0.0067, respectively. That is, Cr-based APVs undergo the lattice contraction with Δa/a0 comparable to the reported NTE in Mn-based APV materials such as Mn3GaN and Mn3ZnN (see Fig. 3a). Furthermore, the equilibrium lattice constants decrease and increase for the Mn3XN (X = Ga, Hg, In, Ni, Pd, Pt, and Zn) and Mn3XN APVs (X = Au, Co, Ir, and Rh) on the transition from a noncollinear magnetic ground state to PM state, respectively (see Fig. 3a).

Recently, Bocarsly et al. proposed a magnetic deformation proxy ∑M to predict the magnetocaloric materials as the theoretical evaluation of (ΔSM) is very challenging55. This proxy measures the volume deformation of the NM and magnetic structure, which correlates well with the experimentally measured ΔSM values. In their study, they screened 167 FM materials, including 7 APVs. For the APVs, it is noted that ∑M scales linearly with the percentage volume difference ΔVM between the FM and NM unit cell (see Supplementary Fig. 3). Inspired by their work, we evaluated ∑M for the APVs with FM and noncollinear magnetic ground state in order to estimate the potential magnetocaloric effect. For FM APVs, it is found that the ∑M is most significant for the Fe-based APVs within the 1.2–1.7% range (see Supplementary Table 5). For example, the ∑M of Fe3RhN, Fe3PtN, and Fe3NiN are 1.67%, 1.59%, and 1.54%, respectively, whereas Co-, Mn-, and Ni-based APVs have ∑M < 1.0% except for Mn3ZnC (1.33%) (see Supplementary Table 5). Thus, we expect a significant magnetocaloric effect in Fe3RhN, Fe3PtN, and Fe3NiN, based on the argument that the ∑M approximate to 1.5% could exhibit a considerable magnetocaloric effect55.

As to the noncollinear APVs, we evaluated the ∑M by considering four ΔVM combinations, namely, the noncollinear magnetic ground state with PM and NM states (NC-PM and NC-NM), the FM with PM and NM states (FM-PM and FM-NM) (see Fig. 3b and Supplementary Table 6). It is observed that the ∑M value is small by using the ΔVM of the NC-PM and FM-PM states, in comparison to the other two combinations (see Fig. 3b). Nevertheless, a small value of ∑M does not mean a low ΔSM55. For instance, the experimentally measured ΔSM of Mn3GaN is very significant (22.3 Jkg−1K−1), and it also exhibits giant barocaloric effect13. Overall, the ∑M of Mn3GaN should be largest among all the APVs. The calculated ∑M of Mn3GaN is largest 0.805% for the Γ5g and PM state combination, which verifies the experimental observation, whereas the ∑M of Mn3GaN for the other three combinations is not the largest among the APVs (see Fig. 3b). Therefore, it can be concluded for the noncollinear systems that the approach of Bocarsly et al. proxy does not provide reasonable ∑M obtained from the ΔVM combination of NC-NM, FM-NM, and FM-PM states. The implicit correlation of ΔSM with ∑M indicates the strong magnetostructural coupling in APVs with significant ΔVM (NC-PM). This conduces to the prediction of possible NTE and magnetocaloric materials with sizable ∑M by virtue of significant ΔVM (see Supplementary Table 6). For example, the Cr3XN APVs (X = Ir and Pt) with appreciable ∑M could exhibit potential applications as NTE and magnetocaloric materials.

### Piezomagnetism

PME provides another effective characterization of the magnetostructural coupling6, which manifests itself as the response of magnetization to strain. The origin of PME is explained based on symmetry together with an illustration of the magnetic spin directions (see Supplementary Fig. 4 and Supplementary Note 2). For APVs with noncollinear magnetic ground states, the total bulk magnetization is vanishing, but a net magnetization can be induced under finite compressive/tensile strain, as reported for Mn-based APVs6,8. Our calculations confirm their results on the Mn-based APVs except for the Mn3CoN and Mn3RhN (see Supplementary Fig. 5), where the resulting net magnetization from our (Zemen et al.)8 calculations are 0.646 (0.305) and 0.214 (−0.143) μB/f.u., respectively. Interestingly, for Mn3CoN, a net magnetic moment of 0.362 μB/f.u. is induced at Co atoms under 1% tensile strain, whereas the local magnetic moment of Co is zero in the cubic unstrained state. The magnetic moment direction of Co is aligned in (111) plane similar to Mn atom direction in the Γ4g state. As a result, Mn3CoN could be an interesting material for elastocaloric and magneto-elastic applications. Surprisingly, the PME effect is asymmetric with respect to the applied compressive and tensile strains (see Supplementary Figs. 6 and 7). Most APVs exhibit more significant PME with tensile strain except Cr3PtN (see Supplementary Fig. 6), e.g., the net magnetization for Cr3PtN at 1% compressive strain is as large as 0.21 μB/f.u. in comparison to 0.15 μB/f.u. at 1.0% tensile strain.

The magnitude of the magnetoelectric effect is minimal in the intrinsic bulk AFM materials, such as Cr2O356. The two-phase heterostructure materials consolidate the magnetoelectric effect. A recent study corroborates APV as a potential material for magnetoelectric composite6,57. The piezoelectric perovskite could be one suitable substrate for such composite heterostructure as they also have comparable lattice parameters with APVs5,58. The heterostructure amalgamate the piezoelectric and piezomagnetic properties, which are coupled by an interfacial strain. Based on our PME analysis, we propose Cr- and Mn-based noncollinear systems with significant PME as potentials candidates for magnetoelectric composite.

Interestingly, the biaxial strain can induce phase transition between different magnetic configurations, i.e., Γ4g and Γ5g, which can further lead to a significant change in the transport properties as discussed below. It is found that a few APV materials undergo a magnetic phase transition due to the imposed biaxial strain (see Supplementary Tables 4 and 7). For instance, cubic Mn3AuN has Γ5g as the magnetic ground state, which preserves under tensile strain. However, a transition into a distorted Γ4g state is obtained by applying a compressive strain of 0.5 and 1.0% (see Supplementary Table 4). Such transitions can be attributed to significant changes in the MAE and with respect to the biaxial strain (see Supplementary Table 4), but there is no consistent MAE trend as the absolute value of MAE is mostly determined by the atomic SOC strengths.

### Anomalous Hall conductivity (unstrained)

It is well known that FM compounds commonly exhibit AHC due to the presence of a net magnetization59, where the broken time-reversal symmetry ($${\mathcal{T}}$$) and SOC are two essential prerequisites. Noncollinear AFMs also display non-zero AHC, as observed in Mn3X (X = Ir, Ge, and Sn)22,34. As a linear response property, the occurrence of AHC can be elucidated based on the symmetry analysis. For cubic APVs, the magnetic space group of Γ5g and Γ4g are $$R\bar{3}m$$ (166.97) and $$R\bar{3}m^{\prime}$$ (166.101), respectively. For Γ5g, the local magnetic moment spin directions of M atoms are invariant under the mirror symmetry transformation M$${}_{(0\bar{1}1)}$$, M$${}_{(10\bar{1})}$$, and M$${}_{(\bar{1}10)}$$, leading to vanishing AHC (see Supplementary Table 8)29,30, whereas in the Γ4g state, the above-mentioned mirror symmetries are broken, but the product of mirror (M) and time-reversal symmetry $${\mathcal{T}}$$ retain the Γ4g configuration. This results in finite AHCs with all three off-diagonal components non-zero but of the same amplitude (see Supplementary Table 8)29.

Explicit calculations confirm the above symmetry arguments. For instance, the AHC is zero for Mn3XN (X = Au, Hg, In, Pt, and Zn) with the Γ5g ground state (see Supplementary Figs. 8b and 9), whereas the significant AHC is observed for the APVs with the Γ4g ground state, such as the AHC of Cr3IrN and Cr3PtN are 414.6 and 278.6 S/cm, respectively. The AHC of APVs is summarized in the Supplementary information (see Supplementary Figs. 810 and 16). In comparison to the previous studies on an individual or a few compounds29,32, our results are in good agreement (see Supplementary Table 9). For instance, the AHC of Mn3SnN from our and calculations by Gurung et al. are 106.5 and 133 S/cm29, respectively, whereas the value (−73.9 S/cm) obtained by Huyen et al.50 is of opposite sign in addition to the difference in the absolute values. In this regard, for Mn3NiN, the sign of experimentally observed AHC is confirmed by our DFT calculations31, consistent with that obtained by Zhou et al32,39. This might be due to opposite magnetization direction while maintaining the noncollinear configurations or chirality of noncollinear spin configurations specified in the calculations, subject to further investigations. Moreover, it is observed that the absolute values of AHC for the same compound in the same magnetic ground state are scattered as well (see Supplementary Table 9). We suspect that this is due to the different lattice constants and numerical parameters used in different calculations. For instance, Zhou et al. performed calculations using the experimental lattice constants on Mn3NiN and other APV compounds, which are on average about 1.0–1.3% smaller than the fully relaxed lattice constants in this work.

### Strain-induced AHC (piezospintronics)

As discussed above, all cubic APVs with noncollinear magnetic ground states display significant PMEs where a net magnetization can be induced by applying biaxial strain; an interesting question is whether the AHC can be tailored as well. From the symmetry point of view, for the Γ5g state, the magnetic space group changes from $$R\bar{3}m$$ (166.97) to C2/m (12.58) with biaxial strain, resulting in finite σx and σy with the same amplitude but opposite sign, while the σz component remains zero30. This is confirmed by our calculations on those compounds with the Γ5g ground state. For instance, the AHC induced by 1% biaxial strain is as large as −71.2 S/cm for Mn3PtN (see Supplementary Fig. 8b), comparable to that in Mn3HgN (see Supplementary Fig. 9). The Mn3InN and Mn3ZnN have quite low AHC due to weak SOC strength (see Supplementary Fig. 9).

Similarly, the AHC of APVs in the Γ4g state can also be tailored by the biaxial strain. In this case, the magnetic space group is reduced from $$R\bar{3}m^{\prime}$$ (166.101) to $$C2^{\prime} /m^{\prime}$$ (12.62), the resulting σx and σy components are the same while the σz component possesses a distinct value (see Supplementary Fig. 8a and Supplementary Table 8). Explicit evaluations of the AHC for APVs in distorted Γ4g states verify the symmetry arguments, where the σx and σy components behave the same with respect to strain (see Supplementary Fig. 8a). Interestingly, it is observed that more significant changes occur in AHC for the Γ4g compounds than the Γ5g cases. For instance, the σz component of AHC in Cr3IrN attains the largest AHC of 693.1 S/cm at 1% tensile strain, with an increase of 278 S/cm compared to the value in the cubic geometry (see Supplementary Fig. 8a). Moreover, the moderate strain can even lead to a sign change of the AHC, as observed on the σz component of Mn3AgN and Mn3CoN with 0.5% compressive and 1% tensile strain, respectively (see Supplementary Fig. 10).

One interesting question is whether the piezospintronic effect (i.e., the variation of AHC induced by biaxial strain) correlates with the PME, as summarized in Fig. 4 for the variation of such quantities comparing the cases with 1% tensile strain and cubic geometries. Obviously, ΔAHC cannot be directly inferred from the induced net magnetization, particularly exemplified by the APVs in the Γ4g magnetic ground state. For example, the ΔAHC and net magnetization of Cr3IrN are 278.5 S/cm (σz component) and 0.082 μB/f.u., respectively, while for Mn3SnN, the ΔAHC and net magnetization are 35.5 S/cm (σz component) and 0.47 μB/f.u., respectively. Moreover, for Mn3CoN, the net magnetization and ΔAHC of σx are 250.7 S/cm and 0.646 μB/f.u. It signifies that the ΔAHC could be large for the small net magnetization and vice versa (see Fig. 4). Interestingly, the ΔAHC and net magnetization are smaller for those compounds in the Γ5g magnetic state, in comparison to those of such materials with the Γ4g magnetic state, e.g., the ΔAHC and net magnetization of Mn3ZnN are 9.17 S/cm and 0.029 μB/f.u., respectively.

Particularly, the APVs undergoing a phase transition between Γ4g and Γ5g states driven by the epitaxial strain exhibit strong piezospintronic effect while the magnitude of the PME is marginal. For instance, Mn3ZnN has a Γ5g magnetic ground state in the cubic phase with vanishing AHC. A phase transition into the Γ4g state by 1% tensile strain results in a considerable ΔAHC of 152.2 S/cm for the σy component (see Fig. 4). On the other hand, the phase transition from the Γ4g to Γ5g states for Mn3PdN leads to a ΔAHC as large as 58.6 S/cm (Fig. 4). Therefore, we suspect that those compounds with Γ4g states are more promising to host a strong piezospintronic effect.

### Anomalous Nernst effect

The intriguing behavior of AHC under biaxial strain can be attributed to the fine-tuning of the electronic structure. To further illustrate such sensitivity, we investigated the ANC, which shares the same symmetry as AHC but is proportional to the derivative of AHC with respect to energy following the Mott formula60. Taking Mn3NiN as an example, the corresponding ANC is as large as 16,569 S/cm.eV. This is consistent with 1.80 AK−1m−1 at 200 K obtained by Zhou et al.39, up to a factor of two but with alike dependence with respect to the energy around the Fermi energy (see Supplementary Fig. 15). The numerical discrepancy might be due to the different lattice constants used in the calculations, as discussed above. Such a large ANC of Mn3NiN is comparable to the largest values observed experimentally in Co2FeGe (3.16 AK−1m−1), Co2MnGa (4.0 AK−1m−1), and Fe3Ga (3.0 AK−1m−1)40,41,61,62. Interestingly, the strain also has a stronger influence on the ANC. For the tetragonally distorted Mn3NiN in the Γ4g state, the ANC becomes as large as 20,035 S/cm.eV at –0.5% compressive strain for the αx and αy components, i.e., enhanced by 21% compared to that of the cubic case. Last but not least, a sign change can be induced in the ANC by the biaxial strain. For instance, the ANC corresponding to the αx and αy components of Cr3IrN changes to –3196.9 S/cm.eV at 1% compressive strain starting from 6823.4 S/cm.eV for the cubic case in the Γ4g state. This is also observed for Mn3AgN and Mn3CoN (see Supplementary Fig. 11). The ANC of APV compounds as a function of biaxial strain is summarized in Supplementary Figs. 1114.

To explicate the origin of the piezospintronic effects on both AHC and ANC, our detailed analysis of the electronic structure reveals that the tunability of AHC and ANC by strain can be attributed to the presence of Weyl points close to the Fermi energy. Taking Mn3PdN as an example, as shown in Fig. 5a, the ANC can be tuned between 7037.3 S/cm.eV at 1% compressive strain to −14,599 S/cm.eV at 1.5% compressive strain, with a sign change at 1.3% strain. Such an ANC is comparable to that observed in Mn3NiN, awaiting further experimental validation. The band structure shows no obvious changes due to the applied strain (see Fig. 5b). However, it is found that there are 12 Weyl points at (0.43, −0.35, and −0.49) and equivalent k-points with an energy of 20 meV below the Fermi energy in the cubic phase. Such Weyl points will be shifted across the Fermi energy upon applying compressive strain, e.g., reaches to −1.75 meV for −1.3% biaxial strain, and 1.87 meV above the Fermi energy for 1.4% strain (see above inset of Fig. 5a). The AHC is mostly enhanced when the Weyl points are located at the Fermi energy, due to the singular behavior of the Berry curvature at the Weyl nodes (see below inset of Fig. 5a). This is consistent with ref. 50 and our observation in Mn3GaN30,50. For magnetic materials, the Weyl nodes with opposite chiralities (i.e., Berry curvatures with opposite sign) are located at the same energy, but the total contributions to the AHC can be significant, particularly if the Weyl nodes are within “several” or “a few” meV around the Fermi energy. Correspondingly, the sign of ANC, which is determined by the derivative of AHC can be tuned as the Weyl points are shifted across the Fermi level. We suspect such tunability of AHC and concomitant ANC by manipulating the Weyl points with the biaxial strain or other possible stimuli is promising for future applications, such as Fe3Al with giant transversal thermoelectric effects62.

## Discussion

We carried out a systematic analysis of 14 cubic APV M3XZ compounds with noncollinear magnetic ground states, focusing on the magnetic properties driven by isotropic and anisotropic magnetostructural coupling. It is found that there exists a strong competition between different noncollinear magnetic configurations where a large MAE clearly defines the noncollinear magnetic ground state, while small MAE leads to the mixed Γ4g and Γ5g configurations. For such materials with mixed magnetic ions, the MAE cannot be understood based on the perturbation theory, whereas the SOC energy can be used to get a reliable atomic resolved contribution, which is mostly determined by the strength of atomic SOC. The magnetic ground state analysis resulted in the prediction of four unreported APVs with noncollinear ground state, especially Cr3XN APVs (X = Ir and Pt) with the Γ4g magnetic configuration. The isotropic magnetostructural coupling indicated by the magnetic deformation Δa/a0 can be considered as an effective descriptor for the magnetocaloric effect. However, we observed that the magnetic deformation is better measured comparing the PM and magnetically ordered states, resulting in better agreement with the experimental NTE results, rather than comparing the NM and ordered state. Therefore, we suggest that the recently proposed proxy for predicting magnetocaloric effects based on the magnetic deformation could be improved by using quasi-random approximation of the PM state. More interestingly, biaxial strain not only causes a significant PME in such materials but also leads to a strong influence on MAE, AHC, and ANC after considering SOC. Based on detailed symmetry analysis, we performed an explicit evaluation of the AHC and found that those compounds with the Γ4g magnetic ground state have large AHC, which is susceptible to the epitaxial strain. Nevertheless, there is no strong correlation between the net magnetization and induced AHC when finite strain is applied. Detailed analysis reveals that the sensitivity of AHC and derived ANC with respect to strain can be attributed to the fine-tuning of energies for the Weyl nodes, opening up further possibilities for engineering spintronic devices in the future.

## Methods

### Density functional theory calculation

Our DFT calculations are performed using the projector augmented wave method as effectuated in the VASP package63. The exchange-correlation functional is approximated using the generalized gradient approximation as parameterized by Perdew–Burke–Ernzerhof64. We used an energy cutoff of 500 eV for the plane-wave basis set, and a uniform k-points grid of 13 × 13 × 13 within the Monkhorst-pack scheme for the Brillouin zone integrations. The Methfessel–Paxton scheme is used to determine the partial occupancies of orbitals with a smearing width of 0.06 eV. The SOC is considered in all the calculations. In order to verify the magnetic ground state of various compounds, the more accurate total energy calculations are performed using a higher energy cutoff of 600 eV and a dense k-mesh of 25 × 25 × 25 (see Supplementary Note 3).

The magnetic ground states are obtained by comparing the total energies (see Supplementary Table 1) of eight magnetic configurations, i.e., Γ4g, Γ5g, NM, FM, cAFM-1, cAFM-2, cAFM-3, and M-1 states (see Fig. 2), where the lattice constants are fully optimized for Γ4g, Γ5g, FM, PM, and NM state (see Supplementary Table 2). To verify the effects of the Coulomb interaction, we performed a series of DFT+U (U = 2–10 eV for the Mn-3d orbitals) calculations on Mn3GaN. It is observed that the Γ5g magnetic ground state does not change with respect to the applied U values (see Supplementary Table 10). Therefore, we suspect that the Coulomb interaction is likely to have a marginal influence on the magnetic ground state of such a class of compounds. Moreover, to investigate the piezomagnetic and piezospintronic effects, biaxial in-plane strain is applied, which reduces the crystalline symmetry from cubic to tetragonal. The optimal lattice constants along c-direction are evaluated by the polynomial fitting of the energies from a series of calculations.

### Modeling of paramagnetic state

The PM state is modeled based on the DLM picture (see Fig. 2d), where a special quasi-random structure modeled using a 2 × 2 × 2 supercell by imposing zero total magnetization65. That is, a supercell with the same number of up and down moments is considered with a pair correlation function same as A50B50 random alloys, generated using the alloy theoretic automated toolkit code66. It is noted that our results reveal that systematic treatment of the PM state is needed in order to provide a quantitative description of the magnetostructural coupling in such compounds, where the recently developed spin-lattice dynamics approach is promising for future detailed investigations67.

### Anomalous Hall and Nernst conductivity calculation

The AHC is evaluated using the WannierTools code68, where the required accurate tight-binding models are obtained by the maximally localized Wannier functions (MLWFs) using the Wannier90 code69. The s, p, and d orbitals of M and X atoms and the s and p orbitals for N atom are considered, resulting in 80 MLWFs in total for every noncollinear APVs. The AHC is computed by integrating the Berry curvature on a uniform 401 × 401 × 401 k-points mesh to guarantee good accuracy, which can be expressed as70:

$${\sigma }_{xy}=-\frac{{e}^{2}}{\hslash }\int \frac{d{\bf{k}}}{{\left(2\pi \right)}^{3}}\mathop{\sum}\limits_{n}f\left[\right.\epsilon \left({\bf{k}}\right)-\mu \left]\right.{{{\Omega }}}_{n,xy}\left({\bf{k}}\right)$$
(3)
$${{{\Omega }}}_{n,xy}\left({\bf{k}}\right)=-2{\rm{Im}}\mathop{\sum}\limits_{m\ne n}\frac{\langle {\psi }_{{\bf{k}}n}| {v}_{x}| {\psi }_{{\bf{k}}m}\rangle \langle {\psi }_{{\bf{k}}m}| {v}_{y}| {\psi }_{{\bf{k}}n}\rangle }{\left[\right.{\epsilon }_{m}\left({\bf{k}}\right)-{\epsilon }_{n}\left({\bf{k}}\right){\left]\right.}^{2}}$$
(4)

where e is elementary charge, μ is the chemical potential, ψn/m denotes the Bloch wave function with energy eigenvalue ϵn/m, vx/y is the velocity operator along Cartesian x/y direction, and $$f[\epsilon \left({\bf{k}}\right)-\mu ]$$ is Fermi-Dirac distribution function. The ANC αxy is evaluated based on the Mott relation, which yields:

$${\alpha }_{xy}=-\frac{{\pi }^{2}{k}_{B}^{2}T}{3e}\frac{d{\sigma }_{xy}}{d\epsilon }{\left|\right.}_{\epsilon = \mu }$$
(5)

In this work, we evaluated only the derivative of AHC at the Fermi level dσxy/dϵ, which provides a quantitative measurements of the ANC.