Quantum phase transition in the one-dimensional water chain