Topological structural transformations of nanoparticle self-assemblies mediated by phase transfer and their application as organic-inorganic hybrid photodetectors.