BaMgAl3P2(HO7)2 crystallizes in the monoclinic C2 space group. Ba(1) is bonded in a 10-coordinate geometry to two equivalent O(2), two equivalent O(3), two equivalent O(4), two equivalent O(6), and two equivalent O(7) atoms. Mg(1) is bonded in a 4-coordinate geometry to two equivalent O(1) and two equivalent O(7) atoms. There are two inequivalent Al sites. In the first Al site, Al(1) is bonded to two equivalent O(2), two equivalent O(6), and two equivalent O(7) atoms to form AlO6 octahedra that share corners with four equivalent Al(2)O6 octahedra and corners with two equivalent P(1)O4 tetrahedra. The corner-sharing octahedral tilt angles range from 35-38°. In the second Al site, Al(2) is bonded to one O(3), one O(4), one O(6), one O(7), and two equivalent O(5) atoms to form AlO6 octahedra that share corners with two equivalent Al(1)O6 octahedra, corners with two equivalent Al(2)O6 octahedra, and corners with two equivalent P(1)O4 tetrahedra. The corner-sharing octahedral tilt angles range from 35-52°. P(1) is bonded to one O(1), one O(2), one O(3), and one O(4) atom to form PO4 tetrahedra that share  a cornercorner with one Al(1)O6 octahedra and corners with two equivalent Al(2)O6 octahedra. The corner-sharing octahedral tilt angles range from 51-53°. H(1) is bonded in a single-bond geometry to one O(1) and one O(5) atom. There are seven inequivalent O sites. In the first O site, O(1) is bonded in a 3-coordinate geometry to one Mg(1), one P(1), and one H(1) atom. In the second O site, O(2) is bonded in a 2-coordinate geometry to one Ba(1), one Al(1), and one P(1) atom. In the third O site, O(3) is bonded in a distorted bent 120 degrees geometry to one Ba(1), one Al(2), and one P(1) atom. In the fourth O site, O(4) is bonded in a distorted bent 120 degrees geometry to one Ba(1), one Al(2), and one P(1) atom. In the fifth O site, O(5) is bonded in a distorted single-bond geometry to two equivalent Al(2) and one H(1) atom. In the sixth O site, O(6) is bonded in a distorted bent 150 degrees geometry to one Ba(1), one Al(1), and one Al(2) atom. In the seventh O site, O(7) is bonded in a 3-coordinate geometry to one Ba(1), one Mg(1), one Al(1), and one Al(2) atom.
BaMgAl3P2(HO7)2 crystallizes in the monoclinic C2 space group. Ba(1) is bonded in a 10-coordinate geometry to two equivalent O(2), two equivalent O(3), two equivalent O(4), two equivalent O(6), and two equivalent O(7) atoms. Both Ba(1)-O(2) bond lengths are 2.78 Å. Both Ba(1)-O(3) bond lengths are 2.83 Å. Both Ba(1)-O(4) bond lengths are 2.87 Å. Both Ba(1)-O(6) bond lengths are 2.76 Å. Both Ba(1)-O(7) bond lengths are 2.86 Å. Mg(1) is bonded in a 4-coordinate geometry to two equivalent O(1) and two equivalent O(7) atoms. Both Mg(1)-O(1) bond lengths are 2.02 Å. Both Mg(1)-O(7) bond lengths are 2.10 Å. There are two inequivalent Al sites. In the first Al site, Al(1) is bonded to two equivalent O(2), two equivalent O(6), and two equivalent O(7) atoms to form AlO6 octahedra that share corners with four equivalent Al(2)O6 octahedra and corners with two equivalent P(1)O4 tetrahedra. The corner-sharing octahedral tilt angles range from 35-38°. Both Al(1)-O(2) bond lengths are 1.99 Å. Both Al(1)-O(6) bond lengths are 1.83 Å. Both Al(1)-O(7) bond lengths are 1.87 Å. In the second Al site, Al(2) is bonded to one O(3), one O(4), one O(6), one O(7), and two equivalent O(5) atoms to form AlO6 octahedra that share corners with two equivalent Al(1)O6 octahedra, corners with two equivalent Al(2)O6 octahedra, and corners with two equivalent P(1)O4 tetrahedra. The corner-sharing octahedral tilt angles range from 35-52°. The Al(2)-O(3) bond length is 1.94 Å. The Al(2)-O(4) bond length is 1.93 Å. The Al(2)-O(6) bond length is 1.89 Å. The Al(2)-O(7) bond length is 1.88 Å. There is one shorter (1.93 Å) and one longer (1.95 Å) Al(2)-O(5) bond length. P(1) is bonded to one O(1), one O(2), one O(3), and one O(4) atom to form PO4 tetrahedra that share  a cornercorner with one Al(1)O6 octahedra and corners with two equivalent Al(2)O6 octahedra. The corner-sharing octahedral tilt angles range from 51-53°. The P(1)-O(1) bond length is 1.53 Å. The P(1)-O(2) bond length is 1.56 Å. The P(1)-O(3) bond length is 1.56 Å. The P(1)-O(4) bond length is 1.56 Å. H(1) is bonded in a single-bond geometry to one O(1) and one O(5) atom. The H(1)-O(1) bond length is 1.73 Å. The H(1)-O(5) bond length is 1.00 Å. There are seven inequivalent O sites. In the first O site, O(1) is bonded in a 3-coordinate geometry to one Mg(1), one P(1), and one H(1) atom. In the second O site, O(2) is bonded in a 2-coordinate geometry to one Ba(1), one Al(1), and one P(1) atom. In the third O site, O(3) is bonded in a distorted bent 120 degrees geometry to one Ba(1), one Al(2), and one P(1) atom. In the fourth O site, O(4) is bonded in a distorted bent 120 degrees geometry to one Ba(1), one Al(2), and one P(1) atom. In the fifth O site, O(5) is bonded in a distorted single-bond geometry to two equivalent Al(2) and one H(1) atom. In the sixth O site, O(6) is bonded in a distorted bent 150 degrees geometry to one Ba(1), one Al(1), and one Al(2) atom. In the seventh O site, O(7) is bonded in a 3-coordinate geometry to one Ba(1), one Mg(1), one Al(1), and one Al(2) atom.