  The properties of graphene-like BC$_6$N semiconductor are studied using
density functional theory taking into account the attractive interaction
between B and N atoms. In the presence of a strong attractive interaction
between B and N dopant atoms, the electron charge distribution is highly
localized along the B-N bonds, while for a weaker attractive interaction the
electrons are delocalized along the entire hexagonal ring of BC$_6$N.
Furthermore, when both B and N atoms are doped at the same site of the hexagon,
the breaking of the sub-lattice symmetry is low producing a small bandgap. In
contrast, if the dopant atoms are at different sites, a high sub-lattice
symmetry breaking is found leading to a large bandgap. The influences of
electron localization/delocalization and the tunable bandgap on thermal
behaviors such as the electronic thermal conductivity, the Seebeck coefficient,
and the figure of merit, and optical properties such as the dielectric
function, the excitation spectra, the refractive index, the electron energy
loss spectra, the reflectivity, and the optical conductivity are presented. An
enhancement with a red shift of the optical conductivity at low energy range is
seen while a reduction at the high energy range is found indicating that the
BC$_6$N structure may be useful for optoelectronic devices in the low energy,
visible range.
