Introduction

In recent years, calculations based on ab initio thermodynamics have increasingly contributed to unraveling key processes in interfacial electrochemistry; e.g., in batteries, fuel cells, and other electrocatalytic systems. In such studies, the electrochemical environment and operation conditions are suitably represented in the form of thermodynamic reservoirs1,2,3,4,5. Within a grand-canonical setup these reservoirs are then coupled to predictive-quality (typically density-functional theory (DFT)) total energy calculations for the electrode, to deduce electrochemical stabilities and activities; see e.g., refs. 2,6,7,8,9,10,11. In the application to interfacial electrochemistry a key challenge to this general ab initio thermodynamics concept is the necessity to exchange electrons with a reservoir representing the electrode potential. In principle, this requires to perform DFT calculations in various charge states. This clashes with the common representation of the electrode as finite slab using periodic-boundary conditions, for which straightforward calculations can only be performed at zero total charge of the cell. For this reason, in most practical application, the early computational hydrogen electrode (CHE) approach2,6,12 relies solely on the energetics of charge-neutral electrode calculations, in the absence of the electrochemical double layer. The dependence on the electrode potential is then included in the analysis as an a posteriori shift of the electrochemical potential of the electrons taken from the reservoir, whose number is a priori fixed according to the charge-neutrality condition.

Conceptually, this restriction can be readily lifted through the introduction of meaningful counter-charge models in the vacuum region between the periodic slabs1,13. This then allows for a surface polarization and charging of the electrode slab while still maintaining the overall charge neutrality of the supercell. In the recent fully grand-canonical (FGC) approaches this is realized in practice by the use of an implicit solvation model in the DFT calculations5,9,11,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34, which captures the effects of both electrolyte polarization and solvent screening, and renders the calculations largely insensitive to details of the counter-charge model employed35 at conventional thicknesses of the vacuum/dielectric region32. Within this approach, variable-charge calculations can nowadays be performed at high computational efficiency in a number of major DFT codes, e.g., ENVIRON18,36, VASPsol21, FHI-aims25, Jaguar29, BigDFT24, GPAW31,37, or JDFTx38.

The capabilities of FGC approaches have been highlighted in several publications and include a potential-dependence of chemical reaction steps8,29,30,31,39,40, potential-induced surface reconstructions or shifts of stable adsorption sites5,11,13,41. However, there is presently still limited understanding of the methodological differences between the still prevalent zero-charge CHE and the variable-charge FGC approaches. In this work we therefore present a consistent thermodynamic framework to compare both types of approaches and highlight the simplifications made in practical calculations. In particular, we show by analysis of a generic second-order Taylor expansion of the interface energies with respect to surface charge7,11,20,34,39,42,43,44,45 that the CHE approach can be understood as a first-order approximation to the FGC energetics, while to second order, double-layer charging is represented by changes in work function and interfacial capacitance.

We illustrate these differences between CHE, second-order expansion and FGC in the application to two classic probes of interfacial electrochemistry at metal electrodes, namely non-Nernstian shifts of proton electrosorption peaks at low-index Pt crystals5,46,47,48,49,50 and the non-integer electrosorption valency of halide ions at Ag(111)51,52,53,54. While neither of these observations can be reproduced at the CHE level, already the second-order expansion introduces them qualitatively, if not even in quantitative agreement with existing experimental data. We find that with current simple implicit solvation models higher-order terms captured in the FGC approach do not generally lead to further significant improvements. Apart from the intrinsic shortcomings of the continuum solvation itself55, we also discuss alternative sources for the remaining discrepancies with experiments. As an important corollary, the present work also demonstrates analytically that the FGC energetics does not tend toward CHE results in the limit of single adsorbates in infinitely large surface unit-cells. Instead, the discussed applications suggest that second-order calculations are a computationally efficient approximation to FGC calculations.

Results

Ab initio thermodynamics and interfacial free energy

The central quantity in our ab initio thermodynamics approach to surface electrochemistry is the Gibbs excess energy of interface configuration α4,5,13,

$$\begin{array}{lll}{G}_{{\rm{exc}}}^{\alpha }(T,p,{\mu }_{{\rm{s}}},{\tilde{\mu }}_{{\rm{a}}},{\Phi }_{E})&=&{G}_{{\rm{surf}}}^{\alpha }(T,p,{N}_{{\rm{s}}}^{\alpha },{N}_{{\rm{a}}}^{\alpha },{N}_{e}^{{\rm{abs}},\alpha })-{N}_{{\rm{s}}}^{\alpha }{\mu }_{{\rm{s}}}\\ &&-{N}_{{\rm{a}}}^{\alpha }{\tilde{\mu }}_{{\rm{a}}}+{N}_{e}^{{\rm{abs}},\alpha }e{\Phi }_{E}.\end{array}$$
(1)

The specific interface configuration α is hereby characterized by its surface geometry (e.g., the position of adsorbates) and chemical composition. In this work we will focus on adsorbates at metal electrodes and we will specify this composition in terms of the number of neutral substrate atoms \({N}_{{\rm{s}}}^{\alpha }\), the number of (possibly charged) adsorbate species \({N}_{{\rm{a}}}^{\alpha }\), and the number of excess electrons \({N}_{e}^{{\rm{abs}},\alpha }\) (conveniently measured as absolute surface charge, cf. below). The additional dependence on temperature T and pressure p in the grand-canonical setup is henceforth dropped for ease of notation. Appropriately normalized to the surface area A, the intensive interface excess free energy is

$${\gamma }_{{\rm{exc}}}^{\alpha }({\mu }_{{\rm{s}}},{\tilde{\mu }}_{{\rm{a}}},{\Phi }_{E})=\frac{1}{A}{G}_{{\rm{exc}}}^{\alpha }({\mu }_{{\rm{s}}},{\tilde{\mu }}_{{\rm{a}}},{\Phi }_{E}),$$
(2)

and denotes the cost of creating the electrode surface α in the electrochemical environment at the applied potential ΦE, as it compares the Gibbs free energy of the electrode \({G}_{{\rm{surf}}}^{\alpha }\) with the sum of the free energies of its constituents in their corresponding (bulk) reservoirs. These free energies are defined by the bulk chemical potential μs of the (neutral) substrate atoms and the electrochemical potentials (highlighted with a tilde) of the (charged) adsorbate species \({\tilde{\mu }}_{{\rm{a}}}\) and of the excess electrons \({\tilde{\mu }}_{e}\). The latter relates to the applied electrode potential via \({\tilde{\mu }}_{e}=-e{\Phi }_{E}\). Without loss of generality, we choose the extensive Gibbs excess energies for the entire electrode as central base quantities in this work, and will therefore explicitly include a surface area dependence in the equations wherever required.

Note that the sign convention followed in Eq. (1) considers negative Gibbs free energies and (electro)chemical potentials, with more negative values corresponding to more stable or more dilute configurations. The electrode potential ΦE is measured according to electrochemistry conventions, with increasing values away from the zero-reference vacuum level, such that e.g., the experimental standard hydrogen electrode (SHE) lies at +4.44 V on this absolute scale56. In multicomponent systems different neutral and charged species may exist and appropriate sums over the indices s and a with appropriate stoichiometries need to be introduced in Eq. (1). We stress that this need extends also generally to all interfacial species in the double layer, such as water or solvated ions57,58,59. However, in this work we restrict ourselves to implicit solvation models in which only the specifically bound ionic adsorbates a are treated explicitly in Eq. (1).

It is important to point out that the so-defined excess energies have often no direct thermodynamic relevance, as they still depend on the specific interface configuration α. The true thermodynamic excess energy Gexc corresponds to the minimum \({G}_{{\rm{exc}}}^{\alpha }\) in the space of all possible interface configurations α5, and this then also defines the true ground-state electrode configuration in terms of Ns, Na, and \({N}_{e}^{{\rm{abs}}}\). We note in passing that the two mathematical steps of formulating the excess energies \({G}_{{\rm{exc}}}^{\alpha }\) as in Eq. (1) and then minimizing with respect to configurations α correspond to a Legendre transform, which is why Gexc approximates in fact the grand canonical free energy of the system. In a comprehensive all-explicit simulation the optimum interface configuration that defines Gexc would eventually emerge directly from an appropriate, ideally exhaustive sampling of all corresponding degrees of freedom. In practice, Gexc is instead often approximately determined by computing \({G}_{{\rm{exc}}}^{\alpha }\) for a set of candidate configurations α with fixed \({N}_{{\rm{s}}}^{\alpha },{N}_{{\rm{a}}}^{\alpha },{N}_{e}^{{\rm{abs}},\alpha }\), and the configuration with minimal \({G}_{{\rm{exc}}}^{\alpha }\) is declared to be the most stable one3,4,5,60,61. It is also possible to compare candidate configurations and excess energies that already minimize \({G}_{{\rm{exc}}}^{\alpha }\) in a sub-space of all interface configurations α. In the electrochemical context, this refers notably to charge-equilibrated excess energies \({{\mathcal{G}}}_{{\rm{exc}}}^{\alpha }\) that minimize \({G}_{{\rm{exc}}}^{\alpha }\) with respect to the number of electronic charges \({N}_{e}^{{\rm{abs}},\alpha }\) for a configuration α with defined \({N}_{{\rm{s}}}^{\alpha }\) and \({N}_{{\rm{a}}}^{\alpha }\)

$${\mathcal{G}}_{{\rm exc}}^{\alpha}({\mu}_{\rm s},{\tilde{\mu}}_{\rm a},{\Phi}_{E})={\min}_{{N}_{e}^{{\rm abs},{\alpha}}}{G}_{{\rm exc}}^{\alpha}({\mu}_{\rm s},{\tilde{\mu}}_{\rm a},{\Phi}_{E}).$$
(3)

\(\mathcal{G}_{{\rm{exc}}}^{\alpha }\) then defines the cost of creating an interface with composition \({N}_{{\rm{s}}}^{\alpha }\) and \({N}_{{\rm{a}}}^{\alpha }\) at a given applied potential ΦE, as would be obtained equivalently in a constant potential calculation27,30,62.

As common in ab initio thermodynamics approaches to surface systems4, the difference in the solid-state terms in Eq. (1), i.e., \({G}_{{\rm{surf}}}^{\alpha }\) and any bulk-like reservoir μs, is generally approximated as

$$\begin{array}{l}{G}_{{\rm{surf}}}^{\alpha }({N}_{{\rm{s}}}^{\alpha },{N}_{{\rm{a}}}^{\alpha },{N}_{e}^{{\rm{abs}},\alpha })-{N}_{{\rm{s}}}^{\alpha }{\mu }_{{\rm{s}}} \\ \approx {E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }({N}_{{\rm{s}}}^{\alpha },{N}_{{\rm{a}}}^{\alpha },{N}_{e}^{{\rm{abs}},\alpha })-{N}_{{\rm{s}}}^{\alpha }{E}_{{\rm{bulk}},{\rm{s}}}^{{\rm{DFT}}}+\Delta {F}^{{\rm{corr}},\alpha }.\end{array}$$
(4)

Here, \({E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }\) is the total energy of candidate structure α and \({E}_{{\rm{bulk}},{\rm{s}}}^{{\rm{DFT}}}\) is the total energy per atom of the bulk-like reservoir of neutral species s, both total energies being typically calculated with DFT. ΔFcorr,α is a correction term due to the changes in the vibrational and configurational degrees of freedom of the adsorbates in candidate structure α as compared to their corresponding reservoir. This free energy term is commonly assumed to be independent of the charge state \({N}_{e}^{{\rm{abs}},\alpha }\) of the candidate structure. One should note that even though \({E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }\) is denoted here as a total energy, it does contain free energy contributions due to solvent screening and electrolyte response when an implicit solvation model is employed in the DFT calculation5,32.

FGC calculations

In Eq. (1) the absolute surface charge \({N}_{e}^{{\rm{abs}},\alpha }\) of candidate configuration α measures the number of electrons in excess or deficient with respect to the number of electrons of the corresponding charge-neutral electrode surface at the applied potential (other references are possible without affecting the interpretation5). \({N}_{e}^{{\rm{abs}},\alpha }\) is thus the number of electrons that need to be exchanged with the external electron reservoir. In the present application to adsorbates at metal electrodes

$${N}_{e}^{{\rm{abs}},\alpha }=\frac{{q}_{{\rm{a}}}}{e}{N}_{{\rm{a}}}^{\alpha }+{N}_{e}^{{\rm{net}},\alpha },$$
(5)

i.e., \(-e{N}_{e}^{{\rm{abs}},\alpha }\) is the sum of charges to compensate for the ion charges \({q}_{{\rm{a}}}{N}_{{\rm{a}}}^{\alpha }\) of all adsorbates of charge qa and the net electronic surface excess charge \(-e{N}_{e}^{{\rm{net}},\alpha }\) that is itself compensated exactly by the electrolyte counter charges in the diffuse layer. Without meaningful counter-charge model, any net charge of a metallic surface poses a significant challenge in calculations with periodic boundary conditions63. In its practical realization, without explicitly represented electrolyte ions (c.f. ref. 64) the CHE2,6,61 approach therefore considers only charge-neutral candidate structures with \({N}_{e}^{{\rm{net}},\alpha }=0\). In order to do so, it thus assumes that each ion of charge qa also drags qa/e electrons onto the surface upon adsorption. Any electrochemical reaction involving a proton transfer would then, for instance, necessarily become a proton-coupled electron transfer (PCET). For such charge-neutral structures, solvation effects, at least on the level of implicit solvation models, are often small. This is why corresponding CHE work is often also based on DFT calculations performed without any solvation treatment at all.

FGC simulations in implicit solvation models instead bypass the overall supercell charge neutrality restriction by balancing any \({N}_{e}^{{\rm{net}},\alpha }\;\ne\;0\) through added electrolyte counter charges in the dielectric region between the periodically repeating slabs. At sufficiently high electrolyte concentrations, the details of the electrolyte model are thereby largely irrelevant for the overall energetics5,19,32,35,39. Practical calculations then perform the minimization of \({G}_{{\rm{exc}}}^{\alpha }\) in Eq. (1) with respect to \({N}_{e}^{{\rm{abs}},\alpha }\) for every candidate structure by explicitly calculating a number of finite charge states. Within the approximation in Eq. (4) and assuming a symmetric slab setup the minimization of Eq. (3) yields the condition

$$\frac{\partial {G}_{{\rm{exc}}}^{\alpha }({N}_{e}^{{\rm{abs}},\alpha })}{\partial {N}_{e}^{{\rm{abs}},\alpha }}=0\leftrightarrow \underbrace{\frac{\partial {E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }({N}_{e}^{{\rm{abs}},\alpha })}{\partial {N}_{e}^{{\rm{net}},\alpha }}}_{-e{\Phi }^{\alpha }}=-e{\Phi }_{E},$$
(6)

where the underbraced equality arises from Janak’s theorem and the employed reference for the electrostatic potential (see Methods). Equation (6) thus states that the minimization is equivalent to choosing a system such that its work function eΦα is equal to the externally applied (target) potential ΦE times the elementary charge e. Thus, the charge-equilibrated \({{\mathcal{G}}}_{{\rm{exc}}}^{\alpha }\) can be directly obtained by interpolating the dependence of the energy and the charge on the work function and evaluating \({G}_{{\rm{exc}}}^{\alpha }\) for charge values where the work function corresponds to ΦE5, similar to what is done in the generalized CHE and related constant-potential approaches27,30,62.

Obviously, this procedure increases the computational burden, as each candidate structure has to be calculated in different charge states. On the other hand, certain electrochemical observables can be simulated that would otherwise be inaccessible within the CHE approximation. Noteworthy, these include non-linear variations of the interface energy with applied potential (cf. Lippmann equation5,47,65,66,67) potential-induced surface reconstructions5,13,41 that maintain the overall stoichiometry in terms of Na and Ns, and pH-shifts of electrosorption peaks on the RHE scale as well as non-integer electrosorption valencies51,52,54, as will be explicitly illustrated here.

Grand canonical energetics within a quadratic approximation

Further insight into the differences between FGC and CHE results can be gained by analyzing a second-order Taylor expansion of \({E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }\) with respect to the net electronic surface excess charge \({N}_{e}^{{\rm{net}},\alpha }\)7,11,34,39,42,43,44,45. Within a symmetric slab setup—with a total surface area of 2A and a unique electrostatic reference level in the implicit region—\({E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }\) can be expanded around the charge-neutral point \({N}_{e}^{{\rm{net}},\alpha }=0\) as

$$\begin{array}{lll}{E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha}({N}_{e}^{{\rm{abs}},\alpha})&=&{E}_{{\rm{surf}},0}^{{\rm{DFT}},\alpha}+\underbrace{{\left.\frac{\partial{E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }}{\partial{N}_{e}^{{\rm{net}},\alpha }}\right|}_{{N}_{e}^{{\rm{net}},\alpha } =0}}_{-e{\Phi }_{0}^{\alpha }}{N}_{e}^{{\rm{net}},\alpha }\\&&+\frac{1}{2}\underbrace{{\left.\frac{{\partial}^{2}{E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }}{{\left(\partial{N}_{e}^{{\rm{net}},\alpha}\right)}^{2}}\right|}_{{N}_{e}^{{\rm{net}},\alpha } =0}}_{\frac{{e}^{2}}{{c}_{0}^{\alpha}}}{\left({N}_{e}^{{\rm{net}},\alpha }\right)}^{2}+\ldots,\end{array}$$
(7)

where \({E}_{{\rm{surf}},0}^{{\rm{DFT}},\alpha }\) is the total energy of the uncharged system, \({\Phi }_{0}^{\alpha }\) the work function and \({c}_{0}^{\alpha }\) the extensive interfacial capacitance at the potential of zero charge (PZC). \({c}_{0}^{\alpha }\) relates to the more common, area-normalized capacitance \({C}_{0}^{\alpha }\) measured in μF/cm2 via \({c}_{0}^{\alpha }=2A{C}_{0}^{\alpha }\). Here and in the following, a subscript 0 will refer to quantities determined at the PZC. The explicit dependence of the total and excess energies on \({N}_{{\rm{s}}}^{\alpha }\) and \({N}_{{\rm{a}}}^{\alpha }\) is dropped for ease of notation.

Within this second-order expansion, the minimization of the excess free energy of candidate structure α with respect to the number of electrons can be carried out analytically following Eq. (6) to obtain

$${N}_{e}^{{\rm{net}},\alpha }({\Phi }_{E})=\frac{{c}_{0}^{\alpha }}{e}\cdot ({\Phi }_{0}^{\alpha }-{\Phi }_{E}).$$
(8)

Inserting Eqs. (7) and (8) into Eq. (1) then yields the charge-equilibrated excess energy \({{\mathcal{G}}}_{{\rm{exc}}}^{\alpha }\) up to second-order as

$$\begin{array}{lll}{{\mathcal{G}}}_{{\rm{exc}}}^{\alpha }({\Phi }_{E}) \\\approx \left[{G}_{{\rm{surf}},0}^{\alpha }-{N}_{{\rm{s}}}^{\alpha }{\mu }_{{\rm{s}}}-{N}_{{\rm{a}}}^{\alpha }{\tilde{\mu }}_{{\rm{a}}}+{N}_{{\rm{a}}}^{\alpha }{q}_{{\rm{a}}}{\Phi }_{E}\right]-\frac{1}{2}{c}_{0}^{\alpha }{\left({\Phi }_{0}^{\alpha }-{\Phi }_{E}\right)}^{2}\end{array}$$
(9)
$$:=\underbrace{\left[{G}_{{\rm{exc}},0}^{\alpha}+{N}_{{\rm{a}}}^{\alpha }({q}_{{\rm{a}}}{\Phi }_{E}-{\tilde{\mu}}_{{\rm{a}}})\right]}_{{G}_{{\rm{exc,CHE}}}^{\alpha }({\Phi}_{E})}-\underbrace{\frac{1}{2}{c}_{0}^{\alpha }{\left({\Phi}_{0}^{\alpha }-{\Phi }_{E}\right)}^{2}}_{{G}_{{\rm{exc,DL}}}^{\alpha }({\Phi }_{E})}.$$
(10)

The first bracket in Eq. (10) is identical to the excess free energy \({G}_{{\rm{exc,CHE}}}^{\alpha }({\Phi }_{E})\) as it would result within the CHE approach. The second term \({G}_{{\rm{exc,DL}}}^{\alpha }\) corresponds to the energy cost of charging the double layer.

This derivation highlights that the CHE approximation is equivalent to a first-order approximation in ΦE of the FGC energetics. For each candidate structure α the CHE energy expression is therefore accurate around the PZC of α (\({\Phi }_{0}^{\alpha }={\Phi }_{E}\leftrightarrow {N}_{e}^{{\rm{net}}}=0\)), where the term \({G}_{{\rm{exc,DL}}}^{\alpha }\) becomes small. On the other hand, for potentials much different than the PZC (\({\Phi }_{0}^{\alpha }\;\ne\;{\Phi }_{E}\leftrightarrow {N}_{e}^{{\rm{net}}}\;\ne\;0\)) the additional energy contributions \({G}_{{\rm{exc,DL}}}^{\alpha }\) can become relevant. Within the CHE model, the only potential-dependence of \({{\mathcal{G}}}_{{\rm{exc}}}^{\alpha }({\Phi }_{E})\) arises from the term \({N}_{{\rm{a}}}^{\alpha }({q}_{{\rm{a}}}{\Phi }_{E}-{\tilde{\mu }}_{{\rm{a}}})\). This dependence is thus always linear in ΦE, at variance with the typical parabolic potential dependence of electrochemical interface energies5,47,68.

From the previous derivation we furthermore see that the relative stability of two electrode configurations α, β differing only in the number of adsorbates a and at applied potential ΦE is

$$\Delta {{\mathcal{G}}}_{{\rm{exc}}}^{\alpha -\beta }({\Phi }_{E})\quad =\quad \Delta {G}_{{\rm{exc,CHE}}}^{\alpha -\beta }({\Phi }_{E})+\Delta {G}_{{\rm{exc,DL}}}^{\alpha -\beta }({\Phi }_{E})\,,$$
(11)
$${\rm{where}}\quad \Delta {G}_{{\rm{exc,CHE}}}^{\alpha -\beta }({\Phi }_{E})={G}_{{\rm{exc}},0}^{\alpha }-{G}_{{\rm{exc}},0}^{\beta }+({N}_{{\rm{a}}}^{\alpha }-{N}_{{\rm{a}}}^{\beta })({q}_{{\rm{a}}}{\Phi }_{E}-{\tilde{\mu }}_{{\rm{a}}})$$
(12)
$${\rm{and}}\quad \Delta {G}_{{\rm{exc,DL}}}^{\alpha -\beta }({\Phi }_{E})=-\frac{1}{2}{c}_{0}^{\alpha }{\left({\Phi }_{0}^{\alpha }-{\Phi }_{E}\right)}^{2}+\frac{1}{2}{c}_{0}^{\beta }{\left({\Phi }_{0}^{\beta }-{\Phi }_{E}\right)}^{2}.$$
(13)

Within the CHE approximation the relative stability of systems with the same number of adsorbates \({N}_{{\rm{a}}}^{\alpha }={N}_{{\rm{a}}}^{\beta }\) is thus potential-independent, excluding the possibility to simulate potential-dependent diffusion barriers, potential-induced shifts of stable adsorption sites, or potential-induced surface reconstructions that conserve the number of adsorbates (and generally also substrate atoms) at the electrode, as e.g., observed for the quasi hexagonal reconstruction of Au(100)5. Intriguingly, all these shortcomings are lifted when including the next higher order term in ΦE, namely the capacitive charging contribution of the double layer \({G}_{{\rm{exc,DL}}}^{\alpha -\beta }\)–an energy contribution that is widespread in the classical electrochemical literature51,52,53,68,69,70,71,72,73,74,75,76,77,78. We will explicitly demonstrate below how this contribution leads to a shift of the electrosorption peaks with pH, and how it relates to the so-called electrosorption valency, another classic concept in phenomenological electrochemistry51,52,53.

The double-layer correction \(\Delta {G}_{{\rm{exc,DL}}}^{\alpha -\beta }({\Phi }_{E})\) can be further simplified by a change of variables according to \(\Delta {c}_{0}={c}_{0}^{\alpha }-{c}_{0}^{\beta }\), \({\bar{\Phi }}_{0}=\frac{1}{2}({\Phi }_{0}^{\alpha }+{\Phi }_{0}^{\beta })\), and \(\Delta {\Phi }_{0}={\Phi }_{0}^{\alpha }-{\Phi }_{0}^{\beta }\), which yields

$$\begin{array}{ll}{\Delta}{G}_{{\rm exc},{\rm DL}}^{{\alpha}-{\beta}}({\Phi}_{E})={\underbrace{ {c}_{0}^{\beta}{\Delta}{\Phi}_{0}}_{{\Delta}{q}^{\rm net}}} \left( {\Phi}_{E} -{\bar{\Phi}_{0}}\right)-\\ \qquad\qquad\qquad-\frac{1}{2}{{\Delta}{c}_{0}}\left({\Phi}_{E} - \left({\bar {\Phi}}_{0} + \frac{{\Delta} {\Phi}_{0}}{2}\right)\right)^{2}.\end{array}$$
(14)

In this notation, \(\Delta {G}_{{\rm{exc,DL}}}^{\alpha -\beta }\) becomes very suggestive. The first term corresponds to the (average) applied potential drop across the electric double layer \(({\Phi }_{E}-{\bar{\Phi }}_{0})\) times the charge difference \(\Delta {q}^{{\rm{net}}}={c}_{0}^{\beta }\Delta {\Phi }_{0}\) necessary to bring both systems α and β to an equal work function. We denote it with the superscript net, as the term corresponds to the difference in net surface charges (8) of both systems. As shall be shown below it can also be directly related to the adsorbate dipole79 and the electrosorption valency. The second term results from a change in the capacitive energy due to different interfacial capacitances Δc0 of the two electrode configurations. Note that identical interface energy contributions were already proposed by Frumkin68 to understand electrosorption of charge-neutral species.

pH shifts of proton electrosorption peaks at platinum

Electrosorption peaks in cyclic voltammetry (CV) measurements are known to be sensitive probes of the electric double layer5,46,47. They therefore form ideal observables to assess critically the capabilities and quantitative performance of the CHE and the FGC approaches. Here, we concentrate in particular on proton electrosorption at two low-index single crystal surfaces of platinum, Pt(111) and Pt(100). For both systems, small but significant shifts of the electrosorption peaks with pH even on the RHE scale have been observed experimentally48,49,50. Such shifts go beyond what would simply be predicted by the Nernst equation and are certainly an intriguing object of study.

Within ab initio thermodynamics we approximate the electrosorption peak position5,46 as the electrode potential \({U}_{{\rm{RHE}}}^{{\rm{sorp}}}\) on the reversible hydrogen electrode (RHE) scale for which the charge-equilibrated excess energy \({{\mathcal{G}}}_{{\rm{exc}}}^{{\rm{H}}}\) of the hydrogen-covered electrode surface, with \({N}_{{\rm a}}^{{\rm{H}}}={N}_{{\rm{H}}}\) specifically adsorbed H atoms, becomes equally stable as the charge-equilibrated excess energy \({{\mathcal{G}}}_{{\rm{exc}}}^{{\rm{clean}}}\) of the pristine, clean surface

$$\Delta {{\mathcal{G}}}_{{\rm{exc}}}^{{\rm{H}}-{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp}}})={{\mathcal{G}}}_{{\rm{exc}}}^{{\rm{H}}}({U}_{{\rm{RHE}}}^{{\rm{sorp}}})-{{\mathcal{G}}}_{{\rm{exc}}}^{{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp}}})=0.$$
(15)

Electrode potentials on the absolute and on the RHE scale are hereby related as \({\Phi }_{E}={U}_{{\rm{RHE}}}+4.44\ {\rm{V}}-\frac{{k}_{{\rm{B}}}T}{e}\mathrm{ln}\,(10){\rm{pH}}\)5,9,80. Inserting the second-order expansion of \(\Delta {{\mathcal{G}}}_{{\rm{exc}}}^{{\rm{H-clean}}}\) (Eq. (11)) we thus arrive at the condition

$$\Delta {G}_{{\rm{exc,CHE}}}^{{\rm{H}}-{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp,2nd}}})+\Delta {G}_{{\rm{exc,DL}}}^{{\rm{H}}-{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp,2nd}}})=0,$$
(16)

where the first-order CHE term is

$$\Delta {G}_{{\rm{exc,CHE}}}^{{\rm{H}}-{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp}}})={G}_{{\rm{exc}},0}^{{\rm{H}}}-{G}_{{\rm{exc}},0}^{{\rm{clean}}}+{N}_{{\rm{H}}}(e{U}_{{\rm{RHE}}}^{{\rm{sorp}}}+4.44\ {\rm{eV}}-{k}_{{\rm{B}}}T\mathrm{ln}\,(10){\rm{pH}}-{\tilde \mu}_{{\rm{H}}}),$$
(17)

and the double-layer correction is

$$\begin{array}{lll}\Delta {G}_{{\rm{exc,DL}}}^{{\rm{H}}-{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp}}})&=&\Delta {q}^{{\rm{net}}}\left({U}_{{\rm{RHE}}}^{{\rm{sorp}}}+{\lambda }_{1}({\rm{pH}})\right)-\frac{1}{2}\Delta {c}_{0}{\left({U}_{{\rm{RHE}}}^{{\rm{sorp}}}+{\lambda }_{2}({\rm{pH}})\right)}^{2}\,,\\ {\rm{where}}\quad {\lambda }_{1}({\rm{pH}})&=&4.44{\rm{V}}-{\bar{\Phi }}_{0}-\frac{{k}_{{\rm{B}}}T}{e}\mathrm{ln}\,(10){\rm{pH}}\\ {\rm{and}}\quad {\lambda }_{2}({\rm{pH}})&=&{\lambda }_{1}({\rm{pH}})-\frac{\Delta {\Phi }_{0}}{2}.\end{array}$$
(18)

Here, we have specified the general variables in Eqs. (11) and (14) for proton electrosorption as qa = +e and \({\tilde{\mu }}_{{\rm{a}}}={\tilde{\mu }}_{{\rm{H}}}\), and have introduced the charge difference between the clean and H-covered surface \(\Delta {q}^{{\rm{net}}}={c}_{0}^{{\rm{clean}}}\Delta {\Phi }_{0}\), together with the extensive interfacial capacitance \({c}_{0}^{{\rm{clean}}}=2A{C}_{0}^{{\rm{clean}}}\) of the clean surface, the difference in extensive interfacial capacitances \(\Delta {c}_{0}={c}_{0}^{{\rm{H}}}-{c}_{0}^{{\rm{clean}}}\), and the difference \(\Delta {\Phi }_{0}={\Phi }_{0}^{{\rm{H}}}-{\Phi }_{0}^{{\rm{clean}}}\) and average \({\bar{\Phi }}_{0}=1/2({\Phi }_{0}^{{\rm{H}}}+{\Phi }_{0}^{{\rm{clean}}})\) of the work functions of the H-covered and clean surfaces, respectively.

Within the CHE approximation (\(\Delta {G}_{{\rm{exc,DL}}}^{{\rm{H}}-{\rm{clean}}}=0\)), the condition is readily resolved for \({U}_{{\rm{RHE}}}^{{\rm{sorp}},{\rm{CHE}}}\) by exploiting the electrochemical potential of a proton, which is given by the SHE conditions as5

$${\tilde{\mu }}_{{\rm{H}}}=\frac{\mu ({{\rm{H}}}_{2}(g))}{2}+4.44{\rm{eV}}-{k}_{{\rm{B}}}T\mathrm{ln}\,(10){\rm{pH}},$$
(19)

where μ(H2(g)) is the chemical potential of hydrogen gas at normal conditions (298 K, 1 bar). This then yields

$$\begin{array}{lll}{U}_{{\rm{RHE}}}^{{\rm{sorp}},{\rm{CHE}}}&=&-\frac{1}{e{N}_{{\rm{H}}}}\left({G}_{{\rm{exc}},0}^{{\rm{H}}}-{G}_{{\rm{exc}},0}^{{\rm{clean}}}-{N}_{{\rm{H}}}\frac{\mu({{\rm{H}}}_{2}(g))}{2}\right)\\&&\approx-\frac{1}{e}\left({\bar{E}}_{{\rm{ads}}}^{{\rm{H}}}+\Delta{F}^{{\rm{corr}},{\rm{H}}}\right),\end{array}$$
(20)

where in the second step we have followed the general approximation of Eq. (4) and introduced the average H adsorption energy \({\bar{E}}_{{\rm{ads}}}^{{\rm{H}}}\) plus the (negligibly small) free energy correction ΔFcorr,H due to the change of vibrational and configurational degrees of freedom of the adsorbed hydrogen. The CHE approximation thus essentially predicts the proton electrosorption peak on the RHE scale simply at the potential corresponding to minus the average hydrogen adsorption energy. In fact, this holds in general, i.e., the CHE approximation would always equate electrosorption and adsorption for any kind of adsorbate. This is why in the CHE literature electrosorption and adsorption are often used interchangeably.

Most importantly, Eq. (20) does not depend anymore on pH, i.e., within the CHE approximation the proton electrosorption peak does not exhibit any shifts on the RHE scale. If we were to transform \({U}_{{\rm{RHE}}}^{{\rm{sorp}},{\rm{CHE}}}\) to an absolute scale, the peak would thus shift simply as predicted by the Nernst equation, at variance with the experimental observations (cf. further below). To this end, we acknowledge that lateral interactions among the adsorbed H atoms and configurational entropy terms might introduce a variation of the average adsorption energy and free energy correction term with surface coverage9. However, this will rather lead to a broadened electrosorption peak than natively introduce a pH-dependence in \({U}_{{\rm{RHE}}}^{{\rm{sorp}},{\rm{CHE}}}\). Similarly, different interface models in the underlying DFT calculations, e.g., the surface in vacuum, in various implicit solvation models or with differing adsorbed ice-like water layers, will primarily affect only the absolute value of the calculated adsorption energy and therewith the predicted pH-independent electrosorption peak position. The only way non-Nernstian shifts can be rationalized within the CHE model is by a pH-induced change in the adsorption energy, assuming e.g., a pH dependence of the interfacial water structure, or secondary effects such as the adsorption of co-ions, as further discussed below.

In contrast, already the second-order double-layer correction \(\Delta {G}_{{\rm{exc,DL}}}^{{\rm{H}}-{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp}}})\) introduces intrinsic pH-dependencies, and leads to a quadratic equation defining \({U}_{{\rm{RHE}}}^{{\rm{sorp}},2{\rm{nd}}}\) (cf. Eqs. (16)–(18)). This quadratic equation and even more so the higher-order terms contained in the FGC approach yield therefore complex non-Nernstian shifts of electrosorption peaks on the RHE scale. As an example, we point out that already the linear term in \(\Delta {G}_{{\rm{exc,DL}}}^{{\rm{H}}-{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp}}})\) (Δqnet) effectively renormalizes the CHE peak position, while introducing an additional, linear dependence on pH as

$$\begin{array}{lll}{U}_{{\rm{RHE}}}^{{\rm{sorp}},{\rm{half}}-2{\rm{nd}}}&=&-\frac{{\bar{E}}_{{\rm{ads}}}^{{\rm{H}}}+\Delta {F}^{{\rm{corr}},{\rm{H}}}+\Delta {Q}^{{\rm{net}}}\left(4.44{\rm{V}}-{\bar{\Phi }}_{0}\right)}{e+\Delta {Q}^{{\rm{net}}}}\\&&+\left(\frac{\Delta {Q}^{{\rm{net}}}}{e+\Delta {Q}^{{\rm{net}}}}\right)\frac{{k}_{{\rm{B}}}T}{e}\mathrm{ln}\,(10){\rm{pH}},\end{array}$$
(21)

where we have introduced the per-adsorbate quantity \(\Delta {Q}^{{\rm{net}}}=\frac{\Delta {q}^{{\rm{net}}}}{{N}_{{\rm{H}}}}\). ΔQnet is largely independent of the surface coverage, given that the extensive quantity Δqnet is expected to scale approximately linearly with NH (\(\propto\Delta {\Phi }_{0}^{\alpha }({N}_{{\rm{H}}})\), see e.g., Supplementary Fig. 10). Thus, whenever ΔQnet/e is not vanishingly small, the corrections and linear pH shift of Eq. (21) become significant.

Figure 1 illustrates the performance of the various approaches, by collecting the calculated proton electrosorption peak positions on Pt(111) and Pt(100). Concentrating first on the data obtained with an electrode surface model containing 1/4 ML hydrogen coverage in the energetically most stable fcc (Pt(111)) and bridge sites (Pt(100)), respectively, we see qualitatively the same trends among the theoretical approaches on both surfaces. In contrast to the constant \({U}_{{\rm{RHE}}}^{{\rm{sorp}},{\rm{CHE}}}\) predicted by the CHE approximation, already the second-order approximation yields non-Nernstian shifts of \({U}_{{\rm{RHE}}}^{{\rm{sorp}},2{\rm{nd}}}\) at both surfaces. We note that a significant contribution to these shifts arises from the second, quadratic term in Eq. (18), i.e., from the large change in the interfacial capacitance ΔC0 upon proton electrosorption. In fact, for Pt(100), this contribution is large enough that it actually changes the shift direction from an upwards shift to higher \({U}_{{\rm{RHE}}}^{{\rm{sorp}}}\) from the linear Δqnet term only (cf. Eqs. (18) and (21) and the signs of the work function change for H on Pt in Table 1) to a small shift downwards. However, this holds, of course, only, if an implicit solvation model is used in the underlying DFT calculations as done in this work. Using a surface slab in vacuum would yield highly underestimated differential interfacial capacitances and would correspondingly then also yield only minor shifts of the electrosorption potential even within the second-order approximation.

Fig. 1: Proton electrosorption potentials \({U}_{{\rm{RHE}}}^{{\rm{sorp}}}\) for Pt(111) and Pt(100).
figure 1

Left panels: Calculated shifts within the CHE (solid line), the second-order (dashed line) and the FGC (dotted line) approach. Shown are results for 1/4 ML (red) and 1 ML (blue) hydrogen coverage on the surface. Right panels: Experimental shifts derived from works by Rizo et al. (orange squares)48 and Kamyabi et al. (black stars)49 for Pt(111), as well as Zheng et al. (orange circles)50 for Pt(100). The linear fits are guide to the eye.

Table 1 Work function (Φ0) and area-normalized interfacial capacitances (C0) at the PZC for the systems studied in the main text at the lowest (clean) and highest studied coverage θ. More data in the SI.

At both surfaces, the FGC approach yields shifts of the electrosorption potential \({U}_{{\rm{RHE}}}^{{\rm{sorp}},{\rm{FGC}}}\) that almost coincide with the second-order approximation at low pH. Towards higher pH, the two approaches then exhibit increasingly different results, with the FGC approach leading to smaller absolute shifts. These findings are consistently obtained also for other H adsorption sites and at other surface coverages (see Supplementary Figs. 59). Figure 1 illustrates this explicitly by also showing the results calculated for full ML coverage. The primary effect of changing coverage is an offset of the various \({U}_{{\rm{RHE}}}^{{\rm{sorp}}}\), as expected from the different average H adsorption energies. \({U}_{{\rm{RHE}}}^{{\rm{sorp}},2{\rm{nd}}}\) and \({U}_{{\rm{RHE}}}^{{\rm{sorp}},{\rm{FGC}}}\) exhibit only small changes of their slope and curvature. This is in agreement with the often rigid shift of experimental CV peaks at overall unaltered shape5. From the above derivations, we see that this will occur whenever the change of work function and interfacial capacitance scales approximately linearly with the surface coverage. Then the double-layer correction \({G}_{{\rm{exc,DL}}}^{{\rm{H}}-{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp}}})\) will scale similarly with NH as the CHE term \({G}_{{\rm{exc,CHE}}}^{{\rm{H}}-{\rm{clean}}}({U}_{{\rm{RHE}}}^{{\rm{sorp}}})\), and the pH terms in the overall condition for \({U}_{{\rm{RHE}}}^{{\rm{sorp}},2{\rm{nd}}}\), Eq. (16), become coverage independent. Such a behavior can be expected for most adsorbates, whenever adsorbate-induced work function changes derive from local dipoles and capacitance variations from local alterations of the capacitance.

While the comparison of the various theoretical approaches sketches a rather consistent picture for both Pt(111) and Pt(100), clear differences arise in Fig. 1 in the comparison to the existing experimental data48,49,50. For Pt(111), the non-Nernstian shift of the proton electrosorption peak is reproduced very nicely by the FGC approach. Even though this holds also for the absolute positions, we note that this comparison is less well-defined. First, we infer only approximately the absolute experimental positions from the better resolved half peak-currents of the CVs in refs. 48,49. (see also Supplementary Fig. 11). Second, absolute theoretical positions are sensitively affected by the employed approximate DFT exchange-correlation functional, through the change in the H adsorption energy. The good agreement reached with the PBE functional could thus be partially fortuitous as discussed further below. More important is the fact that the FGC approach yields non-Nernstian shifts of the correct sign and order of magnitude without having to invoke a pH-dependent change of the adsorption energy. To this end, it is important to point out that a previous theoretical CHE study by Karlberg et al.46 found no impact on the adsorption energy upon application of an electrostatic field and inclusion of explicit interfacial water molecules. In contrast, most recent results from ab initio molecular dynamics suggest a small influence of explicit water on average adsorption energies81. Nevertheless, even such refined dynamical simulations on neutral slabs, i.e., remaining at the CHE-level in terms of electrode charge equilibration, could not explain the non-Nernstian pH shifts of \({U}_{{\rm{RHE}}}^{{\rm{sorp}}}\) at this surface. We therefore believe that the rationalization of these shifts within the FGC approach is indeed correct for the right reason, i.e., that the appropriate account of charge equilibration in the FGC scheme is key to describe proton electrosorption here.

On Pt(100) the performance of the FGC approach as measured by the existing experimental data is not as good. The peak position is significantly misaligned and the non-Nernstian shift with pH is predicted in the wrong direction and with wrong magnitude. The FGC approach predicts an almost negligible shift, in contrast to experiments where the magnitude of the shift is of comparable size as at Pt(111), just in the opposite direction. As already pointed out, the misalignment is most likely related to the exchange-correlation functional. A reevaluation of \({U}_{{\rm{RHE}}}^{{\rm{sorp}},{\rm{CHE}}}\) with the revPBE functional82,83 yields, for instance, a peak position lowered by 140 meV to 0.33 V, which agrees very well with the average experimental position. At the same time though, this functional would also lower the predicted Pt(111) peak position by 130 meV and thus worsen the apparent agreement with experiment for this surface. Accepting a typical ±200 meV uncertainty of GGA-level absolute adsorption energies, the truly critical point assessing the description of the electrochemistry are therefore not the absolute positions, but the non-Nernstian shifts of the electrosorption peaks. To this end, the inability of our calculations to describe the experimental pH shifts at Pt(100) are most likely related to the absence of the explicit water structure in the present calculations. As shown convincingly in a recent study by Cheng et al.84, an increasing distance between metallic surface and interfacial water for higher pH values lead to a decrease in the adsorption energy and thereby to a peak shift of correct magnitude on the RHE scale. In general, any such influence of surface-specific interfacial water58,59,85,86,87,88,89,90,91,92 can not be captured in calculations based only on implicit solvation. This highlights that present-day FGC calculations still need to be seen as a numerically efficient approximation—that as a next step might need to be refined by appropriately extending them to mixed explicit/implicit solvation models39,58. We also note in passing that Pt(100) has no proper double layer region (co-adsorbed H, OH)49; co-ion effects might thus also contribute to the overall pH-shift on the RHE scale93. As such, proton electrosorption will remain an intriguing test system for future more explicit calculations to address the complexity of the interface.

Electrosorption valencies of halide ions at Ag(111)

Electrosorption valencies are another fundamental and, as we shall see, closely related concept in the context of electrosorption in interfacial electrochemistry51,52. The electrosorption valency la (or formal charge number77) denotes the number of electrons that flows onto the electrode upon electrosorption of one adsorbate a at applied potential ΦE. While some debate exists of how to actually measure la or relate it to other concepts like partial charge transfer51,52,53,54,70,71,72,73,74,75,76,77,78, la is a well-defined thermodynamic quantity. According to the Lippmann equation47,65, the electronic surface charges are given by the derivative of the interface energy with respect to the applied potential. Within the present ab initio thermodynamics framework, this definition translates to obtaining the absolute number of electrons \({N}_{e}^{\alpha ,{\rm{abs}}}({\Phi }_{E})\) of an electrode configuration α from the derivative of the charge-equilibrated excess energy \({{\mathcal{G}}}_{{\rm{exc}}}^{\alpha }({\Phi }_{E})\) with respect to ΦE,

$${N}_{e}^{\alpha ,{\rm{abs}}}({\Phi }_{E})=\frac{1}{e}\frac{\partial {{\mathcal{G}}}_{{\rm{exc}}}^{\alpha }({\Phi }_{E})}{\partial {\Phi }_{E}}.$$
(22)

Without loss of generality, we will focus here again on a symmetric slab setup, where on each of the two identical surfaces one adsorbate a electrosorbs to an empty site of an electrode configuration α characterized by Na adsorbates of the same type and at the same site type. This results in a new electrode configuration with 2(Na + 1) adsorbates (and, as before, without changing the number of substrate atoms Ns). The electrosorption valency of this process is then

$$\begin{array}{lll}{l}_{{\rm{a}}}({\Phi }_{E})=\frac{1}{2}\left[{N}_{e}^{2({N}_{{\rm{a}}}+1),{\rm{abs}}}({\Phi }_{E})-{N}_{e}^{2{N}_{{\rm{a}}},{\rm{abs}}}({\Phi }_{E})\right]\\\qquad\quad =\frac{1}{2e}\frac{\partial }{\partial {\Phi }_{E}}\Delta {{\mathcal{G}}}_{{\rm{exc}}}^{2({N}_{{\rm{a}}}+1)-2{N}_{{\rm{a}}}}({\Phi }_{E}),\end{array}$$
(23)

where the factor 1/2 renormalizes the symmetric slab setup. If we insert the general second-order expansion (Eqs. (11) and (14)), the electrosorption valency can again be separated into a CHE and a DL part

$${l}_{{\rm{a}}}({\Phi }_{E})={l}_{{\rm{a}}}^{{\rm{CHE}}}+{l}_{{\rm{a}}}^{{\rm{DL}}}({\Phi }_{E})$$
(24)
$$=\frac{{q}_{{\rm{a}}}}{e}+\left[\frac{\Delta {q}^{{\rm{net}}}}{2e}-\frac{\Delta {c}_{0}^{2{N}_{{\rm{a}}}}}{2e}\left({\Phi }_{E}-{\Phi }_{0}^{2({N}_{{\rm{a}}}+1)}\right)\right].$$
(25)

At the CHE level we recover the assumption dictated by charge-neutrality that each adsorbed ion of charge qa drags qa/e electrons onto the surface. The electrosorption valency is thus purely given by the formal ionic charge: it is a constant integer number, independent of the applied potential and surface structure or composition. This simplification is lifted by the two-term DL correction. The first potential-independent term renormalizes the formal ionic charge by the charge difference \(\Delta {q}^{{\rm{net}}}={c}_{0}^{2{N}_{{\rm{a}}}}\Delta {\Phi }_{0}\) and therewith allows for non-integer electrosorption valencies. The second term introduces an explicit potential dependence. To this end, it is important to point out that in this derivation both DL correction terms formally contain extensive differential capacitances. However, the intensive electrosorption valency is still well defined, as we consider the idealized situation where only one adsorbate electrosorbs on each side of the symmetric electrode slab.

This is further clarified when switching to a mean-field picture that characterizes the adsorbate layer only in terms of the surface coverage θ = Na*Asite/A, where Asite is the crystallographically determined surface area per adsorption site. This allows to describe the finite change in adsorbate numbers in terms of changing coverage, e.g.,

$$\Delta {q}^{{\rm{net}}}=2A{C}_{0}^{2{N}_{{\rm{a}}}}({\Phi }_{0}^{2({N}_{{\rm{a}}}+1)}-{\Phi }_{0}^{2{N}_{{\rm{a}}}})\approx 2A{C}_{0}^{2{N}_{{\rm{a}}}}\frac{{\rm{d}}{\Phi }_{0}^{{N}_{{\rm{a}}}}}{{\rm{d}}{N}_{{\rm{a}}}}=2{A}_{{\rm{site}}}{C}_{0}^{\theta }\frac{{\rm{d}}{\Phi }_{0}^{\theta }}{{\rm{d}}\theta }.$$
(26)

This expression then contains only intensive quantities: Asite, the differential capacitance \({C}_{0}^{\theta }\), and the derivative of the work function with respect to θ. In this formulation, the DL-correction to the electrosorption valency becomes

$${l}_{{\rm{a}}}^{{\rm{DL}}}({\Phi }_{E},\theta)=\frac{1}{e}\left[\overbrace{{C}_{0}^{\theta}\underbrace{{A}_{{\rm{site}}}\frac{{\rm{d}}{\Phi }_{0}^{\theta}}{{\rm{d}}\theta }}_{ = -\frac{1}{{\epsilon}_{0}}{d}_{z}}}^{\Delta {Q}^{{\rm{net}}}} -{A}_{{\rm{site}}}\frac{{\rm{d}}{C}_{0}^{\theta }}{{\rm{d}}\theta }\left({\Phi }_{E}-{\Phi }_{0}^{\theta }\right)\right],$$
(27)

i.e., in essence a charge per adsorbate necessary to keep the work function constant upon electrosorption. ΔQnet is identical to the term introduced before in the discussion of linear pH shifts for proton electrosorption in Eq. (21), where the derivative was approximated by the average change per adsorbate. Considering that \(\frac{{\rm{d}}{\Phi }_{0}^{\theta }}{{\rm{d}}\theta }=-\frac{1}{{\epsilon }_{0}{A}_{{\rm{site}}}}{d}_{z}\) can be related to the normal component of the adsorbate dipole dz79 (with electrochemical sign convention), we recognize that the terms in Eq. (27) are closely related to the dipolar and capacitive contributions to the electrosorption valency that are recurrently discussed in classical electrochemistry works47,51,52,94,95. In fact, the relation between dz and la is identically reported by Schmickler95.

To illustrate the effects of the DL corrections, we consider the electrosorption of halide ions (Cl, Br, I) on Ag(111) in the low-coverage regime. The experimentally well-established increase of their electrosorption valencies with increasing Pauling electronegativity53,54, i.e., \({l}_{{\rm{I}}}^{\exp }<{l}_{{\rm{Br}}}^{\exp }<{l}_{{\rm{Cl}}}^{\exp }\), up to values that are only a fraction of the formal charge of −1, poses a challenging test case. While the electrosorption valency is generally a function of applied potential and coverage (cf. Eq. (27) for the DL correction), we focus here on the la values in the coverage range up to 1/3 ML, at a given fixed potential. Specifically, we choose a potential value for which Foresti et al. observe ordered halide overlayers corresponding to 1/3 ML54. After correcting for the underestimation of the PZC of Ag(111) with the current solvent parameters (−0.42 eV), we have: ΦE(I) = 4.0 V, ΦE(Br) = 4.1 V and ΦE(Cl) = 4.1 V. Interpolation of \({\Phi }_{0}^{\theta }\) and \({C}_{0}^{\theta }\) computed at coverages between 1/12 an 1/3 ML (see Supplementary Figs. 12 and 13) allows to determine the derivatives in Eq. (27) and therefore the double-layer correction to the electrosorption valencies. Figure 2 provides the corresponding valencies, computed with the CHE approximation, with the full second-order double-layer correction and only considering the second-order ΔQnet term. By construction, the CHE approximation yields the formal charge −1 for the entire halide ion series. Instead, the second-order terms introduce varying non-integer values which vary with coverage. To this end, it is important to note that the extrapolations of the corresponding lines to the limit θ → 0 do not coincide with the CHE results, supporting the fundamental differences between FGC and CHE calculations also for individual adsorbates in the limit of infinite cell size. In this respect, it is reassuring to see that already the consideration of the second-order ΔQnet term reproduces the expected trend of the computed electrosorption valencies with the Pauling electronegativity over the entire low-coverage range. This also extends to the full DL correction, but the actual values obtained depend then on the chosen applied potential (cf. Eq. (27)). Deferring a detailed comparison to experimental data to a forthcoming publication, we include in Fig. 2 measured “integral” electrosorption valencies for low coverages54. Also in light of the large uncertainties of different measurement methods53,54, the agreement obtained with the DL corrected calculations is very encouraging, and confirms the importance of FGC approaches toward a reliable first-principles description of electrified interfaces.

Fig. 2: Electrosorption valencies for halide ions in the low-coverage regime on the fcc sites of Ag(111) at a fixed potential (ΦE(I) = 4.0 V, ΦE(Br) = 4.1 V and ΦE(Cl) = 4.1 V, see text).
figure 2

The valencies lθ are calculated with the CHE approximation (solid black lines), the full second-order double-layer (DL) correction (dotted blue lines) and the second-order ΔQnet term (dashed red lines) (see Eqs. (25) and (27)). Experimental “integral” electrosorption valencies for the low-coverage regime are from Foresti et al.54 (orange stars).

Discussion

Ab initio thermodynamics offers a computationally efficient and ideally predictive access to questions in interfacial electrochemistry. In the CHE approximation it enjoys high popularity, in particular in applications to electrocatalysis. In this work, we used electrosorption as a fundamental elementary step in electrocatalysis to compare this approach to FGC ab initio thermodynamics. The present analysis underscores the importance of double-layer charging, missing in the zero net-charge CHE approach. In the context of electrosorption this manifests itself in the ability to describe non-Nernstian pH-shifts of electrosorption peaks and non-integer electrosorption valencies; both effects can be captured at the variable-charge FGC level. As evaluated against existing experimental data for proton electrosorption at Pt electrodes, and halide ion electrosorption at Ag electrodes, the present first-principles description yields in general results closer to experiment than pure CHE calculations and is partly already semi-quantitative. Analysis of a second-order approximation to the FGC energetics allows to rationalize the relevance of the potential of zero charge, the interfacial capacitance, and work function shifts induced by adsorbates e.g., through their dipoles. All the expressions derived here for the electrochemical stability of adsorbates and their electrosorption valencies are in agreement with classical electrochemistry works47,51,52,53,68,69,70,71,72,73,74,75,76,77,78,94,95, closing the gap between phenomenological and first-principles treatments of electrified interfaces.

On a more practical level, the analysis with the second-order model provides clear insight into the limitations of zero-charge calculations and guidelines for their usage:

  • Increased deviations of the CHE energetics from FGC results are expected whenever the electrode potentials ΦE considered are significantly different from the potential of zero charge Φ0, as the correction terms scale with (ΦE − Φ0).

  • Energetic differences between CHE and FGC calculations are proportional to the magnitude of the interfacial capacitance C0; CHE energetics thus becomes problematic for high electrolyte concentrations with large C0 values. Furthermore, a non-negligible influence of the electrolyte chemistry can be expected, due to ion-specific interfacial capacitances96,97. DFT slab calculations in vacuum underestimate C0 significantly and do therefore not allow to assess the effects of an applied potential.

  • Major differences between CHE and FGC calculations will occur for adsorbates with significant dipole moments, whenever the work function change per adsorbate is large. This is in line with other studies30,40 and was noted early7,98.

The improved description at the FGC level comes at a somewhat increased computational cost. This does not so much refer to the actual DFT calculations themselves, thanks to efficient implementations of current implicit solvation models. Instead, it refers to the larger number of DFT calculations of the system in different charge states. Depending on the specific application this may typically mean ~10 times more calculations. While this will typically not be prohibitive, we note that the number of calculations required to determine the quantities for the second-order model is generally smaller, as it only includes parameters obtained at the PZC, namely adsorption energies, \({\Phi }_{0}^{\alpha }\) and the interfacial capacitance \({C}_{0}^{\alpha }\). Considering the success of this model in describing the electrosorption phenomena studied in this work, calculations at this level might therefore be an appealing intermediate option for systems where computational cost is truly limiting. Having said this, we emphasize that the remaining inaccuracies of FGC calculations can still be significant. Notable factors are the approximate DFT exchange-correlation functional and their errors in adsorption energies, the neglect of explicit water58,59,86, or missing co-ions93. In addition, the present analytical derivations indicate that discrepancies between all-implicit and all-explicit interfacial capacitances39,55,92,99 and work functions58 can have an impact as well. We expect many of these limitations to be overcome by FGC-type schemes with implicit/explicit hybrid descriptions of interfacial water, an approach we will pursue in the future.

Methods

DFT calculations

All DFT calculations reported below are performed with the Quantum ESPRESSO package100 (PWscf), the PBE exchange-correlation functional101 and pseudopotentials from the SSSP library102 (v0.7, PBE, efficiency) with density and wave function cutoffs of 360 and 45 Ry, respectively. The two systems, H on Pt and halide ions on Ag are studied in a periodic, symmetric slab setup with substrate and adsorbate degrees of freedom described explicitly. For Pt we use (2 × 2) cells with 7 and 8 Pt layers for the (111) and (100) surfaces, respectively; for Ag(111) we use a (\(\sqrt{12}\times \sqrt{12}\)) supercell consisting of 6 Ag layers. Slabs are separated by ≈17 Å. Brillouin zone integrations are performed using Γ-centered Monkhorst-Pack meshes (Pt: (10 × 10 × 1), Ag: (4 × 4 × 1)) and a cold smearing103 of 0.01 Ry (Pt) or 0.02 Ry (Ag), yielding a numerical accuracy better than 1 meV/Å2 in the interface energies.

As implicit solvation model we use the SCCS implementation of ENVIRON18,36,104,105 with optimized interfacial parameters (\({\rho }_{\min }=0.0013,{\rho }_{{\rm{max}}}=0.01025\), α = β = γ = 0) and a Helmholtz-layer representation of the electrolyte via planar counter charges. For this setup, good agreement is found between experimentally measured and predicted PZCs, interfacial capacitances, and electrosorption behavior for Pt electrodes, as reported in earlier work5. In particular, the work function—when determined as the energy difference between the Fermi level and the flat electrostatic potential in the implicit region—and the electrode potential ΦE on the absolute scale are identical, which is why all electrochemical potentials (ionic and electronic) in this work are expressed on the absolute scale.

As reference energies for the adsorbates we use the Gibbs free energies of the diatomic molecules (p = 1 bar, T = 298 K) in vacuum including the vibrational and rotational degrees of freedom. The free energy corrections ΔFcorr are determined as the Helmholtz free energy contributions due to coverage-independent vibrations of the adsorbed species (calculated via finite-differences), neglecting small configurational entropy contributions. Specifically, in the case of H@Pt we thus discriminate only between hollow and bridge sites with the (111)-fcc and (100)-bridge vibrations for 0.25 monolayer (ML) coverage taken as per-adsorbate values.

For the determination of the charge-equilibrated excess energies, we optimize the geometries for the interfacial candidate structures for a set of finite surface charges \({N}_{e}^{{\rm{net}}}\) (≥9 values centered around 0) and evaluate their work functions Φα and total energies \({E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }\), as exemplified in Fig. 3a for the case of H at fcc sites on Pt(111). Values are chosen to sample a potential range of ~4–5 V around the PZC (\({N}_{e}^{{\rm{net}}}=2A{C}_{0}({\Phi }_{E}-{\Phi }_{0})\) with C0 ≈30 μF/cm2) for H on Pt, and in a smaller range of ~2 V for the halide systems. As described above and more thoroughly in ref. 5, charge-equilibrated excess energies \({{\mathcal{G}}}_{{\rm{exc}}}^{\alpha }\) (dots in Fig. 3c) can then be obtained directly for the set of electrode potentials ΦE, which correspond to the obtained set of work functions \({\Phi }^{\alpha }({N}_{e}^{{\rm{net}},\alpha })\). This involves evaluation of Eq. (1) with the described approximations and for the DFT energies with corresponding surface charges \({E}_{{\rm{surf}}}^{{\rm{DFT}},\alpha }\left({N}_{e}^{{\rm{net}},\alpha }({\Phi }^{\alpha })\right)\) (dots in Fig. 3a). The lines in Fig. 3 correspond to polynomial interpolations using the data of the studied set of charges. The close agreement between a second-order model and the FGC results for this system are supported by the reported residuals in Fig. 3b, and the accurate parabolic interpolation in Fig. 3c (error ~1 meV/Å2) (see also Supplementary Figs. 14). The interfacial capacitances follow directly from the second derivative of the interpolant (cf. Eq. (9)). Table 1 reports work functions Φ0 and area-normalized interfacial capacitances C0 for the systems studied in the main text, at the lowest and highest coverage. Values for other coverages and adsorption sites are reported in the Supplementary Tables 14.

Fig. 3: Area-normalized interface energetics of pristine and H(fcc)-covered Pt(111) as obtained within the SCCS implicit solvation model.
figure 3

Dots are the DFT calculated values, lines are polynomial interpolations. a Calculated total energy vs. system charge \({N}_{e}^{{\rm{net}}}\) including a second-order polynomial fit. b Fit residues for a second- and fifth-order fit. c Charge-equilibrated excess energies \({{\mathcal{G}}}_{{\rm{exc}}}^{\alpha }({\Phi }_{E})/2A\) for clean and H(fcc)-covered Pt(111) at applied electrode potential ΦE for pH = 0, including second-order fits.