Hassib Audi

Yannick Viero

N Alwhaibi

Zhongrui Chen

Maksym Iazykov

Arnaud Heynderickx

Fan Xiao

David Guérin

Christophe Krzeminski

Iain Mark

M Grace

I M Grace

C J Lambert
email: c.lambert@lancaster.ac.uk

O Siri

D Vuillaume

S Lenfant

H Klein
email: klein@cinam.univ-mrs.fr

Orcid H Audi

Electrical molecular switch addressed by chemical stimuli

à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

Molecular electronic exploits the rich variety of organic molecules to create custom-designed molecular devices for applications in future electronics. The desired function should be encoded in the molecules, which are then connected to electrodes. Among the numerous functional molecules found in the literature, the most striking examples of molecular devices are arguably the molecular switches, i.e. molecules which exist as at least two stable isomers, whose electronic properties can be controllably and reversibly modified by external stimuli. [START_REF] Van Der Molen | Charge transport through molecular switches[END_REF] These switches should be distinguished from molecules where a stochastic conductance switching is observed (e.g. for uncontrollable switching driven by the electric field, or electrode/molecule instabilities). [START_REF] Ramachandran | A bond-fluctuation mechanism for stochastic switching in wired molecules[END_REF][START_REF] Van Der Molen | Stochastic and photochromic switching of diarylethenes studied by scanning tunnelling microscopy[END_REF][START_REF] Jang | Interpretation of stochastic events in single molecule conductance measurements[END_REF][START_REF] Battaglini | STM observation of a single diarylethene flickering[END_REF][START_REF] Moore | Real-time measurements of conductance switching and motion of single oligo (phenylene ethynylene) molecules[END_REF] For conformational switches, the 3D structure of the molecule is modified by the isomerization reaction (stereoisomerization). The cis-trans isomerization induced by light of the azobenzene molecule, [START_REF] Bellini | Lightinduced molecular motion of azobenzene-containing molecules: a random-walk model[END_REF][START_REF] Katsonis | Synthetic lightactivated molecular switches and motors on surfaces[END_REF][START_REF] Ferri | Light-Powered Electrical Switch Based on Cargo-Lifting Azobenzene Monolayers[END_REF][START_REF] Kumar | Reversible Photo-Switching of Single Azobenzene Molecules in Controlled Nanoscale Environments[END_REF][START_REF] Mativetsky | Azobenzenes as Light-Controlled Molecular Electronic Switches in Nanoscale Metal-Molecule-Metal Junctions[END_REF][START_REF] Smaali | High On-Off Conductance Switching Ratio in Optically-Driven Self-Assembled Conjugated Molecular Systems[END_REF] photoisomerization of diarylethene, [START_REF] Irie | Diarylethenes for Memories and Switches[END_REF][START_REF] Katsonis | Reversible conductance switching of single diarylethenes on a gold surface[END_REF][START_REF] Kronemeijer | Reversible Conductance Switching in Molecular Devices[END_REF][START_REF] Van Der Molen | Light-controlled conductance switching of ordered metal-molecule-metal devices[END_REF] or hydrogen tautomerization reaction in phtalocyanine, [START_REF] Liljeroth | Current-induced hydrogen tautomerization and conductance switching of naphthalocyanine molecules[END_REF] are well-known examples of such switches. In redox switches, the electronic properties depend on the modification of the charge state of the molecules [START_REF] Gittins | A nanometer-scale electronic switch consisting of a metal cluster and redox-addressable groups[END_REF][START_REF] Liu | Molecular memories that survive silicon device processing and real-world operation[END_REF][START_REF] Roth | Measurements of electron-transfer rates of charge-storage molecular monolayers on Si(100). Towards hybrid molecular/semiconductor information storage devices[END_REF][START_REF] Mahapatro | Electronic Transport through Ruthenium-Based Redox-Active Molecules in Metal-Molecule-Metal Nanogap Junctions[END_REF][START_REF] Liao | Cyclic Conductance Switching in Networks of Redox-Active Molecular Junctions[END_REF] through oxidation or reduction depending on the position of the electrochemical potential with respect to the HOMO-LUMO gap of the molecule. It is also possible to control the conductance of molecular junctions by the photo-population of excited states. [START_REF] Zhou | Photoconductance from Exciton Binding in Molecular Junctions[END_REF][START_REF] Morteza Najarian | Orbital Control of Photocurrents in Large Area All-Carbon Molecular Junctions[END_REF][START_REF] Pourhossein | Optical modulation of nano-gap tunnelling junctions comprising self-assembled monolayers of hemicyanine dyes[END_REF][START_REF] Najarian | Long-Range Activationless Photostimulated Charge Transport in Symmetric Molecular Junctions[END_REF] In this case, upon resonant illumination, the electrons photo-injected in the LUMO increase the current though the molecular junctions. In contrast to conformational and redox switches, this effect is not persistent, vanishing rapidly when the excitation is turned off.

Several demonstrations of an alternative approach to electronic conductance modulation by pH control in molecular junctions have been reported. [START_REF] Morales | Inversion of the rectifying effect in diblock molecular diodes by protonation[END_REF][START_REF] Chen | Effect of anchoring groups on single-molecule conductance: comparative study of thiom-, amine-, and carboxylic-acidterminated molecules[END_REF][START_REF] Guo | Covalently bridging gaps in single-walled carbon nanotubes with conducting molecules[END_REF][START_REF] Ballesteros | Controlling the Structural and Electrical Properties of Diacid Oligo(Phenylene Ethynylene) Langmuir-Blodgett Films[END_REF][START_REF] Darwish | Multi-Responsive Photo-and Chemo-Electrical Single-Molecule Switches[END_REF] For example, the conductance value in the junction can be modified by the protonation or deprotonation of the anchor group of the molecule grafted on a metal surface (electrode). Single molecules of alkanes terminated with diamine or dicarboxylic-acid groups measured by scanning tunneling microscope break-junction (STM-BJ) in a pH-controlled solution show higher conductance at pH = 13 (deprotonated) than at pH = 1 (protonated). [START_REF] Chen | Effect of anchoring groups on single-molecule conductance: comparative study of thiom-, amine-, and carboxylic-acidterminated molecules[END_REF] For these authors, the basic (pH = 13) or acidic (pH = 1) environment of the molecular junction modifies the chemical specie of the anchoring group: NH2 or COO-in basic environment and NH3 + or COOH in acidic medium.

The NH2 and COO -species enhance the coupling strength between the molecule and the gold electrode, compared to the NH3 + and COOH species formed in acidic environment. In the specific case of dithiol terminated alkanes, no significant variation of the conductance with the pH was observed. The same behaviors were also observed for diacid oligo(phenylene ethylene) Langmuir Blodgett films characterized by scanning tunneling microscope (STM) [START_REF] Ballesteros | Controlling the Structural and Electrical Properties of Diacid Oligo(Phenylene Ethynylene) Langmuir-Blodgett Films[END_REF] with a higher conductance (ratio ≈ 7) for the deprotonated form (COO-Au bond at pH = 11.4) than for the protonated form (COOH-Au bond at pH = 5.9). This difference of conductance was interpreted by the chemical modification of the anchoring group with pH as in Ref. 28, but also by the formation of lateral H bonds between neighboring molecules in the films. For these systems, the higher conductance was obtained for the deprotonated form (Gdepro > Gpro).

More recently, STM-BJ measurements of 4,4'-vinylenedipyridine connected between Ni electrodes showed a conductance switch attributed to change in the electrode/molecule coupling upon protonation, and moreover, the pH required to switch the conductance can also be tuned by the applied electrochemical potential. [START_REF] Brooke | Dual Control of Molecular Conductance through pH and Potential in Single-Molecule Devices[END_REF] Protonation and deprotonation of a πconjugated molecular system bridged in a molecular junction can also modify the conductance. Oligoaniline derivatives connected into gaps in single walled carbon nanotubes exhibits conductance variations of around one decade between the protonated form (pH = 3 ) and deprotonated form (pH = 11) and this variation was reversible during 5 cycles. [START_REF] Guo | Covalently bridging gaps in single-walled carbon nanotubes with conducting molecules[END_REF] The higher conductance was obtained for the protonated form. In another system, a multi-sensitive molecule (pH and light) based on a spyropiran derivative and characterized by STM-BJ shows an increase of the conductance by a factor about 2 after protonation of the spyropiran in the open form. [START_REF] Darwish | Multi-Responsive Photo-and Chemo-Electrical Single-Molecule Switches[END_REF] For these π-conjugated molecular systems, the higher conductance was obtained for the protonated form (Gpro > Gdepro). We can also mention that an inversion of the rectifying effect in diblock molecular diodes by protonation was observed by STM. [START_REF] Morales | Inversion of the rectifying effect in diblock molecular diodes by protonation[END_REF] This inversion was explained by a modification of the dipolar moment of the molecule with the protonation that induces a reduction of the HOMO and LUMO energies. Consequently, the conduction occurs by a resonant tunneling through the HOMO before the protonation and through the LUMO after. This last result shows that the protonation or deprotonation of the molecule can modify the molecular orbital energy of the molecule addressed in a molecular junction. A similar influence of the protonation on the LUMO position was reported for SAMs, in which the protonation of the terminal carboxylic acid groups converts back and force the molecular junctions between a resistor and a rectifying diode. [START_REF] Ai | In-Place Modulation of Rectification in Tunneling Junctions Comprising Self-Assembled Monolayers[END_REF] Protonation has also been used in combination, with light irradiation to block the spiropyran molecule in its merocyanine isomer and avoiding its spontaneous back switching to the spiropyran form. [START_REF] Kumar | Chemical Locking in Molecular Tunneling Junctions Enables Nonvolatile Memory with Large On-Off Ratios[END_REF] Finally, protonation has been used to induce destructive-quantum-interference in diketopyrrolopyrrole derivative, leading to a reversible decrease of the conductance (1 order of magnitude) upon protonation. [START_REF] Zhang | Distinguishing Diketopyrrolopyrrole Isomers in Single-Molecule Junctions via Reversible Stimuli-Responsive Quantum Interference[END_REF] Benzo-imidazole derivatives are molecules known for their sensitivity to pH, exhibiting a different absorption and/or emission signatures depending on their protonation states. [START_REF] Rogers | Effects of pH on benzimidazole fluorescence[END_REF] Benzo-bis(imidazole) have been recently investigated as precursors of modular fluorescent probes polymers, [START_REF] Kamplain | Dynamic covalent polymers based upon carbene dimerization[END_REF][START_REF] Le | Benzobisimidazole Cruciform Fluorophores[END_REF] metal coordination frameworks, [START_REF] Bunzen | Zinc(II) Coordination Frameworks Based on Benzobisimidazole: The Role of the Methyl Substituent[END_REF] or Janus bis(carbene)s and transition metal complexes. [START_REF] Khramov | Synthesis and Study of Janus Bis(carbene)s and Their Transition-Metal Complexes[END_REF] They are also very attractive acidochromic systems, because of the presence of two localized π-subunits that can be tuned by reversible protonation to become delocalized. [START_REF] Shilova | Bandrowski's Base Revisited: Toward a Unprecedented Class of Quinonediimines or New Two-Way Chromophoric Molecular Switches[END_REF] Thus, protonation of benzo-bis(imidazole)s of type 1 (R 1 = aniline and R 2 = aryl) led to a bathochromic effect (Δλ = 13 nm) that can be explained by the stabilization of the positive charges (color change from yellow to orange). [START_REF] Shilova | Bandrowski's Base Revisited: Toward a Unprecedented Class of Quinonediimines or New Two-Way Chromophoric Molecular Switches[END_REF] This prompted us to introduce the -SH anchoring group on the benzobis(imidazole) core for grafting such a molecule on gold surfaces in order to evaluate their pH-sensitive switching properties. Here, we demonstrate that the pH effect on the molecule conductance can be controlled by side chain chemistry. A benzo-bis(imidazole) derivative molecule shows a higher conductance in the neutral case (Gneu>Gpro) when laterally functionalized by aniline functions (molecule A, scheme 1), while we observe the reverse case (Gpro>Gneu) for the H-substituted molecule (molecule B, scheme 1). The molecular conductances were measured at 3 scale lengths : selfassembled monolayers (SAM) on flat Au surface, about hundred molecules grafted on Au nanodots (NMJ : nanodot molecule junction) and single molecule by mechanically controlled break junction (MCBJ). The conductances were measured by C-AFM in the two former cases.

The 3 approaches give the same trends. These results are supported by theoretical calculations and we conclude that their opposite behaviors depend on the position of the HOMO resonances relative to the Fermi energy of the electrodes, which modify the density of states at the Fermi energy.

Experimental section and methods.

Synthesis of the molecular switch A and B and characterization in solution.

Quinoidal precursors 2 (Bandrowski base) [START_REF] Shilova | Bandrowski's Base Revisited: Toward a Unprecedented Class of Quinonediimines or New Two-Way Chromophoric Molecular Switches[END_REF] and 3 [START_REF] Audi | Extendable nickel complex tapes that reach NIR absorptions[END_REF] were reacted with the aldehyde 4previously unknown -in EtOH in the presence of piperidine to afford the expected benzobis(imidazoles) 5 and 6, respectively, in 46 and 49 % yields (Scheme 1). In situ deprotection -using TBAF (tetra-n-butylammonium fluoride) -gave target compounds A and B, which could be readily reacted in the presence of gold either as molecular junction, or as unit able to form self-assembled monolayers, because of the presence of terminal -SH thiol functions. Details on the synthesis of 4, 5 and 6 and NMR results (Fig. S1) are given in the supporting information. To check the properties of these switches, protonation of 5 (the stable form of A, i.e. S-protected) was performed in solution, and clearly showed -as expected -a bathochromic effect (supporting information, figure S1) featuring the formation of the protonated species 7 as model of A•2H + (B•2H + ). The protonation of the imidazole site could be clearly identified by color changes [START_REF] Shilova | Bandrowski's Base Revisited: Toward a Unprecedented Class of Quinonediimines or New Two-Way Chromophoric Molecular Switches[END_REF] and analogy with the related benzimidazole bearing a pyridine unit. [START_REF] Novo | Prototropic equilibria of 2pyridylbenzimidazoles in aqueous solution[END_REF] Upon protonation, we observed a color change of the solution featuring the protonation of the imidazole and the formation of a delocalized species (as reported in Ref. 41). The lone pair of NH2 units in aniline is indeed less available due to its conjugation with the aromatic ring. As a result, NH2 is then less basic than the benzoimidazole core. This hypothesis is also consistent with Ref. 43, which reports the acid-base properties of 2pyridylbenzimidazoles. Indeed, the first protonation occurs at the benzimidazole unit and not the pyridine moiety. Since pyridine is more basic than aniline, this observation is in agreement with the protonation of the benzobisimidazole units first in molecule A.

Scheme 1. Synthesis of benzo-bis(imidazole) devivatives A and B, and protonation.

Preparation of self-assembled monolayers (SAMs) of molecules A and B on gold surfaces.

Glassware was dried in air at 120 °C overnight prior to use. Desilylation and grafting reactions were performed in a nitrogen glovebox. Dimethylsulfoxide (DMSO, anhydrous grade) was stored over freshly activated molecular sieves for 3 days then degassed by nitrogen bubbling for 30 min. Other chemicals were used as received without further purification. Ultra flat gold surfaces were prepared on glass slides following the template stripped gold technique ( TS Au). [START_REF] Weiss | Influence of defects on the electrical characteristics of mercury-drop junctions: self-assembled monolayers of n-alkanethiolates on rough and smooth silver[END_REF][START_REF] Weiss | Si/SiO 2-Templated Formation of Ultraflat Metal Surfaces on Glass, Polymer, and Solder Supports: Their Use as Substrates for Self-Assembled Monolayers[END_REF] 4 eq of tetrabutylammonium fluoride (15 % on alumina, 50 mg for A, 60 mg for B) were added to 5 mg of protected-thiol A or B in 20 mL of anhydrous degassed DMSO under stirring. The initial orange solution quickly darkened, then

N N N N R 2 R 2 1 R 1 R 1 S CHO N N N N R S S N N H 2 N NH 2 R R + EtOH / 80°C 1 day piperidine R TMS TMS TMS 2 R = p -C 6 H 4 -NH 2 3 R = H 4 5 R = p -C 6 H 4 -NH 2 6 R = H N N N N R SH HS R N N N N R SH HS R A R = p -C 6 H 4 -NH 2 B R = H H H H + A 2H + R = p -C 6 H 4 -NH 2 B 2H + R = H N N N N R R H H H + S TMS S TMS 8 R = H 7 R = p -C 6 H 4 -NH 2 TBAF
the stirring was continued 1 h under continuous nitrogen bubbling. The medium was quenched by addition of an excess of CaCl2.2H2O (20 mg in 1 mL of degassed methanol) to hydrolyze thiolate and precipitate fluorides in excess. After 10 min, the solution was filtered through a 0.45 µm PTFE filter then immediately used for the preparation of SAMs. The presence of Bu4NCl adduct and the excess of CaCl2 in the medium were assumed not to interfere in the grafting of the thiol on gold. TS Au substrates were immersed for 3 days in the thiol solutions then the functionalized surfaces were cleaned with DMSO, methanol then deionized water. Finally, they were dried under a nitrogen stream.

Acid/base treatments of the SAMs of A and B.

Protonation of the SAMs was realized by placing the substrate for 1 min in vapors of diluted hydrochloric acid (i.e. samples held at 2-3 cm above the surface of a 3 M HCl solution). In the same way, conversion back to the neutral form of the molecules in the SAMs was realized by placing the substrate for 1 min in vapors of triethylamine. Each treatment was followed by a short cleaning in ethanol then deionized water.

Thickness measurements.

We recorded spectroscopic ellipsometry data (on 1 cm 2 samples) in the visible range using a UVISEL (Horiba Jobin Yvon) spectroscopic ellipsometer equipped with DeltaPsi 2 data analysis software. The system acquired a spectrum ranging from 2 to 4.5 eV (corresponding to 300-750 nm) with intervals of 0.1 eV (or 15 nm). Data were taken at an angle of incidence of 70°, and the compensator was set at 45°. We fit the data by a regression analysis to a filmon-substrate model as described by their thickness and their complex refractive indexes. First, a background for the substrate before monolayer deposition was recorded. Secondly, after the monolayer deposition, we used a 2-layer model (substrate/SAM) to fit the measured data and to determine the SAM thickness. We employed the previously measured optical properties of the substrate (background), and we fixed the refractive index of the organic monolayer at 1.50. [START_REF] Ulman | An introduction to ultrathin organic films : from Langmuir-Blodgett to Self-assembly[END_REF] We note that a change from 1.50 to 1.55 would result in less than a 1 Å error for a thickness less than 30 Å. Overall, we estimated the accuracy of the SAM thickness measurements at ± 2 Å. [START_REF] Rabe | An ellipsometric method for the characterization of macroscopically heterogeneous films[END_REF] Albeit other methods (angle resolved XPS, AFM nanoindentation) could be more accurate, ellipsometry has been established as a simple, rapid, and nondestructive tool to estimate the thickness (>1 nm) of SAMs (see a review in Refs. 46, 48).

XPS measurements.

XPS was performed with a Physical Electronics 5600 spectrometer fitted in an UHV chamber with a residual pressure of 2×10 -10 Torr. High resolution spectra were recorded with a monochromatic Al Kα X-ray source (hν = 1486.6 eV), a detection angle of 45° as referenced to the sample surface, an analyzer entrance slit width of 400 µm and with an analyzer pass energy of 12 eV. Semi-quantitative analysis were completed after standard background subtraction according to Shirley's method. [START_REF] Shirley | High-Resolution X-Ray Photoemission Spectrum of the Valence Bands of Gold[END_REF] Peaks were decomposed by using Voigt functions and a least square minimization procedure with constant Gaussian and Lorentzian broadenings for each component of a given peak.

Conducting atomic force microscopy (C-AFM).

Current-voltage characteristics were measured by conducting atomic force microscopy (C-AFM) under a nitrogen flow (Icon, Bruker), using PtIr coated tip (SCM-PIC from Bruker, 0.2 N/m spring constant). To form the molecular junction, the conducting tip was localized at a stationary contact point on the SAM surface at controlled loading force (between 5 to 20 nN).

Current-voltage (I-V) characteristics were acquired with Nanoscope 6 software from Bruker, and treated with Gwyddion v2.44 [START_REF] Necas | Gwyddion: an open-source software for SPM data anylsis[END_REF] and WsXM v5.0 51 software. Two approaches were used for these C-AFM characterizations: (i) On large flat template-stripped gold surfaces ( TS Au) [START_REF] Weiss | Influence of defects on the electrical characteristics of mercury-drop junctions: self-assembled monolayers of n-alkanethiolates on rough and smooth silver[END_REF][START_REF] Weiss | Si/SiO 2-Templated Formation of Ultraflat Metal Surfaces on Glass, Polymer, and Solder Supports: Their Use as Substrates for Self-Assembled Monolayers[END_REF] modified with SAM, the C-AFM tip is localized at different places on the sample (typically on an array of stationary contact points spaced of 100 nm), at a fixed loading force and the I-V characteristics were acquired directly by varying voltage from 0 V to +200 mV for each contact point. The I-V characteristics were not averaged between successive measurements and typically between 100 and 10,000 I-V measurements were acquired on each sample at different areas of the sample. (ii) On array of ∼8 nm (in diameter) single-crystal gold nanodots spaced of 100 nm, fabricated by standard electronic lithography process on (100) Si substrate (resistivity = 10 -3 Ω.cm) and chemically functionalized with molecules, the so-called nanodot molecule junctions (NMJ). [START_REF] Smaali | Conductance Statistics from a Large Array of Sub-10 nm Molecular Junctions[END_REF] The fabrication of the nanodots and the detailed characterization of these nanodot arrays have been reported elsewhere. [START_REF] Clement | Large Array of Sub-10-nm Single-Grain Au Nanodots for use in Nanotechnology[END_REF][START_REF] Trasobares | High speed e-beam lithography for gold nanoarray fabrication and use in nanotechnology[END_REF] Images (topography and current) were acquired on the nanodot arrays with a sweep frequency of 0.5 Hz and the voltage applied on the substrate was fixed at 200 mV. From the current images recorded from 1,000 to 4,000 nanodots at a fixed voltage, histograms of the distribution of the current and conductance were obtained for each sample. [START_REF] Smaali | Conductance Statistics from a Large Array of Sub-10 nm Molecular Junctions[END_REF]

Mechanically controlled break junction (MCBJ).

Our setup consists of a home-made MCBJ [START_REF] Alwan | Statistical evidence of strain induced breaking of metallic point contacts[END_REF][START_REF] Gil | Estimating single molecule conductance from spontaneous evolution of a molecular contact[END_REF] equipped with its dedicated acquisition and control electronics and software. The MCBJ samples (see Fig. S2, supporting information) were made with an Au wire (250 μm diameter, 99.99%, Goodfellow) glued into two quartz capillaries (fused silica, 1mm inner diameter, Vitrocom), which are then glued onto a phosphorous bronze bending beam. An optical glue (NOA61, Nordland) is used for both bondings. The wire is notched in the empty space between the capillaries to initiate the breaking of the junction. The free-standing part of the Au wire is typically 200 μm for our samples, and the unfilled parts of the capillaries act as a reservoir for the organic solutions. To ensure cleanliness of the contacts, samples are broken in pure solvent (dimethyl sulfoxide, DMSO). They are operated for one or two hours at a typical current set-point of 200 pA before measurements begin, to allow mechanical relaxation of the bending beam, and thus stabilization of the electrode distance. We then feed the sample with 10 μL of solution and set a current set-point in the sub nA range. This current imposes the distance between the gold electrodes, and after stabilization, the feedback loop controlling the electrode separation is disabled. We then observe the temporal evolution of the current flowing through the contact.

A connection or disconnection of a molecule between the 2 electrodes is expected to induce a sharp change (stepwise) in the current. If we do not observe such events, the feedback is enabled, and the set-point is increased (reducing electrode separation). These operations are repeated until we observe abrupt current jumps (see a typical exemple figure S3, in the supporting information). Current histograms and single molecule conductance are extracted from these measurements as reported in Ref. 56 and detailed in the supporting information.

Theoretical modeling.

Single molecule in gas phase. First principles ab-initio calculations were performed using the Gaussian software. [START_REF] Frisch | Gaussian03-Version c01[END_REF] The geometries were optimized using density functional theory in the framework of the B3LYP functional, [START_REF] Becke | Density-functional thermochemistry. III. The role of exact exchange[END_REF] 6-311g basis set and the GDISS optimization algorithm. [START_REF] Farkas | Methods for optimizing large molecules. Part III. An improved algorithm for geometry optimization using direct inversion in the iterative subspace (GDIIS)[END_REF] The influence of pH through proton exchanges at the molecular level is not simple to simulate, due to the interplay of dielectric and solvation effects. [START_REF] Bürgi | Simulating proteins at constant pH: An approach combining molecular dynamics and Monte Carlo simulation[END_REF] Another issue for the modeling is the presence of a counter ion (here Cl-) at a random position, which is needed to equilibrate the total charge of the system. [START_REF] Ibragimova | Importance of Explicit Salt Ions for Protein Stability in Molecular Dynamics Simulation[END_REF] To cope with this issue, we have used a cluster model as defined in Ref. 62

(see the Supporting Information). For each molecule (A and B)

and protonation states, we have calculated the HOMO-LUMO gap, the wave function distributions, the electron affinity (EA) and the ionization potential (IP). The theoretical optical absorption was determined using Time Dependent Functional Density theory calculations (TDDFT).

Metal/molecule/metal junction. To calculate the electron transport through these molecules when a metal/molecule/metal junction is formed, we use a combination of the SIESTA code, [START_REF] Soler | The SIESTA method ad initio order-N materials simulation[END_REF] which enables the extraction of a Hamiltonian describing the junction and the quantum transport code Gollum. [START_REF] Ferrer | GOLLUM: a next-generation simulation tool for electron, thermal and spin transport[END_REF] The calculation utilizes a double-ζ plus polarization orbitals basis set and the GGA [START_REF] Perdew | Generalized Gradient Approximation Made Simple[END_REF] exchange correlational functional. To calculate the protonated form, we control the charge on the counter ions (Cl -) via the atomic basis set (see Supporting Information). The zero-bias transmission coefficient T(E) is then calculated as a function of the electron energy E. This is then used to evaluate the conductance and electrical current via the Landauer formula.

Results and discussion.

Structural characterization of SAMs.

XPS measurements show that the SAMs of molecules A and B are well formed on the Au surfaces. We observed the peaks of C1s, S2p and N1s with the expected S/C and N/C ratios (see figure S4 and Table S1, Supporting Information). The S2p spectra (for both molecules) showed the contributions of the S-Au bond and the free thiol end-group (Fig. S5, Supporting Information). The N1s spectra showed several peaks (3 for SAM A, 2 for SAM B, Fig. S6, Supporting Information) attributed to the different chemical environments of the N atoms (see discussion, Supporting Information). Table 1 presents the thickness of SAMs A and B measured by ellipsometry before and after the acid/base treatments. The theoretical length of molecules A and B are estimated to 1.9 nm (see geometry optimization, Supporting Information). It appears that SAM B (thickness ~1.9 nm) is denser and better organized than SAM A (thickness ~ 1.3 nm, thus an average tilt angle of the molecule of ~ 50° with respect to the surface normal). This difference can be explained by the more planar shape of molecule B, which is more favorable to a compact stacking. The treatments with vapors of hydrochloric acid and triethylamine do not induce a significant variation of the thickness of SAMs A and B, indicating a good stability.

Table 1. Thickness (in nm) measured by ellipsometry for SAMs A and B before (pristine) and after the acid and base treatments. Average values from 2-3 samples and 3 measurements at different places on each samples.

Electrical characterization.

SAM on flat TS Au surfaces characterized by C-AFM.

We measured the electron transport properties in molecular junctions, which consist of SAMs on flat TS Au electrodes, and contacted by C-AFM. For this purpose, the loading force of the C-AFM tip is kept very low (around 5 nN) in order to avoid any mechanical deformation of the SAM (< 0.1 nm) and consequently any modification of its electronic properties. [START_REF] Engelkes | Analysis of the Causes of Variance in Resistance Measurements on Metal-Molecule-Metal Junctions Formed by Conducting-Probe Atomic Force Microscopy[END_REF][START_REF] Engelkes | Simultaneous nanoindentation and electron tunneling through alkanethiol self-assembled monolayers[END_REF][START_REF] Smaali | On the mechanical and electronic properties of thiolated gold nanocrystals[END_REF] The I-V curves were accumulated over different zones (typically 4) of the sample, and after pristine HCl exposure NEt 3 exposure

SAM A 1.3 ± 0.2 1.3 ± 0.2 1.5 ± 0.2

SAM B

1.9 ± 0.2 1.9 ± 0. S2, Supporting Information).

For both SAMs of molecules A and B, the current distributions are shifted by the protonation and the back conversion to the neutral state of the molecules, and we observe that the mean current for the pristine SAM has an intermediate value between the mean currents measured on the protonated and neutral SAMs. Specifically for the molecule A (Figure 1-a), the mean current initially measured at 4.8x10 -9 A for the pristine SAM is between the mean current of the protonated SAM of 1.5x10 -9 A and the neutral SAM at 1.4x10 -8 A. For molecule B, the mean currents for the pristine, protonated and neutral SAMs are measured at 8.3x10 -10 A, 2.0x10 -9 A and 3.2x10 -10 A respectively (Figure 1-b). It is likely that in the "pristine" case, just after the SAM grafting, there is a mix of neutral and protonated molecules. Thus, we observed that the molecule A is more conducting in the neutral state, while the molecule B exhibits a higher conductance in the protonated state. The ratios of the mean currents are For molecules A, the ratios Ineu(A)/Ipro(A) are 9.

Molecules grafted on sub-10 nm nanodots (NMJ) and characterized by C-AFM.

The changes in the molecular junction conductance for the protonated and neutral states of the molecules were also assessed with another platform of smaller size, made from hundreds of molecules grafted onto tiny crystalline Au nanodots and contacted by C-AFM (NMJ). [START_REF] Smaali | Conductance Statistics from a Large Array of Sub-10 nm Molecular Junctions[END_REF][START_REF] Clement | Large Array of Sub-10-nm Single-Grain Au Nanodots for use in Nanotechnology[END_REF] The current is measured by scanning the array of NMJs, with a C-AFM tip at a given bias applied on the substrate. A current is measured only when the tip is localized on the molecular junction (Fig. 3). [START_REF] Smaali | Conductance Statistics from a Large Array of Sub-10 nm Molecular Junctions[END_REF] The current through the native SiO2 covering the space between the nanodots is below the detection limit of our apparatus. C-AFM images on this array of nanodot/molecules junctions taken at + 200 mV for both the molecules and for the two states (neutral and protonated) are shown in the supporting information (Fig. S10). From these C-AFM images and with help of the Gwyddion software, [START_REF] Necas | Gwyddion: an open-source software for SPM data anylsis[END_REF] we extract a value of the current for A and B, respectively, a little bit smaller then on TS Au surfaces (table 2). This inversion of the ratios with the nature of the side chains of the molecule will be further discussed in the theoretical section below.

MCBJ

�

Single molecule conductance measurements by MCBJ.

Finally, we compare these results with single molecule experiments using the MCBJ technique. Following the protocol described in the experimental section, we performed single molecule conductance measurements on molecules A and B, starting with a millimolar solution of the neutral molecules in DMSO. However, we never obtained stable molecular junctions for the molecule A, which we attribute to steric hindrance caused by the bulkier side groups. Therefore, only results for molecule B are reported here. Figure 5 6 and S17 (in the supporting information) for the data analysis (multi-peak) and the single molecule conductance determination.

We obtained complex conductance histograms, which prevent us from a straightforward analysis. We thus developed an automated analysis protocol (see more details in the supporting information). In brief, from the current histograms converted to conductance, we calculate the differences between the most probable current values (peaks in Fig. 5). If these differences correspond to connection/disconnection of molecules in the contact, they should share a common multiple, the conductance of a single molecule. We plot in figure 6 the peaks of conductance versus a discrete number of molecules NMOL. Arbitrarily, the lowest conductance value (lowest current peak) is attributed to NMOL = 1, since we do not observe current jumps of lower amplitude. These plots clearly show that for all the measurements, the conductance values are fitted by a linear function f(NMOL) = GMOL NMOL, GMOL being the conductance of a single molecule. We note that there is some missing points (i.e. peaks), which reflects the stochastic nature of these molecular junctions. The conductance values are expressed in the conductance quantum units, G0 = 2e 2 /h (7.75x10 -5 S), with e the electron charge and h the Planck constant. The extracted GMOL values are reported in table 3.

We note that the conductances vary with the applied voltage, while the conductances of the SAMs (see Table S3, Supporting Information) are not dependent on the voltage (linear I-V regime < 200 mV). However, conductances of single molecules is very sensitive to the atomic details of the molecule/electrode contact. For example, it has been reported [START_REF] Li | Conductance of single alkanedithiols: conduction mechanism and effect of molecule-electrode contacts[END_REF][START_REF] Li | Charge transport in single Au/alkanedithiol/Au junctions: coordination geometries and conformational degrees of freedom[END_REF] that the conductance depends whether the molecule is connected on a hollow site of the gold surface or to a gold ad-atom (this variability being averaged in a larger area junction). 75 We have then applied the same measurement and analysis protocol to the protonated molecule B (Figs. S14-S16 in the supporting information). The protonation is operated in-situ by exposing the junction with molecules to HCl vapors for one minute. After the exposition, the base tunneling current in the junction, for given electrode separation, increases by approximately one order of magnitude. This current increase is attributed to the dissolution of acid in the solvent, leading to the opening of an ionic current channel in the junction. One of the main benefits of the measurement and analysis method used here, lies in eliminating the constant (or slowly varying) tunneling or ionic contribution to the net conductance. [START_REF] Gil | Estimating single molecule conductance from spontaneous evolution of a molecular contact[END_REF] In these conditions, it makes sense to compare conductance values of protonated and neutral molecules.

Modeling molecules in gas phase

We first calculated the optimized geometries, the electron affinity (EA), the ionization potential (IP) and the HOMO-LUMO gap for molecules A and B in the neutral and protonated forms (Figs. S18-S20, Supporting Information). For molecule A, we considered the 4H + and 2H + cases, and we find that the HOMO-LUMO gap is the same in the two cases (Fig. S19, Supporting Information). Basically, the protonation tends to reduce the HOMO-LUMO gap of the molecules and increases the IP and EA. Both the HOMO and the LUMO of molecules A and B are characterized by highly delocalized wave functions. The protonation of the nitrogen atoms strongly modify the nature of the HOMO as it becomes strongly localized on the protonation sites i.e. on the chloride counter-ion. On the contrary, the LUMO wave functions remain strongly delocalized on the aromatic cycles.

Modeling electron transport in metal/molecule/metal junctions

To explain this switching behavior, we calculated electron transport through the two molecules when attached to gold electrodes. The transmission curves T(E) in Figure 7 For molecule B, we find that the DFT calculation positions the Fermi energy close to the HOMO, leading to a similar transmission for Molecule A (Figure S22, Supporting Information). However, the calculated IP of molecule B is larger than A (meaning the HOMO is at a lower energy). Figure S19 (Supporting Information) shows this difference to be ~ 0.5eV, and therefore we shift the Fermi energy by this amount and define EF 1 = EF 0 +0.5eV (Fig. 7b). The value of the conductance for the neutral case at EF 1 is 0.002G0. Protonation again decreases the HOMO-LUMO gap, but now the transmission is higher at E-EF 1 = 0eV and the conductance now increases to a value of 0.03G0, again in agreement with the measured trend (Figs. 1, 4 and 6). Also, the predicted conductance is much larger than the measured value of G (Table 3), which can be attributed to the underestimation of the HOMO-LUMO gap. However the conductance ratios for molecular A Gneu/Gpro = 6 and Gpro/Gneu = 15

for molecule B are in agreement with our measured ratios (Table 2). Thus, the changing behavior on protonation between molecule A and B can be attributed to the difference in the relative position of the HOMO resonance with respect to the Fermi energy.

Conclusion.

A multi-scale characterization of the electron transport though molecular junction upon protanation demonstrates that their conductance switching depends on the lateral functional

Associated content

Supporting Information

The Supporting Information is available free of charge on website at DOI: xxxxx Synthesis, NMR, UV-vis spectra, detailed protocols MCBJ measurements, XPS spectra, detailed current vs. time traces during MCBJ measurements, C-AFM images on NMJs, C-AFM current-voltage curves on TS AU/SAM, calculated optimized geometries, calculated electronic structures, calculated molecular orbitals, calculated optical absorption curves and calculated electron transport in metal/molecule/metal junctions.

2 1 . 8 ± 0. 2 removing

 182 Figs.S8 and S9) according to the procedure described in the experimental section. These

  Ineu(A)/Ipro(A)=9.3 and Ipro(B)/Ineu(B)=6.3 for molecule A and B, respectively (table2).

Figure 1 .!Figure 2 .

 12 Figure 1. Histograms of the current at a fixed bias of 200 mV for (a) SAM of molecule A after fabrication (3698 junctions) in black (log µ = -8.32 (4,8x10 -9 A), log σ = 0.57), after protonation in red (1588 junctions, log µ = -8.81 (1.5x10 -9 A), log σ = 0.36) and after converted back to the neutral state in green (1186 junctions, log µ = -7.86 (1.4x10 -8 A), log σ = 0.69); (b) SAM of molecule B after fabrication (6096 junctions, log µ = -9.08 (8.3x10 -10 A), log σ = 0.56) in black, after protonation in red (9338 junctions, log µ = -8.69 (2x10 -9 A), log σ

52 !Figure 3 .

 523 Figure 3. Example of (a) topography image (nanodots are bright spots) and (b) current image (bright spots are the current value of each NMJ) obtained simultaneously on NMJs of neutral molecules A and measured by C-AFM (loading force10 nN and Vbias = 200 mV). 2456 NMJs are measured.

Figure 4 .

 4 Figure 4. Histograms of the current at a fixed bias (200 mV) measured by C-AFM on (a) array of NMJs of molecule A after protonation in black (2445 junctions, log µ = -8.07 (8.5x10 -9 A), log σ = 0.33) and for neutral molecules in red (2456 junctions, log µ = -7.54 (2.9x10 -8 A), log σ = 0.05); (b) NMJs of molecule B after protonation in black (1634 junctions, log µ = -7.38 (4.2x10 -8 A), log σ = 0.29) and for neutral molecules in red (1154

72 �Figure 5 .

 725 Figure 5. Histograms of currents (at Vbias = 35 mV) measured with the MCBJ in pure DMSO (dark) and in a 1 mM solution of molecules B in the neutral state (blue) and protonated state (red). The current histogram after protonation is shifted to higher currents, see text and Figs.

!Figure 6 .

 6 Figure 6. Conductance values of the peaks observed in the histograms of Fig. 5 (and figuresS9-S11) versus a number of molecules (neutral molecule B). A linear fit gives the GMOL values reported in table 2 for the 3 applied voltages. Conductance values are given in conductancequantum units, G0.

  show the gap between the HOMO and LUMO resonances is approximately 2eV. To perform a comparison between molecule A and B, we first calculate their transport properties for identical contacting geometries as shown in Figure 7. Molecule A in the neutral form shows that the DFT predicted Fermi energy (EF 0 ) lies close to the HOMO resonance and gives a conductance value of 0.06G0. Upon protonation, the HOMO-LUMO gap is decreased and the position of the Fermi energy lies in the middle of the gap. The value of conductance decreases to 0.01G0 in agreement with trend shown in the SAM measurement of figures 1 and 4. The thickness of the SAM ~ 1.3nm compared to the molecule length (1.8nm) means the moleculeforms a more tilted geometry in the SAM. However, we find that the general trend upon protonation is not dependent on the contact angle geometry (figure S24, Supporting Information). Also, electron transport though tilted molecule A contacting the gold electrode though the NH2 anchor group can be discarded, since the conductance is 3 orders of magnitude lower (Fig.S25, Supporting Information).

�Figure 7 .

 7 Figure 7. Zero bias transmission coefficient T(E) for molecule A (a) and molecule B (b) in a

  groups. The molecular conductances were measured at 3 scale lengths : self-assembled monolayers on flat Au surfaces, about hundred molecules grafted on Au nanodots (measured by C-AFM in these two cases) and single molecules by mechanically controlled break junction, and. These 3 approaches demonstrate that the effect of pH modulation on the molecule conductance can be controlled by side chain chemistry. A benzo-bis(imidazole) molecule shows a higher conductance in the neutral state (Gneu>Gpro) when laterally functionalized by amino-phenyl groups, while we observe the reverse case (Gpro>Gneu) for the H-substituted molecule. These results are understood with the help of theoretical calculations which attribute the different behaviors to the position of the HOMO resonances relative to the Fermi energy of the electrodes.

  3, 4.1 and 2.2. For molecule B, we get Ipro(B)/ Ineu(B) ratios of 6.3, 2.1 and 1.2 for the three cycles. This "fatigue" effect, usually observed in molecular switches (optical, 69 redox 22 or pH[START_REF] Guo | Covalently bridging gaps in single-walled carbon nanotubes with conducting molecules[END_REF] ), may have several causes (molecule desorption

	or degradation, uncontrolled chemical reactions,…) and strategies have been recently
	demonstrated (e.g. mixed SAMs with alkylthiols) to maximize the conductance switching and
	reduce this fatigue effect. 70, 71

Table 2 .

 2 Switching

ratios for molecules A and B measured at 3 scale lengths by 3 approaches, and theoretical calculations (n.m. :not measured)

Table 3 :

 3 Values of the molecule conductance, Gmol, at several voltages and in the neutral (from data Fig. 6) and protonated forms (data Fig S17 in the supporting information).

  Table 3 gathers the conductance values obtained for neutral and protonated molecules B at Vbias = 35, 70 and 140 mV (see supporting information, figures S14-S16 given the corresponding current traces and histograms of currents and figure S17 for the GMOL vs.

	Bias (mV)	GMOL (G0)	GMOL (G0)
		neutral	protonated
	35	4.7 ± 0.2 x 10 -5	3.40 ± 0.02 x 10 -4
	70	7.50 ± 0.03 x10 -5	4.80 ± 0.46 x 10 -4
	140	3.80 ± 0.01 x10 -5	1.72 ± 0.33 x 10 -4
	NMOL plots). In all cases, the conductance of protonated molecules is higher than the
	conductance of the neutral ones. From these values, we can calculate a conductance ratio
	between protonated and neutral molecule ranging from 4.5 to 6.5 (table 2). These results show
	that we have operated a molecular switch, using a chemical stimulus, at the scale of a single
	molecule.

Nanoscale

Acknowledgments

This work was funded by the ANR grant FOST (ANR-12-BS10-01801). We thank Dominique Deresmes (IEMN) for help and advices (C-AFM measurements). Support from the UK EPSRC is acknowledged, through grant nos. EP/N017188/1, EP/M014452/1, EP/P027156/1 and EP/N03337X/1. Support from the European Commission is provided by the FET Open project 767187 -QuIET.

Author information

Author contributions

Notes

The authors declare no competing financial interest.