Introduction

Graphene nanoribbons (GNRs), one-dimensional graphene stripes with nanometer width, represent a distinctive class of carbon materials characterized by a band gap from quantum confinement. Depending on the geometry and edge terminations, GNRs can be classified into various groups such as: Armchair (AGNRs)1,2,3,4,5, Zigzag (ZGNRs)6,7, Chevron1,8,9,10 and other structures11. The ability to fine-tune their electronic properties by altering the chemical structure is a pivotal aspect driving extensive research; for example, the band gap of AGNRs can be controlled by adjusting the ribbon width12,13,14.

Introducing substitutions of C atoms with elements from neighboring groups of the periodic table adds further degrees of freedom, enabling “doping” in GNRs to precisely modulate their electronic properties. Consequently, significant attention has been devoted to exploring GNRs substituted with elements like Oxygen15,16, Sulfur15,17,18,19, Boron20,21 and Nitrogen7,22,23,24,25,26,27,28,29,30,31,32,33; either individually or in combination34. Nitrogen-substitution, in particular, has been deeply investigated due to its ability to act as an electron donor in GNRs.

The local chemical environment of the substituted Nitrogen leads to various electronic configurations in graphene-related structures35,36. For instance, pyridinic-N contributes only one electron to the π-states because of its -sp2 hybridization and the bonds with two neighboring atoms, i.e., it behaves similar to a CH group37. It is found at the edges of the GNRs and causes a rigid downshift of valence (VB) and conduction bands (CB) which has been exploited to create local p-n junctions in GNRs7,22,38,39. On the other end, graphitic-N with three bonds to neighboring C atoms and an extra electron partially shared with the π orbitals37,40 reduces the band gap and leads to the formation of a new in-gap state localized at the heteroatom. However, the formation of graphitic-N in GNRs is less common, with few recent examples30,34,41.

Fine-tuning the electronic properties of GNRs demands precise structural control down to the atomic level, a challenge not met by modern top-down techniques. On-surface synthesis has emerged as a promising bottom-up approach to achieve this precision1,13,42. This synthesis approach involves the surface-assisted activation of precursors for polymer growth through Ullmann-type coupling and subsequent higher temperature cyclodehydrogenation to planarize the polymers. In most of the GNRs investigated so far, only C and H were involved in the different synthetic steps. On-surface synthesis has also been applied to doped structures where, however, the substituting elements generally are not involved in the formation of new bonds22,29,38 with very few exceptions43,44.

Here, we present the on-surface synthesis of a pyridine-extended 7-AGNR (Py-7-AGNR) on Au(111) from 10,10’-dibromo-2,2’-di(pyridin-2-yl)-9,9’-bianthryl (DB-DPBA) and investigate its properties using scanning tunneling microscopy (STM) and non-contact atomic force microscopy (nc-AFM). We find preferential bond formation between the N of the pyridine extension and the 7-AGNR backbone (>90%) resulting in the integration of graphitic-N along the GNR edge. The other possible pyridine orientation, leading in C-C bonding and formation of pyridinic-N, is largely suppressed. This preferential C-N versus C-C reaction pathways is rationalized by a lower activation barrier, as determined from DFT calculations. The impact of graphitic-N on the electronic properties of Py-7-AGNRs is probed by means of scanning tunneling spectroscopy (STS) revealing a reduction in the band gap and the emergence of localized states in agreement with DFT simulations.

Results and discussions

The molecular precursor DB-DPBA (1) consists of a bianthracene backbone with two pyridyl groups attached at opposite sides and two Br atoms at opposite edges. Precursor (1) was synthesized in-solution, as shown in the top row of Fig. 1. Bistriflate (2) was initially prepared according to previously reported procedures45 and subjected to the Miyaura-Ishiyama borylation to provide diboronic ester (3) in 75% yield. Then, the Suzuki-Miyaura coupling of (3) and 2-bromopyridine afforded 2,2’-di(pyridin-2-yl)-9,9’- bianthracene (4) in 66% yield. Finally, DB-DPBA 1 was obtained by the bromination of (4) using N-bromosuccinimide (NBS) at room temperature in 90% yield and characterized by 1H and 13C NMR spectroscopy as well as high-resolution mass spectrometry (see SI 1-6 in the Supporting Information).

Fig. 1: Synthesis steps for Py-7-AGNRs.
figure 1

Solution-synthesis of monomer 1 (upper row), used for the on-surface synthesis of Py-7-AGNRs (bottom row). The two possible configurations resulting in pyridinic-N and graphitic-N are highlighted in the last panel.

Subsequently, precursor 1 was sublimation-deposited on a clean Au(111) substrate in ultra-high vacuum (UHV) to perform on-surface reactions. A first annealing step at around 180 °C triggers the Ullmann-type coupling between DB-DPBA precursors to form non-planar polymers. A second annealing step at 300 °C induces complete planarization to form the targeted Py-7-AGNR. Due to the asymmetry in the lateral pyridyl units and their possible rotations during the annealing process, the positions of the N atoms along the ribbon are not predetermined. In particular, the pyridyl group can cyclize under formation of either a C-N or a C-C bond, leading to a graphitic-N or a pyridinic-N (highlighted in blue and green, respectively, in Scheme 1). To understand if one of the two possible N configurations is favored, we deposited a sub-monolayer coverage of DB-DPBA on a Au(111) substrate kept at room temperature. Recently, Mugarza et al. synthesized a closely related pyridyl-extended precursors with N atoms in 3 or 4 position; however, they reported that sublimation of these precursors was impossible since they already react and polymerize in the crucible46. We did not face this problem with DB-DPBA 1, indicating that the position of the substituted atoms can greatly affect the chemical reactivity of this kind of precursors.

A large-scale STM topography image of the surface after DB-DPBA deposition is shown in Fig. 2a. The molecules tend to self-assemble into one-dimensional (1-D) chains at the fcc regions of the herringbone reconstruction of Au(111). Locally, it is possible to find some large islands of close-packed units. The inset of Fig. 2a shows a zoom-in image of a self-assembled chain of molecules. In STM images, the precursors are characterized by two bright, slightly asymmetric features separated by roughly 0.75 nm and an apparent height of 1.9 nm. To elucidate the molecular structure on Au(111), we conduct DFT simulations. Figure 2b shows the relaxed geometry of DB-DPBA on a non-reconstructed Au(111). The precursor adsorbs with the pyridyl lateral groups parallel to the substrate, while the bianthracene backbone is tilted away from the surface, with a maximum height of roughly 0.67 nm. The topmost parts of the two anthracene units have a distance of 0.70 nm, comparable to our experimental values. The corresponding simulated STM image of a DB-DPBA unit (Fig. 2c) matches well with our topography images, where two bright dots are resolved. This adsorption geometry is similar to the one reported for the pristine version (i.e., without N atoms) of the precursor11,47.

Fig. 2: Self-assembly of DB-DPBA on Au(111).
figure 2

a Large-scale STM topography after deposition of the molecular precursor. The molecules tend to organize in chains following the Au(111) herringbone reconstruction (scale bar: 20 nm, scanning parameters: −1 V, 50 pA). Inset: small-scale STM topography of the molecules organized in chains. The DB-DBPA are characterized by two brighter dots. b Equilibrium geometry of a single DB-DPBA obtained by DFT calculations (perspective view). The pyridyl units lay on the surface, while the bianthracene core is highly tilted. c DFT simulated STM image of a single molecule and top view of the equilibrium geometry (scale bar: 1 nm). There is good a matching with the STM appearance of molecules in the topography image in panel a.

After deposition, it is not possible to distinguish the position of the N atoms by STM, since all the possible geometries look identical. This is confirmed by DFT-based STM simulation of different pyridyl configurations (see Figure SI 7 and Table 1 in the Supporting Information). The only difference is in terms of adsorption energy, where the structure with the N atoms of the pyridyl pointing outside is favored (−0.11 eV). DFT simulations allow us to estimate the energy barrier needed to flip the pyridyl ring between the two configurations as 0.45 eV at 95°, due to the steric hindrance between the H atoms of the two rings (Fig. SI 8 in the Supporting Info). For larger rotation angles, the energy decreases. Rotation of the pyridyl ring, hence, sees an energy barrier of 0.45 eV and will thus be accessible already at moderate annealing temperatures.

Annealing the sample to 180 °C triggers the formation of polymeric units on the surface, as shown in Fig. 3a. This step results in the growth of polymers (with an average length of 40 nm) which are characterized by bright dots alternating along the main axis with a periodicity of 0.85 nm, as expected from covalently bonded and alternatingly tilted anthracene units. Upon a further annealing step at slightly higher temperature (250 °C) most of the units remain non-planar. However, as shown in the inset of Fig. 3b, some segments have already reacted. This partial planarization process starts at one GNR end and then proceeds along one edge, until a defect (e.g., a bend) is encountered. The DFT-optimized model and the corresponding STM simulation of a partially closed single unit (see Fig. SI 9 in the Supporting Information) matches well with our STM images, where only one brighter dot related to the unreacted edge is seen. Some short units (mainly monomers or dimers) are already completely reacted and planarized.

Fig. 3: Different annealing temperatures of DB-DBPA on Au(111).
figure 3

a Large-scale STM topography after annealing at 180 °C. In the inset, a zoom-in image of a segment of a polymer with alternating dots with a period of 0.85 nm (scale bar: 5 nm, scanning parameters: −0.5 V, 30 pA). b Large-scale STM of partially planar segments after annealing at 250 °C. In the inset, a zoom-in image of partially planar segments (scale bar: 10 nm, scanning parameters: −0.5 V, 20 pA. At this temperature, some edges have already undergone planarization. In general, this process starts at the GNR end and proceeds along one edge. c Large-scale STM image of planar GNRs at 300 °C. In the inset, a zoom-in image of a segment of a ribbon (scale bar: 10 nm, scanning parameters: −0.3 V, 40 pA.) At this temperature, the segments are already completely planar.

The final annealing step at a temperature of 300 °C forms completely planar Py-7-AGNRs, as shown in Fig. 3c. These growth conditions can give rise to long (up to 80 nm) and straight GNRs following the elbow sites of the Au(111) reconstruction. Similarly long ribbons have been reported for the pristine version of the same precursor11,48; in contrast, bipyrimidine substituted analogues (i.e., two N atoms in each ring) have been reported to grow shorter due to the stronger interaction with the substrate which hinders their diffusion on the surface46. Small scale images of the Py-7-AGNR (inset in Fig. 3c), reveal the expected periodic pattern related to the pyridine edge extensions.

In our N-substituted case, complete planarization is reached already at 300 °C instead of 400 °C as in the nitrogen-free 7-AGNR counterpart11,48. This lower cyclization temperature is attributed to the presence of N atoms in the pyridyl rings, which is in line with observations in other N-substituted small nanographenes43,44,46.

To better understand if N has a role in the planarization/cyclization steps, we investigated the structure of the synthesized Py-7-AGNR in detail. Figure 4a shows an STM image of a ribbon segment acquired at negative bias (occupied states). Most of the edge extensions seem asymmetric with an apparent “up-bend” on the left and “down-bend” on the right edge with the exception of two units in the bottom right part (highlighted by green arrows) which appear more symmetric and rounded. Measurements taken at positive bias (unoccupied states) (Fig. 4b), instead, show alternating bright dots present along the backbone. The distance between two consecutive brighter units is 1.28 nm with an angle of 63° with respect to the ribbon axis. As for the negative bias image (Fig. 4a), almost all the edges present these features with the exception of the same two highlighted by green arrows.

Fig. 4: Planar GNRs on Au(111) after annealing at 300 °C.
figure 4

a STM topography image acquired in the occupied density of states. Most of the edge extensions have an upward (left side) or downward (right side) bend, with the exception of the two highlighted by green arrows (scale bar: 1 nm, scanning parameters:-1.0 V, 100 pA). b STM topography image of the same segment acquired in the unoccupied density of states. The edge extensions are imaged as bright dots, with the exception of the two indicated by green arrows (scale bar: 1 nm, scanning parameters: 0.80 V, 100 pA). c Bond-resolved nc-AFM image of the same segment of Py-7-AGNRs, revealing specific bonds in the pyridine extensions that appear darker. (open feedback parameters: −5 mV, 200 pA, Δz: 220 pm from Au(111) surface; frequency: 27401 Hz) (d) Nc-AFM image of a short segment of another Py-7-AGNR. The blue dashed box highlights a unit with fully graphitic-N edges, while the green box indicates a unit with pyridinic-N. (open feedback parameters: −5 mV, 200 pA, Δz: 210 pm from Au(111) surface; frequency: 27401 Hz) (e) DFT-based nc-AFM simulations of pyridinic-N (green) and graphitic-N (blue) units (scale bar: 1 nm).

To understand the reason of this difference, we performed nc-AFM measurements with a CO molecule attached to the tip49. In this way, it is possible to achieve single bond resolution, such as in Fig. 4c. Here, the periodic pattern related to the pyridine edge extensions is clearly visible. In addition, the majority of the pyridine extensions reveal bonds that are imaged darker than the ribbon backbone. We attribute these darker bonds to graphitic-N-C bonds, and the two brighter ones (highlighted again by green arrows) to pyridinic-N-C. Figure 4d shows a high-resolution nc-AFM image of a short segment with one unit (blue rectangle) with edges in graphitic-N configuration and the adjacent one (green rectangle) with pyridinic-N. Nc-AFM simulations done on the two possible structures (Fig. 4e) clearly confirm our assignment. As expected, graphitic-N edges appear dark, while pyridinic-N does not have any evident contrast difference, just a slight distortion at the N position. The darker appearance of graphitic-N in nc-AFM measurements, already reported for other structures24,25,50,51, derives from its different short-range repulsion distance compared to C atoms and the lower adsorption height from the Au substrate (as proven by DFT). In addition, STM simulations of Py-7-AGNR containing graphitic-N and pyridinic-N (Figure SI 10) reproduce the experimental findings where the extension assigned to graphitic-N appears slightly tilted at negative bias while having an apparent bright dot when scanned at around 0.8 eV. Pyridinic-N, on the other hand, appears symmetric and rounded.

We made statistics on the type of N bonding using nc-AFM images (see also SI 11 in the Supporting Info). From 306 edge extensions that we analyzed, 9.2% were exhibiting a pyridinic-N configuration, while all others were graphitic-N. Considering the design of the DB-DPBA precursor and the required on-surface synthesis steps implies that cyclization proceeds via preferential C-N bond formation (blue in Scheme 1). Moreover, this ring closure takes place at a lower temperature than the analogous C-C one for the pristine version. For a deeper understanding of this preferred cyclodehydrogenation path, we applied a DFT-based constrained optimization approach to determine the energy barriers for closing the C-N and C-C bonds. As model systems, we used two relaxed geometries of monomers which, upon cyclodehydrogenation, should form a graphitic-N or pyridinic-N bond (left panels in Fig. 5b). The energy difference of the starting configurations for the C-N versus C-C path is due to the different orientation of the pyridyl extension. We used the distance between the two atoms forming a bond as collective variable (atoms connected by dotted lines in the inset of Fig. 5a and indicated with red arrows in Fig. 5b). While slowly changing the constraint value of the collective variable (at increments of 0.05 Å) we relaxed within DFT the geometry (all degrees of freedom except the constraint) thus identifying a transition state (activation energy). Figure 5b shows some configurations of the molecules at each steps.

Fig. 5: Reaction barrier calculations for C-N and C-C bonds formation.
figure 5

a Energy barrier for the C-N (blue) and C-C (green) bond formation as a function of atomic distances. In the inset, chemical sketch with dotted lines indicating the two controlled distances. The energy progressively increases as the distance is reduced until maxima are reached at 1.9 Å. After these points, the two curves decrease in energy thanks to the formation of bonds in the bianthracene backbone. b DFT-relaxed structures (perspective view) of different steps of the bond formations. In the right panel, the atoms involved are highlighted with red arrows.

Figure 5a shows the resulting energy profiles of the two bond formation pathways. Total energies increase as the distance between atoms is reduced, until at 2.6 Å the C-N formation becomes energetically favored. Both energies then reach a maximum at 1.9 Å, but C-N bond formation sees a lower barrier than C-C bond formation. The energy difference of ≈ 0.1 eV comes from the absence of the H atom bonded to the N, which decreases the steric hindrance and the required energy to form the bond. Upon further approach of the atoms, the bonds between the bianthracene units start to form and the energy drops substantially, with the graphitic-N case being lower in total energy. The actual mechanism of C-N bond formation has been previously discussed44. Applying a Boltzmann statistics to the barrier height difference of 0.11 eV, the probability to obtain a C-C, i.e., pyridinic-N, is 11%; which is in good agreement with the experimental value of 9.2%. It is important to note that the pyridyl orientation giving rise to the C-N bond is less favorable than the one for the C-C bond after deposition on Au(111) surface. For this reason, the majority of the pyridyl rings will initially have the wrong orientation and they will need to rotate in order to reach the preferred configuration for the C-N bond formation. As shown before, this rotation is indeed easily accessible during the different annealing steps (see Fig. SI 8 in the Supporting Information).

The effect of N atoms on the electronic structures is investigated using DFT and compared to experimental results. The electronic contributions of graphitic-N atoms to the π-orbitals of the Py-7-AGNR on Au(111) were first investigated based on a Bader analysis52 (a schematic image showing the transfer of electron to the substrate is reported in Fig. SI 12); which, similar to other graphene nanoribbons containing N in this specific configuration30,41, shows a partial transfer of charges towards Au(111). In particular, we found that each graphitic-N loses 0.32 electron towards the substrate (i.e., 0.64 from each unit cell since it contains two graphitic-N atoms). Figure 6 and Fig. SI 13 show DFT band structures in gas phase of infinitively long Py-7-AGNR with the possible N configurations compared to the pristine one (partial density of states (PDOS) of the frontier bands are reported in SI 13). The pyridinic-N and the pristine GNRs share similar properties: the band gap in both cases is close to 0.8 eV. The effect of the pyridinic-N is the expected rigid downshift of valence band (VB) and conduction band (CB) by roughly 50 meV. The most significant contribution of pyridinic-N is a flat band at −2.1 eV (highlighted in yellow) which is mainly localized at the N positions. In contrast, graphitic-N has a stronger impact on the electronic properties. First, graphitic-N was considered as charge-neutral (Fig. SI 13c). Because of the extra electrons shared from the N atoms (one from each), the system starts to fill energy levels which are empty in the pristine case. In particular, the electrons populate the CB of the unsubstituted case, which now becomes the VB. This new ordering of the bands will shift Ef and it will give a small band gap of 50 meV. However, as shown at the beginning of the paragraph, the Py-7-AGNR containing graphitic-N is expected to lose part of its charge upon adsorption on Au(111); for this reason graphitic-N was also modeled removing one electron per unit cell, i.e., half-electron from each graphitic-N, as an approximation for charge transfer found from the Bader analysis. This allows to have a better comparison with experimental results. After removing the charge, Ef crosses the VB resulting in a partially filled band and in a metallic ribbon. In this way, the ordering of the orbitals is comparable to the charge neutral graphitic-N case (see Fig. SI 13c and SI 13 d): VB-1 is localized at the 7-AGNR sections and VB partially spreads over the pyridine extensions. Finally, CB is only localized close to the graphitic-N atoms and there are no analogous bands for the pristine case.

Fig. 6: Gas-phase DFT band structures of possible edge-extended 7-AGNRs.
figure 6

Py-7-AGNR containing (a) graphitic-N1+ (b) pristine and (c) pyridinic-N. Bands with significant N contribution are highlighted by orange lines. The repetitive units are indicated by dotted square brackets in the chemical structure at the bottom of each panel. The graphitic-N1+ case is modeled with one electron per unit cell removed. For the band structure of the charge-neutral case, see Fig. SI 13c.

Experimentally, we characterized the electronic properties of the Py-7-AGNR by means of STS. An example is reported in Fig. 7a. By analyzing the corresponding nc-AFM image, most of the edges present graphitic-N, except two on the right side (green arrow). The dI/dV spectra recorded at different locations are shown in Fig. 7b. The most prominent feature is an intense peak at 0.9 V, which is predominantly seen close to the N atoms of the pyridine extension (red and green spectra). Importantly, this contribution is only present at the graphitic-N edges. This is confirmed by taking a dI/dV spectrum close to a pyridinic-N (blue spectrum in Fig. 7b) which does not have any peak in this range, but is similar to the pristine GNR48. This agrees well with the gas-phase simulation shown in Fig. 6c, where the pyridinic-N states are localized far from the Fermi level (Ef). Similar considerations can be made for the peak at 1.5 V, which is more intense only at the graphitic-N edges. These differences between the two distinct arrangements of N atoms point out that the electronic properties are affected by the specific position of the introduced heteroatom. There are two additional peaks close to Ef at −0.1 V and 0.05 V. To try to assign the peaks to the corresponding bands, we took dI/dV maps at selected bias voltages in order to map the distribution of these states in the ribbon, as shown in Fig. 7d, and compared them to simulated LDOS of a Py-7-AGNR with one electron per unit cell removed (Fig. 7e). The corresponding Py-7-AGNR is reported in panel c, where the nc-AFM image shows that the edges are all graphitic-N. The dI/dV maps recorded at −0.1 V reveals intensity spreading between the 7-AGNR backbone and the pyridine extensions. This resembles the map recorded above Ef (0.1 V) suggesting that it corresponds to the same band measured at different energies. Indeed, there is good agreement with the simulated LDOS maps of VB1+ measured at two different k-points. This confirms the non-integer charge transfer due to the graphitic-N atoms and the metallic behavior of the ribbon. The dI/dV map recorded at 0.9 V shows bright dots localized at the pyridine extensions closer to the N atoms. This behavior is well reproduced by the CB1+, which reproduces the inhomogeneous distribution at the edges. Finally, the state at 1.4 V is mainly localized at the pyridine extensions with a more symmetric distribution, in line with the simulation of CB + 11+.

Fig. 7: Electronic properties of Py-7-AGNRs.
figure 7

a STM (left) and nc-AFM (right) image of a Py-7-AGNR with graphitic-N edges. Two pyridinic-N defects are labeled by green arrows. (scale bar: 1 nm, scanning parameters:−1.5 V, 100 pA). b dI/dV spectra on different points (see a). (Open feedback parameters: −1.5 V, 200 pA; Vrms: 20 mV) (c) STM (left) and nc-AFM (right) of another Py-7-AGNR segment without pyridinic-N defects. d dI/dV maps at selected bias voltages of the Py-7-AGNR shown in (c). e Simulated DOS maps of the singly charged system shown in Fig. 6a, evaluated at the different k-points of the corresponding bands.

Conclusion

In conclusion, we have reported the successful on-surface synthesis of long Py-7-AGNRs containing graphitic-N atoms at the edges. Their chemical structure has been elucidated by STM and nc-AFM techniques, revealing that the vast majority (more than 90%) of the pyridyl extensions form graphitic-N via C-N bond formation although the monomer design does not exclude pyridinic-N formation via C-C bond formation. The preferred C-N bond formation is rationalized by a lower energy barrier seen when approaching C and N and proves that subtle differences in reaction barriers allow to efficiently steer on-surface reactions. STS reveals a metallic ribbon for surface-adsorbed Py-7-AGNRs due to charge transfer to the substrate and a characteristic graphitic-N-related unoccupied state at 0.9 V. The results reported herein demonstrate the highly preferential formation of C-N bonds on metal surfaces by annealing, which contributes an important element to the design of new GNRs incorporating substitutional N atoms.

Methods

Au(111) single crystal surfaces (MaTeck GmbH) were prepared by iterative Ar+ sputtering and annealing cycles. Prior to sublimation of molecules, the surface structure and cleanliness was checked by STM imaging. The molecular precursors DP-DPBA were filled into quartz crucibles of a home-built evaporator and sublimed at around 300 °C to achieve a rate of 0.45 Å min-1 onto the single crystal surfaces held at room temperature. STM and AFM measurements were performed with a commercial low-temperature STM/AFM from Scienta Omicron operated at a temperature of 4.5 K (LHe) and base pressure below 5 × 10−11 mbar. STM images were acquired in constant-current mode (overview and high-resolution imaging), dI/dV spectra and dI/dV maps were acquired in constant-height mode. Differential conductance dI/dV spectra and maps were obtained with a lock-in amplifier. dI/dV parameters are reported in the figure captions. Bond-resolved nc-AFM images were acquired in constant-height mode with CO-functionalized tips at low bias voltages while recording frequency and current signals. Open feedback parameters and lowering of the tip height Δz are reported in the figure caption. The data were processed with Wavemetrics Igor Pro software.

DFT calculations were executed using the AiiDAlab53 applications, based on AiiDA54 workchains designed for the DFT code CP2K55 (systems adsorbed on gold) and for the DFT code Quantum Espresso56 (bandstructure calculations). Surface-adsorbate setups were modeled within a periodic slab scheme. The simulation cell included four Au atomic planes along the [111] orientation. Hydrogen atoms passivated one face of the slab to mitigate Au(111) surface states. A 40 Å vacuum layer was included to isolate the system from its periodic images along the axis orthogonal to the slab. Electronic wavefunctions were represented via TZV2P Gaussians basis sets for C, N, H, and DZVP for Au. Plane-waves basis set cutoff for the charge density was set at 600 Ry. Norm-conserving Goedecker–Teter–Hutter pseudopotentials were employed. The PBE GGA57 approximation for the exchange correlation functional was used and Grimme’s D358 van der Waals corrections were included. Au supercells varied in size depending on the adsorbate, ranging from 28.12 × 26.54 Å2 (corresponding to 598 Au atoms) to 66.37 × 29.48 Å2 (1538 Au atoms). Geometry optimizations were performed with the bottom two atomic planes constrained while relaxing others until forces were below 0.005 eV ˚A. For nc-AFM simulations, DFT equilibrium geometries and electrostatic potentials were used alongside Hapala’s probe-particle code59.

For the bandstructure calculations, ultrasoft pseudopotentials, from the SSSP60 were employed to model the ionic potentials. A cutoff of 50 Ry (400 Ry) was used for the plane wave expansion of the wave functions (charge density). The simulation cell contained 15 Å of vacuum in the non-periodic directions to minimize interactions among periodic replicas of the system. The thickness of the vacuum region, the sampling of the BZ and the cutoff ensure convergency of the computed band structures. The atomic positions of the ribbon atoms and the cell dimension along the ribbon axis were optimized till forces were lower than 0.002 eV/A and the pressure in the cell was negligible. The band structures are aligned to the vacuum level computed from the average electrostatic potential in the vacuum region.