Effect of defective structure taking on the electronic and optical properties of InP nanowire