The K(+)-induced switching of valinomycin has been studied using a molecular template formed by an aromatic oligoamide macrocycle at the liquid/solid interface by scanning tunneling microscopy (STM). Individual valinomycin and its K(+) complex can be identified and resolved in the molecular template, and the high-resolution STM images of valinomycin and its K(+) complex show triangle-like and cyclic structural characteristics, respectively.