Geometry relaxation in the excited states and its effects on the electronic properties of the Er(8-hydroxyquinolate)3 complex.