Use of confinement and additives to control inorganic crystallization