Porphyrin assemblies as chemical sensors