{'fraction_non_alphanumeric': 0.03256004297004885, 'fraction_numerical': 0.014476814077806481, 'mean_word_length': 4.674600870827286, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Ab initio modelling of local interfaces in doped organic semiconductors

Doping in organic semiconductors remains a debated issue from both an experimental and ab initio perspective. Due to the complexity of these systems, which exhibit a low degree of crystallinity and high level of disorder, modelling doped organic semiconductors from first-principles calculations is not a trivial task, as their electronic and optical properties are sensitive to the choice of initial geometries. A crucial aspect to take into account, in view of rationalizing the electronic structure of these materials through ab initio calculations, is the role of local donor/acceptor interfaces. We address this problem in the framework of state-of-the-art density-functional theory and many-body perturbation theory, investigating the structural, electronic, and optical properties of quaterthiophene and sexithiophene oligomers doped by 2,3,5,6-tetrafluoro-7,7,8,8-tetracyano-quinodimethane (F4TCNQ). We consider different model structures ranging from isolated dimers and trimers, to periodic stacks. Our results demonstrate that the choice of the initial geometry critically impacts the resulting electronic structure and the degree of charge transfer in the materials, depending on the amount and on the nature of the local interfaces between donor and acceptor species. The optical spectra appear less sensitive to these parameters at least from a first glance, although a quantitative analysis of the excitations reveals that their Frenkel or charge-transfer character is affected by the characteristics of the donor/acceptor interfaces as well as by the donor length. Our findings represent an important step forward towards an insightful first-principles description of the microscopic properties of doped organic semiconductors complementary to experiments.


Introduction
Understanding the microscopic properties of doped organic semiconductors (OSCs) is the key to disclosing and ultimately controlling the fundamental doping mechanisms in these materials. [1][2][3] Relentless efforts in the last decade have brought noticeable advances in this field, unraveling correlations between the chemical nature and concentration of the dopant species and the observed ion-pair formation or creation of charge-transfer complexes. 2,[4][5][6][7][8][9][10][11][12][13] This intensive research has made it apparent that such complexity demands reliable theoretical models that are able to address it in a predictable and insightful way. Ab initio quantum mechanical methods, such as densityfunctional theory (DFT) and many-body perturbation theory (MBPT), offer the unique advantage of an accurate and parameter-free description of the electronic-structure of materials given only their chemical composition and structural arrangement. In this sense, results obtained with first-principles approaches are regarded as complementary to experimental findings. However, besides theoretical and numerical approximations, the match between first-principles and experimental results is determined by the geometries chosen to model the systems under study. While this problem is negligible when dealing with ordered crystalline structures, in the case of doped organic semiconductors, which typically exhibit a low degree of crystallinity and a high level of disorder, [14][15][16][17][18] the initial geometry adopted in the calculations may influence the outcome and hence bias the interpretation of the investigated physical effect. A common choice in modelling doped OSCs is to consider an isolated dimer formed by a donor and an acceptor molecule interacting with each other. 12,[19][20][21] Representing OSC with an isolated dimer implicitly assumes that the system can be reproduced by a single molecular interface. This model turned out to be successful in describing the level alignment of the donor/acceptor interfaces, 19 the spatial distribution of the resulting frontier states, 12 and also in rationalizing the role of the donor conjugation length. 20 However, in this way, it is not possible to capture in full the behavior of extended donor/acceptor stacks, nor to reproduce the chemical environment of a molecule surrounded by more than one dopant. 22 This is a non-negligible issue, considering that local interactions at donor/acceptor interfaces are known to critically impact the doping mechanism in organic semiconductors. 7,11,14,15 We investigate the effects of local interactions between donor and acceptor species on the electronic and optical properties of doped OSCs using ab initio many-body theory, focusing on prototypical charge-transfer complexes (CTCs) formed by oligothiophene molecules doped by the electron acceptor 2,3,5,6tetrafluoro-7,7,8,8-tetracyano-quinodimethane (F4TCNQ). We consider trimer structures with different alternations of donors and acceptors, which are meant to model different types of interfaces. For comparison, we contrast these structures with isolated dimers and idealized periodic stacks formed by alternating donor and acceptor moieties. In the framework of hybrid DFT, we determine the nature and the spatial distribution of the frontier states and we quantitatively predict the degree of charge transfer in these systems. With the aid of MBPT applied on top of DFT, we provide an accurate description of the single-particle energy levels and of the optical excitations, including absorption spectra and character of the (bound) electron-hole pairs.

Systems
We study isolated dimers, trimers, and periodic stacks of CTCs formed by quaterthiophene (4T) and sexithiophene (6T) molecules doped by F4TCNQ. The choice of considering these two donor species is stimulated by the results of ref. 20, which show the sensitivity of the ground-and excited-state properties of these complexes to the donor length. We assume that initial geometries where the donor and acceptor species face each other are held together by p-p interactions, and have the respective centers of mass aligned on top of each other in the center of the CTC. The systems considered in this work are depicted in Fig. 1: a reference D-A dimer, analogous to the one adopted in ref. 20; three trimer configurations formed by (i) an acceptor molecule adsorbed on two stacked donors (D-D-A), (ii) an acceptor sandwiched between two donors (D-A-D), and (iii) a donor sandwiched between two acceptors (A-D-A); a periodic stack aligned in the normal direction with respect to the molecular planes, represented by the unit cell with lattice parameters a = 35 Å in 4T-F4TCNQ and a = 45 Å in 6T-F4TCNQ, and b = 25 Å in the two non-periodic directions, including about 20 Å of vacuum to avoid spurious interactions between the replicas. The lattice constant along the stacking direction, c = 6.66 Å, accounts for twice the p-p distance between the donor and acceptor molecules.

Theoretical background
The results presented in this work are calculated using DFT 23 and MBPT. 24 In the framework of DFT, we optimize the structures and compute the electron density, which is the main ingredient to determine the character and the spatial distribution of the single-particle wave-functions and also to quantify the degree of charge transfer (CT) in the ground state using the Bader charge analysis. [25][26][27][28] The variation of the Bader charges within the acceptor/donor unit(s) in the CTCs with respect to the isolated cases is defined as and respectively. In eqn (1) and (2), q i ¼ Ð nðrÞdr is the Bader charge calculated by integrating the charge density within the Bader volume V i associated to the ith atom in the acceptor (donor), and N A (N D ) is the total number of valence electrons in the acceptor (donor) moiety. As the total number of electrons must be conserved, eqn (1) and (2) obey the condition d A + d D = 0.
The solutions of the Kohn-Sham equations 29 of DFT represent the starting point for the MBPT calculations. The quasi-particle (QP) electronic structure of the CTCs is obtained by computing the self-energy from the single-shot G 0 W 0 approximation. 30 This is the baseline for the construction and the solution of the Bethe-Salpeter equation (BSE), which gives access to the exitonic wavefunctions and energies, and hence to the optical absorption spectra. This method, initially conceived for crystalline solids, 24,[31][32][33] has successfully been applied to isolated molecules and organic materials in the last two decades. 20, Formally, the BSE is the equation of motion for the two-particle Green's function, L = L 0 + L 0 KL, where K is the BSE interaction kernel composed by the repulsive exchange term, given by the bare Coulomb potential v, and by the direct screened Coulomb potential W, which accounts for the electron-hole attraction, and L 0 is the non interacting two-particle Green's function. 31,57 In practice, this problem is mapped into an effective two-particle Hamiltonian whose eigenvalues and eigenvectors describe the excitation energy and the character of the electron-hole pairs, respectively. 33 With this information, one can calculate the hole and electron densities 20,58,59 as and r l e ðrÞ ¼ respectively. A l ab are the BSE coefficients associated to the lth excited state and the index a (b) runs over all occupied (empty) states f a (f b ) included in the transition space. To ensure charge conservation, the hole and the electron densities integrate always to unity. In order to quantify the degree of localization of the hole (electron) on the donor (acceptor) in the lth excited state, we introduce the hole and electron localization index (LI) obtained by summing up the Bader partial charges associated to the hole and the electron, respectively, as and In eqn (5) (eqn (6)), q i ¼ Ð r l h=e ðrÞdr is the charge associated to the hole (electron) density integrated within the Bader volume V i of the ith atom in the donor (acceptor) unit(s) of the CTC. As the hole and electron densities must integrate to unity, the hole and electron LIs are constrained to be always less than or equal to 1. The optical excitations computed from the BSE can be further analyzed through the transition density 60,61 This quantity is helpful to retrive information about the spatial and symmetry character of the considered excited state.

Computational details
The results reported in this work are obtained following a threestep computational approach. The first step consists in a groundstate calculation with structural optimization. All systems are optimized with the all-electron code FHI-aims 62 by minimizing the interatomic forces until they are smaller than 10 À3 eV Å À1 . In these calculations, we employ the TIER2 basis sets 63 with a tight integration mesh, the Perdew-Burke-Ernzerhof 64 (PBE) generalized gradient approximation for the exchange-correlation (xc) functional, and the Tkatchenko-Scheffler scheme 65 to account for the van der Waals interactions. For the periodic systems, the Brillouin zone (BZ) is sampled by a 1 Â 1 Â 6 k-grid.
The second step consists in computing the QP electronic structure from MBPT. In the isolated systems, these calculations are performed with the code MOLGW. 66 We use augmented double-z polarized Gaussian basis set aug-cc-pVDZ, 67 with frozen-core and resolution-of-identity 68 approximations. QP energies are calculated adding the perturbative QP correction obtained from G 0 W 0 to the underlying DFT calculation with the range separated hybrid xc functional CAM-B3LYP. 69 In the periodic stacks the ground-state electronic structure is computed using the planewave pseudopotential code Quantum Espresso, 70,71 using a cutoff for the wave-functions (electron density) of 40 Ry (160 Ry), norm conserving pseudopotentials, 72 and a 1 Â 1 Â 12 k-grid. This is the starting point for the GW calculations performed with the code Yambo, 73,74 where the truncated Coulomb potential method 73,75 is adopted, defining a box-like region with a vertical dimension of 24 Å and a lateral size of 35 Å and 44 Å for 4T-F4TCNQ and 6T-F4TCNQ, respectively. The QP correction in the periodic stacks is calculated through the partially self-consistent G n W 0 approximation, where only the single particle Green's function G is updated at each iteration using the QP energies from the previous iteration with a convergence threshold of 10 meV. To improve the convergence of the self-energy with respect to the number of bands, the Bruneval-Gonze terminator technique 73 is adopted with 400 bands in total. The Godby-Needs plasmon-pole approximation 76 is employed to approximate the frequencydependence of the dielectric function, that is used to describe the screening function W 0 . A cutoff of 40 Ry (5 Ry) for the exchange (correlation) part of the self-energy is chosen.
In the third and final step, the optical properties of the considered materials are calculated from the solution of the BSE on top of the QP electronic structure. For this purpose, the MOLGW 66 and the Yambo 73,74 codes are used for the isolated and periodic stacks, respectively. In solving the BSE, the Tamm-Dancoff approximation (TDA) is adopted, such that the coupling between resonant and anti-resonant transitions is neglected. In organic materials, the TDA is known to cause a (rigid) blue-shift of a few hundred meV in the excitation energies and a slight redistribution of the oscillator strength. However, it has typically no impact on the nature of the excitations. 20,40,[77][78][79] In building the BSE Hamiltonian for the periodic stacks with Yambo, we consider an electron-hole transition space composed of 20 occupied and 40 unoccupied states. In this case, to alleviate the poor starting-point dependence of the underlying PBE calculation, the QP correction is adjusted by the application of a scissors operator of 1.86 (1.51) eV and dimensionless stretching factors S v = 1.31 (1.60) and S c = 1.29 (1.26) for doped 4T (6T) stacks. The values of the scissors operators are evaluated as D = D GW + D PBE0-PBE , where D GW is the QP correction to the gap on top of PBE, whereas D PBE0-PBE is the difference between PBE0 80 and PBE band gaps. The PBE0 band gap for the periodic stacks is computed with FHI-aims. 62 The optical absorption spectra with Yambo are obtained assuming an incident electric field polarized along the a and c directions (see the coordinate system at the bottom of Fig. 1), and calculated by the inversion of the BSE Hamiltonian using the Haydock-Lanczos iterative algorithm. 81

Structural properties
We start our analysis by investigating the structural properties of the optimized CTCs shown in Fig. 1. In the CTCs formed by 4T, which has a size comparable to F4TCNQ, the donor remains essentially planar regardless of the stacking sequence and the interface with the acceptor (see the left side of Fig. 1). On the contrary, doped 6T exhibits more pronounced deviations from planarity, with the exception of the F4TCNQ-6T-F4TCNQ trimer, in which the donor remains flat. In the 6T-F4TCNQ dimer and in the 6T-6T-F4TCNQ trimer, the edges of the donor interacting with F4TCNQ are twisted by 141 and 181, respectively. However, the most prominent effect is seen in the 6T-F4TCNQ-6T sequence, where the edges of the 6T oligomers are significantly distorted in the out-of-plane direction, as visible on the right side of Fig. 1. We explain this behavior in terms of van der Waals attraction between the edge rings of the donor, which exceeds the length of the acceptor molecule, approaching a mutual distance of 3.81 Å. The periodic stacks behave similarly as their isolated dimer counterparts, although the periodic boundary conditions effectively reduce the distortions. In all the considered CTCs, the smallest intermolecular distance between C atoms at the center of each donor and acceptor molecule ranges from 3.33 Å to 3.39 Å. The shortest donor-acceptor distance is obtained in the D-A dimer and D-D-A trimer, which exhibit analogous interface structures. The distance between the two donor moieties in the D-D-A trimer amounts to 3.6 Å. In the D-A-D sequence, the distances between the donors and the acceptors range between 3.35 Å and 3.39 Å, and increase with the donor length.

Electronic properties
In the next step of our analysis we focus on the electronic properties of the CTCs and start with the estimation of the degree of charge transfer in the ground state. This quantity has a particular relevance in the field of doped OSCs, as it represents the main parameter to assess the nature and the effectiveness of the doping mechanism. For this purpose we use here the Bader charge analysis (see Section 3). For each complex, we define the Bader charge variation d as the amount of charge transferred from the donor(s) to the acceptor(s) in the ground state. The results reported in Fig. 2 (further details in the ESI †) are grouped according to the stacking type. In this way it is possible to capture at a glance how the CT is related to the stacking sequence. While all complexes exhibit partial charge transfer, as expected from the nature of the involved species, 13 the actual amount of charge transfer is rather sensitive to the type and number of donor/acceptor interfaces. In the D-A dimers, the charge is equally distributed between the two constituents and the CT slightly increases with the donor length. The trimers exhibit a more diverse behavior. In the D-D-A configuration, the charge transfer takes place almost exclusively between the donor and the acceptor directly facing each other. The second donor, which is farther away and less strongly interacting with F4TCNQ, loses less than 0.05e. On the other hand, in the D-A-D (A-D-A) configuration, the acceptor (donor) receives (donates) charge from both neighboring donor (acceptor) molecules. The results in Fig. 2 indicate an uneven distribution of the transferred charge from the donor to the acceptors, with differences of the order of 0.05e. However, as this value is of the same order as the numerical error on the Bader charges, this finding should not be over-interpreted. The results described above represent a clear indication that the effectiveness of the charge transfer is determined by the amount of donor-acceptor interfaces and by the nature of the species involved, rather than by the number of stacked molecules. The increase of the donor length impacts very slightly the amount of transferred charge. This effect can be understood considering the stronger interaction between the acceptor and the donor when the latter has a more extended backbone and hence a larger charge density, which in turn gives rise to an enhanced charge redistribution in the whole complex.
We continue our analysis with the electronic properties of the considered CTCs, starting from the level alignment of the non-periodic systems computed from G 0 W 0 on top of hybrid DFT (see Fig. 3). We show the energies of the frontier states of the CTCs with those of their building blocks [4T (left), 6T (right), and F4TCNQ (center)] computed at the same level of theory. In this way, the type-II alignment between the donor and acceptor species is clearly evident. In the dimers, both the HOMO and the LUMO are hybridized with bonding and antibonding character, respectively, 13,19,20,82-84 (see Fig. 4) and they are energetically comprised between the frontier orbitals of the constituents. The situation is again more faceted in the trimers, where the number and the characteristics of the donor/acceptor interfaces influence the level alignment and also the nature and the spatial distribution of the frontier orbitals. In both D-D-A and D-A-D sequences, the HOMO of the CTC lies above the HOMO of the donor, while the LUMO is between the lowestunoccupied levels of the building blocks. The scenario is reversed in the A-D-A trimer, where the LUMO of the complex is energetically lower than that of the acceptor, while the HOMO lies in between the HOMO energy levels of the donor and the acceptor (see Fig. 3). As a result, we obtain a larger band gap for the dimers compared to all the trimers. Among the latter, the A-D-A configuration exhibits a smaller gap, mainly due to the sizable downshift of the LUMO with respect to the individual components.
These findings suggest that the relative concentration of the donor and acceptor molecules in the complex impacts the level alignment and the overall energy levels of the CTCs with respect to their constituents. Interestingly, the character of the orbitals in the trimers also depends on the stacking sequence. At the frontier, only the D-D-A trimer behaves as the dimer, with the HOMO and LUMO bearing bonding and anti-bonding character, respectively. In the D-A-D (A-D-A) stack the LUMO (HOMO) has We now turn to the periodic arrangements, where the electronic properties are analyzed in terms of the band structure shown in Fig. 5 for the case of the 4T-F4TCNQ stack. The corresponding plot for 6T-F4TCNQ can be found in the ESI. † We focus once again on the band gap, on the character of the frontier states, and also on the band dispersion which originates both from the p-p interactions between the molecules along the periodic stacking direction, and also from the non-negligible spatial overlap at the interface between the molecular orbitals of the species involved. In accordance with the results obtained with the same approach on other CTCs, 84 the fundamental gap, which amounts to about 2 eV in 4T-F4TCNQ, appears at Z, namely at the edge of the BZ, rather than at G, where the energy separation between the highest-occupied and the lowest-unoccupied bands increases up to approximately 3 eV. The nature and distribution of the Kohn-Sham wave-functions at G, shown in Fig. 5, resemble that of the isolated dimer in terms of bonding and anti-bonding character of the frontier states (see Fig. 4). On the contrary, the valence band maximum (VBM) and conduction band minimum (CBM) at Z are significantly more localized on the donor and acceptor molecules, respectively, compared to their counterparts at G. This character approaches the behavior of the HOMO and LUMO of the D-A-D and A-D-A trimer, respectively.

Optical properties
The analysis of the electronic structure presented before provides us with all the ingredients to understand the optical properties of  the isolated and periodic CTCs considered in this work. In Fig. 6 we report the absorption spectra of the isolated dimers and trimers. Remarkably, all spectra look rather similar to each other around the absorption onset, where two weak peaks appear regardless of the number of stacked molecules, their interfaces, and the donor length. An intense peak characterizes all spectra between 3.0 eV and 3.5 eV on both the left and right panels of Fig. 6. Its large oscillator strength is due to the enhanced wavefunction overlap between the orbitals involved in the optical transitions and due to the polarization of the excitations along the longitudinal axis of the CTC. A detailed analysis of these peaks is reported in the ESI. † Here, we focus on the lowest-energy region of the spectra, where the optical transitions between the bonding and anti-bonding orbitals at the frontier are found. In all spectra, the lowest-energy excitation, labelled P 1 in Fig. 6, is optically active and exhibits similar energy and oscillator strength. Its frequency decreases by a few hundred meV going from the dimer to the trimers, while its intensity concomitantly increases by a slight amount. Notably, the gaps do not follow the red-shift of the energy of P 1 (see Fig. 6), implying different binding energies of this excitation in different arrangements. The largest binding energy of P 1 is obtained in the dimers, as expected, considering the enhanced confinement and the reduced screening produced by two molecules instead of three. Among the trimers, P 1 is most strongly bound in the A-D-A configuration, where, especially in the case of 6T, the binding energy is almost as large as in the dimer. On the other hand, the reduced exciton binding energy of P 1 in the D-D-A trimer results from the screening due to the second donor molecule. The second peak, P 2 , is characterized in all spectra by an oscillator strength similar to P 1 . However, its energy difference with respect to both P 1 and the gap (E gap ) varies from system to system.
To better understand the nature of these excitations, we summarize in Table 1 their energy, oscillator strength, and composition in terms of single-particle transitions. In all CTCs, P 1 corresponds to the HOMO-LUMO transition. However, as discussed in Section 4.2, the character and spatial distribution of the frontier orbitals in the complexes is particularly sensitive to the stacking sequence and to the number of D-A interfaces.  Hence, the nature of P 1 varies accordingly: In the D-A dimer and in the D-D-A trimer, where the frontier orbitals have bonding and anti-bonding character, this excitation has Frenkel-like character. 20 On the other hand, in the D-A-D trimers, where the HOMO is localized on the donor molecules and the LUMO is an anti-bonding state delocalized on the CTC, P 1 has charge-transfer character, with the hole fully localized on the donors and the electron mostly localized on the acceptor. The A-D-A trimer exhibits a behavior opposite to the D-A-D one, as far as P 1 is concerned: the HOMO has bonding character and the LUMO is fully localized on the acceptors. All this information is summarized in Fig. 7 where the electron and hole densities, calculated according to eqn (5) and (6), respectively, are displayed.
In the case of P 2 the situation is more elaborate. As shown in Table 1, this excitation has a different composition depending on the stacking type. In the dimers, P 2 is formed by the transition between the HOMOÀ1 and the LUMO. As the character of the former changes with the length of the donor (see Fig. 3), in 4T-F4TCNQ, the HOMOÀ1 is delocalized over the whole CTC, while in 6T-F4TCNQ, it becomes more localized on the 6T. As a result, in 4T-F4TCNQ, P 2 is an exciton with more Frenkel-like charcater, while in 6T-F4TCNQ, P 2 has mainly CT nature. In the trimers, on the other hand, P 2 has a different composition depending on the type and sequence of molecular interfaces. It stems from HOMOÀ1 -LUMO+1 in F4TCNQ-4T-F4TCNQ, while it stems from HOMOÀ2 -LUMO in the 4T-4T-F4TCNQ and 4T-F4TCNQ-4T complexes. In all trimers formed by 4T, the occupied states involved in P 2 are delocalized on the whole complex while the unoccupied ones have anti-bonding nature (see Fig. 4). Hence, P 2 always has a Frenkel-like character, Table 1 Excitation energy, oscillator strength (OS), and composition in terms of single-particle transitions of the P 1 and P 2 excitations marked in Fig. 6 Excitation Energy  Fig. 7 Hole, electron, and transition densities of the excitations associated to the first (P 1 ) and second (P 2 ) peaks in the optical spectra of the CTCs shown in Fig. 6. as seen from the hole and electron densities depicted in Fig. 7. In the CTCs formed by doped 6T, the situation is slightly different: While in all configurations, the composition of P 2 is the same as in the 4T counterparts, the spatial distribution of the occupied orbitals involved in the corresponding optical transition changes (see Table 1). Due to the increasing donor length, the HOMOÀ1 in the dimer and in the A-D-A trimer, and the HOMOÀ2 in the D-D-A and D-A-D trimers become more localized on the donor(s) species (see the ESI †). As a result, P 2 has a Frenkel-like character in all CTCs formed by doped 4T, whereas in those including 6T, the spatial separation between the hole and the electron increases and hence the CT character is more pronounced.
In the spectra of the D-D-A trimers, an additional weak peak, labeled P 1 *, is visible between P 1 and P 2 . It stems from the transition between the HOMOÀ1 and the LUMO. In the D-D-A trimers, the HOMOÀ1 has a bonding character similar to the HOMO (see Fig. 4), although it is slightly more localized on the donor molecules than on the acceptor. As a result, the reduced spatial overlap between HOMOÀ1 and LUMO explains the lower oscillator strength of P 1 *, compared to P 1 . More details are provided in the ESI. † To support these observations, we quantify the localization of the hole on the donor(s) and of the electron on the acceptor(s) with the LIs defined in eqn (5) and (6). The results for P 1 and P 2 are reported in Table 2. In the dimers, the values of LIs for both the hole and electron densities associated to P 1 are close to 1.0, which suggests the CT character of this excitation. On the other hand, the frontier orbitals contributing to this transition have bonding and anti-bonding nature due to the large degree of hybridization (see Fig. 4). From the combined analysis of the electron and hole densities shown in Fig. 7 and of the LIs in Table 2, it is evident that P 1 bears a very peculiar nature, which can hardly be labeled as purely Frenkel-or charge-transfer-like. The D-D-A trimers exhibit a similar behavior to the dimers. However, in this case, the presence of two donor molecules stacked on top of each other enhances the localization of the hole on their side, such that the corresponding LI is even closer to 1.0 (see Table 2). On the other hand, the electron is as localized on the acceptor as in the dimer, as reflected by the values of the associated LI. In the D-A-D (A-D-A) trimers, the CT nature of P 1 is confirmed by the LI being equal to 1.0 for the hole (electron), while the electron (hole) exhibits about 0.8 localization on the acceptor (donor). Turning now to P 2 , its Frenkel (CT) nature in 4T-F4TCNQ (6T-F4TCNQ) is confirmed by the LI equal to 0.6 (0.95) of the hole on the donor, with the electron being also largely localized on the acceptor. In the trimers formed by doped 4T, the values of LI for P 2 as shown in Table 2 point to a balanced distribution of the hole and of the electron on both donor and acceptor species, resulting in an overall delocalization of this excitation on the whole complex. On the other hand, in the trimers formed by doped 6T the results of Table 2 for P 2 quantify the enhanced segregation of the hole and electron on the donor and acceptor molecules, respectively. The LI associated to the hole, in particular, is very close to 1.0 in all these trimers, thus confirming the CT-like character of P 2 . This analysis of the LIs suggests that a simple visual inspection of the hole and the electron densities, or even only of the orbitals contributing to the optical transitions, is insufficient to determine the character of the excitations. The calculation of the LIs represents a much more robust and reliable approach to analyze the excitations.
We finally analyze the optical properties of the CTCs modeled by periodic arrangements (see the bottom of Fig. 1). The absorption spectra shown in Fig. 8 (left panel) are computed considering different polarizations of the incident electric field, namely along the stacking direction (c axis in Fig. 1, solid lines in Fig. 8), and along the long molecular axis (a axis in Fig. 1, dashed lines in Fig. 8). The average spectrum obtained from these two is also displayed for comparison. The first excitation, labeled E 1 , is bright and very intense. It is polarized along the stacking direction, as shown by the corresponding transition density in Fig. 8. Energetically, it is red-shifted with respect to P 1 in the spectra of the corresponding dimers, which can be regarded as a manifestation of J-aggregate behavior. 56,85,86 As summarized in Table 3, E 1 is mainly the result of transitions from the highest-occupied band to the lowest-unoccupied band around the high-symmetry point Z in the BZ, where the band gap appears (see Fig. 5). The binding energy of E 1 , evaluated as the energy difference with respect to the QP gap, is of the order of 1 eV, i.e., significantly reduced compared to P 1 in the isolated CTCs (see Fig. 6). This is a reasonable behavior, considering the larger screening exerted by the periodic alternation of donor and acceptor molecules in comparison with isolated dimers or trimers. The second and third bright excitations in the spectra of the periodic stacks, labeled E 2 and E 3 , respectively, are much weaker than E 1 and, as such, hardly visible in Fig. 8. Similar to E 1 , E 2 is also polarized along the stacking direction, and stems from the transitions between the highest-occupied band and the lowest-unoccupied band in the vicinity of G (see Table 3). E 1 and E 2 can be associated to the splitting of P 1 in the isolated dimers due to intermolecular coupling in the periodic stacks. [87][88][89] Analogously, the third excitation E 3 results from the splitting of P 2 in the dimer: as shown in Table 3, it stems from multiple transitions between the second highest-occupied band and the lowest-unoccupied one over the entire BZ.
To deepen the analysis on the excitations in the periodic stacks in comparison with those in the isolated dimers and trimers, we consider the transition densities depicted on the  Fig. 8 and contrast them with those reported in Fig. 7. From the transition-density plots, the polarization of E 1 and E 2 along the stacking direction is evident and so is the larger oscillator strength of the first excitation compared to the second one. Reflecting the character of the electronic states involved in the corresponding optical transitions, the transition density of E 1 is significantly more extended along the stacking direction than the one of E 2 due to the more pronounced wavefunction overlap. The transition densities of both excitations exhibit similarities with the one of P 1 in the isolated dimers and trimers, even in the D-A-D and A-D-A arrangements where the lowest-energy excitation has a CT character (see Fig. 7). On the other hand, E 3 is evidently polarized along the long molecular axis (see Fig. 8, right panel), analogously to P 2 in the nonperiodic structures (see Fig. 7).

Discussion and conclusions
The results presented in this work demonstrate the sensitivity of the electronic and optical properties of doped OSCs on the number and nature of the local donor-acceptor interfaces in the structures adopted in the first-principles calculations. The electronic structure of dimers, trimers, and periodic stacks varies accordingly. Bonding and anti-bonding frontier orbitals are formed only by donor and acceptor molecules interacting with each other through one single interface. This is obviously the case in the dimers 13,19,20 and also in the trimers formed by one acceptor molecule adsorbed on top of two donors. On the other hand, when one donor (acceptor) is sandwiched between two acceptor (donor) molecules, the LUMO (HOMO) of the complex is localized solely on the latter species, that are present in larger amount, with the LUMO+1 (HOMOÀ1) exhibiting antibonding (bonding) character. The orbital energies are correspondingly affected by these characteristics, which are also reflected in the relative level alignment of the CTCs with respect to their constituents, and also in the resulting band gaps. The optical spectra are, at a first glance, hardly influenced by the type and amounts of donor-acceptor interfaces in the model structure. For a given donor molecule, the absorption onset is within a window of less than 500 meV regardless of the number of stacked molecules and their arrangement, and the corresponding peak has comparable oscillator strength in all systems. However, in spite of these common characteristics, a quantitative inspection reveals a different nature of the first excitation, corresponding to the transition between the HOMO and the LUMO, depending on the aforementioned character of the frontier orbitals. As a result, excitons with more pronounced Frenkel or charge-transfer character are obtained depending on the number of local interfaces: One donor-acceptor interface promotes bonding and anti-bonding states at the frontier and hence Frenkel excitons localized in the CTC. Conversely, the  Table 3 Excitation energy, oscillator strength (OS) and composition in terms of single-particle transitions (band and k-point) of the first three excitations E 1 , E 2 and E 3 highlighted in Fig. 8. The labels VB and CB stand for the highest valence band and the lowest conduction band, respectively. The coordinates of the k-points are expressed in reciprocal lattice units, where G = (0,0,0) and Z = (0,0,0.5). Only the transitions with weight larger than 10% are reported double interface of a donor (acceptor) molecule with two acceptor (donor) species enhances the spatial segregation of the LUMO (HOMO) on the acceptors (donors), thus enhancing the CT nature of the excitons. Charge-transfer complexes modelled by idealized periodic structures exhibit additional features in the electronic structure, such as dispersive bands and the systematic reduction of the QP-gap energy. The fundamental gap appears at the zone edge along the reciprocal axis of the periodic direction rather than at the zone center G, similar to the other D-A complexes investigated in previous work. 84 The character of the wave-functions at the frontier varies across the Brillouin zone, being more remarkably bonding and anti-bonding at G than at the zone edge Z, where the highest-occupied and lowest-unoccupied bands become more segregated on the donors and on the acceptors, respectively. The optical spectra of the periodic stacks exhibit a pronounced maximum at the onset, corresponding to a bright excitation polarized along the stacking direction. The relative intensity of the first peak is enhanced compared to the nonperiodic CTCs, due to the increase of wave-function overlap and delocalization along the periodic direction.
In conclusion, our study highlights the remarkable complexity of modelling organic donor/acceptor complexes using first principles. Our main finding is that the electronic and optical properties of doped OSCs depend critically on the local interface structure. Hence, the models adopted in the ab initio calculations should be chosen critically depending on the characteristics of the system under study (e.g., the dopant concentration) and/or the effect to be investigated (e.g., local or global properties of the materials). The implications of our work in the context of ab initio studies of the doped OSCs are therefore evident. Our findings are also relevant from an experimental perspective, as they demonstrate that a detailed description of the local structures is crucial for addressing and unraveling the microscopic physical processes in doped OSCs. If existing experimental evidence is able to clarify the specific local interface structure, it should be used to guide the ab initio modelling. On the other hand, if no experimental reference is available, our results provide a useful rationale to anticipate the role played by the model structures and thus to support the physical intuition in designing them.

Conflicts of interest
There are no conflicts to declare.