Turning optical chemosensors into optodes: a quantum chemical and experimental case-study