  In the present paper, we investigate the structural, thermodynamic, dynamic,
elastic, and electronic properties of doped 2D diamond C$_4$X$_2$ (X = B or N)
nanosheets in both AA$'$A$''$ and ABC stacking configurations, by
first-principles calculations. Those systems are composed of 3 diamond-like
graphene sheets, with an undoped graphene layer between two 50% doped ones. Our
results, based on the analysis of ab-initio molecular dynamics simulations,
phonon dispersion spectra, and Born's criteria for mechanical stability,
revealed that all four structures are stable. Additionally, their standard
enthalpy of formation values are similar to the one of pristine 2D diamond,
recently synthesized by compressing three graphene layers. The C$_4$X$_2$ (X =
B or N) systems exhibit high elastic constant values and stiffness comparable
to the diamond. The C$_4$N$_2$ nanosheets present wide indirect band gaps that
could be advantageous for applications similar to the ones of the hexagonal
boron nitride (h-BN), such as a substrate for high-mobility 2D devices. On the
other hand, the C$_4$B$_2$ systems are semiconductors with direct band gaps, in
the 1.6 - 2.0 eV range, and small effective masses, which are characteristics
that may be favorable to high carrier mobility and optoelectronics
applications.
