Energy and electron transfer in photochromic molecules