KMg7 crystallizes in the hexagonal P-6m2 space group. K(1) is bonded to six equivalent Mg(1) and six equivalent Mg(2) atoms to form KMg12 cuboctahedra that share corners with six equivalent K(1)Mg12 cuboctahedra, corners with twelve equivalent Mg(1)K2Mg10 cuboctahedra, edges with six equivalent Mg(1)K2Mg10 cuboctahedra, faces with two equivalent K(1)Mg12 cuboctahedra, faces with six equivalent Mg(1)K2Mg10 cuboctahedra, and faces with six equivalent Mg(3)Mg12 cuboctahedra. There are three inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to two equivalent K(1), two equivalent Mg(3), four equivalent Mg(1), and four equivalent Mg(2) atoms to form distorted MgK2Mg10 cuboctahedra that share corners with four equivalent K(1)Mg12 cuboctahedra, corners with fourteen equivalent Mg(1)K2Mg10 cuboctahedra, edges with two equivalent K(1)Mg12 cuboctahedra, edges with four equivalent Mg(1)K2Mg10 cuboctahedra, edges with four equivalent Mg(3)Mg12 cuboctahedra, faces with two equivalent K(1)Mg12 cuboctahedra, faces with two equivalent Mg(3)Mg12 cuboctahedra, and faces with six equivalent Mg(1)K2Mg10 cuboctahedra. In the second Mg site, Mg(2) is bonded in a 2-coordinate geometry to two equivalent K(1), two equivalent Mg(3), and four equivalent Mg(1) atoms. In the third Mg site, Mg(3) is bonded to six equivalent Mg(1) and six equivalent Mg(2) atoms to form MgMg12 cuboctahedra that share corners with six equivalent Mg(3)Mg12 cuboctahedra, edges with twelve equivalent Mg(1)K2Mg10 cuboctahedra, faces with two equivalent Mg(3)Mg12 cuboctahedra, faces with six equivalent K(1)Mg12 cuboctahedra, and faces with six equivalent Mg(1)K2Mg10 cuboctahedra.
KMg7 crystallizes in the hexagonal P-6m2 space group. K(1) is bonded to six equivalent Mg(1) and six equivalent Mg(2) atoms to form KMg12 cuboctahedra that share corners with six equivalent K(1)Mg12 cuboctahedra, corners with twelve equivalent Mg(1)K2Mg10 cuboctahedra, edges with six equivalent Mg(1)K2Mg10 cuboctahedra, faces with two equivalent K(1)Mg12 cuboctahedra, faces with six equivalent Mg(1)K2Mg10 cuboctahedra, and faces with six equivalent Mg(3)Mg12 cuboctahedra. All K(1)-Mg(1) bond lengths are 3.38 Å. All K(1)-Mg(2) bond lengths are 3.38 Å. There are three inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to two equivalent K(1), two equivalent Mg(3), four equivalent Mg(1), and four equivalent Mg(2) atoms to form distorted MgK2Mg10 cuboctahedra that share corners with four equivalent K(1)Mg12 cuboctahedra, corners with fourteen equivalent Mg(1)K2Mg10 cuboctahedra, edges with two equivalent K(1)Mg12 cuboctahedra, edges with four equivalent Mg(1)K2Mg10 cuboctahedra, edges with four equivalent Mg(3)Mg12 cuboctahedra, faces with two equivalent K(1)Mg12 cuboctahedra, faces with two equivalent Mg(3)Mg12 cuboctahedra, and faces with six equivalent Mg(1)K2Mg10 cuboctahedra. Both Mg(1)-Mg(3) bond lengths are 3.34 Å. There are two shorter (3.34 Å) and two longer (3.42 Å) Mg(1)-Mg(1) bond lengths. All Mg(1)-Mg(2) bond lengths are 3.30 Å. In the second Mg site, Mg(2) is bonded in a 2-coordinate geometry to two equivalent K(1), two equivalent Mg(3), and four equivalent Mg(1) atoms. Both Mg(2)-Mg(3) bond lengths are 3.38 Å. In the third Mg site, Mg(3) is bonded to six equivalent Mg(1) and six equivalent Mg(2) atoms to form MgMg12 cuboctahedra that share corners with six equivalent Mg(3)Mg12 cuboctahedra, edges with twelve equivalent Mg(1)K2Mg10 cuboctahedra, faces with two equivalent Mg(3)Mg12 cuboctahedra, faces with six equivalent K(1)Mg12 cuboctahedra, and faces with six equivalent Mg(1)K2Mg10 cuboctahedra.