Boubacar Traoré

Pooja Basera

Alexandra J Ramadan

Henry J Snaith

Claudine Katan

Jacky Even
email: jacky.even@insa-rennes.fr

Boubacar Traore
email: boubacar.traore@univ-rennes1.fr

A theoretical framework for microscopic surface and interface dipoles, work functions and valence band alignments in 2D and 3D halide perovskite heterostructures

come     A theoretical framework for microscopic surface and interface dipoles, work functions and valence band alignments in 2D and 3D halide perovskite heterostructures

Introduction

Surfaces and interfaces are pervasive in thin films and semiconductor systems. They play a critical role in the performance of optoelectronic devices and the significance of their presence echoes well with the famous phrase "interface is the device". [START_REF] Hohenberg | Inhomogeneous electron gas[END_REF]2 This is because surfaces/interfaces offer additional flexibility to control the properties of devices through schemes such as: careful selection of contact materials, surface passivation and functionalization. 3,4 The latter, surface functionalization, directly influences the surface dipoles between adjacent layers in a device stack, which in turn change materials' work functions and absolute energy level alignments. [5][6][7][8][9] In the context of hybrid organic-inorganic halide perovskites (HOIP), [10][11][START_REF] Fernández-Seivane | On-site approximation for spin-orbit coupling in linear combination of atomic orbitals density functional methods[END_REF] tuning the energy level alignment of materials composing the thin-film devices has been a successful strategy to improve their performance in photovoltaic cells and light emitting diodes (LEDs). 3,[13][14][15][16] Indeed, a key ingredient to enhance the performance of optoelectronic devices is the appropriate energy level alignment between the photo-active layer and the contact charge carrier transport layers, namely the hole transport layer (HTL) and the electron transport layer (ETL). 17,18 An appropriate alignment allows the device to efficiently collect and transport the photo-generated carriers towards the electrodes for solar cells or improves the injection of carriers towards the photoactive layer for LEDs. Hence, a major playground for optimizing the performance of HOIP based devices is to fine-tune their energy level alignments and this may be achievable via surface functionalization and / or passivation. 3,19,20 Although, the influence of surface passivation and / or functionalization on the change of work function is, in general, clear from experiments, the analyses rely on qualitative arguments or empirical models. This makes it difficult to quantify the effect of the change of surface dipoles on the change of work functions and absolute energy levels. To further elaborate on this missing link and bring a more quantitative analysis in the context of HOIP to be combined with results from existing experimental methodologies such as ultraviolet photoelectron spectroscopy (UPS) or inverse photoelectron spectroscopy (IPES) techniques, 2,21 we revisit a methodology that clearly shows the relationship between surface dipoles and work functions. 22 The latter would correspond to absolute valence energy levels for undoped and non-defective materials of this family of semiconductors. We demonstrate the potentials of the methodology for hybrid semiconductors through a variety of cases to clearly show i) the effect of surface termination on the absolute energy level alignments, the ability to modulate the work function via ii) surface coating and iii) surface functionalization and / or passivation with molecules. Finally, we demonstrate the additivity of surface dipoles in heterostructures. The latter will be useful to design band alignments in complex heterojunctions and buried interfaces. Our methodology transcends the limits of halide perovskites and provides a computational strategy to fine-tune the absolute energy level alignments for optimizing the performance of broader families of optoelectronic devices.

Results and discussion

Link between the work function and the surface dipole

We start by establishing the expression that relates the work function to the surface dipoles using the International System of Units (SI). Beforehand, we present the steps that lead to the relation between the polarization density and the charge density. Using the definition of the displacement electric field:

D = ✏ 0 E + P ( 1
)
where E is the electric field and P is the polarization density that captures the field due to "trapped " dipole moments. Taking the divergence of Eq. ( 1) and comparing it to Gauss' law,

✏ 0 r • E = r • D r • P (2)
and

✏ 0 r • E = ⇢ with ⇢ = ⇢ free + ⇢ b (3)
we have,

⇢ = r • D r • P = ⇢ free + ⇢ b with r • D = ⇢ free = 0 and r • P = ⇢ b (4)
where ⇢ free is the free charge density (⇢ free = 0 for dielectrics and insulators) and ⇢ b is the bound charge density. Considering a slab with the vacuum along z (Figure 1a), one can consider the planar averaged charge density along z without loss of generality. Hence,

⇢ b (z) = dP z dz . (5)
From the integration by parts, the dipole moment density (surface dipole density) p is given by:

p = Z c/2
Assuming, by construction, that the dipole is vanishing in the middle of the bulk like layer of the slab (z = z 0 = 0, taken as the origin) and in the middle of the vacuum region (at 1a), the first term on the right hand side of Eq. ( 6) vanishes and we have the surface dipole p,

z = c/2) (Figure
p = Z c/2 z 0 P z (z)dz. (7)
Eq. ( 7) can be numerically computed using the polarization density profile of Eq. ( 5), which is related to the total charge density ⇢ b (z), an output from first-principles calculations.

Noteworthy, ⇢ b (z) = ⇢ b (z) electronic + ⇢ b (z) ionic is the total charge density including both electronic and ionic contributions. Notice that, at this stage, the procedure can be used to analyze only the microscopic contributions along the heterostructure stacking axis. This semi-classical approach is analogous to the previous one used for dielectric susceptibility and microscopically induced dipole profiles. [23][24][25] Inspired from the work of Leung et al., 22 the last part of the theoretical development aims at relating the computed surface dipole p to the work function. As for the charge density,

we consider the planar averaged potential V (z) given by

V (z) = 1 A R R dxdyV (x, y, z) where
A is the area in the plane of the cell. Combining the definition of the dipole moment density (Eq. ( 6)) and Poisson's equation (

✏ 0 r 2 V = ⇢ b ): p = Z c/2 z 0 =0 z⇢ b (z)dz = ✏ 0 A Z dx Z dy Z c/2 z 0 =0 z[ @ 2 V @x 2 + @ 2 V @y 2 + @ 2 V @z 2 ]dz (8)
Due to periodicity, the first two terms inside the bracket vanish. From the integration by parts of

R c/2 z 0 =0 z[ @ 2 V @z 2 ]
dz, the terms @V @z at z = z 0 = 0 and z = c/2 disappear by the symmetry of the system. This results in

p = ✏ 0 Z c/2 z 0 =0 dV (z) ) p ✏ 0 = V (c/2) V (z 0 ) (9)
If the Fermi level is set to zero (taken as the reference), then eV (c/2) = W F = is by definition the work function (Figure 1b). Therefore,

= eV (z 0 ) e p ✏ 0 ) = e p ✏ 0 = 1.809 ⇥ 10 8 p ( 10
)
where p is in C/m, in J, the charge e in C and ✏ 0 in F/m. Eq. ( 10

Effect of surface termination

We begin the application of the methodology considering two slabs : a CsPbI 3 slab from its pseudo-cubic structure 26 To understand the microscopic origin of these large E abs v differences, we compute the polarization density profiles of the two termination types using Eq. ( 5) as presented in Figure 2d,h. A few interesting features emerge from these profiles. Notably, the emergence of the surface dipoles which counteract each other at the opposite surface layers. Moreover, the surface dipoles fade away in the middle bulk-like region of the slabs justifying the assumption of vanishing dipole at z = z 0 in Eq. (7). We see from the areas under the peaks of the dipolar density profiles in Figure 2d,h that the PbI 2 -terminated surfaces have larger surface dipoles as compared to the CsI and MAI-terminated ones. By integrating these profiles using Eq. 7, we calculate the difference of the surface dipole densities for the two terminations as summarized in Table 1. Notably, the differences of the absolute alignments E abs v are in excellent agreement with the differences computed using Eq. (10). This shows that the increase of E abs v ( ) for PbI 2 -termination is solely due to the increase of its surface dipole as compared to CsI or MAI-termination. The agreement between the Hartree potential alignment approach with theoretical prediction from Eq. (10), not only serves as a double check for consistent results but also underscores the link between surface dipoles and energy level alignments.

At the surface of a crystalline solid, the termination of the crystal structure and the absence of the subsequent ions/atoms, implies that the lowest energy relative position of the surface atoms will be different as compared to the atoms within the infinite crystalline slab.

We can allow the surface to "relax" computationally, and then estimate this impact upon the surface dipole for the different surface terminations. Hence, we compute the surface dipoles and E abs v of the different terminations for the relaxed surface layers of both slabs (Figure 2e,f for CsPbI 3 and Figure 2i,j for MAPbI 3 ) and the results are summarized in Table 1 . This trend between the relaxed and unrelaxed surface layers can be anticipated from the lower surface dipole of PbI 2 as a result of surface relaxation. The changes are due to the combined effect of the octahedral distortions of the surface layer along with the contraction or the stretching of PbI bond lengths at the surface (see Text S5). This shows that in these ionic semiconductors, surface relaxation impacts the surface dipoles, which in turn directly tunes the subsequent absolute energy alignments and the work functions. It also highlights the importance of experimental techniques giving access to the local atomistic details at the surfaces and interfaces to probe the relaxation of the perovskite lattice. Finally, we shall point out that the differences between the workfunctions obtained here for the relaxed and unrelaxed bare surfaces, may appear at first sight quite large. But in most pratical cases, such surfaces are, in addition, likely to be covered intentionnaly or naturally by passivation layers (vide infra).

Table 1: Comparison of absolute valence energy levels (E abs v ) calculated for the different systems. The table also compares the shifts of absolute valence energy levels obtained from the difference of surface dipoles ( using Eq 10) and those computed from the Hatree potential alignment (Figure 2b and Eq. 14). CsI or MAI-termination is taken as the reference when comparing to PbI 2 . With the adsorbate X at the termination Y (X Y , e.g. DMSO CsI ), the termination Y is used as the reference.

Unrelaxed surface layers

E abs v = (eV) E abs v (eV) p (C/m) (eV) [

Effect of the surface coating with Cs

Coating perovskite surfaces with a metal like Cs presents potential technological promises in applications requiring electron sources such as electron beam accelerator facilites. [START_REF] Baum | High-Performance Negative Electron Affinity Photocathodes For High Resolution Electron Beam Lithography and Metrology[END_REF] It has recently been demonstrated that by depositing monolayers of Cs on top of halide perovskites, the electron emission efficiency was improved [START_REF] Liu | Highly Efficient Photoelectric Effect in Halide Perovskites For Regenerative Electron Sources[END_REF] and the improvement was attributed to a change of sign of the electron affinity, which translates into a diminishing work function. 1). This reduction of the surface dipole is associated with the charge transfer from the Cs monolayer to the surface perovskite atoms as shown in Figure 3d,g.

We observe charge depletion from the Cs monolayer which gets transferred to the perovskite layer. This induces a dipole pointing out from the surface and leads to the reduction of the absolute valence energy level or the work function. These results are consistent with the lowering of the onset energy of the electron emission by about 2.2 eV for CsPbI 3 due to the deposition of Cs monolayers from photoelectric experiments. [START_REF] Liu | Highly Efficient Photoelectric Effect in Halide Perovskites For Regenerative Electron Sources[END_REF] This difference is in fair agreement with 2.63 eV 2.88 eV predicted from our calculations. Note that the shifts E abs v with Cs-coating are in excellent agreement with computed via Eq. ( 10) as shown in Table 1.

Effect of the surface passivation and / or functionalization

Surface passivation and/or functionalization is a topic of considerable interest nowadays for developments of perovskite based thin film technologies. We refer the reader to the extensive literature and reviews on these aspects, 2,31-38 but we want to illustrate via two examples how our proposed theoretical framework could suitably guide the ongoing experimental efforts.

We choose as a first example the tuning of the surface dipoles by passivating and / or functionalizing CsPbI 3 and MAPbI 3 surface layers with DMSO (Dimethyl sulfoxide; Figure 4a), a commonly used solvent in halide perovskites fabrication process. [START_REF] Ahn | Highly Reproducible Perovskite Solar Cells with Average Efficiency of 18.3% and Best Efficiency of 19.7% Fabricated via Lewis Base Adduct of Lead(II) Iodide[END_REF][START_REF] Vidal | Assessing Health and Environmental Impacts of Solvents for Producing Perovskite Solar Cells[END_REF] We consider both 1). Again, we find that the differences E abs v in all the different terminations are in excellent agreement with computed via Eq. ( 10). C/m, Table 1), which explains its similar E abs v as compared to CsPbI 3 with PbI 2 -termination.

The lowering of E abs

Notably, the differences E abs v for all the different terminations are in excellent agreement with computed via Eq. ( 10). --

Additivity of surface dipoles and buried interfaces for a 2D/3D perovskite heterostructure

The different systems, thus far investigated, exhibit the clear connection between the surface dipoles and the tuning of energy level alignments. This occurs through the interaction between the dipoles of the different materials composing the whole structure. A natural question that could arise would be: How are the surface dipoles of the constituent materials connected to that of the combined structure viewed as a single entity? The analysis of complex heterostructures with buried interfaces is indeed important for practical applications.

We address this issue by considering a heterostructure comprised of CsPbI 3 interfaced with BA 2 PbI 4 (BA = Butylammonium) 2D perovskite. The details of the heterostructure construction and relaxation are provided in the SI. Here, the heterostructure is conceptualized as a multilayer nanocomposite 23,25 whereby it is divided into its components as shown in Notably, by adding the profiles p(z) 3D and p(z) 2D , we recover the polarization profile of the heterostructure following:

p(z) heterostructure ⇡ p(z) 3D + p(z) 2D (11)
Eq. ( 11) provides a theoretical guidance for the engineering of complex 2D/3D heterostructures. It demonstrates the quasi-additivity of the surface dipoles across the heterostructure down to the atomic scale. Moreover, it highlights the interplay between the dipoles of the different systems that lead to the readjustment of the energy level alignments in interface systems as compared to the energy levels obtained in individual materials. This additivity of the surface dipoles in heterostructures is analogous to the additivity of the dielectric sus-ceptibilities that was demonstrated in a previous work. 25 Together, they provide a variety of analysis methods to gain deeper insights on the optoelectronic properties of complex material heterostructures. We find similar results with PEA 2 PbI 4 /CsPbI 3 2D/3D heterostructure (Figure S17) showing the generality of the approach (PEA=phenylethylammonium). Hence, this method can be very useful to interpret band alignments in complex heterostructures and buried interfaces.

Revisiting the classical approach to surface molecular dipoles

Following the pioneering work of Demchak and Fort, [START_REF] Demchak | Surface Dipole Moments of Close-Packed Un-ionized Monolayers at The Air-Water Interface[END_REF] an attractive model was developed to analyse monolayers at water-air interfaces, but later on applied more widely to describe ultrathin layers made of dipolar molecules separating two dielectric media. This model was adapted to various situations, [START_REF] Demchak | Surface Dipole Moments of Close-Packed Un-ionized Monolayers at The Air-Water Interface[END_REF][START_REF] Oliveira | Estimation of Group Dipole Moments From Surface Potential Measurements on Langmuir Monolayers[END_REF][START_REF] Petrov | Three-Capacitor Model for Surface Potential of Insoluble Monolayers[END_REF][START_REF] Nüesch | Solution versus Vapor Growth of Dipolar Layers on Activated Oxide Substrates[END_REF] including the design of organic solar cells and optoelectronic devices. [START_REF] Krüger | Modification of TiO 2 Heterojunctions with Benzoic Acid Derivatives in Hybrid Molecular Solid-State Devices[END_REF][START_REF] Goh | Effects of Molecular Interface Modification in Hybrid Organic-Inorganic Photovoltaic Cells[END_REF][START_REF] Otálvaro | Self-Assembled Monolayer Induced Au(111) and Ag(111) Reconstructions: Work Functions and Interface Dipole Formation[END_REF][START_REF] Zhu | Response Enhancement of Self-Powered Visible-Blind UV Photodetectors by Nanostructured Heterointerface Engineering[END_REF] This model also called the "three-Capacitor Model" [START_REF] Oliveira | Estimation of Group Dipole Moments From Surface Potential Measurements on Langmuir Monolayers[END_REF][START_REF] Davies | Interfacial Potentials[END_REF] for the analysis of monolayers at water-air interfaces, provides a link between the potential drop across the stack V , and three electric dipoles attributed to water molecules and the Langmuir monolayers:

✏ 0 A V = µ 1 ✏ 1 + µ 2 ✏ 2 + µ 3 ✏ 3 ( 12
)
where A is the surface area and the three pairs of dipole moments and relative dielectric constants µ i ,✏ i (i = 1, 2, 3) are respectively attributed to the aqueous subphase, polar head and hydrophobic tail end-groups of the adsorbed molecules. It must be pointed out that the deviation of the dipole moments with respect to the surface normal along the stack direction was also considered. [START_REF] Demchak | Surface Dipole Moments of Close-Packed Un-ionized Monolayers at The Air-Water Interface[END_REF][START_REF] Oliveira | Estimation of Group Dipole Moments From Surface Potential Measurements on Langmuir Monolayers[END_REF] When used in the context of thin film based devices, [START_REF] Krüger | Modification of TiO 2 Heterojunctions with Benzoic Acid Derivatives in Hybrid Molecular Solid-State Devices[END_REF][START_REF] Goh | Effects of Molecular Interface Modification in Hybrid Organic-Inorganic Photovoltaic Cells[END_REF][START_REF] Zhu | Response Enhancement of Self-Powered Visible-Blind UV Photodetectors by Nanostructured Heterointerface Engineering[END_REF] a similar formula is expressed in a more compact form, considering only the potential drop across the ultrathin dipolar molecular layer:

V = N.µ.cos✓ ✏ 0 ✏ r ( 13
)
where N is the surface dipole density and ✓ is the angle between the molecular dipole (µ) and the normal to the surface. This formula provides a practical way to qualitatively describe the influence of molecular dipoles on device properties, but an adhoc choice of an effective dielectric permittivity ✏ r has to be made in order to get a quantitative match between experimental quantities and computed potential drops. It should be noted that the problem of the arbitrary choice of effective dielectric permittivities was already documented in the literature on monolayers at water-air interfaces. [START_REF] Oliveira | Estimation of Group Dipole Moments From Surface Potential Measurements on Langmuir Monolayers[END_REF] Moreover, from a fundamental viewpoint, the validity of the dielectric permittivity concept down to a monolayer can be questioned. The nanoscale averaging of lattice polarizability was already discussed in details in the context of multilayered 2D perovskite heterostructures. 25,[START_REF] Katan | Quantum and Dielectric Confinement Effects in Lower-Dimensional Hybrid Perovskite Semiconductors[END_REF] The semi-classical approach presented in this work allows circumventing this difficulty by using a DFT computation at the initial stage.

Conclusions

In summary, we present a theoretical methodology that bridges classical electromagnetism and the outputs of first-principles calculations to relate the change of absolute valence energy levels (or work functions) to the modulation of surface dipoles. We apply the methodology to a variety of systems to demonstrate its power. Furthermore, we show the additivity of the polarization density profiles across heterostructures, which allows us to decipher the interplay between surface dipoles in the readjustment of band alignments in buried interfaces. Overall, this work provides a theoretical strategy to propose, analyze, interpret and fine-tune energy level alignments for designing high-performance optical and optoelectronic devices.

Computational methods

First-principles calculations were performed using SIESTA [START_REF] Soler | The SIESTA Method for Ab Initio Order-N Materials[END_REF][START_REF] Artacho | The SIESTA method; developments and applicability[END_REF] code based on a basis set of finite-range of numerical atomic orbitals. Structural relaxations were peformed using the van der Waals density functional with C09 exchange 55 combined with DF2 flavor. [START_REF] Hamada | Comparative Van Der Waals Density-Functional Study of Graphene on Metal Surfaces[END_REF] We used the revisited Slater half-occupation technique in the so-called DFT-1/2 implementation in order to correct the band gaps. [START_REF] Ferreira | Approximation to Density Functional Theory For The Calculation of Band Gaps of Semiconductors[END_REF][START_REF] Tao | Accurate And Efficient Band Gap Predictions of Metal Halide Perovskites Using The DFT-1/2 Method: GW Accuracy With DFT Expense[END_REF] DFT-1/2 was used on top of GGA-PBE 59 functional for the band structure and alignment calculations. Spin-orbit coupling, in its on-site approximation, was included in the computation of the band gaps. [START_REF] Fernández-Seivane | On-site approximation for spin-orbit coupling in linear combination of atomic orbitals density functional methods[END_REF] The absolute valence energy levels of the different systems were computed using the Hartree potential alignment with the vacuum level set as the reference. 9,61 Here, the absolute valence energy level E abs v is obtained using:

E abs v = V BM bulk + V H + E vacuum (14)
where E abs v is the absolute valence energy level, V BM bulk is the valence band maximum of the bulk system, V H is the shift of the Hartree potential between the slab and the bulk system, and E vacuum is the vacuum level shift. For the absolute energy level of conduction bands, E abs c , we calculated it by adding to E abs v the theoretically computed band gap of the bulk compound within DFT-1/2 giving:

E abs c = E abs v + E g,bulk (15)
Detailed computational methods is provided in the SI.

Structural information

For the structures, we used the pseudo-cubic structure of CsPbI 3 generated from its room-temperature othorhombic cell as reported in Ref. 14 . The lattice constant of this pseudo-cubic structure was obtained using :

a pseudocubic = (V or tho =4) 1=3
, where V or tho is the volume of the room-temperature orthorhombic cell. Similarly, for CsPbBr 3 , we used the pseudo-cubic structure from its room-temperature orthorhombic cell 15 .

2D/3D heterostructure construction

We used the doubled pseudo-cubic cells in the plane of the perovskite to lattice match it to the 2D layer cell. This cell doubling corresponds to multiplying the pseudo-cubic lattice constant by p 2. For the heterostructure using 2D based BA, we used the room temperature structure of BA 2 PbI 4 as reported in Ref. 16 . As for PEA, we used the structure recorded at 295K from Ref. 17 . We considered 9 octahedral layers of CsPbI 3 to mimic the 3D part of the heterostructure. The in-plane lattice constants of the 3D part were imposed for the whole heterostructure and were not allowed to relax during the 2D/3D interface geometry optimization. We only allowed the c-lattice constant along z to relax along with the atomic positions.

Note on slab dipole correction

In modeling slabs with asymmetric surface terminations, an artificial electric field is created across the slab due to the periodic boundary conditions. This is reflected as a potential slope in the vacuum region of the slab. Quite often a dipole correction scheme is imposed to compensate for the artificial electric field 18,19 and thus making the potential flat in the vacuum region. This would then allow to compute quantities such as work functions with asymmetric surface terminations. Here, we used symmetrically terminated slab surfaces by construction such that there is negligible potential slope in the vacuum region and that there is no need to use any dipole correction scheme. We checked that the dipole correction has negligible effects on the absolute valence energy levels with our symmetric surface terminations. In addition the symmetric termination is desired in our approach in order to reliably extract the surface dipoles from the developed methodology.

Band gap correction

Since normal DFT severely underestimates the bandgap, we used the revisited Slater half-occupation technique in the so-called DFT-1/2 implementation in order to correct the band gaps 11,20 . This technique allows to obtain reasonable band gaps in good agreement with experiments and at a much computationally affordable cost. For DFT-1/2 correction, we removed 1=2e from p and s orbitals of halides and lead (Pb) atoms, respectively. This is because the valence band maximum of these halide perovskites is made of an anti-bonding hybridization between Pb (s) and halides (p) states 21 . We note that spin-orbit coupling effect was included.

Charge transfer

The charge transfer from the adsorbate to the slab or vice-versa was computed using:

⇢ = ⇢ slab+adsor b (⇢ slab + ⇢ adsor b ) (1)
where ⇢ is the charger transfer from or to the perosvkite slab, ⇢ slab+adsor b is charge density of the whole system including the perovskite and the adsorbate layers, ⇢ slab is the charge density of the perovskite part of the slab and ⇢ adsor b is the charge density of the adsorbate or added foreign layer. Here, a positive value of ⇢ corresponds to electronic charge accumulation while a negative value corresponds to electronic charge depletion. Note that within SIESTA convention for total charge density: a positive sign is for electronic charge density and a negative sign is for ionic charge density.

Text S2 | The computation of absolute valence energy levels

The absolute valence energy levels of the different systems were computed using the Hartree potential alignment with the vacuum level set as the reference 22,23 . Here, the absolute valence energy level E abs v is obtained using:

E abs v = V BM bulk + V H + E vacuum (2)
where V BM bulk is the valence band maximum of the bulk system, Again, this difference in nicely captured by the larger surface dipole of the CsBr-terminated surface as a result of surface relaxation (Figure S4c). By computing (+1.08 eV) using Eq. ( 10) of the main text, we observe an excellent agreement with E abs v (+1.03 eV). Table S1 summarizes the computed absolute valence energy levels along with the difference of the surface dipoles for the various cases of CsPbBr 3 slabs.

V H = V slab H V bulk
Table S1 | Comparison of absolute valence energy levels (E abs v ) calculated for the different systems. The table also compares the shifts of absolute valence energy levels obtained from the difference of surface dipoles ( using Eq 10 of the main text) and those computed from the Hatree potential alignment (Figure 2b and Eq. 14 of the main text). CsBr-termination is taken as the reference. that octahedral distortions have a significant influence on the electronic properties of halide perovskites [24][25][26][27] .

Unrelaxed surface layers

E abs v = (eV) E abs v (eV) p (C/m) (eV)
The valence band maximum (VBM) of these compounds is made of an anti-bonding hybridization between the halide X(p) states and the metal M(s) states. The larger Pb-I-Pb deviation from the ideal 180 in the case of CsI termination leads to much less destabilized X(p) -M(s) coupling, which results in much deeper VBM. In addition, the longer PbI bonds in CsI-termination also exacerbates this less destabilized X(p) -M(s) coupling at the VBM giving rise to its much deeper absolute valence energy level after relaxation. In the case Of PbI 2 termination, the same effect occurs but to a lesser extent. Besides, the shorter out-of-plane PbI bond in PbI 2 after relaxation tends to destabilize X(p) -M(s) coupling which counteracts the deepening of VBM. Thus, its less deeper absolute valence energy level after relaxation as compared to the CsI-termination. Therefore, the change of trend between the relaxed and unrelaxed surfaces for the two terminations is related to the way the two surfaces are reorganized after relaxation which is reflected in the computed surface dipoles. Table S3 compares the variation of the in-plane and out-of-plane PbI bond lengths and Pb-I-Pb angles for the MAPbI 3 slabs when the surface layers are unrelaxed and relaxed. The results are shown for both MAI and PbI 2terminated surfaces. Here, the relaxation did not induce significant changes on the average PbI bond lengths and Pb-I-Pb angles for either surface termination. However, the values undergo a noticeable fluctuation between the lower and upper bounds as shown in the table, as a result of the distortions that lead to some deepening of the subsequent absolute valence energy levels. However, no change of the trend is seen between the unrelaxed and relaxed surfaces for the two terminations due to the similar fluctuations and distortions induced for the two systems.

Table S3 | Comparison of the in-plane and out-of-plane Pb-I-Pb angles, in-plane and out-of-plane PbI bond lengths at the outermost surface layers of MAPbI 3 slab. subscripts "in" and "out" refer to the in-plane and out-ofplane, respectively. The range between the lower and upper bounds is rather shown here to show the distortion effects since the average values for the relaxed structures were similar to the unrelaxed ones.

  ) relates the change in the work function to the change of the surface dipole22 and provides a consistent way to compare the results from energy level alignments. In other words, the change of the absolute valence energy alignments, due to a modulation and tuning of the surface properties, should be consistent with the numerically computed shift of the energy ( ) as a result of the change of the surface dipoles. This will be shown in the subsequent studied systems.

Figure 1 :

 1 Figure 1: Definition of model parameters. a Slab structure used to define z = z 0 = 0 (center of the slab) and z = c/2 (middle of the vacuum) for the derivation of the surface dipoles. By construction, we use symmetrical terminations on either side of the surfaces such that the dipole moment is vanishing in the middle bulk like region at z = z 0 . b Definition of the work function from a Hartree potential profile.

  and low temperature orthorhombic MAPbI 3 27 slab (MA = methylammonium). We consider two different terminations hereafter named as CsI and PbI 2 for CsPbI 3 slab (Figure2a) and MAI and PbI 2 for MAPbI 3 slab (FigureS1 and S2). With these two terminations, the most important features of the theoretical development from the previous section will be highlighted. Figure2bpresents an example of the shift of the Hartree potentials used to obtain the absolute valence energy alignments of the CsI structure shown in Figure 2a. Since, the atomic layers may reorganize differently when exposed to the vacuum of the slab or attached to adsorbates, we also inspect the effect of surface layers relaxation on the surface dipoles and concomitantly on the absolute alignments. When the surface layers are unrelaxed in CsPbI 3 slab, we compute an absolute valence energy level (E abs v ) of 6.78 eV for the PbI 2 -terminated surface as compared to 4.51 eV for the CsI-terminated one as shown in Figure 2c. The difference amounts to E abs v = 2.27 eV between the two terminations. In the case of MAPbI 3 , we obtain 5.30 eV and 6.92 eV for MAI and PbI 2 terminations, respectively (Figure 2g), resulting in E abs v = 1.62 eV. In both CsPbI 3 and MAPbI 3 slabs, PbI 2 termination presents a deeper E abs v as compared to the other termination when the surface layers remain unrelaxed.

Figure 2 :

 2 Figure 2: Effect of surface termination on absolute energy alignments and microscopic interpretation. a CsPbI 3 structures with CsI and PbI 2 terminations with relaxed surface layers. The surface layers are shown by dashed rectangles on either side of the slab. b Hartree potential alignment method used to obtain the absolute valence energy levels of the systems. The profile of the slab corresponds to the relaxed CsI terminated surface shown in a. For this example, a potential shift ( V H ) of +0.36 eV between the slab and the bulk results in superimposed profiles at the center of the slab (bulk-like region). c Computed absolute valence energy levels for CsI and PbI 2 terminated surfaces, respectively, for the unrelaxed surface of CsPbI 3 slab. d Polarization density profiles of the two terminations of CsPbI 3 slab showing different surface dipoles for the unrelaxed surface layers. The integration of these profiles result in the surface dipole moments of Eq. (7) discussed in the text. e Computed absolute valence energy levels of CsI and PbI 2 terminated surfaces, respectively, for the relaxed surface layers of CsPbI 3 slab. f Polarization density profiles of the two terminations of CsPbI 3 slab showing different surface dipoles for the relaxed surface layers. g Computed absolute valence energy levels of MAI and PbI 2 terminated surfaces, respectively, for the unrelaxed surface layers of MAPbI 3 slab. h Polarization density profiles of the two terminations of MAPbI 3 slab showing different surface dipoles for the unrelaxed surface layers. i Computed absolute valence energy levels for MAI and PbI 2 terminated surfaces, respectively, for the relaxed surface layers of MAPbI 3 slab. j Polarization density profiles of the two terminations of MAPbI 3 slab showing different surface dipoles for relaxed surface layers. The arrows pointing the directions of the dipoles are guides to the eyes.

  Work function shifts obtained by DFT techniques can be compared to dedicated phenomenological models,[START_REF] Lewis | Cesium-Coated Halide Perovskites as a Photocathode Material: Modeling Insights[END_REF] but we show here that the atomistic origin can be directly analyzed within the general theoretical framework proposed in the present work. To shed more light on this effect, we placed a monolayer of Cs (each monolayer contains 2 Cs atoms for 2 terminal I atoms) on top of either side of the relaxed surface layers of both CsI and PbI 2 -terminated CsPbI 3 slabs. The insertion of Cs monolayer, hereafter referred to as Cs-coating, creates surface states at the bottom of the conduction band with the Fermi level crossing those bands, making the system n-type (FigureS6, Text S6). Concomitantly, the Fermi level becomes closer to the vacuum level. The computed E abs v values for Cs-coating are compared to those from the pristine CsI and PbI 2 -terminated slabs in Figure3and Table1

Figure 3 :

 3 Figure 3: Effect of surface coating with Cs. a Comparison of relaxed CsPbI 3 structures with CsI and PbI 2 terminations with the surface layers coated with a monolayer of Cs. The surface layers are shown by dashed rectangles on either side of the slab. b Computed absolute valence energy levels of the slabs with CsI and a monolayer of Cs on CsI terminations. c Polarization density profiles comparing the surface dipoles of the slabs with CsI and a monolayer of Cs on CsI terminations. d Profile of the electronic charge density transfer across the slab with a monolayer of Cs on CsIterminated surface. Red for electronic charge accumulation and blue for electronic charge depletion. The positions of Cs monolayer, surface I and PbI layers are shown by vertical lines. coated with a monolayer of Cs. The surface layers are shown by dashed rectangles on either side of the slab. e Computed absolute valence energy levels of the slabs with PbI 2 and a monolayer of Cs on PbI 2 terminations. f Polarization density profiles comparing the surface dipoles of the slabs with PbI 2 and a monolayer of Cs on PbI 2 terminations. g Profile of the electronic charge density transfer across the slab with a monolayer of Cs on PbI 2 -terminated surface. Red for electronic charge accumulation and blue for electronic charge depletion. The positions of Cs monolayer and PbI layers are shown by vertical lines.

CsI and PbI 2 -

 2 terminated surfaces for CsPbI 3 slab and MAI and PbI 2 -terminated surfaces for MAPbI 3 slab. To insert DMSO at the surface, we place the oxygen (O) atom of the molecule at the position of an outer terminal I (iodine) atom.[START_REF] Petrov | Formamidinium Haloplumbate Intermediates: The Missing Link in a Chain of Hybrid Perovskites Crystallization[END_REF] In doing so, we remove a neighboring Cs atom or MA molecule to keep the charge neutrality of the system. In these slabs, the pristine surfaces contains 2 outer I atoms and we substitute one of them by DMSO. Hence, we have a ratio of one DMSO molecule per 2 outer I atoms. The relaxation of the surface with DMSO induces octahedral distortions of the surface PbI layers (see Figure S7, S8 for the relaxed systems). For instance, the in-plane Pb-I-Pb angles of the relaxed CsPbI 3 surface layers with DMSO on the CsI-termination vary between ⇠ 141 and ⇠ 164 from the ideal undistorted 180 . These octahedral distortions cause a widening of the band gap in the surface region as can be seen from the layer-by-layer resolved projected density of states (PDOS) of the system in Figure S9. Nevertheless, the resulting band structure exhibits dispersive bands with no surface states inside the gap showing the passivating role of DMSO (Figure S10, S11). In all cases, the energy level alignment with DMSO at the surface pushes up the absolute valence energy levels of the different systems (Figure 4b-e). The corresponding polarization density profiles clearly indicate a severe reduction of the surface dipole with the addition of DMSO (Figure 4b-e and Table

v 2 ) 2 ) 2 )Figure 4 :

 2224 Figure 4: Effect of surface passivation and / or functionalization with DMSO. a DMSO molecule with the Hirshfeld net atomic charge map. Red for excess electronic charge and blue for electron deficiency. The arrow shows the direction of the dipole moment of DMSO, which points from O to S. b (left) Computed absolute valence energy levels of CsPbI 3 slabs with CsI and DMSO on CsI terminations. (right) Polarization density profiles comparing the surface dipoles of the slabs with CsI and DMSO on CsI terminations. c (left) Computed absolute valence energy levels of CsPbI 3 slabs with PbI 2 and DMSO on PbI 2 terminations. (right) Polarization density profiles comparing the surface dipoles of the slabs with PbI 2 and DMSO on PbI 2 terminations. d (left) Computed absolute valence energy levels of MAPbI 3 slabs with MAI and DMSO on MAI terminations. (right) Polarization density profiles comparing the surface dipoles of the slabs with MAI and DMSO on MAI terminations. e (left) Computed absolute valence energy levels of MAPbI 3 slabs with PbI 2 and DMSO on PbI 2 terminations. (right) Polarization density profiles comparing the surface dipoles of the slabs with PbI 2 and DMSO on PbI 2 terminations.

Finally, we consider ( 2 , 4 , 6 -

 246 Figure S13-S14 and the resulting band structures exhibit dispersive bands with no surface

Figure 5 :

 5 Figure 5: Effect of surface passivation and / or functionalization with TMPPA. a TMPPA molecule with the Hirshfeld net atomic charge map. Red for excess electronic charge and blue for electron deficiency. The arrow shows the direction of the dipole moment of TMPPA. b (left) Computed absolute valence energy levels of CsPbI 3 slabs with CsI and TMPPA on CsI terminations. (right) Polarization density profiles comparing the surface dipoles of the slabs with CsI and TMPPA on CsI terminations. c (left) Computed absolute valence energy levels of CsPbI 3 slabs with PbI 2 and TMPPA on PbI 2 terminations. (right) Polarization density profiles comparing the surface dipoles of the slabs with PbI 2 and TMPPA on PbI 2 terminations. d (left) Computed absolute valence energy levels of MAPbI 3 slabs with MAI and TMPPA on MAI terminations. (right) Polarization density profiles comparing the surface dipoles of the slabs with MAI and TMPPA on MAI terminations. e (left) Computed absolute valence energy levels of MAPbI 3 slabs with PbI 2 and TMPPA on PbI 2 terminations. (right) Polarization density profiles comparing the surface dipoles of the slabs with PbI 2 and TMPPA on PbI 2 terminations.

Figure 6a .

 6a Figure 6a. We compare the polarization density profiles of the different structures in Figure 6b. We notice that at the interface region, the polarization profile of the 3D (p(z) 3D ) counteracts that of the 2D (p(z) 2D ) as a result of the opposing orientations of BA in the 2D and 3D-like regions, where the [NH 3 ] + groups of the molecule point to the perovskite.

Figure 6 :

 6 Figure 6: Additivity of the surface dipoles. a The relaxed 2D/3D heterostructure model composed of CsPbI 3 interfaced with BA 2 PbI 4 . The heterostructure is viewed as a composite showing its constituent parts. b Computed polarization density profiles of the 2D/3D and the constituent parts demonstrating the additivity of the surface dipoles down to the atomic scale.

HFigure S1 |Figure S2 |

 S1S2 Figure S1 | Structures of MAPbI3 slabs with the relaxed surface layers considering both MAI and PbI2 terminations.

Figure S3 |Figure S4 |

 S3S4 Figure S3 | Effect of surface termination on absolute energy alignments of CsPbBr3 with unrelaxed surface layers. a CsPbBr3 structures with CsBr and PbBr2 terminations with unrelaxed surface layers. The surface layers are shown by dashed rectangles on either side of the slab. b Computed absolute valence energy levels for CsBr and PbBr2 terminated surfaces, respectively for the unrelaxed surface layers. c Polarization density profiles of the two slab systems showing different surface dipoles for the unrelaxed surface layers. The integration of these profiles result in the surface dipole moments.

FiguresFigure S5 |Figure S6 |Figure S7 |Figure S8 |FigureFigure S10 |Figure S11 |Figure S12 |Figure S13 |Figure S14 |Figure S15 |Figure S16 |

 S5S6S7S8S10S11S12S13S14S15S16 Figures S5 and S6 report the band structures of CsPbI 3 slab with relaxed CsI-terminated surface and the slab terminated with a monolayer of Cs, respectively. As can be seen from FigureS6, the monolayer of Cs introduce shallow surface states at the conduction band with the Fermi level (E F ) crossing the bands and making the system n-type. From the local density of states (LDOS) shown in FigureS6, the bands due to the surface states are indeed localized on Cs monolayers.

Table S2 |

 S2 Comparison of average in-plane and out-of-plane Pb-I-Pb angles, in-plane and out-of-plane PbI bond lengths at the outermost surface layers of CsPbI 3 slab. subscripts "in" and "out" refer to the in-plane and out-ofplane, respectively. The percentage variation with respect to the unrelaxed systems are given in parenthesis.

		PbI in (Å)	Pb-I-Pb in ( )	PbI out (Å)	Pb-I-Pb out ( )
			Unrelaxed surface layers
	CsI	3.15	180.0	3.15	180
	PbI 2	3.15	180.0	3.15	180
			Relaxed surface layers
	CsI	3.17 (+0.6%) 165.7 (-7.9%) 3.20 (+1.6%) 180.0 (0.0%)
	PbI 2 3.16 (+0.3%) 172.6 (-4.1%) 3.11 (-1.3 %) 180.0 (0.0%)

Acknowledgement

This work was performed with funding from the European Union's Horizon 2020 research and innovation program under grant agreement No. 861985 (PEROCUBE). J.E. acknowledges financial support from the Institute Universitaire de France. This work was granted access to the HPC resources of [TGCC/CINES/IDRIS] under the allocations 2020-A0100911434 and 2020-A0090907682 made by GENCI. B.T. and C.K. thank Dr. S. Tao (Eindhoven University of Technology) for providing the source code of the DFT-1/2 program.

Supporting Information Available

The supplementary information contains: More computational details of DFT calculations using SIESTA code;

Computational method of absolute energy alignment; Absolute valence energy alignment of CsPbBr 3 perovskite; Band structure with Cs surface coating including the Local density of states of surface states; Layer-by-layer projected density of states of CsPbI 3 slab with DMSO at the surfaces; Band structure and charge transfer from surface passivation with DMSO; Additivity of the surface dipole for PEA 2 PbI 4 /CsPbI 3 2D/3D heterostructure.

Supplementary Information

Boubacar Traore, ⇤1 Pooja Basera, 1;2 Alexandra J. Ramadan, 3 Henry J. Snaith, 3 Claudine Katan, 1 and Jacky Even ⇤2

1 Univ Rennes, ENSCR, INSA Rennes, CNRS, ISCR -UMR 6226, F-35000 Rennes, France.

Text S1 | Computational details for localized basis-sets calculations (SIESTA)

DFT-based calculations 1,2 were performed using SIESTA 3,4 using a basis set of finite-range of numerical atomic orbitals. For structural optimization, we used the van der Waals density functional with C09 exchange 5 within the van der Waals DF2 flavor to describe the exchange-correlation term (we modified SIESTA version "master-post-4.1-251" to include DF2 flavor). This tuning was suggested to improve C09 based geometry optimization over that with the original DF1 flavor 6 . The latter has already proven to provide a good description of experimental lattice constants similar to those obtained with optimized GGA based PBEsol functional in solids. 7,8 . Norm-conserving

Troullier-Martins pseudopotentials were used for each atomic species to account for the core electrons. 9 1s 1 , 2s 2 2p 2 , 2s 2 2p 3 , 5s 2 5p 5 , 5d 10 6s 2 6p 2 , 2s 2 2p 4 and 3s 2 3p 4 were used as valence electrons for H, C, N, I, Pb, O and S respectively. Polarized Double-" (DZP) basis set with an energy shift of 200 meV and a real space mesh grid energy cutoff of 300 Rydberg were used for the calculations. We used 8x8x8 and 6x6x1 Monkhorst-Pack k-point grids for the bulk and slab systems, respectively. For CsPbI 3 slabs, we doubled the cells along a-b planes resulting in lattice constants equal to that of the bulk multiplied by p 2 (a slab = p 2 ⇥ a bulk ).

For band structures, band alignments and charge densities for polarization density profiles, we used singlepoint calculations with GGA-PBE 10 functional combined with DFT-1/2 11 including spin-orbit coupling on top of vdwDF2-C09 optimized structures. Spin-orbit coupling (SOC), when used, was considered in its on-site approximation as proposed by Fernández-Seivane et al 12 .

To compute the polarization density profiles, we removed the spurious "unphysical" charge densities beyond 30

Bohr from the surface deep inside the vacuum. Since, so far, SIESTA does not keep symmetries from geometry optimizations, we also take the half-sum of the total charge densities across the slab in forward and reverse directions resulting in a more symmetrized density profile (e:g : :

where n is the size the charge density array ⇢ along z). This to reflect the symmetry of the surfaces by construction and has only minor effects on the results.

Structural relaxation

The fully relaxed bulk structures were used to construct the slabs. With the slabs constructed, only the atomic positions were allowed to relax when surface layers relaxation was requested. We only allowed the two surface octahedral layers of the perovskite to relax while keeping the bulk-like regions frozen to the positions of the optimized bulk structure. This strategy allows capture of the surface effects during the relaxation while maintaining the integrity of the bulk region of the slabs, which is useful for the energy level alignment. We used the fast inertial relaxation engine (FIRE) algorithm 13 for the different relaxations and the maximum force was set to 0.04 eV/Å.

We used 10 octahedral layers to construct the different slabs since we found that this thickness was sufficient for converged absolute valence energy levels. For the PbI 2 terminated surface, we had 9 effective octahedral layers