BaMgAl3P2(HO7)2 crystallizes in the monoclinic Cm space group. Ba(1) is bonded in a 8-coordinate geometry to one O(3), one O(4), two equivalent O(10), two equivalent O(5), and two equivalent O(6) atoms. Mg(1) is bonded in a 6-coordinate geometry to one O(4), one O(8), two equivalent O(6), and two equivalent O(9) atoms. There are two inequivalent Al sites. In the first Al site, Al(1) is bonded in a 5-coordinate geometry to one O(3), two equivalent O(10), and two equivalent O(9) atoms. In the second Al site, Al(2) is bonded to one O(10), one O(5), one O(7), one O(8), and one O(9) atom to form distorted AlO5 trigonal bipyramids that share  a cornercorner with one P(1)O4 tetrahedra and corners with two equivalent Al(2)O5 trigonal bipyramids. There are two inequivalent P sites. In the first P site, P(1) is bonded to one O(1), one O(3), and two equivalent O(5) atoms to form PO4 tetrahedra that share corners with two equivalent Al(2)O5 trigonal bipyramids. In the second P site, P(2) is bonded in a distorted tetrahedral geometry to one O(2), one O(4), and two equivalent O(6) atoms. There are two inequivalent H sites. In the first H site, H(1) is bonded in a single-bond geometry to one O(7) atom. In the second H site, H(2) is bonded in a single-bond geometry to one O(8) atom. There are ten inequivalent O sites. In the first O site, O(1) is bonded in a single-bond geometry to one P(1) atom. In the second O site, O(2) is bonded in a distorted single-bond geometry to one P(2) atom. In the third O site, O(3) is bonded in a distorted bent 120 degrees geometry to one Ba(1), one Al(1), and one P(1) atom. In the fourth O site, O(4) is bonded in a 3-coordinate geometry to one Ba(1), one Mg(1), and one P(2) atom. In the fifth O site, O(5) is bonded in a distorted bent 120 degrees geometry to one Ba(1), one Al(2), and one P(1) atom. In the sixth O site, O(6) is bonded in a 3-coordinate geometry to one Ba(1), one Mg(1), and one P(2) atom. In the seventh O site, O(7) is bonded in a distorted trigonal non-coplanar geometry to two equivalent Al(2) and one H(1) atom. In the eighth O site, O(8) is bonded in a distorted single-bond geometry to one Mg(1), two equivalent Al(2), and one H(2) atom. In the ninth O site, O(9) is bonded in a T-shaped geometry to one Mg(1), one Al(1), and one Al(2) atom. In the tenth O site, O(10) is bonded in a 4-coordinate geometry to one Ba(1), one Al(1), one Al(2), and one O(10) atom.
BaMgAl3P2(HO7)2 crystallizes in the monoclinic Cm space group. Ba(1) is bonded in a 8-coordinate geometry to one O(3), one O(4), two equivalent O(10), two equivalent O(5), and two equivalent O(6) atoms. The Ba(1)-O(3) bond length is 2.95 Å. The Ba(1)-O(4) bond length is 2.59 Å. Both Ba(1)-O(10) bond lengths are 2.96 Å. Both Ba(1)-O(5) bond lengths are 3.20 Å. Both Ba(1)-O(6) bond lengths are 2.61 Å. Mg(1) is bonded in a 6-coordinate geometry to one O(4), one O(8), two equivalent O(6), and two equivalent O(9) atoms. The Mg(1)-O(4) bond length is 2.13 Å. The Mg(1)-O(8) bond length is 2.33 Å. Both Mg(1)-O(6) bond lengths are 2.17 Å. Both Mg(1)-O(9) bond lengths are 2.04 Å. There are two inequivalent Al sites. In the first Al site, Al(1) is bonded in a 5-coordinate geometry to one O(3), two equivalent O(10), and two equivalent O(9) atoms. The Al(1)-O(3) bond length is 1.78 Å. Both Al(1)-O(10) bond lengths are 1.91 Å. Both Al(1)-O(9) bond lengths are 1.79 Å. In the second Al site, Al(2) is bonded to one O(10), one O(5), one O(7), one O(8), and one O(9) atom to form distorted AlO5 trigonal bipyramids that share  a cornercorner with one P(1)O4 tetrahedra and corners with two equivalent Al(2)O5 trigonal bipyramids. The Al(2)-O(10) bond length is 1.99 Å. The Al(2)-O(5) bond length is 1.78 Å. The Al(2)-O(7) bond length is 1.85 Å. The Al(2)-O(8) bond length is 2.05 Å. The Al(2)-O(9) bond length is 1.78 Å. There are two inequivalent P sites. In the first P site, P(1) is bonded to one O(1), one O(3), and two equivalent O(5) atoms to form PO4 tetrahedra that share corners with two equivalent Al(2)O5 trigonal bipyramids. The P(1)-O(1) bond length is 1.48 Å. The P(1)-O(3) bond length is 1.60 Å. Both P(1)-O(5) bond lengths are 1.59 Å. In the second P site, P(2) is bonded in a distorted tetrahedral geometry to one O(2), one O(4), and two equivalent O(6) atoms. The P(2)-O(2) bond length is 1.49 Å. The P(2)-O(4) bond length is 1.57 Å. Both P(2)-O(6) bond lengths are 1.58 Å. There are two inequivalent H sites. In the first H site, H(1) is bonded in a single-bond geometry to one O(7) atom. The H(1)-O(7) bond length is 0.97 Å. In the second H site, H(2) is bonded in a single-bond geometry to one O(8) atom. The H(2)-O(8) bond length is 1.01 Å. There are ten inequivalent O sites. In the first O site, O(1) is bonded in a single-bond geometry to one P(1) atom. In the second O site, O(2) is bonded in a distorted single-bond geometry to one P(2) atom. In the third O site, O(3) is bonded in a distorted bent 120 degrees geometry to one Ba(1), one Al(1), and one P(1) atom. In the fourth O site, O(4) is bonded in a 3-coordinate geometry to one Ba(1), one Mg(1), and one P(2) atom. In the fifth O site, O(5) is bonded in a distorted bent 120 degrees geometry to one Ba(1), one Al(2), and one P(1) atom. In the sixth O site, O(6) is bonded in a 3-coordinate geometry to one Ba(1), one Mg(1), and one P(2) atom. In the seventh O site, O(7) is bonded in a distorted trigonal non-coplanar geometry to two equivalent Al(2) and one H(1) atom. In the eighth O site, O(8) is bonded in a distorted single-bond geometry to one Mg(1), two equivalent Al(2), and one H(2) atom. In the ninth O site, O(9) is bonded in a T-shaped geometry to one Mg(1), one Al(1), and one Al(2) atom. In the tenth O site, O(10) is bonded in a 4-coordinate geometry to one Ba(1), one Al(1), one Al(2), and one O(10) atom. The O(10)-O(10) bond length is 1.56 Å.