Effect of nitrogen doping and pressure on the stability of $\mathrm{LuH_3}$
A report on the near-ambient superconductivity in a nitrogen-doped lutetium hydride has stimulated great interest in this material [Dasenbrock-Gammon et al. , Nature (London) 615, 244 (2023)]. While its superconductivity is still a subject of debate, the structure of the claimed cubic phase remains uncertain. In this work, we study the effect of nitrogen doping and pressure on the energetic and dynamic stability of cubic $\mathrm{LuH_3}$. Our findings indicate that both pressure and nitrogen doping can enhance the stability of the cubic $\mathrm{LuH_3}$ phase. Here, we propose a $\mathrm{Lu_8}$$\mathrm{H_{21}}$$\mathrm{Lu}$ structure that exhibits a stable phonon, reasonable thermodynamic stability at 1 GPa, and an x-ray diffraction pattern similar to the experimental data. However, we do not observe electron-phonon coupling in the zone-center phonon modes of these crystal structures.