Fe doped GST has shown experimentally the ability to alter its magnetic properties by phase change. In this work, we use screened exchange hybrid functional to study the single neutral substitutional 3d transition metal (TM) in crystalline GeTe and GeSb2Te4. By curing the problem of local density functional (LDA) such as over delocalization of the 3d states, we find that Fe on Ge/Sb site has its majority d states fully occupied while its minority d states are empty, which is different than previous predicted electronic configuration by LDA. From early transition metal Cr to heavier Ni, the majority 3d states are gradually populated until fully occupied and then the minority 3d states begin to be filled. In order to study the magnetic contrast, we use lower symmetry crystalline GeTe and GeSb2Te4 as the amorphous phases, respectively, which has been proposed to model the medium range disordering. We find that only Co substitution in r-GeSb2Te4 and s-GeSb2Te4 shows magnetic contrast. The experimental magnetic contrast for Fe doped GST may be due to additional TM-TM interaction, which is not included in our model. It can also be possible that these lower symmetry crystalline models are not sufficient to characterize the magnetic properties of real 3d TM doped amorphous GST.