Ab Initio Investigation of Crystalline and Amorphous GeTe Doped with Magnetic Impurities