Electronic structure of the ground and excited states of β-carboline