Structural effects on optoelectronic properties of halide perovskites.