The stepwise photochromic reactivity of diarylethene tuned by selective ions and fabrication of a molecular logic circuit. (July 2021)