a, b, Comparison of shortest (a) and average between first neighbours (b) A–A distances in A7X3 compounds with metal–metal contacts in corresponding pure metals (A) at the same pressures. c, Correlation between average ⟨X–A⟩ distances in XA6 prisms and first neighbours ⟨A–A⟩ distances. The red hexagons correspond to Re7N3 as described in this work; data for orthorhombic Fe7C3 at 158 GPa are from ref. 35, data for predicted Fe7N3 at 150 GPa are from ref. 32, all other data are from ref. 30.