A first-principles study of B2 NiAl alloyed with rare earth elements Pr, Pm, Sm, and Eu