Nanowires of different nature have been shown to self-assemble as a function of stress at the contact between two macroscopic metallic leads. Here we demonstrate for gold wires that the balance between various metastable nanowire configurations is influenced by the microstructure of the starting materials and we discover a new set of periodic structures, which we interpret as due to the atomic discreteness of the contact size for the three principal crystal orientations.