  The peculiar electronic and optical properties of covalent organic frameworks
(COFs) are largely determined by protonation, a ubiquitous phenomenon in the
solution environment in which they are synthesized. The resulting effects are
non-trivial and appear to be crucial for the intriguing functionalities of
these materials. In the quantum-mechanical framework of time-dependent
density-functional theory, we investigate from first principles the impact of
protonation of triazine and amino groups in molecular building blocks of COFs
in water solution. In all considered cases, we find that proton uptake leads to
a gap reduction and to a reorganization of the electronic structure, driven by
the presence of the proton and by the electrostatic attraction between the
positively charged protonated species and the negative counterion in its
vicinity. Structural distortions induced by protonation are found to play only
a minor role. The interplay between band-gap renormalization and exciton
binding strength determines the energy of the absorption onsets: when the
former prevails on the latter, a red-shift is observed. Furthermore, the
spatial and energetic rearrangement of the molecular orbitals upon protonation
induces a splitting of the lowest-energy peaks and a decrease of their
oscillator strength in comparison with the pristine counterparts. Our results
offer quantitative and microscopic insight into the role of protonation on the
electronic and optical properties of triazine derivatives as building blocks of
COFs. As such, they contribute to rationalize the relationships between
structure, property, and functionality of these materials.
