Theoretical prediction of the structural, electronic and optical properties of SnB2O4 (B = Mg, Zn, Cd)