MgGa4P6(HO3)6 crystallizes in the hexagonal P-6 space group. Mg(1) is bonded in a distorted trigonal planar geometry to three equivalent O(1) atoms. There are two inequivalent Ga sites. In the first Ga site, Ga(1) is bonded in a 3-coordinate geometry to three equivalent O(3) atoms. In the second Ga site, Ga(2) is bonded to three equivalent O(2) and three equivalent O(4) atoms to form distorted GaO6 octahedra that share corners with three equivalent P(1)HO3 tetrahedra, corners with three equivalent P(2)HO3 tetrahedra, and  a faceface with one Ga(2)O6 octahedra. There are two inequivalent P sites. In the first P site, P(1) is bonded to one H(1), one O(1), and two equivalent O(4) atoms to form distorted PHO3 tetrahedra that share corners with two equivalent Ga(2)O6 octahedra. The corner-sharing octahedral tilt angles are 39°. In the second P site, P(2) is bonded to one H(2), one O(2), and two equivalent O(3) atoms to form distorted PHO3 tetrahedra that share corners with two equivalent Ga(2)O6 octahedra. The corner-sharing octahedral tilt angles are 54°. There are two inequivalent H sites. In the first H site, H(1) is bonded in a single-bond geometry to one P(1) atom. In the second H site, H(2) is bonded in a single-bond geometry to one P(2) atom. There are four inequivalent O sites. In the first O site, O(1) is bonded in a linear geometry to one Mg(1) and one P(1) atom. In the second O site, O(2) is bonded in a distorted trigonal planar geometry to two equivalent Ga(2) and one P(2) atom. In the third O site, O(3) is bonded in a bent 120 degrees geometry to one Ga(1) and one P(2) atom. In the fourth O site, O(4) is bonded in a bent 150 degrees geometry to one Ga(2) and one P(1) atom.
MgGa4P6(HO3)6 crystallizes in the hexagonal P-6 space group. Mg(1) is bonded in a distorted trigonal planar geometry to three equivalent O(1) atoms. All Mg(1)-O(1) bond lengths are 1.92 Å. There are two inequivalent Ga sites. In the first Ga site, Ga(1) is bonded in a 3-coordinate geometry to three equivalent O(3) atoms. All Ga(1)-O(3) bond lengths are 1.91 Å. In the second Ga site, Ga(2) is bonded to three equivalent O(2) and three equivalent O(4) atoms to form distorted GaO6 octahedra that share corners with three equivalent P(1)HO3 tetrahedra, corners with three equivalent P(2)HO3 tetrahedra, and  a faceface with one Ga(2)O6 octahedra. All Ga(2)-O(2) bond lengths are 2.25 Å. All Ga(2)-O(4) bond lengths are 1.92 Å. There are two inequivalent P sites. In the first P site, P(1) is bonded to one H(1), one O(1), and two equivalent O(4) atoms to form distorted PHO3 tetrahedra that share corners with two equivalent Ga(2)O6 octahedra. The corner-sharing octahedral tilt angles are 39°. The P(1)-H(1) bond length is 1.41 Å. The P(1)-O(1) bond length is 1.52 Å. Both P(1)-O(4) bond lengths are 1.56 Å. In the second P site, P(2) is bonded to one H(2), one O(2), and two equivalent O(3) atoms to form distorted PHO3 tetrahedra that share corners with two equivalent Ga(2)O6 octahedra. The corner-sharing octahedral tilt angles are 54°. The P(2)-H(2) bond length is 1.41 Å. The P(2)-O(2) bond length is 1.55 Å. Both P(2)-O(3) bond lengths are 1.54 Å. There are two inequivalent H sites. In the first H site, H(1) is bonded in a single-bond geometry to one P(1) atom. In the second H site, H(2) is bonded in a single-bond geometry to one P(2) atom. There are four inequivalent O sites. In the first O site, O(1) is bonded in a linear geometry to one Mg(1) and one P(1) atom. In the second O site, O(2) is bonded in a distorted trigonal planar geometry to two equivalent Ga(2) and one P(2) atom. In the third O site, O(3) is bonded in a bent 120 degrees geometry to one Ga(1) and one P(2) atom. In the fourth O site, O(4) is bonded in a bent 150 degrees geometry to one Ga(2) and one P(1) atom.