Template-Dependent Morphogenesis of Oriented Calcite Crystals in the Presence of Magnesium Ions