Serpentine polymorphism: a quantitative insight from first-principles calculations