Quantum dynamics of electrons in a molecular segment with phonon interaction