Theoretical electronic spectra of 2-aminopurine in vapor and in water