Mechanism of action of optical materials from the perspective of theoretical chemistry