Solvent switchable nanostructures and the function of a π-amphiphile.