Structure of alginate gels: interaction of diuronate units with divalent cations from density functional calculations.