Ab initio methods for atmospheric photochemistry