Structure-conserving spontaneous transformations between nanoparticles