Quantum structural phase transition in chains of interacting atoms