The influence of the electronic structure of adsorbate–substrate complexes on photoisomerization ability