Ab initio studies of the photophysics of 2-aminopurine