1 Introduction

In recent years, boron-containing materials have attracted great interest and widespread attention from researchers due to their unique properties and promising applications. Due to their unparalleled properties, such as flame retardancy, heat resistance, high hardness, high strength, wear resistance, etc., and novel physicochemical properties, boron-containing materials have been used in industrial and agricultural production and serve people's life [1,2,3].

Boron atoms have small radii and high ionization potential. Atomic structure characteristics with electron deficiency determine the complexity of boron bonding. It is almost impossible for boron atoms to lose electrons to form ionic or metallic bonds, and due to its electron deficiency, it is difficult for boron to achieve all valence bonds as two-electron covalent bonds [4,5,6,7]. The boron atoms adopt the SP3 hybridization state, accepting electron pairs with empty SP3 orbitals, and reducing their electron deficiency through the formation of coordination bonds. Boron only possesses three valence electrons in its four valence orbitals, but it can still build stable coordination compounds by accepting lone electron pairs from multi-electron groups in its spare orbitals [8]. The boron atom adopts the SP2 hybridization state to reduce its electron deficiency by forming delocalized π-bonds with empty 2P orbitals. This type of bonding exists in all molecules or atomic groups of the planar triangular configuration of boron [9,10,11,12,13].

Many studies on boron clusters have been conducted in recent years. Boron tends to form multicenter delocalized bonds to compensate for its electron-deficient nature, which determines the diversity of boron cluster structures. Theories and experiments support the notion that, at small sizes, boron clusters typically form stable planar (quasi-plane) structures [14, 15]. Through photoelectron spectroscopy (PES) and theoretical research, Wang's group discovered in 2003 that the smaller boron clusters (B10-B15-) have a triangular dense stacking planar or quasi-planar structure with a chemical bonding pattern similar to that of cyclic olefins and exhibit typical aromatic and anti-aromatic characteristics [11]. From the B16 to B20 scale range, the boron clusters begin to transition from a planar (quasi-plane) structure to a toroidal or tubular structure [16]. Later, bigger anionic boron clusters B16-B42- were discovered, and as their size grew, hexagonal holes started to appear in the quasi-plane structure [15, 17]. In 2014, Zhai et al., made the first cage-like all-boron fullerene cluster (boron sphere alkene) with D2d-symmetry, four heptagonal holes on the waist and two staggered hexagonal holes on the top and bottom of the structure. This discovery was made using a combination of photoelectron spectroscopy and calculations from quantum chemical theory. Since then, borospherenes have garnered a great deal of interest from scientists [18].

Due to the presence of a single p-electron, the 2s and 2p electrons of boron atoms are easily hybridized to form SP2 valence electron structures, which are very easy to bond with other atoms, especially with metals to form some cluster materials with special functions [19,20,21]. Li and Popov have thoroughly examined the structural and electrical characteristics of transition metal Co and Rh doped B12 clusters, as well as Al and B9 and B10 doped B9 and B10 clusters [20, 22]. Thus, metal-doped B clusters' physicochemical characteristics have drawn a lot of attention in recent years [23,24,25]. It demonstrates to us the significance of the doping of transition metal atoms into boron clusters in the study of metal coordination chemistry.

Alkali metal-doped boron cluster research has been described in part [23, 26]. So far, theoretical and experimental work on alkali metal-doped pure boron clusters has been widely carried out, and many characteristic research results have been obtained. Although theoretical research on potassium-doped boron clusters in alkali metals is still in its infancy, this study uses sophisticated theoretical computations to thoroughly examine the geometry, electrical characteristics, and stability of such clusters.

2 Computational details

We employed an effective optimization approach to look for the global minimum to acquire the K2Bn cluster's ground-state structure. The CALYPSO code is the efficient method we use, which can quickly predict the most stable cluster structure using particle swarm optimization algorithms, and to narrow the search space and increase the diversity of the structures, it also inserts symmetry constraints into the structure formation process [27,28,29]. This method's efficacy for predicting cluster structure has been demonstrated in reference [30,31,32,33,34,35,36,37,38,39]. For K2Bn (n = 1–12) structure prediction, we monitor 50 generations for each category, with each generation including 30 structures, 60% of which are produced by the pso method and the remaining 40% produced randomly. Thus, for each category, we get 1500 initial structures. At the B3LYP/6-31g level [40,41,42,43], the initial geometric optimization and energy calculations for these isomers were carried out. Subsequently, the energies are sorted from low to high and then the lower-energy structures with the top 30 are picked out for further re-optimization at various spin multiplicities. Considering the time consumption, the basis sets labeled GEN is the combination of 6-311+G(d) and def2-tzvp basis sets [44,45,46,47,48], which are employed for the B and K atoms, respectively. To make sure that the lowest energy structures are real minima without fictitious frequencies, the harmonic vibration frequencies are also calculated. The Gaussian 09 software program implements each of the aforementioned calculations [49, 50]. We examined the bonding characteristics of the magic clusters using the Multiwfn 3.7 program, including the Electronic Localization Function and AdNDP (Adaptive Natural Density Partitioning) [51, 52].

3 Results and discussion

3.1 Geometric structure

Figure 1 displays the K2Bn (n = 1–12) clusters' ground-state configurations using the technique outlined in Sect. 2. These K2Bn isomers should be referred to as na, nb, nc, and nd, where n is the number of B atoms, a is the ground-state structure, and b, c, and d are the metastable structures. Additionally, the relative energy (in eV) and point group symmetry are indicated beneath the structure. The ground-state cluster K2Bn (n = 1–12)’s electronic states and symmetries are listed in Table 1.

Fig. 1
figure 1

Most stable structures of Bn+2 clusters and low-lying isomers of K2Bn (n = 1–12) clusters, along with the point group symmetry and relative energy (eV). The pink and blue balls represent B and K atoms, respectively

Table 1 Electronic states, symmetries, average binding energies Eb(eV), HOMO–LUMO energy gaps Eg(eV), and charges on the K atoms of the most stable K2Bn(n = 1–12) clusters

The structural evolution of K2Bn clusters (n = 1–12) is studied in detail, and the same K2Bn cluster calculation method described in Sect. 2 was used to obtain the corresponding pure boron clusters as a comparison object. Compared with the earlier work [53, 54], we can see that they generally agree with our conclusions for Bn clusters, suggesting a reasonable theoretical approach to boron-based clusters. Several interesting findings came out of the structural examination of the doped clusters: (1) We discovered that the two unusual K atoms invariably take up the convex cap position in the ground-state structure of practically all K2Bn clusters. This phenomenon might be due to the different atomic radii of the doped elements. (2) It is obvious that in the case of n = 6–12 and 3, the K2Bn clusters exhibit a 3D structure, while the Bn clusters are 2D or arc structures except for the B9 cluster which is 3D. Moreover, after K atom doping, only the conformation of K2B1,2 clusters retains the main skeleton of pure B3,4 clusters. That is to say, the two doped K atoms result in a clear structural reconfiguration phenomenon for the K2Bn (n = 3–12) cluster ground-state structure. (3) K2Bn clusters expand by covering the surface of K2Bn−1 clusters with boron atoms when the number of B atoms increases between n = 1–3 and n = 6–12. K2B5 is also grown with a boron atom overlaid on K2B4, with the difference that the orientation of the two K atoms has changed.

3.2 Relative stability and charge transfer

The average binding energy (Eb) and second-order difference of energy (Δ2E) can be used to describe the cluster's stability, where the Eb indicates how much the average energy per atom increases after breaking the cluster into single atoms. The clusters are defined as follows, and the more stable they are, the greater the values of Eb and Δ2E.

$$E_{{\text{b}}} K_{2} B_{n} = \frac{{nE\left( B \right) + 2E\left( K \right) - E\left[ {K_{2} B_{n} } \right]}}{n + 2}$$
(1)
$$\Delta^{2} E\left( {K_{2} B_{n} } \right) = E\left( {K_{2} B_{n + 1} } \right) + E\left( {K_{2} B_{n - 1} } \right) - 2E\left( {K_{2} B_{n} } \right)$$
(2)

where the energy E in the equation corresponds to the energy of an individual atom or atom cluster. The results of the calculations based on the above equation are plotted in Fig. 2. As shown in (A), the Eb value of the K2Bn cluster increases sharply with the increase of B atoms at n = 1–8 and is in an oscillating trend at n = 8–12. However, the Eb growth rate of the B cluster is significantly lower than that of the K2Bn cluster, so the Eb values of both are approaching n = 1–8. It is easy to find a clear local maximum peak for the K2Bn cluster at n = 8, indicating that it is more stable than the surrounding structures. In addition, most of the identification evidence for stable clusters may be inferred by the maximum value of Δ2E compared to its neighbors. In (B), several different peaks can be found, K2B3, K2B6, K2B8, and K2B10, especially the K2B8 cluster has the largest Δ2E value of 3.29 eV. These peaks imply extraordinary stability for these isomers.

Fig. 2
figure 2

Size dependence of the average binding energy Eb (A), the second-order difference of energy \({\Delta }_{2}E\) (B), HOMO–LUMO energy gaps Eg (C)

Next, we looked at how the distance Eg (HOMO–LUMO gap) between a cluster's highest occupied (HOMO) and lowest unoccupied (LUMO) molecular orbitals changes as cluster size rises. We calculated the gap Eg for K2Bn (n = 1–12) and Bn (n = 3–15) and plotted it in (C). For the K2Bn clusters, the HOMO–LUMO gap shows irregular parity oscillation behavior with several distinct maxima at n = 2, 4, 6, and 8, indicating their higher chemical stability [55,56,57,58,59]. In the range of n = 1–5, 8–9, and 10–12, pure B clusters and K2Bn clusters have the same trend, but because of the addition of doped atoms at n = 6 and 7, both show reverse oscillation compared to Eg values. In addition, the curves about the pure boron clusters in Fig. 2 are all consistent with the previous studies.

3.3 Charge transfer

The charge (Q) distribution of K atoms in the K2Bn (n = 1–12) cluster is listed in Table 1, which we obtained using the natural population analysis (NPA). The results show that among all the K2Bn (n = 1–12) clusters, the K atom is positively charged because it acts as an electron donor. In other words, the charge is transferred from the K atom to the B backbone of all neutral substances. This might be a result of the lesser Pauline electronegativity of the K atom (0.82) compared to the B atom (2.04). By observing the charge relations of (Table 1) K atoms, we found that at n = 1–6, the positive charge on the K atom rises quickly, climbs gradually at n = 6–9, reaches a maximum at n = 9, and then begins to oscillate. The charge transfer of each ground-state structure in the K2Bn system exceeds 1e. This implies that the neutral potassium-doped boron clusters are more likely to generate stronger K–B bonds. Not to be disregarded is the fact that K2B8's charge transfer reaches 1.86e, which may contribute to its notable stability.

3.4 Bonding characters

From the above analysis, the Eb, Δ2E, Eg, and charge transfer were considered together and K2B8 was found to exhibit good stability. We further analyzed the characteristics of molecular orbitals (Mos) and the bonding characteristics of this cluster to delve deeper into the deeper causes of its exceptional stability. First, we looked at the cluster's DOS (density of state), as seen in Fig. 3, to qualitatively assess the contribution of the doped K atom and B skeletons to the low-energy MO chemical bond. We note that when the orbital energy is between − 21.77 eV and − 18.5 eV, the total density of state (TDOS) is almost from the contribution of doped atom K. The contribution of B atoms accounts for the full TDOS when the orbital energy is between − 16.33 eV and − 2.72 eV. When the orbital energy is higher than 0 eV, the contribution of B atoms to the TDOS in the structure is significantly larger than that of K atoms. Second, portions of the K2B8 cluster's molecular orbital diagrams, together with the accompanying energy levels and HOMO–LUMO energy gaps, were created to better comprehend the molecular orbitals of the cluster (see Fig. 4). According to the findings, K2B8 had a HOMO energy of − 4.47 eV and a LUMO value that was 3.31 eV greater. In detail, the component of HOMO is mainly from 96.91% of p atom orbitals (AO) of B atoms in the main framework; the component of LUMO is mainly from 69.67% of s AO and 21.18% of p AO of two doped K atoms. The contributions of the p AO of the K atom, the s and p AO of the B atoms, and the HOMO-2 and HOMO-3 occupied molecular orbitals are 1.15%, 21.49%, and 73.02%, respectively, for the other occupied molecular orbitals. K atoms' and B atoms' respective s and p AO to HOMO-7 are 0.61%, 1.03%, 0.61%, and 96.98%. These analytical results imply that the main constituents of these molecular orbitals are K-p AOs, B-s AOs, and B-p AOs. In other words, the K-B and B-B s-p hybridization encourages the engagement of the doped K atom with the B8 fragment and the notable stability of the K2B8 cluster.

Fig. 3
figure 3

Calculated TDOS (total densities of states) and PDOS (partial densities of states) of the K2B8 cluster

Fig. 4
figure 4

Molecular orbitals and the corresponding energy levels of the K2B8 cluster. The HOMO–LUMO gap is indicated (in red)

It is well known that examining the bonding properties of K2B8 requires an understanding of the composition of its multicenter bonds. Specifically, we applied the adaptive natural density partitioning (AdNDP) approach to a systematic search for N-centered two-electron (nc–2e) bonds. The primary criterion is that a bond is deemed to have a localized character when n ≤ 2, and a delocalized character otherwise. The schematic structure of the K2B8 cluster, the occupation numbers (ONs) of the multicenter bonds, and the structural units corresponding to the multicenter bonds are shown in Fig. 5. The analyzed structure after systematic search shows that there are no definite domain bonds in K2B8, but there are 13 delocalized bonds. Among them, the atoms flanking the double pagoda-like structure form ten σ-type bonds, namely seven 2c–2e bonds (occupation number ON = 1.916|e|), two 4c–2e bonds (occupation number ON = 1.88|e|), and one 8c–2e bond (occupation number ON = 1.99|e|). The remaining 5c–2e, 6c–2e, and 7c–2e (whose occupation numbers are ON = 1.967|e|, 1.981|e| and 1.988|e|, respectively) exhibit π-type features. Overall, it is clear that the doped K atoms have a higher likelihood of forming N-centered two-electron (nc–2e) bonds with larger occupation numbers together with their nearby B atoms.

Fig. 5
figure 5

AdNDP chemical bonds for the K2B8 cluster. ON denotes the occupation number

However, to learn more about the bond properties of the K2B8 cluster, the electron localization function (ELF) was examined. The results are presented in Fig. 6. The three-dimensional real space function ELF has values between 0 and 1. In essence, the region with the higher value of the ELF is surrounded by an analogous surface where the electrons are more locked and less likely to escape, allowing them to travel more freely in comparison (in this region at will out of the domain). The electron localization is weak in certain places with low ELF values; therefore, if the electrons are positioned there, they can readily leave the domain and move to other parts. As seen in Fig. 6, some places between the K2B8 (B–B, K–B, K–K) atoms are visible as yellow–green or even orange in the ELF projections in different planes, indicating that the ELF values in these regions are more than 0.5, indicating that covalent bonds are formed in the B–B, K–B, and K–K connecting regions. It is intriguing that these higher electron localization joining locations are uniformly skewed in favor of the B atom, which is consistent with the findings of earlier charge transfers.

Fig. 6
figure 6

Analysis of ELF A the structural diagram with all atomic labels, B 2D color distribution of the ELF projection in different planes of the K2B8 cluster

4 Conclusion

In conclusion, the DFT calculations at the B3LYP energy level and the CALYPSO structure search method were used to conduct a systematic investigation of the potassium-doped boron clusters. The ground-state structures of clusters of different sizes were identified based on their total energy and point group symmetry after a significant number of stable low-energy structures were obtained. The impurity K atom likes the convex top position of the backbone in all of the most stable K2Bn structures. The doped K atom consistently serves as an electron donor in the K2Bn (n = 1–12) cluster range. The K2B8 clusters with a double pagoda structure showed good stability in this study, according to the analysis of the clusters' relative stability and charge transfer. The work specifically shows that the s-p hybridization of B–B and B–K made a substantial contribution to the good stability of the K2B8 clusters by further analyzing the molecular orbitals and chemical bonds of K2B8. Our study is intended to serve as a guide for the future synthesis and use of doped boron-based nanomaterials.