Morphology dependent interaction between Co(ii)-tetraphenylporphyrin and the MgO(100) surface

Porphyrins are key elements in organic–inorganic hybrid systems for a wide range of applications. Understanding their interaction with the substrate gives a handle on structural and electronic device properties. Here we investigate a single transition-metal porphyrin, namely Co(ii)-tetraphenylporphyrin (CoTPP), on the MgO(100) surface and the effect of multilayer film formation within hybrid density-functional theory and many-body perturbation theory. We focus on the relevant adsorption sites, simulate their photoemission spectra as a key fingerprint and compare with experiments on MgO(100) films on Ag(100). While we find only weak interaction between the cobalt centre and terrace sites on the MgO(100) surface, a strong interaction manifests itself with the low-coordinated sites. This leads to distinct features in both the valence and core-level regions of the electronic structure, as observed in the ultraviolet and X-ray photoemission spectra, corroborated by simulated spectra and calculated cobalt core-level shifts. Our work thus demonstrates the relevance of morphology-related low-coordinated sites and their properties in the adsorption of CoTPP on the MgO(100) surface.


Introduction
Porphyrin-substrate hybrid systems are the building blocks in a series of materials, such as the organic light-emitting diodes, chemical sensors, dye-sensitized solar cells and solar-energy conversions. [1][2][3][4][5][6][7][8][9] Understanding therefore the way these molecules interact with the substrate upon adsorption holds the key to the prediction and improvement of the present-day devices.
Porphyrins are substituted porphine derivatives with a rather versatile chemical structure in terms of substituents and free-base/metalated macrocycle. Such a chemical flexibility is necessary to direct and control the interaction with the substrate on the molecular level only. The substituent bulkiness, for instance, can tune the adsorption strength in terms of distance from the surface 10 and its chemical activity can influence the adsorbate orientation on the surface. 11,12 The metal centres in the metaloporphyrins can also serve as an anchor to the surface, when chemical bonds are favoured over physisorption. Such interactions are known to lead to altered geometries and electronic properties, 13 along with affecting the metal magnetic moment. 14,15 The molecule-substrate interaction naturally depends on the surface morphology as well. The presence of atomically flat terraces, 16 adatom layers, [17][18][19] different adsorption sites 20,21 or reconstructions [22][23][24] strongly affects the adsorbate arrangement on the surface. Porphyrins tend to occupy first the lowcoordinated sites, such as step-edges, 25,26 where free-base porphyrins are known to undergo self-metalation. 6,[27][28][29] Physisorption, conversely, leads to a self-assembly into islands, 20 governed by the van der Waals interactions between the porphyrins in the monolayer. The competition between molecule-molecule and molecule-substrate interactions is thus reflected in the monolayer structure. 30 Such a variety of adsorption scenarios does not allow any a priori prediction about the resulting physical properties of the adsorbed molecules, which explains the great interest in those systems both at experimental and theoretical level. 6,31 It is thus important to understand the extent to which an adsorbed porphyrin is affected by the contact with the surface in terms of geometry and electronic structure.
One member of the porphyrin family, namely the Co(II)-tetraphenylporphyrin (CoTPP), has recently attracted considerable attention. Along with other porphyrin-derivatives, 32 it was found to form a bound state with the underlying metal substrate, Ag(111) 10,14,15,33 or Au(111), 34 as well as on the Fe(001)-p(1 Â 1)O surface. 19 As a result the empty Co-3d z 2 orbital fills up, quenching thus the CoTPP magnetic moment for the first adsorbed monolayer and forming a new state close to the Fermi level. This interaction with the surface can be controlled via the adsorption of NO on the metal centre in the porphyrin. 15,[35][36][37] The deposition of other metals, 38 for instance, can conversely partially restore the magnetic moment on the CoTPP and thus make it a promising candidate for onsurface magnetochemistry. 39 Interestingly, similarly strong surface interaction has been suggested between CoTPP and MgO (100). 40 Indeed, ultraviolet photoelectron spectroscopy (UPS) experiments identify a peak close to the Fermi level for the monolayer deposition, which disappears for multilayers. Additionally, core-level states corresponding to the presence of both Co 0 and Co 2+ on the surface for low coverages are observed, suggesting a noticeable charge transfer from the surface to the molecule. This finding was assigned to the presence of two sites, distinct for their interaction with the adsorbate. Open questions remain regarding the adsorption strength of CoTPP on MgO(100), especially knowing that other tetraphenylporphyrins, MgTPP for instance, 16 physisorb on this surface, and the extent to which such an interaction affects the mono-and multilayer formation and their electronic structure.
In this work, we investigate the interaction between a Co(II)-tetraphenylporphyrin (CoTPP) and the MgO(100) surface within the density-functional (DFT) and higher levels of theory. First, we look into the possible adsorption sites on the atomically flat metal oxide surface and then explore the possibility of adsorption on other surface micro-structural features such as kinks and steps. Next, we suggest a scheme enabling the comparison between the mono-adsorbed CoTPP and the thin film in terms of their electronic structure. Based on simulated core-level shifts and UPS spectra we identify possible adsorption scenarios compatible with the reported experimental data. 40 Finally, we look into the possibility of metal-exchange on the surface.

Computational details
Density-functional theory is a method widely used for the geometry and electronic-structure determination of adsorbates. 41 Nevertheless, there are short-comings in the description of non-local exchange and correlation effects, such as dispersion forces, level ordering and gap renormalization of the HOMO-LUMO states upon adsorption on surfaces. This could lead to inaccurate adsorption geometries, energy-level alignments as well as incorrect charge transfer and requires higher levels of theory.
The many-body perturbation theory within the GW approximation 42 has been used to accurately determine the level alignment in molecules, interfaces and molecular crystals. [43][44][45][46][47] It captures important non-local correlation effects such as the image potential in adsorbate-substrate systems. The limiting factors of these calculations are their high computational cost and their strong dependency on the initial input in terms of Kohn-Sham orbitals along with the type of GW calculation. 48 This is the reason for the recent development of several other level-alignment approaches, [49][50][51][52][53][54] which are aimed to be competitive in accuracy and far less cumbersome.
In the present work we use different levels of theory for the different tasks. We performed the geometry relaxations using the semi-local functional PBE 55 with Grimme's van der Waals corrections D3, 56 which result in reliable geometries. The correct description of the electronic structure, however, requires the use of hybrid functionals for porphyrins and phthalocyanines. Only at this level of theory the HOMOs are macrocycle-derived states 32,57 and not metal ones (see Fig. S1 in the ESI †). All reported projected densities of state (PDOS) are thus obtained with the HSE06 functional, 58 where a fraction of exact exchange of 25% and the range-separation parameter m = 0.2 Å À1 were used. Geometry optimization within the DFT+U method, 59 which qualitatively corresponds to the hybrid results, does not deviate significantly from the PBE-one with maximum differences of 0.04 Å and 0.31 for the bond lengths and angles, respectively (see Section S3 in the ESI †), similarly to what was observed by other studies. 18 Finally, we perform GW0 calculations on the gas-phase and crystal CoTPP as well as for the MgO(100) surface. With this approach, we obtain values for the ionization energies or electron affinities (where available) in very good agreement with the experimental ones. Corresponding results based on DFT using either local or hybrid functionals are far from such an excellent agreement (see Fig. S1 and Table S7 in the ESI † and below). GW0 calculations on the organic-inorganic system would be computationally too expensive, which is the reason why we adopted the DFT+S corrective scheme (for more details see Section ''Simulated UPS spectra'').
We aim at describing the electronic structure of CoTPP adsorbed on MgO(100) as a mono-and multilayer. We thus work with two model systems for the two scenarios. The monolayer is described by a single or multiple adsorbed molecules, where the CoTPP is in direct contact with the MgO(100) surface, because we do not expect to have any intermolecular covalent interaction (see Section ''On flat MgO(100)''). The multilayer, conversely, is approximated by the crystal CoTPP (see Section S4 in the ESI †), because the UPS spectra we compare to are not sensitive to the filmsubstrate interface. In order to compare these two systems with each other and with the experimental UPS spectra, we align their eigenvalues with respect to the common vacuum energy.
We used the CoTPP geometry as extracted from its crystal structure 60 (see Fig. 1a). We relaxed its geometry in vacuum Paper PCCP using several exchange-correlation functionals, all of which produce similar to the experimental structures (see Table S1 in the ESI †). The degree of molecular distortion was estimated with the help of the twisting angle between the plane of the phenyl and that of the macrocycle, y, and the out-of-plane distortion angle, f (see Fig. 1b). In the calculation of adsorption energies any thermal motion is neglected. Steric hindrances at the step-edge and kink sites can introduce correction terms due to the complex motion of the phenyls and the flexible macrocycle. We implement the various surface micro-structures using suitable slab geometries. The flat terrace is represented by a 5 Â 5 unit-cell 61  The simulation cells were designed so as to accommodate one CoTPP molecule and thus avoid interactions between the periodic images in the surface plane. The distances to the periodic image on the terraced surface corresponds to B8.3 Å. The CoTPP on the stepped surface stays at B17.2 Å across the step and B7.8 Å along it away from its periodic repetition, while in the case of the kinked one the values are B14.7 Å across and B11.0 Å along the edge. Additionally, the vacuum region guaranteeing a surface calculation spans to more than 10 Å above the adsorbed CoTPP for all slabs.
All calculations were carried out with the Vienna Ab initio simulation package, VASP. 62,63 The projector augmented planewave basis (PAW) 64,65 is generated on the PBE functional and contains the following orbitals: Co-3d 4s; C-2s 2p; N-2s 2p; H-1s; Mg-3s; O-2s 2p. The energy cut-off was 600 eV and the augmentation one -1200 eV. We carried out G-point calculations. All calculations are spin-polarized, due to the unpaired electron on the Co-3d z 2 orbital. Electronic energies were converged better than 0.01 meV, whereas the geometry optimization one -at 5 meV Å À1 differences on the forces.
The GW0-approximation was used to obtain the level alignment in the gas and crystal phases, where the quasi-particle energies and one-electron orbitals were updated. LDA orbitals as a starting point were successfully used for H 2 TPP and MgTPP. 66 In the description of CoTPP higher level of theory is required to correctly capture the orbital order in the valence region (see Fig. S1 in the ESI †). We thus chose the HSE06 Kohn-Sham orbitals as a starting point for our study. In the GW0 calculations for the molecule we used a supercell of (21 Â 21 Â 15) Å 3 together with plane-wave and augmentation cut-offs of 421 and 905 eV, respectively. Additional virtual Kohn-Sham orbitals with an energy up to 80 eV above the HOMO level were included. Our setup has already been checked against the experimental results for other studies on MTPPs 66 giving excellent agreement. These settings assure a relative convergence of the quasi-particle energies with respect to the HOMO better than 1.5 meV during the self-consistent GW0.
As far as the MgO (100) is concerned, both LDA and HSE06 starting points give similar results, comparable to the experimental band edges. This translates into an ionization potential (IP) of À7.0 eV (À7.1 eV) and a position of the unoccupied surface band edge at À0.7 eV (À0.4 eV) for G0W0@LDA (G0W0@HSE06) against the experiment with À7.0 and À0.8 eV. 67 As the unoccupied states are not relevant here, we used the HSE06 values, so as to maintain a consistent starting point for all calculations. The G0W0 values were obtained using a slab model of MgO(001) with a 1 Â 1 surface unit cell, seven layers, and a vacuum of 22.5 Å. The k-point sampling was based on a G-centered 8 Â 8 Â 1 k-point mesh and a PAW basis with an energy cut-off of 600 eV was employed. The virtual orbitals cover an energy range of 145 eV. The valence, surface and conduction band-edge positions are converged better than 2 meV.
All geometry structures were visualized with VESTA. 68

Experimental details
In the experiments, CoTPP was adsorbed on thin (100)-oriented MgO films grown on an Ag(100) substrate. The MgO film had a thickness of 10 monolayers, which sufficiently decouples the surface from the metal substrate. X-ray (XPS) and ultraviolet (UPS) photoemission spectra of the adsorbates were measured for submonolayer coverages and multilayer films. The procedures for the surface preparation and CoTPP deposition are reported in Franke et al., 40 along with the parameters to obtain the indicated XPS and UPS spectra.

Results and discussion
On flat MgO (100) The atomically flat MgO (100) consists of oxygen and magnesium ions arranged in a chequerboard pattern typical for rocksalt surfaces. Plausible adsorption sites comprise bridge and the on-top ones on either of the two ions. Electrostatic interaction arises between the partial charges on the pyrrole-like groups and the Co(II)-core and the surface ions. Chemical bonding, if any, between the surface and the adsorbate is expected to be strongest with the metal core and the oxygen. 17,40 The lack of linking groups at the phenyl rings of CoTPP prevents any other chemical bond formation with the substrate. From here on we use the site nomenclature to the Co-position with respect to the surface.
In this section we explore the adsorption with starting positions for the relaxation on both bridge and ontop oxygen sites and the effect of the resulting adsorption sites on the CoTPP. In addition, we look into the CoTPP orientation with respect to the Mg/O grid by namely trying rotations of 451 (e.g. bridge-r45, ontop-r45) (see Fig. 2).
We establish only small energy differences between these four CoTPP adsorption models on the flat MgO(100) after their geometry relaxation (see Table 1). This suggests a rather mobile adsorbate not anchored to a specific adsorption site. Indeed, the CoTPP remains relatively far from the substrate at B3.3 Å. The formation of a shorter chemical bond between the cobalt and surface oxygen, as encountered on other surfaces (see Table S3 in the ESI †), would thus inevitably require the deformation of the macrocycle. Constraining the Co-O bond distance to 1.9 Å leads to a geometry distortion of 2.00 eV. Overall, the enforced interaction does not compensate for the deformation energy, resulting in a decreased adsorption energy of 1.34 eV. The scenario remains thus implausible to occur.
The weak interaction with MgO is also reflected in the CoTPP electronic structure obtained with the HSE06 functional. It remains indeed almost unaltered with respect to the gas phase (see Fig. 3), suggesting little to no hybridization with the surface states. The valence region is dominated by molecular states -macrocycle-HOMOs and lower-lying Co-stateswhereas the MgO states appear at À1 eV below the HOMO of the molecule. As opposed to the CoTPP adsorbed on Ag(111) for instance, 15 our simulations on the electronic structure do not give any indications of a Co-state appearing as a result of a strong interaction with the surface (see Fig. 3). This weak surface-adsorbate interaction leads to an almost indistinguishable adsorption at the two sites.
The monolayer formation is often not only affected by a possible chemical bond of the central metal ion with the surface, 24 but also by the surface structure, the phenyl substituents 69 and molecular interactions governed by the metal core. 18 The tetraphenylporphyrins tend to form a closepacked molecular layer as a result of van der Waals interactions between the phenyl rings. 20,33 Interestingly, it was recently found that the monolayer formation enhances the interaction with the underlying oxide substrate. 21 In this regard, we investigated this aspect for our model system (see Section S2.2 in the ESI † for more details on the simulation model). As opposed to the case reported in ref. 21, the CoTPP monolayer on the flat MgO(100) is farther away from the surface, yet in agreement Fig. 2 The two adsorption sites, bridge and ontop, with the different adsorption configurations as obtained after a geometry relaxation.

Paper PCCP
with results for the CoTPP adsorption at Fe(100)-p(1 Â 1)O 18,19 (see Table S3 in the ESI †). The monolayer at MgO (100) is by only 0.08 eV more strongly bound to the surface than the isolated molecule. Its formation is driven by the favourable intermolecular van der Waals interactions, rather than by the substrateadsorbate interaction. In our case, this leads to 0.58 eV gain in energy due to the adsorbate-adsorbate interaction. Overall, we find that a CoTPP monolayer interacts in a similar manner with the MgO as the isolated molecular adsorbate. This also justifies our approach.

On stepped MgO(100)
The MgO surface is characterized, though, not only by terraces in the (100) plane, but it is also dotted with micro-structural features upon its growth on the Ag(100) substrate (see Fig. 4). 67,[70][71][72] Several methods have been developed to improve the quality of the MgO thin films, such as annealing after Mg evaporation in O-rich atmosphere, 40,70,73 increased growth temperature 29,74 or cooling after growth. 75 Such protocols efficiently reduce the abundance of surface defects but cannot entirely remove them. On the other hand, the low-coordinated sites, such as steps or kinks, render the surface chemically more active. The free-base porphyrin is reported to undergo metalation at those adsorption sites. 26,27,29 In this regard, we explore the CoTPP adsorption on MgO(100) slabs containing steps and kinks. We exclude from the discussion surface point defects, considering their expected low concentration, generally below 0.1% per monolayer, 76 and high formation energy in the range of several electronvolts. 77,78 The steps in MgO(100) are mainly monoatomic 70 and could be both non-polar and polar. The former constitute of both ions, whereas the latter are grown in the [011] direction, forming thus either magnesium-or oxygen-only steps. In the present study, we use a slab model with non-polar steps, as these are the most abundant ones. 72 The terrace size was chosen, so that the accommodated CoTPP is not affected by its periodic image, corresponding thus to the stepped surface plane (017) with a terrace B14.6 Å wide. Such a step is determined to account for an increase in the surface energy of 0.23 J m À2 with respect to the atomically flat one. 79 For the adsorption of CoTPP at the step-edge, we started with an initial configuration straddling the two terraces with the metal ion on top of the oxygen. The lattice site at the step-edge is less coordinated than the terrace one. It is indeed more reactive and it forms a chemical bond with the Co-ion, shorter with respect to the terrace by B1 Å. The overall CoTPP adsorption is stronger by about 1 eV (see Table 1). In addition, several changes are observed in the electronic structure. The HOMOs are not strictly separated into macrocycle and metal ones, as is the case for the gas-phase CoTPP (see Fig. 5). Indeed, a new state appears close to the Fermi level as a result of the interaction between the Co-3d z 2 with an oxygen 2p, in agreement with the formation of a bond. This is accompanied by a small increase in the Bader charge 80 transferred to the CoTPP at the step-edge adsorption site as compared to the terrace one, 0.37 e vs. 0.24 e, respectively.
In addition, two kink-sites can be distinguished with a threecoordinated oxygen (kink-O) or magnesium (kink-Mg) ion (see Fig. 4). The CoTPP adsorption on the kink-O is similar to the one on the step-edge, where a Co-O bond is formed with a length of 1.90 Å (see Table 1 and Fig. 6a). This is accompanied by a displacement of the oxygen ion and its underlying magnesium slightly out of its edge plane. The adsorption of the metalotetraphenylporphyrin on the kink-Mg results in a shorter bond formation between the kink site and one of the macrocycle nitrogen -2.46 Å and compared with the 2.97 Å Co-O in the same structure (see Fig. 6b). Interestingly, this adsorbate-substrate system has the highest adsorption energy of all cases studied here (see Table 1), whereas the adsorption energy on kink-O lies 0.40 eV lower.

PCCP Paper
In terms of the electronic structure, pronounced charge transfer is observed on both kink sites, as opposed to the flat or stepped surfaces. Indeed, the kink-O is strongly undercoordinated and the adsorption of CoTPP leads to the loss of 0.19 e (Bader charge), with the cobalt losing 0.21 e, as compared to the same molecule adsorbed on the terrace. This results in quenching of the metal magnetic moment (see Fig. 6c). In comparison, the Co-atom at the kink-Mg is less affected. The unpaired electron of the neutral kink-Mg site appears to charge the macrocycle LUMO state (see Fig. 6c). Indeed, the charge on the CoTPP is À1.20 e, as opposed to the 0.19 e on the kink-O or À0.24 e at the bridge site.
All things considered, we conclude that the adsorption of CoTPP with MgO(100) includes terrace and low coordinated sites as provided by the surface morphology, similarly to other porphyrins. 22,25,26,81 STM images of MgO films grown on Ag(100) indeed show 82 that step edges with defects and kink sites are largely abundant on these surfaces.

Core-level shifts
The CoTPP monolayer exhibits two pronounced Co 2p 3/2 corelevel peaks at 783.3 and 781.1 eV, as opposed to the multilayer, where only one is observed at 783.1 eV (see Fig. 7). 40 In this regard, we determined these core electron binding energies, so as to estimate their dependence on the different adsorption sites. The calculations are within the final-state approximation, the implementation of which in VASP includes the excitation of a single core electron to the lowest empty state and introduction of an additional charge in the ionic PAW potential. 83 The valence electrons are relaxed, thus accounting for the screening effects, whereas the core ones are kept fixed. Our calculations are within the Janak-Slater transition state approximation, where only half an electron is excited. 84,85 This method is known to give values closer to the experimental ones for 1s shifts in gas-phase molecules for instance. 86 We chose to align the core-level energies with respect to the common and prominent MgO O-2p peak in the valence band. In the case of the CoTPP multilayer, which we approximate to the CoTPP crystal, we employed a commonly used vacuum-level alignment with respect to the bare MgO surface (see Section S4 in the ESI †). Such a choice can be justified because working with different slab models makes the alignment of the corelevel energies with respect to the Fermi level challenging. Using the vacuum level 87 could be equally demanding, considering the presence of a small dipole between the two sides of the slab.
Similarly to our conclusions on the electronic structure, we do not observe any differences in the Co core-levels of the CoTPP adsorbed on the flat MgO, namely bridge and top (see Fig. 7 and Table S8 in the ESI †). The thin film formation likewise only slightly affects the CoTPP core-level shifts. The low-coordinated sites, on the other hand, inflict more significant changes, as a result of the bonding. It is important to point  Paper PCCP out that we exclude any charge transfer coming from the Ag(100) substrate to the CoTPP as a result of the significant thickness of the oxide film. In the case of kink-Mg we obtain a lower value of À2.3 eV, which is close to the experimentally observed À2.2 eV 40 (see Fig. 7), whereas the binding energy is higher by 1.2 eV on the kink-O. The experimental XPS spectrum exhibits two features at a coverage of 0.95 ML (see Fig. 7). The main feature at 783.3 eV is at the position of the porphyrin multilayers and agrees with the calculated binding-energy position of molecules adsorbed on terrace sites. The second feature at 781.1 eV, with a contribution of roughly 20%, is in almost perfect agreement with the binding-energy position calculated for kink-Mg sites. Every fifth molecule at kink sites may seem high, but STM images of MgO(100) thin films on Ag(100) 74,82 show a high density of MgO islands with lateral dimensions between 4-13 nm. Tetraphenylporphyrin molecules usually adsorb in square arrangements with a unit cell size of 1.4-1.5 nm, which means 9-64 molecules would fit on each island. Only 3-13 kink-Mg sites per island, which seems reasonable, would therefore be needed for the behaviour we observe. Given the energy difference of 1.5 eV we calculate between terrace and kink-Mg sites, we would expect the molecules to preferentially decorate the kink-Mg sites first. However, experimentally we observe no preferential decoration of the kink-Mg sites at low coverage (see Fig. 7). One explanation for this could be entropic effects. The molecules on the terraces are likely highly mobile, behaving like a two-dimensional gas at lower coverages, whereas molecules at kink sites are likely fixed in position. However, even in the extreme assumption of completely freely translating and rotating molecules on the terraces, entropy can only account for 0.4 eV at 300 K. Even considering the uncertainty of the calculated adsorption energies, entropy is thus not enough to explain the discrepancy between the calculated energies and the observed behavior.
We believe the presence of hydroxyl groups at the MgO steps in the experimental measurements to be a plausible explanation. Hydroxyl groups are not stable on the terraces of MgO(100) at 300 K, but they are readily created at steps through the adsorption and dissociation of residual water from the background of the vacuum chamber. 79,88 It would not be unreasonable for hydroxyl groups to partially passivate the steps and weaken the adsorption at kink-Mg sites to where entropy makes terrace and kink-Mg adsorption equally favourable. A full theoretical treatment of adsorption of CoTPP on the hydroxylated surface is presently too complex and beyond the scope of the present work.

Simulated UPS spectra
We look next at how the low-and high-coordinated sites affect the electronic structure, differences of which are already observed at hybrid-functional level of theory. These calculations, however, do not account for the long-range correlation effects in adsorbate-substrate systems 89 or in molecular crystals, which in both cases result in a gap renormalization. We thus need a method to describe both systems to the required accuracy, so as to be able to make a direct comparison between the CoTPP in a mono-or in multilayers.
The procedure of adjusting molecular state energies upon adsorption using model and correction terms from higherlevel methods is not uncommon. It requires first the correct description of the molecule and substrate as isolated systems. This can be achieved using either GW calculations, OT-RSH functionals 52,90,91 or even standard functionals where additional corrections are applied. 50 Indeed, the molecular states are adjusted to match either the experimental ionization potentials/electron affinities 21 or those calculated using DSCF. 92 The scissor effect could be added as a whole to the occupied/unoccupied states 50 or applied individually to each Kohn-Sham level. 44 Once adsorbed on the surface, the effect of the surface polarization needs to be included, so as to account for the molecular band-gap narrowing by image-potential effects. The molecular gap renormalization strongly depends on the surface and the contribution of the chemical bonding. In the case of metals, it is a result of the surface polarization energy and scales with the density of states at the Fermi energy, 45 while for semiconductors it is governed by the band gap. 93 The amount of screening can be estimated with the help of the classical image-potential model, 94 through a fit of the exchange-correlation potential to the classical image plane 52 or even the electronic potential change as a result of the presence of the positively/ negatively charged molecule 95 via Wannier functions 53 or constrained DFT. 51,96 In our study, we determined the level alignment for the isolated systems (MgO surface, CoTPP in gas phase and in crystal) within the GW0 approximation. At this level of theory we observe an excellent agreement with the experimental ionisation potentials (see Fig. 8) and the crystal UPS spectra  Table S8. over a wide energy range (see Fig. S6a in the ESI †). In comparison, the IP values obtained with the hybrid HSE06 functional deviate by as much as 0.8 eV, which invalidates its suitability for the energy level alignment.
The adsorbed system has been corrected following the DFT+S scheme. 49,50,52 Given the reliability of the GW0 results, we expect that this approximate scheme to correctly predict the energy level alignment. Both surface and molecular states are shifted, so as to match their corresponding energy difference between the hybrid and the GW0 calculations. In addition, we adopt a point-charge model, where the polarization energy is given by 93 where e is the dielectric constant of MgO, the electronic part of which is estimated to be 3.15; e 0 is the vacuum permittivity, e is one electron charge, d is the distance to the surface. While there is a difference in the bonding between the adsorption on the terrace and low-coordinated sites, we assume in a first approximation that the point-charge model is still valid as a result of the localized character of the molecular HOMOs. The space separation between the CoTPP and MgO is estimated in terms of the Co-MgO distance for simplicity, considering that the metal ions lies within the centre of mass of the macrocycle. This results in polarization energies of 0.53 eV (3.50 Å), 0.86 eV (2.17 Å), 0.98 eV (1.90 Å) and 0.76 eV (2.46 Å) for bridge, step-edge, kink-O and kink-Mg, respectively. The resulting energy level-alignment is presented in Fig. 8.
The HOMO and LUMO states of the bridge and lowcoordinated adsorbed systems and the multilayer phase are macrocycle in character. This allows us to make a direct comparison based on their energy differences. In the case of the kink-Mg, the macrocycle-state, which takes on the charge, is presented separately, lying completely at mid-gap and separated from the rest of the valence band (see Fig. 8). We observe a more pronounced closing of the HOMO-LUMO gap for the step-edge, 2.8 eV, and kink-O, 2.6 eV, adsorption as compared with the bridge site, 3.7 eV, and the crystalline film, 3.4 eV. In addition, a careful selection of a charge donor with a Fermi level lying between the bridge and step-edge/kink-O LUMOs could be used to selectively charge only adsorbates at the lowcoordinated sites. However, we do not consider this in more detail here as this is not a relevant scenario for our experiments.
Based on the level-alignment scheme, we can compare our results with UPS experiments. To this end, we simulated the UPS spectra using the projected density of states (PDOS), where the contribution of each element state was weighed by its photoionization cross-section 32 for a photon of 45 eV, [97][98][99] close to the one used in the experiment. 40 It is important to note that at such a photon energy, the Co-3d states would be much more pronounced than the corresponding carbon ones, which govern the CoTPP HOMOs. To obtain the overall photoelectron spectrum we assume that the monolayer can be decomposed to individual CoTPP molecules on the investigated adsorption sites, where the surface contribution has been excluded for clarity. The overall photo-emission spectrum for these configurations is shown in Fig. 9a.
Adsorption at the step-edge and kink-Mg leads to a pronounced peak, labelled a, already seen for one adsorbed molecule and higher than its corresponding equivalent in the bridge-CoTPP (see Fig. 9a). The bridge-CoTPP, together with other adsorption sites, contributes mainly to a second peak, b. If we assume that 80% of the molecules occupy a terrace site, similarly to our discussion regarding the XPS spectra, the bridge contribution would appear four times more intense, enhancing thus peak b. This indeed agrees well with the experimental spectrum of the monolayer, where two peaks are observed -one with lower intensity at lower binding energy (peak A) and one with higher intensity at higher binding energy (peak B). Other more intense contributions are expect to remain hidden under the MgO valence band.
In addition, we show the simulated photoemission spectrum of the CoTPP crystal, which represents the contribution from CoTPP multilayer adsorbed on MgO. We observe again two peaks, b 0 and c 0 . The lowest in binding energy (b 0 ) aligns with the second peak in the monolayer (b), whereas the c 0 appears in the region with strong MgO contribution. These two peaks can be clearly related to the experimental ones (see Fig. 9b). 40 Our analysis of the simulated UPS spectra shows that the peaks a, b, and b 0 comprise contributions from the macrocycle and c 0 contributions from the phenyl rings in agreement with an earlier assignment. 19 In addition, there are dominant contributions from the Co-3d states. For the CoTPP multilayer, the decomposition is demonstrated in Fig. S6b in the ESI. †  Table S7 in the ESI. † The theoretical spectra reproduce the features observed in the experiment, noteworthy for the multilayer (see Fig. S6a in the ESI †). Still there are short-comings regarding the quantitative separation of peaks (see Fig. 9). Indeed, in the UPS spectrum peak A has a lower binding energy of 0.7 eV compared to B, 2.2 eV, whereas our simulations predicts them to be much closer in energy, 1.6 and 2.5 eV, respectively. Similarly for the multilayer, peaks B 0 and C 0 are separated by 2.0 eV according to the experimental values, whereas the theory predicts them to stand at 1.5 eV from each other. This could be attributed to the fact that theoretically, the valence states appear more contracted in energy without though compromising the overall description of the system as is the case for the multilayer (see Fig. S6a in the ESI †). Furthermore, the approximations regarding image-potential effects may lead to an underestimation of the peak separation between a and b.
Overall, the theoretical UPS confirms our XPS findings. The new features observed experimentally in the valence band region are to be ascribed to low-coordinated sites, in particular kink-Mg related sites. Also in a very recent work 19 on the CoTPP adsorption at the oxygen-covered Fe(100) surface pronounced CoTPP-related features in the valence region of UPS spectra were observed for the monolayer. After the adsorption of 4 monolayers the spectra closely resemble ours of the multilayer CoTPP films. There the evolution of the spectra manifests the interaction of CoTPP with the Fe(100)-p(1 Â 1)O substrate. However, in contrast to our findings, CoTPP adsorption only takes place at the well-ordered surface, as scanning tunneling microscopy experiments and complementary modeling confirm.

Metal exchange at the surface
In this last section we look into the probability of metal exchange happening with the surface and its effect on the electronic structure. Such a transmetalation process has already been observed for porphyrin-derivatives with surface metals 27,28,100,101 and by adding metal atoms in gas phase 102 or at the solid-liquid interfaces. 103 Such a metal substitution is, however, more demanding than the simple metalation of freebase tetraphenylporphyrins, which is an energetically favourable process. 26,104,105 A driving factor in the transmetalation is namely the metal-ion radius -the smaller the divalent ions are, the most stable the metalloporphyrin is. 106 In terms of a trend, it is expected that a smaller ion would substitute a bigger one.
Cobalt and magnesium have radii of similar size, with Mg being 0.07 Å bigger than Co (see Table S9 in the ESI †). Additionally, MgTPP and CoTPP calculations in the gas phase indicate a stronger binding energy by 2.35 eV for the latter. 107 While these aforementioned factors speak against a transmetalation for CoTPP on MgO, small amounts of MgTPP have been observed during the experimental adsorption. 40 These were attributed to the metalation of the 10% H 2 TPP impurities present in the CoTPP, without commenting on the possibility of metal exchange. Interestingly though, no characteristic features of H 2 TPP, such as two distinct peaks for the N 1s core-level shifts, were observed, which could be ascribed to the rather small amount of free-base tetraphenylporphyrine. It has been reported that some surfaces may stabilize a metallic centre over another one, 103 even though no surface atoms were involved in the reaction.
With this in view, we investigate several scenarios in a theoretical experiment. We consider first the possibility for transmetalation via a substitution with a surface atom. 101 This situation is possible, considering that both CoO and MgO crystallize into the rocksalt structure with similar lattice constants (see Table S9 in the ESI †). We constructed thus two models with exchanged Co/Mg ions, where the surface Co is in direct vicinity to the porphyrin metal centre. We establish that the surface transmetalation requires 1.2 eV on the flat MgO(100) and 1.1 eV on the edge of the stepped surface. Such high values are not surprising, considering the high cohesive energy of MgO, 10.3 eV calculated with PBE, and we would thus expect a high activation energy for the process to proceed.
In addition, we look into the transmetalation via an adatom 101,105 where three different scenarios are considered. The reaction is assumed to start with a Mg-adatom and CoTPP adsorbed together on the flat Mg(100) (model A, see The energy difference between models A and B amounts to 0.77 eV in favour of the latter (HSE06). This comprises, however, not only the stabilization of the one tetraphenylporphyrin over the other, but also the adatom energy. We ascribe the stabilization of MgTPP to the Co-adatom on the surface, which governs the valence region. The Mg-adatom, conversely, provokes a charge transfer of its two additional electrons to the low-lying empty porphyrin-like states of the molecule (see Fig. S8d in the ESI †).
The peculiar structure of model C also entails filling of the MgTPP empty states, whereas the valence region is governed by hybridized states of the Co and macrocycle. The cobalt maintains a magnetic moment of 1.8 m, which is lower than the one on the Co-adatom, 2.5 m, and higher than the one in the CoTPP with 1.0 m (HSE06). The structure is more favourable than model A and it is 0.32 eV higher in energy than model B. However, this reaction path is largely suppressed due to the expected low abundance of Mg-adatoms at the surface.

Conclusion
In this work, we investigate the interaction between a Co-substituted tetraphenylporphyrin and an ionic oxide substrate MgO(100). We combine hybrid density-functional theory with a correction scheme based on higher-level methods for the identification of adsorption sites via their photoemission fingerprints as observed in our experiments. We established with the help of simulated photoemission spectra that the adsorbate's interaction with surface step-edge and kink-Mg sites explains the distinct features in the valence region of the CoTPP monolayer. We find that transmetalation could be enabled by adatoms, however, at a very low production rate limited by their abundance.

Conflicts of interest
There are no conflicts to declare.