First-Principles Calculations On The Electronic And Optical Properties Of Polar Functional Materials