Structural, electronic and optical properties of ZnO and TiO2 nanoparticles for wastewater treatment: A first-principles study