An ultra-high resolution scanning TEM high-angle annular dark-field (STEM-HAADF) Z-contrast image is shown in Fig. 2a to reveal the atomic structure of the Z-phase. We implemented two models, SmCo3 and Zr2SmCo9 for the QSTEM simulations as shown in Fig. 2b 32. The later one is a modification of the first one, where the Sm at the Sm1 (6c) atomic position was replaced by Zr. The models were chosen since it was not clear from the beginning which atomic position the Zr would occupy and if there is only a partial or a full replacement of Sm by Zr on the Sm1 (6c) position. A simulated STEM-HAADF Z-contrast image of pure SmCo3 is shown in Fig. 2c together with an atomic model inside the Z-phase. The same is shown for the Zr-modified structure in Fig. 2d. One directly recognizes that the intensity of the Sm1 (6c) position in Fig. 2c is too bright in the simulation compared to the experiment (Fig. 2a), because Sm (Z = 62) is heavier than Zr (Z = 40). Therefore, a simulation with the modified model was carried out yielding the results presented in Fig. 2d. By comparing the simulated image with the experimental one, a perfect match was found regarding the atomic intensities within both images showing that only the Sm1 (6c) position is replaced by Zr. Indications of this behavior were suggested by X-ray measurements before33, 34. The Sm2 (3a) position is still occupied by a Sm atom. By estimating the site-preference energy via first principle calculations (Supplementary Fig. 5), we found that when one or all Sm (6c or 3a) sites are occupied with Zr atoms, the Sm1 (6c) site has a stronger preference to be occupied by Zr, since it is energetically favorable.Fig. 2Atomic-resolution HAADF-STEM images of the Z-phase. a Experimental (left), b atomic models (center) and simulated (right) atomic resolution STEM-HAADF Z-contrast images for c SmCo3 and d Zr2SmCo9. All images are viewed along the  zone axis. The experimental image was filtered by principal component analysis to reduce the effect of noise. Scale bar, 5 Å