We investigate the emergence of chaotic dynamics in a quantum Fermi--Pasta--Ulam problem for anharmonic vibrations in atomic chains applying semi-quantitative analysis of resonant interactions complemented by exact diagonalization numerical studies. The crossover energy separating chaotic high energy phase and localized (integrable) low energy phase is estimated. It decreases inversely proportionally to the number of atoms until approaching the quantum regime where this dependence saturates. The chaotic behavior appears at lower energies in systems with free or fixed ends boundary conditions compared to periodic systems. The applications of the theory to realistic molecules are discussed.