Understanding conductivity in molecular switches: a real space approach in octaphyrins.