Intrinsic defect study on ternary ABX2 diamond-like thermoelectric materials and analysis of the density of energy function