Ab initio calculation of electronic and magnetic properties of rare earth (Pm, Sm and Er)-doped CuO. (2022)