ELECTRODE: An Electrochemistry Package For LAMMPS: March 2022

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/359574749

ELECTRODE: An electrochemistry package for LAMMPS

Preprint · March 2022

CITATIONS READS
0 98

3 authors:

Ludwig Ahrens-Iwers Shern Ren Tee


Technische Universität Hamburg The University of Queensland
3 PUBLICATIONS   17 CITATIONS    15 PUBLICATIONS   212 CITATIONS   

SEE PROFILE SEE PROFILE

Robert Horst Meißner


Technische Universität Hamburg
49 PUBLICATIONS   962 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Green corrosion inhibitors View project

DNA nanowalkers View project

All content following this page was uploaded by Shern Ren Tee on 18 April 2023.

The user has requested enhancement of the downloaded file.


ELECTRODE: An electrochemistry package
for atomistic simulations
Cite as: J. Chem. Phys. 157, 084801 (2022); https://doi.org/10.1063/5.0099239
Submitted: 16 May 2022 • Accepted: 25 July 2022 • Accepted Manuscript Online: 25 July 2022 •
Published Online: 25 August 2022

Ludwig J. V. Ahrens-Iwers, Mathijs Janssen, Shern R. Tee, et al.

ARTICLES YOU MAY BE INTERESTED IN

Fully periodic, computationally efficient constant potential molecular dynamics simulations


of ionic liquid supercapacitors
The Journal of Chemical Physics 156, 184101 (2022); https://doi.org/10.1063/5.0086986

Computing chemical potentials of solutions from structure factors


The Journal of Chemical Physics 157, 121101 (2022); https://doi.org/10.1063/5.0107059

Evaluation of the constant potential method in simulating electric double-layer capacitors


The Journal of Chemical Physics 141, 184102 (2014); https://doi.org/10.1063/1.4899176

J. Chem. Phys. 157, 084801 (2022); https://doi.org/10.1063/5.0099239 157, 084801

© 2022 Author(s).
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

ELECTRODE: An electrochemistry
package for atomistic simulations
Cite as: J. Chem. Phys. 157, 084801 (2022); doi: 10.1063/5.0099239
Submitted: 16 May 2022 • Accepted: 25 July 2022 •
Published Online: 25 August 2022

Ludwig J. V. Ahrens-Iwers,1 Mathijs Janssen,2 Shern R. Tee,3,a) and Robert H. Meißner4 , 5,b)

AFFILIATIONS
1
Institute of Advanced Ceramics, Hamburg University of Technology, Hamburg, Germany
2
Mechanics Division, Department of Mathematics, University of Oslo, N-0851 Oslo, Norway
3
Australian Institute for Bioengineering and Nanotechnology, The University of Queensland, Brisbane, Queensland, Australia
4
Institute of Polymers and Composites, Hamburg University of Technology, Hamburg, Germany
5
Helmholtz-Zentrum Hereon, Institute of Surface Science, Geesthacht, Germany

a)
Electronic mail: [email protected]
b)
Author to whom correspondence should be addressed: [email protected]

ABSTRACT
Constant potential methods (CPMs) enable computationally efficient simulations of the solid–liquid interface at conducting electrodes
in molecular dynamics. They have been successfully used, for example, to realistically model the behavior of ionic liquids or water-in-
salt electrolytes in supercapacitors and batteries. CPMs model conductive electrodes by updating charges of individual electrode atoms
according to the applied electric potential and the (time-dependent) local electrolyte structure. Here, we present a feature-rich CPM imple-
mentation, called ELECTRODE, for the Large-scale Atomic/Molecular Massively Parallel Simulator, which includes a constrained charge
method and a thermo-potentiostat. The ELECTRODE package also contains a finite-field approach, multiple corrections for nonperiodic
boundary conditions of the particle–particle particle–mesh solver, and a Thomas–Fermi model for using nonideal metals as electrodes.
We demonstrate the capabilities of this implementation for a parallel-plate electrical double-layer capacitor, for which we have investi-
gated the charging times with the different implemented methods and found an interesting relationship between water and ionic dipole
relaxations. To prove the validity of the one-dimensional correction for the long-range electrostatics, we estimated the vacuum capaci-
tance of two coaxial carbon nanotubes and compared it to structureless cylinders, for which an analytical expression exists. In summary,
the ELECTRODE package enables efficient electrochemical simulations using state-of-the-art methods, allowing one to simulate even hetero-
geneous electrodes. Moreover, it allows unveiling more rigorously how electrode curvature affects the capacitance with the one-dimensional
correction.
© 2022 Author(s). All article content, except where otherwise noted, is licensed under a Creative Commons Attribution (CC BY) license
(http://creativecommons.org/licenses/by/4.0/). https://doi.org/10.1063/5.0099239

I. INTRODUCTION (CPM) molecular dynamics (MD) results are often significantly


different from those obtained with uniformly charged electrodes.6
A common approach to treat electrodes in atomistic simu- While the CPM7,8 is a popular tool for modeling metal elec-
lations is to assume them to be uniformly charged walls, either trodes by dynamically updating individual charges on electrode
structureless or atomically resolved. In the case of equilibrium elec- atoms, alternatives such as image charge methods9–12 are commonly
trolytes near planar electrodes at low charge densities, this approach used to enforce a constant potential for planar electrodes. While
is known to capture the electrochemical properties well. Several one of these methods can handle nonplanar surfaces by induc-
studies, however, have emphasized the importance of polarization ing a charge density on the interface between two media, most of
of electrodes by the ions and molecules in their vicinity.1–5 In them are limited to planar electrodes.12 Those approaches faithfully
more realistic electrochemical scenarios, constant potential method reproduce the behavior of electrolytes near electrodes, particularly

J. Chem. Phys. 157, 084801 (2022); doi: 10.1063/5.0099239 157, 084801-1


© Author(s) 2022
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

the correlation between thermal fluctuations in the electrolyte near particles (both with electrolyte particles, and with other electrode
the electrode and the induced-charge polarization of the electrode, particles). While the former are treated with regular force field
while obtaining a realistic picture of the electrical double-layer. A approaches, the last term is given a somewhat special treatment.
CPM MD simulation is able to capture the temporal response in U elec , i.e., without electrolyte–electrolyte interactions, is written in
the buildup and breakdown of electric double-layer and, thereby, terms of an electrode charge vector q comprising all electrode
allows realistic capacitor charging and discharging curves to be charges as
generated in silico.6,13–15 Interestingly, near highly charged planar
electrodes16–18 and nonplanar electrodes (such as curved substrates 1
or nanoporous carbons),6,19–25 CPM MD and Monte Carlo simula- Uelec ({r}, q) = qT Aq − bT ({r})q − vT q, (2)
2
tions26 yield a spatially specific charge polarization and a nontrivial
electrolyte structure. with a matrix A, and vectors b and v, where b depends on the elec-
Here, we present a package for treating electrodes in MD simu- trolyte positions {r}. The applied potential v has an entry for every
lations that interfaces with the Large-scale Atomic/Molecular Mas- electrode atom. The interactions between electrode atoms are rep-
sively Parallel Simulator (LAMMPS).27 Our ELECTRODE package resented by A, called elastance matrix due to the analogy between a
uses the highly parallelized and efficient computational infrastruc- vacuum capacitor and a spring. If the electrode atoms do not move,
ture of LAMMPS and allows interaction with many other packages A can be precomputed, allowing significant computational savings.
and features already available in LAMMPS. This work builds, in The electrolyte vector b({r}) represents the electrostatic potential
part, on an earlier work in which we showed how a particle–particle on each electrode atom due to the electrolyte atoms.
particle–mesh (P3 M)-based calculation makes the electrostatic cal- At each step, q is updated to minimize the Coulombic energy
culations of a CPM simulation more efficient.28 In addition to contribution U elec , possibly subject to additional constraints. The
some new improvements to the CPM, this implementation provides desired energy-minimizing charge vector q∗ is straightforward to
a constrained charge method (CCM) and a thermo-potentiostat calculate,34
(TP).29 To capture the electronic response of nonideal metals, a
Thomas–Fermi (TF) model30 is included. Both an Ewald and a P3 M q∗ = A−1 [b({r}) + v]. (3)
k-space solver are available for various constraints of periodicity of
Here, the elastance has been inverted to yield A−1 , which is called
the systems, such as infinite slabs, cylinders, or fully 3D periodic sys-
tems. The ELECTRODE package also contains the closely related
the capacitance matrix in light of its role in Eq. (3): The response
finite field (FF)31 and finite displacement (FD)32 methods, which
of the charge vector q∗ can calculated as the product of the capac-
extend CPM MD with a slab geometry to fully periodic boundary
itance matrix with the vector of external potentials, analogously to
conditions for increased computational efficiency.33
the well-known scalar equation Q = CV linking the capacitance C to
A list of features in the ELECTRODE package is presented in
the charge Q.
Sec. II, including a brief description of their theoretical background.
Provided that the electrode atom positions and, thus, the vac-
In Sec. III, we summarize the concept of CPM MD using data from
uum capacitance are constant, the main computational burden is
various CPM MD runs and rationalize it based on the charging times
the calculation of b({r}) at every time step, which is necessary due
of an electrical double-layer capacitor. We discuss briefly for which
to the motion of the electrolyte. The primary purpose of ELEC-
situation each approach is suitable and give an overview of future
TRODE is to compute the electrode–electrolyte interaction in b
development directions and possible applications in Sec. IV.
efficiently and to update the electrode charges accordingly. Alter-
natively, the electrode charges could be obtained with the conjugate
II. FEATURES gradient method, which solves the minimization problem without
matrix inversion.35,36 Yet another approach is to treat the elec-
A. Constant potential method trode charges as additional coordinates and perform mass-zero
In atomistic electrochemical simulations, the system of interest constrained dynamics for them.37
is often a fluid electrolyte confined between two electrodes (cf. inset In MD with periodic boundary conditions, the simulation cell
of Fig. 2). This could serve as an in silico nanoscale model of a capac- ideally is charge neutral. Scalfi et al.34 showed that this constraint
itor, to optimize some metric, such as energy or power density, by could be imposed by using the symmetric matrix
modifying the electrolyte composition or electrode structure.
The distinctive feature of CPM MD is the calculation of elec- A−1 eeT A−1
S ≡ A−1 − , eT = (1, . . . , 1) (4)
trode charges keeping electrodes at a desired electrostatic potential. eT A−1 e
To achieve this, we first partition the potential energy, U, of an MD
simulation as follows: as capacitance matrix instead of A−1 .
Nonideal metallic electrodes have been recently modeled by
U = Unon−Coul + Uelyt + Uelec. (1) Scalfi et al.30 using a semiclassical TF approach. We have imple-
mented this promising approach in our ELECTRODE package, as
its implementation is very similar to the self-interaction correction
Here, U non-Coul includes all non-Coulombic interactions, U elyt of the Ewald summation38 and contains only a single summation
includes all Coulombic interactions between electrolyte particles, over the electrode atoms. An interesting alternative to effectively
and U elec includes all Coulombic interactions involving electrode model a wide range of materials between insulator and ideal metal

J. Chem. Phys. 157, 084801 (2022); doi: 10.1063/5.0099239 157, 084801-2


© Author(s) 2022
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

was proposed by Schlaich et al.39 and involved using a virtual TF estimate q˜∗b , Eq. (7) is solved for ṽ, which is then applied using
fluid within the electrodes. However, the virtual TF fluid approach the CPM. This results in an energy minimization with respect to
appears computationally more expensive. Both models require free the charge distribution with a constraint on the total electrode
parameters, most crucially the TF length, lTF , in Scalfi et al.30 and charges. Analogous to how constant volume and constant pressure
(a rather artificial) parameterization of the virtual TF fluid in the simulations can be thermodynamically equivalent, CCM and CPM
approach of Schlaich et al.39 Further, assumptions such as atom- simulations will give the same capacitances under suitable condi-
centered densities prohibit effects such as quantum spillover and tions. However, a thorough proof of that assertion is out of scope
delocalization of the image plane. It should be noted that ELEC- of this work and will be discussed in an upcoming work.
TRODE provides a more flexible implementation of the TF model,
allowing heterogeneous electrodes with different lTF for different D. Simulating electrodes with a thermo-potentiostat
atom types. For more general information on CPM MD approaches,
Deißenbeck et al.29 recently presented a thermo-potentiostat
the interested reader is referred to the excellent and thorough
(TP) that takes into account the fluctuation–dissipation relation of
review of current electrode–electrolyte simulations by Scalfi et al.,40
electrode charges at a given voltage and temperature in an elec-
the well-written theory part of MetalWalls,41 or the thesis of
tronic circuit. They have also provided a TP implementation based
Gingrich.42
on a uniform charge distribution using the scripting capability of
LAMMPS.27 The ELECTRODE package provides an implementa-
B. Simulating an arbitrary number of electrodes tion that minimizes the energy with respect to the charge distri-
A CPM MD simulation is typically performed with two elec- bution and conforms to the formalism described by Deißenbeck
trodes, which means there are only two possible values for each et al.29 Our TP approach is currently limited to only two elec-
of the n components of the potential in Eq. (2). In the ELEC- trodes, and instead of a vector of applied potentials ṽ, a potential
TRODE package, an arbitrary number N of electrodes is allowed difference
with every electrode atom belonging to exactly one electrode. We
define an electrode-wise indicator vector gα for every electrode α Δv0 = vtop − vbot (8)
with n entries, which are equal to 1 if the respective electrode
particle belongs to that electrode and 0 otherwise. The indicator between two electrodes is used. At every time step, the potential
matrix difference Δv(t) between the two electrodes is evaluated to find the
new capacitor charge according to
G = [g1 g2 ⋅⋅⋅ gN ] (5)
q(t + Δt) = q(t) − C0 [Δv(t) − Δv0 ](1 − e−Δt/τv )

comprising the indicator vectors of all N electrodes allows us to
+ X kB Tv C0 (1 − e−2Δt/τv ). (9)
connect electrode-wise quantities to particle-wise quantities. From
hereon, we use tildes for electrode-wise quantities. For instance, we
define ṽ as the electrode-wise potential and use it to write the poten- Here, kB is the Boltzmann constant, τ v and T v are parameters of the
tial v = Gṽ. Likewise, energy-minimizing charges q∗ for a given set TP, and X is a normally distributed random number with a mean
of electrode-potentials are of 0 and a standard deviation of 1. The vacuum capacitance C0 is
obtained from the capacitance matrix34 and the effective potential
Δv(t) is computed from the electrode charges and the electrolyte
q∗ = S(b + v) = Sb + SGṽ. (6) configuration [cf. Eq. (7)]. Hence, all quantities required to evaluate
Eq. (9) are readily available in the CPM. The obtained capacitor
charge ±q(t + Δt) is applied using the CCM on both electrodes,
C. Simulating electrodes at specified total charge respectively.
In the CCM, the user sets the electrode-wise total charge q̃ ∗
for each electrode. Such a fixed-charge setup corresponds to an E. Simulations with different periodicity
open-circuit configuration.43 This type of simulation has recently The Ewald summation commonly assumes periodic boundary
been attempted as a variation of the finite-field method.32 Therein, conditions in all three directions and has to be modified for systems
it was found that ramping the total charge up or down over with slab and one-dimensional periodic geometries. As shown by
time could be considered computational amperometry, and a faster Smith,44 a regular 3D Ewald summation for slab-like systems, which
nonequilibrium response was observed. are periodic in the xy-plane but confined in the z-direction, results
Working with the capacitance matrix A−1 rather than the sym- in a dipole term,
metrized matrix S (since charge neutrality is explicitly enforced by
the appropriate choice of q̃ ∗ ), we have the following: J 2D (M) =
2π 2
Mz . (10)
V
q̃ ∗ = GT q∗ = GT A−1 b + GT A−1 Gṽ ≡ q̃∗b + C̃ṽ. (7) Here, M z is the z-component of the dipole of the simulation cell.
This dipole term was subsequently used for correcting the infinite
q̃∗b defines the total charge each electrode would carry at zero poten- boundary artifact of slab-like systems.45 This is known as the EW3Dc
tial and C̃ is the electrode-wise capacitance matrix. To subsequently method, which is implemented in many MD codes including

J. Chem. Phys. 157, 084801 (2022); doi: 10.1063/5.0099239 157, 084801-3


© Author(s) 2022
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

LAMMPS.27 Several authors38,46–48 have shown that the infinite to make the system symmetric along the z-direction, replicating
boundary contribution in slab-like geometries can also be solved the conductor-centered supercell in Ref. 31. The energy-minimizing
in an exact form. This rarely implemented EW2D solver is another charge q∗ in this model is
cornerstone of the ELECTRODE package.
Just like slab-like geometries, systems with only one periodic q∗ = S[b({r}) − Δv0 ζ], (14)
dimension require an appropriate treatment of the long-range elec-
trostatic interactions. As shown by Bródka and Śliwiński,49 the which is equivalent to that obtained from the standard CPM,
approach of Smith44 can be generalized for an infinitely extended replacing v with −Δv0 ζ.
one-dimensional summation,
π III. RESULTS AND DISCUSSION
J 1D (M) = (Mx2 + My2 ). (11)
V
A. Charging times
Here, z is the periodic dimension and M x and M y are the respec- A simple capacitor model is adapted from an example in the
tive components of the total dipole of the unit cell. Contrasting MetalWalls repository52 and comprises a saline solution between
established codes, the ELECTRODE package contains these correc- two gold electrodes with three layers each. To compare the equilib-
tions for one-dimensional periodic systems. Even more crucially, rium conditions of the CPM and CCM, we calculated the capaci-
ELECTRODE is the first package (as far as we know) to imple- tance per area from the averaged equilibrium charges and voltages
ment these corrections in combination with a CPM. As an outlook, at an applied voltage of 2 V and charge of 4.4e, respectively. The
the electrostatic layer correction50 in combination with P3 M51 is obtained values of 2.94 and 2.91 μF cm−2 for the CPM and CCM,
also considered for implementation as an alternative to the EW3Dc respectively, differ by only 1%, showing good agreement between the
approach. methods at equilibrium.
As illustrated for slab-like two-dimensional periodic systems, When a voltage is initially applied with the CPM, the charge
the boundary corrections can be easily incorporated into the CPM induced on both electrodes is very small since the capacitance of the
formalism by splitting the dipole components into their electrode electrode pair in vacuo is small.28,34 However, the electrode charges
and electrolyte contributions, induce the formation of a dipole in the electrolyte, which, in turn,
induces additional charge on the electrode. CPM MD, thus, models
2π elyt elyt the process of charging an electrical double layer capacitor physically
J 2D = [(Mzelec )2 + 2Mzelec Mz + (Mz )2 ]
V correctly, and the charging–discharging curves obtained from CPM
⎡ ⎤ MD can be used to fit parameters for equivalent macroscopic elec-
2π ⎢ ⎥
⎢∑zi zj qi qj + 2Mzelyt ∑zi qi + (Mzelyt )2 ⎥.
= ⎢ ⎥ (12) trical circuits.53 Two charging times τ 1 and τ 2 are obtained by fitting
V ⎢ ij ⎥
⎣ i ⎦ a bi-exponential charging function given by
eq
This way, dipole corrections fit into the linear form of the Coulombic Mz (t) = Mz [1 − c exp(−t/τ1 ) − (1 − c) exp(−t/τ2 )] (15)
energy in Eq. (2) that is used in the CPM and the computational
effort for the electrode–electrolyte interaction scales linearly with the eq
to the z-component of the electrolyte dipole.54 Mz is the extrap-
number of particles. olated equilibrium dipole reached at late times. Comparing the
individual contributions to the total electrolytic dipole reveals that
F. Simulating electrodes with the finite field method τ 1 describes relatively fast water dipole relaxations and τ 2 describes
In the FF method,31 the potential difference between two elec- charging times related to ion diffusion. To validate this statement,
trodes is not directly specified using the applied potential v. Instead, we show both individual components in Fig. 1. From the mixing
the simulation cell is periodic in the z-direction, i.e., without adding parameters c in the panels, it is clear that water dipole relaxation
the artificial vacuum between the slabs required otherwise. The FF dominates at the beginning, while ion diffusion prevails at later
method allows efficient simulations of infinite electrode slabs, since times. τ 1 of the water in Fig. 1(b) largely corresponds to that of
no additional vacuum is required. However, electrodes with com- the total dipole at the beginning of the charging. While the ions in
plex shapes or electrodes with one-dimensional periodicity cannot Fig. 1(c) relax mainly on the slower timescale of τ 2 , the water dipole
be simulated with the FF method. decreases as the ion dipole is slowly built up.
A potential difference Δv0 [cf. Eq. (8)] is created in the FF Figure 2 compares results using CPM, CCM, and TP, the latter
method by introducing a z-directed electric (polarization) field of with a time constant τ v = 100 fs, to each other and to their uniformly
magnitude −Δv0 /Lz , creating a discontinuity of Δv0 across the peri- charged counterparts. We focus on the charging term with the faster
odic z-boundary (and thus between the two electrodes on either side timescale τ 1 because of its large contribution to the total dipole.
of the slab). In this formulation, the electrode Coulombic energy is For the uniform variants, the charges are always evenly distributed
across the inner layers of the electrodes. The uniform methods are
1 in general very close to their heterogeneous counterparts, which is
Uelec = qT Aq − bT ({r})q + Δv0 ζ T q. (13) consistent with previous studies that found only small differences
2
between a heterogeneous and uniform CPM at low voltages for
Here, ζ is a vector containing the normalized z-positions of each simple planar electrodes.16 The charging times obtained with CCM
electrode atom, viz., {z/Lz } with an offset for the bottom electrode appear to be too fast, since τ 1 is about two orders of magnitude

J. Chem. Phys. 157, 084801 (2022); doi: 10.1063/5.0099239 157, 084801-4


© Author(s) 2022
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

FIG. 2. Charging time constants τ 1 and empirical standard deviations employing


different CPM approaches as denoted on the y axis. Inset shows the model system
used to compare the different approaches, consisting of an aqueous NaCl elec-
trolyte in contact with two gold surfaces. Note the different charging time constants
τ 1 for the CCM and CPM approaches.

areal electrolyte resistance R. Continuum models for ion dynam-


FIG. 1. Individual fitting parameters of the bi-exponential function [cf. Eq. (15)]
applied to (a) the total dipole Mztot , (b) the dipole of water molecules Mzwat , and (c)
ics have shown that the ionic relaxation time decently agrees with
to the dipole of ions in the electrolyte Mzion from a standard CPM simulation at 2 V. RC for applied potentials up to around the thermal voltage kB T/e
While only five of the 100 trajectories are shown for illustration, fits are made to ≈ 25 mV;56,57 a recent dynamical density functional theory for a
the entire set of trajectories. dense electrolyte found that the ions relaxed with RC even around
1 V.58 In a bulk electrolyte at infinite dilution, the areal resistance
between two electrodes spaced L apart is given by R = Lρ, where
smaller than obtained with the potential-based methods, which is a ρ = kB T/(2e2 Dcb ) is the ionic resistivity, kB T is the thermal energy,
well-known effect6,55 that could be related to rather unphysical high e is the elementary charge, D is the ionic diffusion constant, and
temperatures and voltages when applying an instantaneous charge cb is the salt number density.59 In our simulations, the plate sep-
with CCM on the electrodes.6 CCM also predicts two times smaller aration was L = 5 nm and the salinity in the bulk phase was
τ 2 than other methods, while the contribution of the second expo- ≈ 0.95M, corresponding to cb ≈ 0.57 nm−3 ; the ion diffusivity
nential decay is almost negligible since c = 0.98 in Eq. (15). However, D ≈ 1.5 ⋅ 10−9 m2 /s was obtained from a separate bulk electrolyte
these values should be interpreted with caution, given that the bi- simulation. Using these values, we obtained RC = 14 ps, which is
exponential curve is a poor fit in the case of a CCM (cf. Fig. S2). roughly seven times smaller than the largest fitted τ 2 . This discrep-
Using the TP, little change in the slower timescale τ 2 is observed ancy must be due partly to our underestimation of ρ, which, at the
compared to the CPM and it only weakly depends on the time con- salinity of our interest, is larger by a factor of about 1.7;59 account-
stant τ v (cf. Table S1). In contrast, the applied voltage v0 in a CPM ing for this effect yields a relaxation time of RC = 23 ps. Another
has an effect on the ionic charging times τ 2 , and for a smaller applied cause of the remaining factor 4 discrepancy between the largest fit-
voltage of 0.3 V, τ 2 drops to 50 ps (cf. Fig. S4). ted τ 2 and predicted ionic relaxation times is the nanoconfinement,
Using a TF model for representing real metals impacts both which could affect the diffusivity D and, in turn, the areal resistivity
charging times and the total dipole. It is interesting to note R. Finally, the mentioned increase of τ 2 with the applied potential
that while a decrease for τ 1 with increasing lTF in Fig. S3(a) is is in line with the potential dependence of the capacitance of the
observed, interpretation of τ 2 is more complex when using a TF (cf. Gouy–Chapman model, though in disagreement with that of the
Table S1), especially when comparing this to a regular CPM, i.e., Kilic–Bazant–Ajdari60 model. Although the analytical estimates of
lTF = 0, at the same voltage. The small difference between a regu- RC times presented here provide starting points for further research
lar CPM and the TF for small lTF might be an artifact due to the on the implications of nanoconfinement and finite salt concentra-
rather thin metal slab model or might be due to a complex inter- tion on charging times, these results should not be overinterpreted
play between charge screening in the metal and the water/ionic as the analytical models contain simplifications that may not apply
relaxation and/or the smaller total dipole obtained with the TF to such nanoscopic systems.
model.
To understand the range of the second relaxation time B. Coaxial cylindrical capacitor
τ 2 ≈ 50–100 ps, it is instructive to consider the product RC of As a sanity check of our approach for systems that are peri-
the aforementioned areal capacitance C = 2.94 μF cm−2 and the odic in just one dimension, we study the capacitance of two coaxial

J. Chem. Phys. 157, 084801 (2022); doi: 10.1063/5.0099239 157, 084801-5


© Author(s) 2022
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

consistency to results found in the literature. Remarkably, using the


TF model with varying TF lengths has a surprising and complex
impact on the water and ionic relaxation times.
These results demonstrate that the ELECTRODE package can
efficiently simulate electrified interfaces, including unusual systems
such as infinitely long charged nanotubes. For a capacitor composed
of coaxial carbon nanotubes, the vacuum capacitance agrees well
within the limit of the analytical result of a structureless cylindrical
capacitor and enables future investigations of curvature-dependent
effects24,57 more rigorously by avoiding interactions between the
nanotubes through the periodic images. Moreover, the charging
process of a plate capacitor with an aqueous NaCl electrolyte in-
between vividly illustrates the differences between the range of
methods introduced here and which are used to estimate the elec-
trode charges. Interestingly, in these simulations, it was observed
that the water dipole initially responds very quickly to the applied
FIG. 3. Dielectric capacitance of cylindrical capacitors for fixed ratios of R1 /R2 potential but then slowly drops off as the ionic dipole slowly builds
with R1 the inner and R2 the outer tube radii. Results for coaxial carbon nanotubes
computed with MD are indicated as lines. Marks denote analytical results for a up, as if the water dipoles were shielded from the ions.
structureless equivalent system. The difference between the radii Δr = R2 − R1 While the package is in a stable state, its development is still
is given relative to the characteristic bond length d CC between carbon atoms in ongoing and will include in the future features like a conjugate
graphene. gradient solver or compatibility to TIP4P water models.

SUPPLEMENTARY MATERIAL
carbon nanotubes of radii R1 and R2 , with R1 < R2 (cf. inset of Fig. 3).
The vacuum capacitance C0 of the coaxial carbon nanotubes can be The supplementary material provides more background on
calculated from the electrode-wise capacitance C̃.34 At large radii, the thermo-potentiostat (TP), boundary corrections, and the FF
the atomic structure of the tubes should have a negligible effect, method. Furthermore, a description of the package interface to
and thus the capacitance should approach that of structureless cylin- LAMMPS and an overview of the implemented classes are given.
ders. The analytical line capacitance for a given ratio of the radii is More details on the simulations are provided, including plots of tra-
C0 /L = 2πε0 /ln(R2 /R1 ), in which ε0 is the vacuum permittivity and jectories and of charging times as a function of the voltage, the TF
L is the length of the simulation box in the periodic dimension. As length, and the time constant of the TP.
shown in Fig. 3 for various fixed ratios of the inner and outer tubes,
the capacitance indeed converges to that of a structureless cylindrical
ACKNOWLEDGMENTS
capacitor when the radii are large compared to the bond length dCC
between carbon atoms. In the CPM, electrode atoms are assigned a The authors acknowledge funding provided by the
3/2
Gaussian charge distribution ρi (r) = qi (η2 /π) exp[−η2 (r − Ri )2 ] Deutsche Forschungsgemeinschaft (DFG, German Research
at their position Ri with the reciprocal charge width η. In agreement Foundation)—Project Nos. 192346071 and 390794421—Grant Nos.
with Serva et al.,61 increased capacitances are observed for larger SFB 986 and GRK 2462.
Gaussian width (i.e., smaller η) in Fig. 3. However, the impact is
almost negligible. AUTHOR DECLARATIONS
Conflict of Interest
IV. CONCLUSIONS
The authors have no conflicts to disclose.
We presented the ELECTRODE package as an efficient imple-
mentation of the constant potential method (CPM) and closely Author Contributions
related methods for the popular LAMMPS simulation environment.
Initially, the main goal was to bundle many different approaches to Ludwig J. V. Ahrens-Iwers: Conceptualization (equal); Formal
electrochemical simulations into one package and ensure that they analysis (supporting); Investigation (lead); Methodology (equal);
are handled in the most computationally efficient way. However, Software (equal); Validation (equal); Writing – original draft (lead);
we also found interesting relationships between the two relevant Writing – review & editing (supporting). Mathijs Janssen: Con-
charging time contributions, i.e., water dipole relaxation and ion ceptualization (supporting); Methodology (supporting); Validation
diffusion. We also implemented several new features, such as the (supporting); Writing – review & editing (supporting). Shern R.
EW2D summation and a correction for systems periodic in just one Tee: Conceptualization (equal); Formal analysis (equal); Investi-
dimension, whose capabilities and full potential have been scarcely gation (equal); Methodology (equal); Resources (equal); Software
explored and which also work independently of the CPM. Recent (equal); Supervision (equal); Writing – original draft (equal); Writ-
improvements to the CPM, such as the finite field (FF) method ing – review & editing (equal). Robert H. Meißner: Conceptu-
and a Thomas–Fermi (TF) model, were included and compared for alization (equal); Data curation (equal); Formal analysis (equal);

J. Chem. Phys. 157, 084801 (2022); doi: 10.1063/5.0099239 157, 084801-6


© Author(s) 2022
The Journal
ARTICLE scitation.org/journal/jcp
of Chemical Physics

27
Investigation (equal); Methodology (equal); Project administration A. P. Thompson, H. M. Aktulga, R. Berger, D. S. Bolintineanu, W. M. Brown, P.
(equal); Software (equal); Supervision (equal); Writing – original S. Crozier, P. J. in ’t Veld, A. Kohlmeyer, S. G. Moore, T. D. Nguyen, R. Shan, M. J.
draft (equal); Writing – review & editing (equal). Stevens, J. Tranchida, C. Trott, and S. J. Plimpton, Comput. Phys. Commun. 271,
108171 (2022).
28
L. J. V. Ahrens-Iwers and R. H. Meißner, J. Chem. Phys. 155, 104104 (2021).
29
DATA AVAILABILITY F. Deißenbeck, C. Freysoldt, M. Todorova, J. Neugebauer, and S. Wippermann,
Phys. Rev. Lett. 126, 136803 (2021).
30
The ELECTRODE package has been merged into the official L. Scalfi, T. Dufils, K. G. Reeves, B. Rotenberg, and M. Salanne, J. Chem. Phys.
release of LAMMPS which is available under https://github.com/ 153, 174704 (2020).
31
lammps/lammps/tree/release. T. Dufils, G. Jeanmairet, B. Rotenberg, M. Sprik, and M. Salanne, Phys. Rev.
Lett. 123, 195501 (2019).
32
T. Dufils, M. Sprik, and M. Salanne, J. Phys. Chem. Lett. 12, 4357 (2021).
33
S. R. Tee and D. J. Searles, J. Chem. Phys. 156, 184101 (2022).
REFERENCES 34
L. Scalfi, D. T. Limmer, A. Coretti, S. Bonella, P. A. Madden, M. Salanne, and
1
C. Merlet, B. Rotenberg, P. A. Madden, and M. Salanne, Phys. Chem. Chem. B. Rotenberg, Phys. Chem. Chem. Phys. 22, 10480 (2020).
35
Phys. 15, 15781 (2013). J. Vatamanu, O. Borodin, and G. D. Smith, Phys. Chem. Chem. Phys. 12, 170
2
K. Breitsprecher, K. Szuttor, and C. Holm, J. Phys. Chem. C 119, 22445 (2015). (2010).
3 36
J. Vatamanu, O. Borodin, and D. Bedrov, J. Chem. Theory Comput. 14, 768 H. Li, G. Jiang, P. Wang, and J. Z. Liu, “A simple and efficient lattice sum-
(2018). mation method for metallic electrodes in constant potential molecular dynamics
4 simulation,” arXiv:2111.06704 (2021).
J. B. Haskins and J. W. Lawson, J. Chem. Phys. 144, 184707 (2016).
5 37
J. Gäding, G. Tocci, M. Busch, P. Huber, and R. H. Meißner, J. Chem. Phys. 156, A. Coretti, L. Scalfi, C. Bacon, B. Rotenberg, R. Vuilleumier, G. Ciccotti, M.
064703 (2022). Salanne, and S. Bonella, J. Chem. Phys. 152, 194701 (2020).
6 38
C. Merlet, C. Péan, B. Rotenberg, P. A. Madden, P. Simon, and M. Salanne, Z. Hu, J. Chem. Theory Comput. 10, 5254 (2014).
39
J. Phys. Chem. Lett. 4, 264 (2013). A. Schlaich, D. Jin, L. Bocquet, and B. Coasne, Nat. Mater. 21, 237 (2022).
7 40
J. I. Siepmann and M. Sprik, J. Chem. Phys. 102, 511 (1995). L. Scalfi, M. Salanne, and B. Rotenberg, Annu. Rev. Phys. Chem. 72, 189 (2020).
8 41
S. K. Reed, O. J. Lanning, and P. A. Madden, J. Chem. Phys. 126, 084704 (2007). A. Marin-lafleche, “Ewald summation in 2D and 3D for a set of point charges
9
S. Tyagi, M. Süzen, M. Sega, M. Barbosa, S. S. Kantorovich, and C. Holm, and Gaussian charges,” https://gitlab.com/ampere2/metalwalls/-/raw/release/doc/
J. Chem. Phys. 132, 154112 (2010). theory/ewald-summation/ewald.pdf, 2020.
42
10
M. K. Petersen, R. Kumar, H. S. White, and G. A. Voth, J. Phys. Chem. C 116, T. Gingrich, “Simulating surface charge effects in carbon nanotube templated
4903 (2012). ionic crystal growth,” https://gingrich.chem.northwestern.edu/papers/Thesisw
11
K. A. Dwelle and A. P. Willard, J. Phys. Chem. C 123, 24095 (2019). Corrections.pdf, 2010.
43
12
T. D. Nguyen, H. Li, D. Bagchi, F. J. Solis, and M. Olvera de la Cruz, Comput. G. Jeanmairet, B. Rotenberg, and M. Salanne, Chem. Rev. 122, 10860 (2022).
44
Phys. Commun. 241, 80 (2019). E. R. Smith, Proc. R. Soc. London, Ser. A 375, 475 (1981).
45
13
K. Breitsprecher, M. Janssen, P. Srimuk, B. L. Mehdi, V. Presser, C. Holm, and I.-C. Yeh and M. L. Berkowitz, J. Chem. Phys. 111, 3155 (1999).
46
S. Kondrat, Nat. Commun. 11, 6085 (2020). S. W. De Leeuw and J. W. Perram, Mol. Phys. 37, 1313 (1979).
14 47
S. Kondrat, P. Wu, R. Qiao, and A. A. Kornyshev, Nat. Mater. 13, 387 (2014). D. M. Heyes, M. Barber, and J. H. R. Clarke, J. Chem. Soc., Faraday Trans. 2 73,
15
S. Kondrat and A. A. Kornyshev, Nanoscale Horiz. 1, 45 (2016). 1485 (1977).
48
16
Z. Wang, Y. Yang, D. L. Olmsted, M. Asta, and B. B. Laird, J. Chem. Phys. 141, D. E. Parry, Surf. Sci. 49, 433 (1975).
49
184102 (2014). A. Bródka and P. Śliwiński, J. Chem. Phys. 120, 5518 (2004).
17 50
D. T. Limmer, C. Merlet, M. Salanne, D. Chandler, P. A. Madden, R. Van Roij, A. Arnold, J. de Joannis, and C. Holm, J. Chem. Phys. 117, 2496 (2002).
51
and B. Rotenberg, Phys. Rev. Lett. 111, 106102 (2013). J. de Joannis, A. Arnold, and C. Holm, J. Chem. Phys. 117, 2503 (2002).
18 52
C. Merlet, D. T. Limmer, M. Salanne, R. van Roij, P. A. Madden, D. Chandler, A. Marin-Laflèche, M. Haefele, L. Scalfi, A. Coretti, T. Dufils, G. Jeanmairet, S.
and B. Rotenberg, J. Phys. Chem. C 118, 18291 (2014). Reed, A. Serva, R. Berthin, C. Bacon, S. Bonella, B. Rotenberg, P. Madden, and M.
19 Salanne, J. Open Source Software 5, 2373 (2020).
C. Merlet, B. Rotenberg, P. A. Madden, P.-L. Taberna, P. Simon, Y. Gogotsi, and
53
M. Salanne, Nat. Mater. 11, 306 (2012). A. M. Sampaio, G. F. L. Pereira, M. Salanne, and L. J. A. Siqueira, Electrochim.
20 Acta 364, 137181 (2020).
C. Merlet, C. Péan, B. Rotenberg, P. A. Madden, B. Daffos, P.-L. Taberna, P.
54
Simon, and M. Salanne, Nat. Commun. 4, 2701 (2013). C. Noh and Y. Jung, Phys. Chem. Chem. Phys. 21, 6790 (2019).
21 55
E. H. Lahrar, P. Simon, and C. Merlet, J. Chem. Phys. 155, 184703 (2021). J. Vatamanu, O. Borodin, and G. D. Smith, J. Phys. Chem. B 115, 3073 (2011).
22 56
A. C. Forse, C. Merlet, J. M. Griffin, and C. P. Grey, J. Am. Chem. Soc. 138, 5731 M. Z. Bazant, K. Thornton, and A. Ajdari, Phys. Rev. E 70, 021506 (2004).
57
(2016). M. Janssen, Phys. Rev. E 100, 042602 (2019).
23 58
J. Seebeck, P. Schiffels, S. Schweizer, J.-R. Hill, and R. H. Meißner, J. Phys. K. Ma, M. Janssen, C. Lian, and R. van Roij, J. Chem. Phys. 156, 084101 (2022).
Chem. C 124, 5515 (2020). 59
Y. Avni, R. M. Adar, D. Andelman, and H. Orland, Phys. Rev. Lett. 128, 098002
24
J. Seebeck, C. Merlet, and R. H. Meißner, Phys. Rev. Lett. 128, 086001 (2022). (2022).
25 60
J. G. McDaniel, J. Phys. Chem. C 126, 5822 (2022). M. S. Kilic, M. Z. Bazant, and A. Ajdari, Phys. Rev. E 75, 021502 (2007).
26 61
D. L. Z. Caetano, S. J. de Carvalho, G. V. Bossa, and S. May, Phys. Rev. E 104, A. Serva, L. Scalfi, B. Rotenberg, and M. Salanne, J. Chem. Phys. 155, 044703
034609 (2021). (2021); arXiv:2106.07232.

J. Chem. Phys. 157, 084801 (2022); doi: 10.1063/5.0099239 157, 084801-7


© Author(s) 2022

View publication stats

You might also like