The role of gel chemistry in synthesis of aluminophosphate molecular sieves