The structure of 5-cyanoindole in the ground and the lowest electronically excited singlet states, deduced from rotationally resolved electronic spectroscopy and ab initio theory.