Introduction

Carbon has various hybridized states (sp, sp2, sp3) and can form diverse bonding, with the ability to bind to itself and to nearly all elements. As a consequence, carbon has numerous allotropes such as graphene [1], fullerenes [2], carbon nanotubes [3], nanorings [4], and nanobuds [5]. In the past several decades, fabrication and discovery of new carbon phases with high stability, novel bonding characteristics, unique properties, and applications have been an ongoing effort for theoretical, synthetic, and material scientists. Two new carbon allotropes from graphene family, the so-called graphyne (GY) and graphdiyne (GDY), have already been discovered [6,7,8]. Although not yet synthesized, GY was theoretically shown to be more stable than GDY and there is much fortune for its synthesis [9]. One and two acetylenic linkages between two carbon hexagons in GY and GDY give the natural holes into the structures and make them capable of lots of applications [10, 11]. GDY was successfully synthesized on the surface of copper via cross-coupling reaction [12]. Due to promising electrical, mechanical, and optical properties of these artificial carbon allotropes, GY and GDY are inspiring candidates for energy storage applications such as hydrogen storage devices [13,14,15] and lithium-ion batteries (LIBs) [16,17,18,19].

To expand the application of carbon surfaces, modulation of their electronic properties is essential. Several methods have already been explored to tune the band gaps in graphene such as cutting into nanoribbons and edge functionalization. [20, 21]. These methods are also expected to be applicable to GY and GDY. In addition, GY/GDY have much larger natural holes than graphene, thus it is easier to realize doping of various candidates into the holes to fabricate n-doping or p-doping semiconductors. There are two possible positions for the dopant in GY and GDY [22]. The dopant can replace either the carbon atoms in the acetylenic linkages or the carbon atoms in the hexagons of GY/GDY. Deng and coworkers showed that BN codoping on GY leads to the opening of band gap with a range of 0.07–0.50 eV depending on different codoping configurations [23]. When BN has completely replaced the carbon atoms, new materials, called BN-yne and BN-diyne, characterizing as more of insulators than semiconductors, are formed [24, 25]. On the other hand, it is possible to tune the band gap of these nanostructures via chemical functionalization. Koo et al. investigated the band gap tunability of GY by halogenation [26]. The halogen atoms preferentially adsorb on the sp-bonded carbon atoms to form sp2 bonds. In another study, it has been shown that fluorination widens the band gap of GY and GDY depending on its functionalization site [27]. Another smart method for modification of electronic property of GY/GDY is cutting them into one-dimensional (nanoribbons) or zero-dimensional (nanoflakes) structures which may produce band gap depending on the width and the shape [28, 29]. In this context, there have been experimental efforts to synthesize GY and GDY nanoflakes and nanofilms [30,31,32,33,34] providing evidence that the synthesis of GY and GDY is possible.

These surfaces are also prospective candidates for optoelectronic applications such as photonics, light-emitting devices, artificial photosynthesis, photo-detectors, and ultrafast lasers. Thus, knowing their electronic states will reveal a better understanding about their functions related to the electronic excitation processes involving the ground states and excited states orbitals. Recently, Bhattacharya et al. [25] explored the possibility of using GY derivatives as UV-light protector. However, no other systematic investigation on the optical properties of modified GY/GDY has been conducted thus far. Regarding the potential application of GY/GDY in future nanoelectronics, exploring efficient methods for engineering desired electronic and optical properties is of importance. Accordingly, in this research, we present a theoretical study to tailor the electronic and optical response of GY/GDY nanoflakes subjected to two types of modifications: edge functionalization and chemical doping. Recent experimental studies show that nitrogen and sulfur codoped graphene is a multifunctional electrode material for high performance LIBs and oxygen reduction reaction [35,36,37,38]. In this view, herein we investigate the variation of the electronic properties of GY/GDY nanoflakes after the introduction of N and S onto their surfaces. Moreover, in our recent paper [39], we have studied the edge functionalization of GY/GDY nanoflakes by a single oxygen containing groups. Nevertheless, the literature is missing a complete survey including the influence of increasing number of functional groups as well as comparing the effectiveness of doping versus functionalization on the electronic structures and optical properties of GY/GDY. Accordingly, this work is devoted to investigate the optoelectronic properties of edge oxidized as well as doped GY/GDY with different levels of functional group or doped atoms. Our results would serve as an important guide for experimental synthesis of modified GY/GDY sheets with specific optoelectronic behavior.

Method

To investigate the electronic property of modified GY/GDY nanoflakes, density functional theory (DFT) calculations were performed using the Gaussian09 suit of programs [40]. For the exchange correlation energy functional, the generalized gradient approximation (GGA) was employed in the Perdew–Burke–Ernzerhof (PBE) scheme [41]. The basis set is split valence double-zeta with inclusion of polarization functions, 6-31G (d). The model GY and GDY are nanoflakes containing 66 and 90 carbon atoms, respectively (Fig. 1). The dangling σ bonds at the edges are saturated with hydrogen atoms. In order to quantify the stability and formation ability of doped or functionalized GY/GDY nanoflakes, we calculate the cohesive energies using the following formula

$$ E_{\text{coh}} = \left( {E_{\text{tot}} - \mathop \sum \limits_{i} n_{i} E_{i} } \right)/N $$
(1)

where E tot, E i , and n i being the total energy of the nanoflakes, the atomic energy and the amount of atoms type i (i = C, O, H, S, N), and N is the total number of atoms present in the modified GY/GDY. For all doped and functionalized GY/GDY surfaces, harmonic vibration frequencies were calculated to guarantee that the optimized geometries correspond to the true minimum. Further, single-point time-dependent DFT (TDDFT) calculations were performed on the ground-state optimized geometries of all modified GY/GDY. The UV–visible absorption spectra were generated by calculating 100 singlet excited states at PBE level. The dominant molecular orbital transitions along with their oscillator strengths and excitation wavelengths have been determined.

Figure 1
figure 1

The structures of considered model nanoflakes, GY (left) and GDY (right), together with substitutional sites for N_doping

Results and discussion

Edge functionalization

In our previous study [39], we performed edge functionalization of GY/GDY nanoflakes by a single oxygen containing functional groups such as carbonyl, ketone, hydroxyl, formyl, carboxylic, and epoxide. The results show that the carbonyl group has the greatest impact on the electronic structures of considered flakes. Moreover, the carbon surfaces terminated with carboxylic group are found to be more stable than other oxidized surfaces. Accordingly, in the present article, we focus on CO and COOH functional groups and explore how increasing number of functional groups affects the electronic and optical properties of GY/GDY surfaces. The model GY and GDY nanoflakes have six hexagons at their open edges which are susceptible for edge functionalization (Fig. S1 in supplementary material). We start the surface modification by functionalizing one hexagon with single CO or COOH group and trace the optoelectronic properties of GY/GDY flakes after successive addition of functional groups to all six hexagons. Thus, the number of functional groups (x) varies from 1 to 6. For all 24 functionalized GY/GDY systems, the geometries were allowed to relax after optimization without symmetry constraints. To evaluate the stability of functionalized surfaces, the cohesive energies were calculated by the use of Eq. (1). Figure 2 presents the variation of E coh with respect to the number of functional groups. The cohesive energy of pristine GY turns out to be −6.34 eV/atom which is in close agreement to the value −6.76 eV/atom reported by Shin et al. [42]. The cohesive energy for the pristine GDY is −6.45 eV/atom which is a bit higher than that of GY. Functionalization of these surfaces with CO increases the cohesive energy in a linear fashion. On the contrary, successive addition of COOH decreases the cohesive energy linearly by about 0.015 eV per COOH group.

Figure 2
figure 2

Variation of cohesive energies with respect to the number of CO and COOH group (x)

Now, we explore the electronic structures of functionalized surfaces. Variations of the electronic energy gap (εHOMO–εLUMO) as a function of number of CO or COOH groups are shown in Fig. 3. It is possible to tune the GY/GDY energy gap over a wide range of ~1.20 eV through the edge functionalization by correct number of CO group. Functionalization of GY/GDY by single CO group results in great reduction in energy gap as compared to pristine nanoflake. The energy gaps of GY_1CO and GDY_1CO are 0.72 and 0.67 eV, respectively. Increasing number of CO functionals to six decreases the energy gaps of GY and GDY by about 0.35 and 0.43 eV, respectively. On the contrary, the energy gap exhibits relatively smooth variations in the range of 1.29–1.34 and 1.40–1.51 eV for GY_xCOOH and GDY_xCOOH surfaces. It should be noted that in both GY and GDY flakes, increasing number of CO and COOH functional groups results in a general energy gap reduction; however, a sudden increase in energy gap appears for the flakes with three functional groups. This may be ascribed to the asymmetry in the functionalization of opposed edges. In addition to the energy gap variation, it is also interesting to inspect the effects of CO and COOH functionals on the location of Fermi level of the GY/GDY systems. Details emerge from the frontier orbitals analyses of pristine and functionalized GD/GDY are summarized in Table S1 in supplementary material. It was found that chemical functionalization with CO moves the Fermi level toward higher energies, while COOH group shifts the Fermi level of pristine GY/GDY toward lower energies. The upward shifts of Fermi level in GY_1CO and GDY_1CO are much greater than the Fermi level downshifts in GY_1COOH and GDY_1COOH. Moreover, in both GY and GDY systems, increasing number of functional groups leads to greater shift in the location of Fermi level with respect to the pristine flakes.

Figure 3
figure 3

Variation of energy gap with respect to the number of CO and COOH group (x)

We have also looked into the total density of states (TDOS) together with projected density of states (PDOS) to analyze the contribution of functional group into the electronic states. CO functional group induces significant changes in the electronic properties of GY/GDY surfaces which is due to orbital overlap between CO group and GY/GDY planes. Figure 4 shows that one of the two major bands originating from the states of CO functional group appears on the Fermi level which is responsible for the energy gap reduction in GY_xCO and GDY_xCO surfaces. On the other hand, the states of COOH group are contributing to the low-lying LUMO region, only, and no evidence of hybridization between COOH group and GY/GDY surfaces was found. We also examined the effect of increasing number of functional groups on the band structures of GY/GDY surfaces. Figure 5 compares the TDOS plots of GY and GDY flakes functionalized by one, three and six CO or COOH functional groups. The bonding/antibonding states of all CO groups appear at the same positions near the Fermi level with very small shift (less than 0.20 eV). Similarly, the peaks of all COOH groups are nearly seen at same location in the LUMO region. Increasing number of functional groups enhances the intensity of impurity state but has little effect on its position.

Figure 4
figure 4

PDOS (i) and TDOS (ii) of GY/GDY systems functionalized with single CO (top) or single COOH group (bottom). The Fermi levels are shown by dotted lines

Figure 5
figure 5

Comparison between the TDOS plots for the GY/GDY systems functionalized by different number of CO (top) and COOH (bottom) functional groups. The Fermi level of the corresponding pristine flake is shown by the dotted line

Optical properties are among the most fascinating and useful properties of nanomaterials and have been extensively studied using a variety of optical spectroscopic techniques. When nanostructures are placed in strong electromagnetic fields, such as the electric field of a laser, they undergo electronic excitation. To control and predict the outcomes of interaction with strong field, knowledge of optical properties of the species involved in the excitation process is required. Accordingly, we have also investigated the optical absorption of functionalized GY/GDY utilizing TDDFT formalism. The details for the electronic transitions between occupied and unoccupied states, including computed excitation wavelengths, the dominant molecular orbital transitions, and oscillator strengths, are given in Tables S3 and S4 in supplementary material. Figure 6 displays the UV–visible spectra of functionalized GY/GDY nanoflakes. For the sake of comparison, the spectra of pristine GY/GDY have also been included. For the pristine GY and GDY nanoflakes, the absorptions start from the UV region and range to the visible region. After functionalization with CO or COOH groups, a wider range of spectrum coverage from UV to near infrared has been observed. The first dominant peak, namely optical energy gap, corresponds to the direct optical transition between HOMO and LUMO. For pristine GY and GDY flakes, the first dominant peaks appear at 1.58 ev/778 nm and 1.74 eV/705 nm, respectively, mimicking their electronic energy gaps. It is clear that the absorption spectra for GY_1COOH and GDY_1COOH resemble the curves observed for their corresponding pristine surfaces. This observation is in agreement with the DOS plots where we found that COOH group has little effect on the electronic structures of GY/GDY flakes. On the contrary, CO functional induces obvious changes in the absorption spectra. In general, the electronic spectra of GY/GDY exhibit red shift toward higher wavelengths (lower energies) due to functionalization with CO and COOH groups. The amount of red shift enhances with increasing number of functional groups. The absorption intensity also increases obeying the similar manner. The evolution of electronic spectra can also be explained by the shift of frontier orbitals upon the functionalization. Our calculations indicate that functionalization of GY/GDY flakes with CO group shifts the HOMO to the higher energy, while the LUMO does not alter too much. In contrast, COOH group is more effective on the LUMO, shifting it to the lower energy (see Table S1 in supplementary material). These shifts lower the threshold for the optical transition between HOMO and LUMO regions, and the resultant peaks appear in the low energy region.

Figure 6
figure 6

Comparison between the absorption spectra of functionalized GY/GDY nanoflakes

Doping and codoping

To alter the optoelectronic properties of nanoflakes, it is also desirable to introduce heteroatoms in their structures. In this section, we examine the incorporation of N and S atoms into the GY/GDY systems via two methods: (i) N_doping by one N substituting one sp2 hybridized C on the basal plane close to the flake edge, and (ii) passivation of dangling σ-bonds by S atom. As shown in Fig. 1, for N-doping, there are four substitutional sites close to the flake edge. The computed energy gaps for N_doped GYs are 1.37, 1.39, 0.50, and 0.60 eV for the structures in which N is doped at sites a, b, c, and d, respectively. Comparing with the energy gap of pristine GY flake (E g  = 1.42 eV), we conclude that replacing C atom attached to the acetylenic chain (site c) by N atom induces greater change in the electronic properties of considered GY flake. On the other hand, after passivation of one dangling bond by S atom, the same four sites are also available for N substituting. The calculated energy gaps for N,S_codoped GYs are 1.09, 1.70, 0.68, and 1.03 eV for the structures in which thionic S at the edge exists adjacent to N atom at sites a, b, c, and d, respectively. Again, N atom at site c leads to distinct change in the energy gap of the GY flake. We have also reached to similar conclusion for the GDY flake (see supplementary material). While most of earlier studies on the graphene indicate that the preference of pyridinic N (site b) [35], however, our results demonstrate that the presence of acetylenic groups in GY/GDY offers geometries other than the hexagonal lattice of graphene which in turn leads to different response to the dopant. Consequently, among examined configuration, the structure with N atoms at site c has been considered for doping and codoping of GY/GDY nanoflakes as shown in Fig. 7. The concentration of dopant is increased from 5.5% (1/18) to 33.3% (6/18) by successive doping of one N or one NS per hexagon at the edge. Geometry optimizations were performed for all considered doped surfaces allowing carbon atoms to relax. All doped GY/GDY systems retain their planar structures during geometry optimization. The bond length between C and N is 1.36–1.41 Å which is smaller than the distance between two C atoms (1.41–1.44 Å) due to the difference between atomic radius of C and N atoms. Consequently, the flakes undergo compression upon N_doping. Figure 7 compares the width and the symmetry of the model GY/GDY after doping with one NS (5.5%) and six NS (33.3%). Incorporation of single NS compresses the distances between two opposed hexagons in the proximity of dopant and extends this distance at the opposite edge. At the dopant concentration of 33.3%, symmetric compression (0.2% for GY and 0.4% for GDY) is observed for the opposite edges.

Figure 7
figure 7

The effect of N,S_codoping on the geometrical parameters (Å) for the model GY/GDY. a N,S_codoped GY (5.5%), b N,S_codoped GDY (5.5%), c N,S_codoped GY (33.3%), d N,S_codoped GDY (33.3%). The specified distance between the opposed edges is 14.41 and 18.88 Å in pristine GY and GDY, respectively

To evaluate the feasibility of NS substitutions, we calculated the cohesive energies based on the definition in Eq. (1). The variations of cohesive energies with the dopant concentration are presented in supplementary material. The cohesive energy decreases in the order: pristine > N_doped > N,S_codoped. By increasing the impurity concentration, the value of the cohesive energy decreases, indicating a decrease in the stability of the doped structure as compared to the pristine sheet. Moreover, we found that the cohesive energy of N,S_codoped GDY is higher than that of N,S_codoped GY. Very recently, the doping and codoping of GDY with N and S atoms has been achieved experimentally [43]. Therefore, the lower formation energy of N,S_codoped GY implies the high feasibility of the NS substitution reaction in GY.

Now, we compare the electronic structures of GY and GDY flakes after doping with N and NS. The variations in energy gap of doped GY/GDY systems with the dopant concentration are shown in Fig. 8. Inspection of this figure elucidates that the energy gaps decrease as the dopant concentration increases, regardless of the type of the dopant. The energy gaps of N_doped GY/GDY systems show a damped oscillation with increasing the dopant concentration. Increasing the concentration of N from 5.5 to 33.3% causes a decrease of 0.44 and 0.30 eV in the energy gap of GY and GDY systems. On the other hand, the energy gap of N,S_codoped GY/GDY systems exhibit very smooth decrease as regards the NS concentration. However, for GY and GDY, the energy gap can be tuned over a range ~1.0 eV by varying the type and the concentration of dopants. Moreover, we found that the Fermi energy level is significantly affected as a result of the influence of N and S doping which in turn changes the semiconducting nature of considered flakes. The Fermi levels locate at 0.60 and 0.75 eV below the LUMO for the pristine GY and GDY, respectively (Table S2 in supplementary material). After N_doping, the Fermi level approaches the LUMO region and slowly reaches the LUMO with N concentration up to 27.7%. This shift to higher energies leads to n-type semiconducting behavior in N_doped GY/GDY systems. On the contrary, the N,S_codoping shifts the Fermi level downward and induces the p-type doping. In fact, doping with only N atoms gives additional electrons to the host GY/GDY systems, while codoping with NS leads to electron deficiency.

Figure 8
figure 8

Variation of energy gap for the GY (top) and GDY (bottom) as a function of dopant concentration

In order to get clear insight into the electronic structures of doped GY/GDY systems, the calculated TDOS and PDOS are presented in Fig. 9. The PDOS analysis shows that for GY/GDY systems, there is a weak contribution of p orbital of N to the low-lying LUMO region which sweeps the energy states toward higher energies. The p orbital of S mainly contributes to top of HOMO region and shifts the energy states to the lower energies. The nanoflakes codoped with NS have changes in the DOS on both sides around the Fermi level which makes the energy gap narrow. We also performed further calculations to compare the TDOS plots of GY/GDY systems incorporating different concentration of dopants up to 33.3% (Fig. 10). The N atoms give rise to the impurity states in the LUMO region which almost appeared at the same position with the shift up to 0.20 eV. Moreover, the growth in the intensity due to increasing the dopant concentration is observed. In the case of N,S_codoping, we see the appearance of impurity states in the HOMO and LUMO regions near the Fermi level which again become more intense as the dopants concentration increases. However, we found that the N,S_codoping induces dramatic changes in the electronic structures of GY/GDY nanoflakes and leads to higher reactivity toward surrounding adsorbate.

Figure 9
figure 9

PDOS (i) and TDOS (ii) of N_doped GY/GDY systems (top) and N,S_codoped GY/GDY (bottom). The dopant concentration is 5.5%. The Fermi levels are shown by dotted lines

Figure 10
figure 10

Comparison of TDOS plots for different concentration of dopant in the N-doped GY/GDY (top) and N,S_codoped GY/GDY (bottom). The Fermi level of corresponding pristine flake is shown by the dotted line

We also investigate the optical properties of N_doped and N,S_codoped GY/GDY flakes. The electronic spectra are shown in Fig. 11 and details of electronic transitions are reported in supplementary material. The spectra of doped GY/GDY are featured by red shift and reduced intensity of the original absorption peaks of the pristine GY/GDY. Nonetheless, at high doping level (33.3%), the intensity again increases to its value as in the original peak of the undoped system. Our calculations indicate that upon N-doping the HOMO of the pristine flake shifts to higher energy, while the LUMO does not alter too much. On the contrary, N,S_codoping leads to downshift of LUMO (see Table S1 in supplementary material). Consequently, the shift in the absorption peaks can be interpreted in terms of upshift of the HOMO and downshift of the LUMO which lowers the threshold for the optical transition. As a result of the presence of NS, the optical energy gap is tuned from the visible to the infrared region of the electromagnetic spectra depending on the doping level. Figure 11 shows that the optical energy gaps lie in the visible region for the pristine GY/GDY and in the infrared region for the N_doped and N,S_codoped GY/GDY.

Figure 11
figure 11

Comparison between absorption spectra for different concentration of dopant in the N_doped GY/GDY (top) and N,S_codoped GY/GDY (bottom)

Lastly, one should bear in mind that our emphasis in the present study is on the trends in the optoelectronic properties of GY/GDY nanoflakes as they are obtained through increasing the concentration of dopant or functional groups. However, we have performed the convergence tests for the size of GY/GDY nanoflakes to confirm that the obtained results are not affected by the size of nanoflakes. For this purpose, we have considered different shapes of GY nanoflakes which are containing 44–68 C atoms. The structures of model GY flakes are shown in Fig. 12 where the nomenclature is based on the existing hexagons in nanoflakes. Accordingly, GY-5, GY-6, GY-7, and GY-9 are nanoflakes that are consisting of 5, 6, 7, and 9 hexagons in their structure. In Fig. 13, we compared the variation of energy gaps in these GY nanoflakes after edge functionalization with single CO or COOH group as well as N,S_codoping. Similar trends for the energy gap variation are observed, regardless of the size of nanoflakes. Upon a closer inspection in the figure, we find that the convergence in the energy gap happens for GY-7 and increasing the flake size to GY-9 does not alter its electronic properties. We also performed similar convergence test for the GDY analogues of GY containing 58–118 C atoms. The results confirm that the trend in energy gap variation is independent of the size of nanoflakes. Moreover, the constancy in the energy gaps was observed.

Figure 12
figure 12

The structures of model GY nanoflakes considered for the size convergence test

Figure 13
figure 13

Convergence test for energy gaps of various shapes of GY nanoflake

Conclusions

DFT calculations were carried out to investigate the electronic and the optical responses of GY/GDY nanoflakes upon (i) functionalization with CO or COOH groups and (ii) doping with N atom or codoping with NS atoms. Functionalization and doping were performed at the edge by varying the concentration of dopant or functional group ranging from 5.5 to 33.3% of the model GY/GDY nanoflakes. Functionalization of these surfaces with CO increases the cohesive energy, while COOH decreases the stability of considered nanoflakes. In the case of doping, increasing the impurity concentration leads to a decrease in cohesive energy of the system indicating weakening the bonds. Table 1 summarizes the computed electronic and optical properties, including the range of energy gap, the location of Fermi level in the modified GY/GDY, the semiconducting type, and the range of the absorption peaks in the electronic spectra. The notations n and p in the column of “Type” stand for n-type and p-type semiconductors, respectively. For instance, edge functionalization with CO depresses the Femi level toward the LUMO region and the resultant oxygenated GY/GDY systems become electron-rich; hence, n-type semiconductor is produced. From energy gap perspective, a wide range of variation has been observed depending on the modification and the impurity content. Although N_doping and CO functional group are more efficient in energy gap tuning, the N,S_codoping and COOH group are also useful for inducing desired semiconducting behavior to the considered flakes. Analysis of the absorption spectra reveal that the modified GY/GDY systems can absorb light from near 355 to 1479 nm covering a wide range of electromagnetic spectrum. Our results offer the opportunity to design the optoelectronic properties of GY and GDY nanoflakes via proper modification. This allows the use of carbon-based 2D nanostructures beyond graphene in widespread applications as in chemical sensors, nanoelectronic devices as well as in LIBs.

Table 1 Summary of computed results for GY and GDY nanoflakes