  In this work we present theoretical calculations and analysis of the vibronic
structure of the spin-triplet optical transition in diamond nitrogen-vacancy
centres. The electronic structure of the defect is described using accurate
first-principles methods based on hybrid functionals. We devise a computational
methodology to determine the coupling between electrons and phonons during an
optical transition in the dilute limit. As a result, our approach yields a
smooth spectral function of electron-phonon coupling and includes both
quasi-localized and bulk phonons on equal footings. The luminescence lineshape
is determined via the generating function approach. We obtain a highly accurate
description of the luminescence band, including all key parameters such as the
Huang-Rhys factor, the Debye-Waller factor, and the frequency of the dominant
phonon mode. More importantly, our work provides insight into the vibrational
structure of nitrogen vacancy centres, in particular the role of local modes
and vibrational resonances. In particular, we find that the pronounced mode at
65 meV is a vibrational resonance, and we quantify localization properties of
this mode. These excellent results for the benchmark diamond nitrogen-vacancy
centre provide confidence that the procedure can be applied to other defects,
including alternative systems that are being considered for applications in
quantum information processing.
