BaMgAl3P2(HO7)2 crystallizes in the triclinic P1 space group. Ba(1) is bonded in a 3-coordinate geometry to one O(13), one O(14), one O(4), one O(5), and one O(6) atom. Mg(1) is bonded to one O(1), one O(3), one O(7), one O(8), and one O(9) atom to form distorted MgO5 trigonal bipyramids that share  a cornercorner with one Al(1)O6 octahedra, corners with two equivalent P(2)O4 tetrahedra,  an edgeedge with one Al(2)O6 octahedra,  an edgeedge with one Al(3)O6 octahedra, and  an edgeedge with one P(1)O4 tetrahedra. The corner-sharing octahedral tilt angles are 26°. There are three inequivalent Al sites. In the first Al site, Al(1) is bonded to one O(11), one O(12), one O(13), one O(14), one O(3), and one O(4) atom to form distorted AlO6 octahedra that share corners with two equivalent Al(2)O6 octahedra, corners with two equivalent Al(3)O6 octahedra,  a cornercorner with one P(1)O4 tetrahedra,  a cornercorner with one P(2)O4 tetrahedra, and  a cornercorner with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 36-41°. In the second Al site, Al(2) is bonded to one O(10), one O(11), one O(14), one O(6), one O(7), and one O(9) atom to form AlO6 octahedra that share corners with two equivalent Al(1)O6 octahedra, corners with two equivalent Al(3)O6 octahedra,  a cornercorner with one P(1)O4 tetrahedra,  a cornercorner with one P(2)O4 tetrahedra, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 36-59°. In the third Al site, Al(3) is bonded to one O(10), one O(12), one O(13), one O(5), one O(8), and one O(9) atom to form AlO6 octahedra that share corners with two equivalent Al(1)O6 octahedra, corners with two equivalent Al(2)O6 octahedra,  a cornercorner with one P(1)O4 tetrahedra,  a cornercorner with one P(2)O4 tetrahedra, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 36-59°. There are two inequivalent P sites. In the first P site, P(1) is bonded to one O(1), one O(3), one O(5), and one O(6) atom to form PO4 tetrahedra that share  a cornercorner with one Al(1)O6 octahedra,  a cornercorner with one Al(2)O6 octahedra,  a cornercorner with one Al(3)O6 octahedra, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 49-57°. In the second P site, P(2) is bonded to one O(2), one O(4), one O(7), and one O(8) atom to form PO4 tetrahedra that share  a cornercorner with one Al(1)O6 octahedra,  a cornercorner with one Al(2)O6 octahedra,  a cornercorner with one Al(3)O6 octahedra, and corners with two equivalent Mg(1)O5 trigonal bipyramids. The corner-sharing octahedral tilt angles range from 47-58°. There are two inequivalent H sites. In the first H site, H(1) is bonded in a single-bond geometry to one O(9) atom. In the second H site, H(2) is bonded in a single-bond geometry to one O(10) atom. There are fourteen inequivalent O sites. In the first O site, O(1) is bonded in an L-shaped geometry to one Mg(1) and one P(1) atom. In the second O site, O(2) is bonded in a single-bond geometry to one P(2) atom. In the third O site, O(3) is bonded in a 3-coordinate geometry to one Mg(1), one Al(1), and one P(1) atom. In the fourth O site, O(4) is bonded in a distorted trigonal planar geometry to one Ba(1), one Al(1), and one P(2) atom. In the fifth O site, O(5) is bonded in a 3-coordinate geometry to one Ba(1), one Al(3), and one P(1) atom. In the sixth O site, O(6) is bonded in a 3-coordinate geometry to one Ba(1), one Al(2), and one P(1) atom. In the seventh O site, O(7) is bonded in a 3-coordinate geometry to one Mg(1), one Al(2), and one P(2) atom. In the eighth O site, O(8) is bonded in a 3-coordinate geometry to one Mg(1), one Al(3), and one P(2) atom. In the ninth O site, O(9) is bonded in a distorted tetrahedral geometry to one Mg(1), one Al(2), one Al(3), and one H(1) atom. In the tenth O site, O(10) is bonded in a distorted trigonal planar geometry to one Al(2), one Al(3), and one H(2) atom. In the eleventh O site, O(11) is bonded in a distorted bent 150 degrees geometry to one Al(1) and one Al(2) atom. In the twelfth O site, O(12) is bonded in a distorted bent 150 degrees geometry to one Al(1) and one Al(3) atom. In the thirteenth O site, O(13) is bonded in a 4-coordinate geometry to one Ba(1), one Al(1), one Al(3), and one O(14) atom. In the fourteenth O site, O(14) is bonded in a 4-coordinate geometry to one Ba(1), one Al(1), one Al(2), and one O(13) atom.
BaMgAl3P2(HO7)2 crystallizes in the triclinic P1 space group. Ba(1) is bonded in a 3-coordinate geometry to one O(13), one O(14), one O(4), one O(5), and one O(6) atom. The Ba(1)-O(13) bond length is 2.92 Å. The Ba(1)-O(14) bond length is 2.92 Å. The Ba(1)-O(4) bond length is 2.65 Å. The Ba(1)-O(5) bond length is 2.64 Å. The Ba(1)-O(6) bond length is 2.64 Å. Mg(1) is bonded to one O(1), one O(3), one O(7), one O(8), and one O(9) atom to form distorted MgO5 trigonal bipyramids that share  a cornercorner with one Al(1)O6 octahedra, corners with two equivalent P(2)O4 tetrahedra,  an edgeedge with one Al(2)O6 octahedra,  an edgeedge with one Al(3)O6 octahedra, and  an edgeedge with one P(1)O4 tetrahedra. The corner-sharing octahedral tilt angles are 26°. The Mg(1)-O(1) bond length is 1.91 Å. The Mg(1)-O(3) bond length is 2.21 Å. The Mg(1)-O(7) bond length is 2.22 Å. The Mg(1)-O(8) bond length is 2.22 Å. The Mg(1)-O(9) bond length is 1.98 Å. There are three inequivalent Al sites. In the first Al site, Al(1) is bonded to one O(11), one O(12), one O(13), one O(14), one O(3), and one O(4) atom to form distorted AlO6 octahedra that share corners with two equivalent Al(2)O6 octahedra, corners with two equivalent Al(3)O6 octahedra,  a cornercorner with one P(1)O4 tetrahedra,  a cornercorner with one P(2)O4 tetrahedra, and  a cornercorner with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 36-41°. The Al(1)-O(11) bond length is 1.81 Å. The Al(1)-O(12) bond length is 1.81 Å. The Al(1)-O(13) bond length is 1.99 Å. The Al(1)-O(14) bond length is 1.99 Å. The Al(1)-O(3) bond length is 2.05 Å. The Al(1)-O(4) bond length is 1.93 Å. In the second Al site, Al(2) is bonded to one O(10), one O(11), one O(14), one O(6), one O(7), and one O(9) atom to form AlO6 octahedra that share corners with two equivalent Al(1)O6 octahedra, corners with two equivalent Al(3)O6 octahedra,  a cornercorner with one P(1)O4 tetrahedra,  a cornercorner with one P(2)O4 tetrahedra, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 36-59°. The Al(2)-O(10) bond length is 1.86 Å. The Al(2)-O(11) bond length is 1.85 Å. The Al(2)-O(14) bond length is 2.00 Å. The Al(2)-O(6) bond length is 1.88 Å. The Al(2)-O(7) bond length is 1.98 Å. The Al(2)-O(9) bond length is 1.93 Å. In the third Al site, Al(3) is bonded to one O(10), one O(12), one O(13), one O(5), one O(8), and one O(9) atom to form AlO6 octahedra that share corners with two equivalent Al(1)O6 octahedra, corners with two equivalent Al(2)O6 octahedra,  a cornercorner with one P(1)O4 tetrahedra,  a cornercorner with one P(2)O4 tetrahedra, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 36-59°. The Al(3)-O(10) bond length is 1.86 Å. The Al(3)-O(12) bond length is 1.85 Å. The Al(3)-O(13) bond length is 2.00 Å. The Al(3)-O(5) bond length is 1.88 Å. The Al(3)-O(8) bond length is 1.98 Å. The Al(3)-O(9) bond length is 1.93 Å. There are two inequivalent P sites. In the first P site, P(1) is bonded to one O(1), one O(3), one O(5), and one O(6) atom to form PO4 tetrahedra that share  a cornercorner with one Al(1)O6 octahedra,  a cornercorner with one Al(2)O6 octahedra,  a cornercorner with one Al(3)O6 octahedra, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 49-57°. The P(1)-O(1) bond length is 1.53 Å. The P(1)-O(3) bond length is 1.58 Å. The P(1)-O(5) bond length is 1.54 Å. The P(1)-O(6) bond length is 1.54 Å. In the second P site, P(2) is bonded to one O(2), one O(4), one O(7), and one O(8) atom to form PO4 tetrahedra that share  a cornercorner with one Al(1)O6 octahedra,  a cornercorner with one Al(2)O6 octahedra,  a cornercorner with one Al(3)O6 octahedra, and corners with two equivalent Mg(1)O5 trigonal bipyramids. The corner-sharing octahedral tilt angles range from 47-58°. The P(2)-O(2) bond length is 1.50 Å. The P(2)-O(4) bond length is 1.56 Å. The P(2)-O(7) bond length is 1.61 Å. The P(2)-O(8) bond length is 1.62 Å. There are two inequivalent H sites. In the first H site, H(1) is bonded in a single-bond geometry to one O(9) atom. The H(1)-O(9) bond length is 0.98 Å. In the second H site, H(2) is bonded in a single-bond geometry to one O(10) atom. The H(2)-O(10) bond length is 0.99 Å. There are fourteen inequivalent O sites. In the first O site, O(1) is bonded in an L-shaped geometry to one Mg(1) and one P(1) atom. In the second O site, O(2) is bonded in a single-bond geometry to one P(2) atom. In the third O site, O(3) is bonded in a 3-coordinate geometry to one Mg(1), one Al(1), and one P(1) atom. In the fourth O site, O(4) is bonded in a distorted trigonal planar geometry to one Ba(1), one Al(1), and one P(2) atom. In the fifth O site, O(5) is bonded in a 3-coordinate geometry to one Ba(1), one Al(3), and one P(1) atom. In the sixth O site, O(6) is bonded in a 3-coordinate geometry to one Ba(1), one Al(2), and one P(1) atom. In the seventh O site, O(7) is bonded in a 3-coordinate geometry to one Mg(1), one Al(2), and one P(2) atom. In the eighth O site, O(8) is bonded in a 3-coordinate geometry to one Mg(1), one Al(3), and one P(2) atom. In the ninth O site, O(9) is bonded in a distorted tetrahedral geometry to one Mg(1), one Al(2), one Al(3), and one H(1) atom. In the tenth O site, O(10) is bonded in a distorted trigonal planar geometry to one Al(2), one Al(3), and one H(2) atom. In the eleventh O site, O(11) is bonded in a distorted bent 150 degrees geometry to one Al(1) and one Al(2) atom. In the twelfth O site, O(12) is bonded in a distorted bent 150 degrees geometry to one Al(1) and one Al(3) atom. In the thirteenth O site, O(13) is bonded in a 4-coordinate geometry to one Ba(1), one Al(1), one Al(3), and one O(14) atom. The O(13)-O(14) bond length is 1.54 Å. In the fourteenth O site, O(14) is bonded in a 4-coordinate geometry to one Ba(1), one Al(1), one Al(2), and one O(13) atom.