  As a two-dimensional material with a hollow hexatomic ring structure,
N\'eel-type anti-ferromagnetic (AFM) GdI3 can be used as a theoretical model to
study the effect of electron doping. Based on first-principles calculations, we
find that the Fermi surface nesting occurs when more than 1/3 electron per Gd
is doped, resulting in the failure to obtain a stable ferromagnetic (FM) state.
More interestingly, GdI3 with appropriate Mg/Ca doping (1/6 Mg/Ca per Gd) turns
to be half-metallic FM state. This AFM-FM transition results from the transfer
of doped electrons to the spatially expanded Gd-5d orbital, which leads to the
FM coupling of local half-full Gd-4f electrons through 5d-4f hybridization.
Moreover, the shortened Gd-Gd length is the key to the formation of the stable
ferromagnetic coupling. Our method provides new insights into obtaining stable
FM materials from AFM materials.
