Explanation of the atomic structure of water in rocks