Assembling photo- and electroresponsive molecules and nano-objects