  Tetrahedrite-based ($\textrm{Cu}_{12}\textrm{Sb}_{4}\textrm{S}_{13}$)
materials are candidates for good thermoelectric generators due to their
intrinsic, very low thermal conductivity and high power factor. One of the
current limitations is virtual absence of tetrahedrites exhibiting n--type
conductivity. In this work, first-principles calculations are carried out to
study Mg-doped tetrahedrite,
$\textrm{Mg}_{x}\textrm{Cu}_{12}\textrm{Sb}_{4}\textrm{S}_{13}$ with
possibility of predicting n--type material in mind. Different concentrations
and modifications of the structure are investigated for their formation
energies, preferred site occupation and change in local environment around
dopants. Mg atoms tend to occupy 6b site, while introduced excess Cu prefers
24g site. Introduction of elements in those sites display different effect on
nearby rattling Cu(2) atom. Topological analysis shows that tetrahedrite
exhibits ionic, closed-shell bonds with some degree of covalency. Majority of
the bonds weakens with increasing content of Mg; structure becomes increasingly
less stable, which is also expressed by global instability and bond strain
indexes. Achieving n--type conductivity was predicted by the calculations for
structures with $x>1.0$, however increasing enthalpy of formation and lack of
stability might suggest limit of solubility and difficulties in obtaining those
experimentally.
