Distortions of the calcite and aragonite atomic structures from interstitial water