Ordered nanowires of photochromic compounds based on spiropyrane and transition metal complexes