  The stability, electronic and optical properties of single-walled carbon
nanotubes (CNTs) and graphene noncovalently functionalized with free-base
tetraphenylporphyrin (TPP) molecules is addressed by density functional theory
calculations, including corrections to dispersive interactions. We study the
TPP physisorption on 42 CNT species, particularly those with chiral indices
($n$,$m$), where $5 \leq n \leq 12$ and $0\leq m\leq n$. Our results show a
quite strong $\pi$-$\pi$ interaction between TPP and the CNT surface, with
binding energies ranging from 1.1 to 1.8 eV, where higher energies can be
associated with increasing CNT diameters. We also find that the TPP optical
absorptions would not be affected by the CNT diameter or chirality. Results for
the TPP physisorption on graphene show a remarkable stability with binding
energy of 3.2 eV, inducing a small redshift on the $\pi$-stacked TPP absorption
bands. The strong graphene-TPP interaction also induces a charge transfer from
TPP to graphene, indicating a $n$-type doping mechanism without compromising
the graphene structure.
