Engineering solid state structural transformations of metal complexes