Ba2MgNb6(NO7)2 crystallizes in the triclinic P1 space group. There are two inequivalent Ba sites. In the first Ba site, Ba(1) is bonded in a distorted q6 geometry to one O(10), one O(13), one O(4), two equivalent O(1), two equivalent O(3), two equivalent O(6), and two equivalent O(8) atoms. In the second Ba site, Ba(2) is bonded in a 6-coordinate geometry to two equivalent O(12), two equivalent O(14), and two equivalent O(9) atoms. Mg(1) is bonded in a distorted trigonal planar geometry to one O(1), one O(5), and one O(8) atom. There are six inequivalent Nb sites. In the first Nb site, Nb(1) is bonded in a 6-coordinate geometry to one N(2), one O(14), one O(4), one O(5), and two equivalent O(2) atoms. In the second Nb site, Nb(2) is bonded to one O(2), one O(3), one O(6), one O(7), and two equivalent O(4) atoms to form NbO6 octahedra that share  a cornercorner with one Nb(4)NO5 octahedra,  a cornercorner with one Nb(6)NO5 octahedra, and corners with two equivalent Nb(2)O6 octahedra. The corner-sharing octahedral tilt angles range from 2-12°. In the third Nb site, Nb(3) is bonded in a 6-coordinate geometry to one O(11), one O(4), one O(5), one O(9), and two equivalent O(7) atoms. In the fourth Nb site, Nb(4) is bonded to one N(1), one O(12), one O(6), one O(8), and two equivalent O(10) atoms to form NbNO5 octahedra that share  a cornercorner with one Nb(2)O6 octahedra, corners with two equivalent Nb(4)NO5 octahedra, and  an edgeedge with one Nb(6)NO5 octahedra. The corner-sharing octahedral tilt angles range from 2-3°. In the fifth Nb site, Nb(5) is bonded in a 6-coordinate geometry to one N(2), two equivalent N(1), one O(10), one O(11), and one O(13) atom. In the sixth Nb site, Nb(6) is bonded to one N(1), one O(1), one O(12), one O(3), and two equivalent O(13) atoms to form NbNO5 octahedra that share  a cornercorner with one Nb(2)O6 octahedra, corners with two equivalent Nb(6)NO5 octahedra, and  an edgeedge with one Nb(4)NO5 octahedra. The corner-sharing octahedral tilt angles range from 2-7°. There are two inequivalent N sites. In the first N site, N(1) is bonded to one Nb(4), one Nb(6), and two equivalent Nb(5) atoms to form NNb4 trigonal pyramids that share corners with two equivalent N(1)Nb4 trigonal pyramids and  an edgeedge with one O(12)Ba2Nb2 tetrahedra. In the second N site, N(2) is bonded in a linear geometry to one Nb(1) and one Nb(5) atom. There are fourteen inequivalent O sites. In the first O site, O(1) is bonded in a distorted linear geometry to two equivalent Ba(1), one Mg(1), and one Nb(6) atom. In the second O site, O(2) is bonded in a distorted T-shaped geometry to one Nb(2) and two equivalent Nb(1) atoms. In the third O site, O(3) is bonded in a distorted rectangular see-saw-like geometry to two equivalent Ba(1), one Nb(2), and one Nb(6) atom. In the fourth O site, O(4) is bonded in a 5-coordinate geometry to one Ba(1), one Nb(1), one Nb(3), and two equivalent Nb(2) atoms. In the fifth O site, O(5) is bonded in a trigonal planar geometry to one Mg(1), one Nb(1), and one Nb(3) atom. In the sixth O site, O(6) is bonded in a distorted rectangular see-saw-like geometry to two equivalent Ba(1), one Nb(2), and one Nb(4) atom. In the seventh O site, O(7) is bonded in a distorted T-shaped geometry to one Nb(2) and two equivalent Nb(3) atoms. In the eighth O site, O(8) is bonded in a distorted linear geometry to two equivalent Ba(1), one Mg(1), and one Nb(4) atom. In the ninth O site, O(9) is bonded in a distorted single-bond geometry to two equivalent Ba(2) and one Nb(3) atom. In the tenth O site, O(10) is bonded in a distorted linear geometry to one Ba(1), one Nb(5), and two equivalent Nb(4) atoms. In the eleventh O site, O(11) is bonded in a linear geometry to one Nb(3) and one Nb(5) atom. In the twelfth O site, O(12) is bonded to two equivalent Ba(2), one Nb(4), and one Nb(6) atom to form OBa2Nb2 tetrahedra that share corners with two equivalent O(12)Ba2Nb2 tetrahedra and  an edgeedge with one N(1)Nb4 trigonal pyramid. In the thirteenth O site, O(13) is bonded in a 4-coordinate geometry to one Ba(1), one Nb(5), and two equivalent Nb(6) atoms. In the fourteenth O site, O(14) is bonded in a distorted single-bond geometry to two equivalent Ba(2) and one Nb(1) atom.
Ba2MgNb6(NO7)2 crystallizes in the triclinic P1 space group. There are two inequivalent Ba sites. In the first Ba site, Ba(1) is bonded in a distorted q6 geometry to one O(10), one O(13), one O(4), two equivalent O(1), two equivalent O(3), two equivalent O(6), and two equivalent O(8) atoms. The Ba(1)-O(10) bond length is 2.88 Å. The Ba(1)-O(13) bond length is 2.94 Å. The Ba(1)-O(4) bond length is 2.99 Å. There is one shorter (2.88 Å) and one longer (2.89 Å) Ba(1)-O(1) bond length. Both Ba(1)-O(3) bond lengths are 2.81 Å. Both Ba(1)-O(6) bond lengths are 2.80 Å. There is one shorter (2.91 Å) and one longer (2.92 Å) Ba(1)-O(8) bond length. In the second Ba site, Ba(2) is bonded in a 6-coordinate geometry to two equivalent O(12), two equivalent O(14), and two equivalent O(9) atoms. Both Ba(2)-O(12) bond lengths are 2.72 Å. Both Ba(2)-O(14) bond lengths are 2.77 Å. Both Ba(2)-O(9) bond lengths are 2.81 Å. Mg(1) is bonded in a distorted trigonal planar geometry to one O(1), one O(5), and one O(8) atom. The Mg(1)-O(1) bond length is 1.94 Å. The Mg(1)-O(5) bond length is 1.90 Å. The Mg(1)-O(8) bond length is 1.94 Å. There are six inequivalent Nb sites. In the first Nb site, Nb(1) is bonded in a 6-coordinate geometry to one N(2), one O(14), one O(4), one O(5), and two equivalent O(2) atoms. The Nb(1)-N(2) bond length is 1.95 Å. The Nb(1)-O(14) bond length is 1.82 Å. The Nb(1)-O(4) bond length is 2.50 Å. The Nb(1)-O(5) bond length is 2.15 Å. Both Nb(1)-O(2) bond lengths are 2.09 Å. In the second Nb site, Nb(2) is bonded to one O(2), one O(3), one O(6), one O(7), and two equivalent O(4) atoms to form NbO6 octahedra that share  a cornercorner with one Nb(4)NO5 octahedra,  a cornercorner with one Nb(6)NO5 octahedra, and corners with two equivalent Nb(2)O6 octahedra. The corner-sharing octahedral tilt angles range from 2-12°. The Nb(2)-O(2) bond length is 2.15 Å. The Nb(2)-O(3) bond length is 1.94 Å. The Nb(2)-O(6) bond length is 1.99 Å. The Nb(2)-O(7) bond length is 2.18 Å. Both Nb(2)-O(4) bond lengths are 2.05 Å. In the third Nb site, Nb(3) is bonded in a 6-coordinate geometry to one O(11), one O(4), one O(5), one O(9), and two equivalent O(7) atoms. The Nb(3)-O(11) bond length is 1.92 Å. The Nb(3)-O(4) bond length is 2.47 Å. The Nb(3)-O(5) bond length is 2.08 Å. The Nb(3)-O(9) bond length is 1.81 Å. Both Nb(3)-O(7) bond lengths are 2.09 Å. In the fourth Nb site, Nb(4) is bonded to one N(1), one O(12), one O(6), one O(8), and two equivalent O(10) atoms to form NbNO5 octahedra that share  a cornercorner with one Nb(2)O6 octahedra, corners with two equivalent Nb(4)NO5 octahedra, and  an edgeedge with one Nb(6)NO5 octahedra. The corner-sharing octahedral tilt angles range from 2-3°. The Nb(4)-N(1) bond length is 2.12 Å. The Nb(4)-O(12) bond length is 2.10 Å. The Nb(4)-O(6) bond length is 2.04 Å. The Nb(4)-O(8) bond length is 2.01 Å. Both Nb(4)-O(10) bond lengths are 2.03 Å. In the fifth Nb site, Nb(5) is bonded in a 6-coordinate geometry to one N(2), two equivalent N(1), one O(10), one O(11), and one O(13) atom. The Nb(5)-N(2) bond length is 1.84 Å. Both Nb(5)-N(1) bond lengths are 2.13 Å. The Nb(5)-O(10) bond length is 2.62 Å. The Nb(5)-O(11) bond length is 1.95 Å. The Nb(5)-O(13) bond length is 2.36 Å. In the sixth Nb site, Nb(6) is bonded to one N(1), one O(1), one O(12), one O(3), and two equivalent O(13) atoms to form NbNO5 octahedra that share  a cornercorner with one Nb(2)O6 octahedra, corners with two equivalent Nb(6)NO5 octahedra, and  an edgeedge with one Nb(4)NO5 octahedra. The corner-sharing octahedral tilt angles range from 2-7°. The Nb(6)-N(1) bond length is 2.12 Å. The Nb(6)-O(1) bond length is 2.00 Å. The Nb(6)-O(12) bond length is 2.04 Å. The Nb(6)-O(3) bond length is 2.12 Å. Both Nb(6)-O(13) bond lengths are 2.04 Å. There are two inequivalent N sites. In the first N site, N(1) is bonded to one Nb(4), one Nb(6), and two equivalent Nb(5) atoms to form NNb4 trigonal pyramids that share corners with two equivalent N(1)Nb4 trigonal pyramids and  an edgeedge with one O(12)Ba2Nb2 tetrahedra. In the second N site, N(2) is bonded in a linear geometry to one Nb(1) and one Nb(5) atom. There are fourteen inequivalent O sites. In the first O site, O(1) is bonded in a distorted linear geometry to two equivalent Ba(1), one Mg(1), and one Nb(6) atom. In the second O site, O(2) is bonded in a distorted T-shaped geometry to one Nb(2) and two equivalent Nb(1) atoms. In the third O site, O(3) is bonded in a distorted rectangular see-saw-like geometry to two equivalent Ba(1), one Nb(2), and one Nb(6) atom. In the fourth O site, O(4) is bonded in a 5-coordinate geometry to one Ba(1), one Nb(1), one Nb(3), and two equivalent Nb(2) atoms. In the fifth O site, O(5) is bonded in a trigonal planar geometry to one Mg(1), one Nb(1), and one Nb(3) atom. In the sixth O site, O(6) is bonded in a distorted rectangular see-saw-like geometry to two equivalent Ba(1), one Nb(2), and one Nb(4) atom. In the seventh O site, O(7) is bonded in a distorted T-shaped geometry to one Nb(2) and two equivalent Nb(3) atoms. In the eighth O site, O(8) is bonded in a distorted linear geometry to two equivalent Ba(1), one Mg(1), and one Nb(4) atom. In the ninth O site, O(9) is bonded in a distorted single-bond geometry to two equivalent Ba(2) and one Nb(3) atom. In the tenth O site, O(10) is bonded in a distorted linear geometry to one Ba(1), one Nb(5), and two equivalent Nb(4) atoms. In the eleventh O site, O(11) is bonded in a linear geometry to one Nb(3) and one Nb(5) atom. In the twelfth O site, O(12) is bonded to two equivalent Ba(2), one Nb(4), and one Nb(6) atom to form OBa2Nb2 tetrahedra that share corners with two equivalent O(12)Ba2Nb2 tetrahedra and  an edgeedge with one N(1)Nb4 trigonal pyramid. In the thirteenth O site, O(13) is bonded in a 4-coordinate geometry to one Ba(1), one Nb(5), and two equivalent Nb(6) atoms. In the fourteenth O site, O(14) is bonded in a distorted single-bond geometry to two equivalent Ba(2) and one Nb(1) atom.