Patterning through Controlled Submolecular Motion: Rotaxane-Based Switches and Logic Gates that Function in Solution and Polymer Films David A. Leigh et.