You are on page 1of 9

Ewald summation for systems with slab geometry

In-Chul Yeh and Max L. Berkowitz

Citation: J. Chem. Phys. 111, 3155 (1999); doi: 10.1063/1.479595


View online: http://dx.doi.org/10.1063/1.479595
View Table of Contents: http://jcp.aip.org/resource/1/JCPSA6/v111/i7
Published by the American Institute of Physics.

Additional information on J. Chem. Phys.


Journal Homepage: http://jcp.aip.org/
Journal Information: http://jcp.aip.org/about/about_the_journal
Top downloads: http://jcp.aip.org/features/most_downloaded
Information for Authors: http://jcp.aip.org/authors

Downloaded 22 May 2013 to 131.94.186.10. This article is copyrighted as indicated in the abstract. Reuse of AIP content is subject to the terms at: http://jcp.aip.org/about/rights_and_permissions
JOURNAL OF CHEMICAL PHYSICS VOLUME 111, NUMBER 7 15 AUGUST 1999

Ewald summation for systems with slab geometry


In-Chul Yeh and Max L. Berkowitza)
Department of Chemistry, CB# 3290, University of North Carolina, Chapel Hill, North Carolina 27599
共Received 25 March 1999; accepted 21 May 1999兲
We propose a modification in the three-dimensional Ewald summation technique for calculations of
long-range Coulombic forces for systems with a slab geometry that are periodic in two dimensions
and have a finite length in the third dimension. The proposed method adds a correction term to the
standard Ewald summation formula. To test the current method, molecular dynamics simulations on
water between Pt共111兲 walls have been carried out. For a more direct test, the calculation of the pair
forces between two point charges has been also performed. An excellent agreement with the results
from simulations using the rigorous two dimensional Ewald summation technique were obtained.
We observed that a significant reduction in computing time can be achieved when the proposed
modification is used. © 1999 American Institute of Physics. 关S0021-9606共99兲70331-4兴

I. INTRODUCTION ditions for water confined between planar walls. They com-
pared various boundary conditions such as minimum image,
An accurate treatment of long-range Coulombic interac- spherical and cylindrical cutoffs with the Ewald summation
tions in computer simulations of charged particles is of great method. The Ewald summation was found to be the safest
importance. For a typical three-dimensionally periodic sys- choice in the calculation. Systems considered in their study
tem, the Ewald summation technique1,2 is the most widely were symmetric and, therefore, the possible effect of asym-
used and accepted method for this purpose. Extensive opti- metry and net polarization of the system on the Ewald sum-
mization techniques such as the smooth particle mesh Ewald mation was not considered. Spohr8 compared the results
共PME兲 method3,4 have been developed to perform fast and from the simulations that used EW3D method with those
reliable simulations of large systems using Ewald summa- from the EW2D method. He concluded that results for
tion. EW3D converge to those for EW2D when the length of the
For a slab geometry which occurs frequently in surface simulation cell in z direction (L z ) used in simulations with
and interfacial systems, the conventional Ewald summation EW3D was large. At the same time he noticed that even
technique cannot be used directly since there is no periodic- when L z was five times larger than the length of the simula-
ity in the one of three dimensions 共let us say along the z tion cell in x or y directions 共L x or L y , respectively兲, the
direction兲. For this type of two-dimensionally periodic 共2DP兲 convergence was not satisfactory.
systems which have a finite length along the third dimension, Recently, there has been a renewed interest in the treat-
various methods have been proposed for the treatment of ment of long-range forces in polar systems or systems carry-
long-range forces.5–17 Recently, some of the methods have ing a net charge.25–29 A better understanding of conditions
been compared to each other in terms of computational speed under which Ewald summation is performed followed from
and accuracy.16,17 A two-dimensional Ewald summation this work. Still one issue that may be important even for
共EW2D兲 technique first introduced by Parry5 and later inde- some systems that are charged neutral, but have a total dipole
pendently rederived by Heyes, Barber, and Clarke6 and by de moment, remains not clear. The issue is the use of the sur-
Leeuw and Perram7 is found to be the most accurate. But the face term in the EW3D formula, the term that depends on the
direct use of EW2D formula is known to be computationally shape of the system, its total dipole moment and the dielec-
very expensive.8,16,17 A simple solution to this problem is to tric constant of the surrounding medium.1,28–31 The surface
use a precalculated table.8 The EW2D method with a precal- term is due to the fact that the electrostatic energy of the
culated table has been successfully applied in our recent ionic crystal is composed of two parts. First part is shape-
simulation studies of water next to metal surfaces.18–20 An- independent but depends on the structure of the crystal lattice
other widely used approach is to apply the conventional concerned and the distribution of ions within a unit cell.
three-dimensional Ewald summation 共EW3D兲 technique to a Second part depends on the shape of the piece of the crystal
simulation cell elongated in z direction so that a sufficiently and the dipole moment of a unit cell. The expression for the
large empty space between periodic replicas in z direction is shape-independent part of energy has the same mathematical
created.21 The inclusion of empty space into the unit cell is form as in the regular EW3D formula. Smith32 derived an
done to avoid an artificial influence from the periodic images expression for the shape-dependent part suitable for the slab
in z direction. This method was applied to simulations of geometry, which is of particular interest here.
various interfacial systems.22–24 In this study we propose that an EW3D method which
Shelley and Patey21 studied the effect of boundary con- includes the shape-dependent correction term introduced by
Smith32 can be used for the calculation of the long-range
a兲
Electronic mail: maxb@net.chem.unc.edu electrostatic forces in simulations of 2DP systems. To distin-

0021-9606/99/111(7)/3155/8/$15.00 3155 © 1999 American Institute of Physics

Downloaded 22 May 2013 to 131.94.186.10. This article is copyrighted as indicated in the abstract. Reuse of AIP content is subject to the terms at: http://jcp.aip.org/about/rights_and_permissions
3156 J. Chem. Phys., Vol. 111, No. 7, 15 August 1999 I.-C. Yeh and M. L. Berkowitz

guish it from the regular EW3D method, it will be abbrevi- gers. In the calculations ␣ and number of n and k vectors are
ated as EW3DC 共the three-dimensional Ewald summation adjustable parameters and are typically chosen for the opti-
with the correction term兲. This term is similar to the surface mum computational efficiency.
term in the standard EW3D formula but has a different pro- When the spherical geometry is used for summation ( P
portionality factor and involves only the z component of the ⫽S), J(M,S) is given by the following relation:2,25,32
total dipole moment. As far as we know, the only attempt to
include this correction term was done in a simulation on 2␲
J 共 M,S 兲 ⫽ 兩 M兩 2 . 共3兲
water between two ideal classical walls performed by Haut- 共 2 ⑀ s ⫹1 兲 V
man et al.10 No detailed comparison with the rigorous
EW2D has been made in that work. If the surrounding medium has an infinite dielectric con-
To test the EW3DC method we performed simulations stant 共⑀ s ⫽⬁, metal兲, J(M,S) vanishes. This boundary con-
on water next to the charged Pt共111兲 walls. Recently, we dition is commonly called conducting 共‘‘tinfoil’’兲 boundary
used this system to calculate the dielectric constant of water condition. If ⑀ s has a finite value, this term cannot be simply
at high electric fields.19 The long-ranged forces were treated ignored. In particular, if there is no surrounding medium
using the EW2D method in these simulations. Below we 共⑀ s ⫽1, vacuum兲, this term becomes
compare the results from the simulations performed with the
2␲
EW3DC method to those obtained with the EW2D method. J 共 M,S 兲 ⫽ 兩 M兩 2 . 共4兲
For more detailed comparison, test calculations involving 3V
only two point charges also have been carried out. By adding
The contribution to the force from this term is
the extra correction term in the EW3D formula, both accu-
racy and speed of the calculation are shown to be greatly 4␲qi
improved. Fi ⫽⫺ⵜ i J 共 M,S 兲 ⫽⫺ M. 共5兲
3V

Clearly, this term is not necessarily zero especially when


II. ELECTROSTATIC INTERACTIONS
there is a net polarization in the simulation cell (M⫽0). It
Consider a system of N point charges q i at positions ri can be ignored if the system is isotropic, M⫽0. Ignoring this
which satisfy the charge neutrality condition ⌺ Ni q i ⫽0 in a term is equivalent to adopting the tinfoil boundary condition.
rectangular simulation cell with lengths in x, y, and z direc- Implications of adopting tinfoil boundary condition in place
tions of L x , L y , and L z , respectively. of vacuum boundary condition for polar systems have been
The electrostatic energy can be written as discussed by Roberts and Schnitker.30,31
N N
The total Coulomb energy for a system periodic in two
1 qq
U⫽
2 兺n ⬘兺 兺 i j ,
i⫽1 j⫽1 兩 ri j ⫹n兩
共1兲
dimensions and finite in the third dimension according to the
EW2D method is
where the sum over n is the sum over all lattice points, n N N ⬁
1 erfc共 ␣ 兩 ri j ⫹m兩 兲
⫽(n x L x ,n y L y ,n z L z ) with n x ,n y ,n z integers. The primed U⫽ 兺 j⫽1
2 i⫽1 兺 兩m兺兩⫽0 ⬘ q i q j 兩 ri j ⫹m兩
sum indicates the omission of the i⫽ j term when n⫽0. The
factor 1/(4 ␲ ⑀ 0 ) is omitted for simplicity 共⑀ 0 is the vacuum N N
␲ cos共 h•ri j 兲
permittivity兲. This sum is conditionally convergent, which ⫹
2A i⫽1 兺 j⫽1
兺 h⫽0
兺 q iq j h
means that the result depends on the order or the summation
geometry in which we add up the terms. The outcome is also
dependent on the dielectric constant of the surrounding me-
dium ( ⑀ s ). The electrostatic energy calculated by the Ewald

⫻ exp共 hz i j 兲 erfc ␣ z i j ⫹ 冉 h
2␣ 冊
⫹exp共 ⫺hz i j 兲 erfc

sum is given by1,2,32


1
N

兺 j⫽1
兺 兩n兺
N ⬁
⬘q iq j
erfc共 ␣ 兩 ri j ⫹n兩 兲
冉 ⫺␣zi j⫹
h
2␣ 冊冎 ⫺

N

兺 j⫽1
A i⫽1
N

兺 q iq j 再 z i j erf共 ␣ z i j 兲

冎 冉 冊兺
U⫽
2 i⫽1 兩 ⫽0 兩 ri j ⫹n兩 N
1 ␣

冉 冊 冉 冊
N N ⫹ exp共 ⫺ ␣ 2 z 2i j 兲 ⫺ q 2i , 共6兲
1 4␲2 k2 ␣ 冑␲ 冑␲
兺 j⫽1
兺 k⫽0

i⫽1
⫹ q iq j exp ⫺
2 ␲ V i⫽1 k2 4␣
where m is a lattice vector for the 2DP system and is given
N
␣ by (m x L x ,m y L y ,0) with m x ,m y integers. h is a reciprocal
⫻cos共 k•ri j 兲 ⫺ 兺
冑␲ i⫽1
q 2i ⫹J 共 M, P 兲 . 共2兲 lattice vector for the 2DP system and is given by
((2 ␲ m x⬘ )/L x ,(2 ␲ m ⬘y )/L y ,0) with m ⬘x ,m ⬘y integers. A is the
J(M, P) is a shape-dependent term and depends on the area of the unit cell in x and y directions given by L x ⫻L y .
summation geometry 共P兲.32 M is the total dipole moment of The primed sum again indicates the omission of the i⫽ j
the unit simulation cell and is given by ⌺ i⫽1 N
q i ri . V is the term when m⫽0.
volume of the unit simulation cell given by L x ⫻L y ⫻L z and If two particles with charges q i and q j are sufficiently
k is a reciprocal lattice vector given by apart in z direction and are periodically repeated in x and y
((2 ␲ n x⬘ )/L x ,(2 ␲ n ⬘y )/L y ,(2 ␲ n z⬘ )/L z ) with n ⬘x ,n ⬘y ,n z⬘ inte- directions, the electric field acting on the particle i due to

Downloaded 22 May 2013 to 131.94.186.10. This article is copyrighted as indicated in the abstract. Reuse of AIP content is subject to the terms at: http://jcp.aip.org/about/rights_and_permissions
J. Chem. Phys., Vol. 111, No. 7, 15 August 1999 Ewald summation for a slab 3157

particle j can be considered as that due to the uniformly periodic in two dimensions and are finite in the third. This
charged sheet with a surface charge density ␴ ⫽q j /(L x L y ) constitutes the EW3DC method which as we show in what
and is given by8,33 follows is indeed capable of reproducing the EW2D results.
␴ qj
E j⫽ ⫽ 共7兲
2 ⑀ 0 2 ⑀ 0L xL y III. METHODOLOGY
The x, y, and z components of the force are given by the For simulations of water between Pt共111兲 walls, we use
following expression:8 the same interaction potentials that we used in our previous
F x ⫽F y ⫽0, 共8兲 studies,18,19,35 namely, the extended simple point charge
共SPC/E兲 model of water36 and water–Pt共111兲 surface
q iq j potential.37
F z⫽ . 共9兲 A rectangular prism is chosen for the unit cell of the
2 ⑀ 0L xL y
simulations. L x and L y of 22.175 and 19.204 Å, respectively,
By using the EW2D formula, Spohr8 found that the have been used to satisfy the periodicity requirement of
above ‘‘parallel plate capacitor’’ approximation can be used Pt共111兲 surface. Simulations are performed for 512 water
with a sufficient accuracy 共relative error less than 0.001兲 if molecules in the unit simulation cell. Water molecules are
the z separation distance between particles i and j ( 兩 z i j 兩 ) is confined in z direction by Pt共111兲 walls and the density of
larger than L x or L y . The important feature of this approxi- water at the center of the simulation cell is 1.0 g/cc. This is
mation is that no 兩 z i j 兩 distance dependency appears in the achieved by changing the value of a parameter z m in water–
formulas. Therefore, if there is an empty space in the EW3D Pt共111兲 potential.37 External electric fields (E 0 ) of 0–4 V/Å
simulation cell along the z direction with a length of at least are applied along the z direction.
L x or L y , contributions to the forces from the image cells in For the calculation of long-range Coulombic interactions
z direction should be negligible due to the neutrality of the we have used EW2D, EW3D, and EW3DC methods. For
system (⌺ Nj E j ⫽(1/2⑀ 0 L x L y )⌺ Nj q j ⫽0). Nevertheless, the EW3D and EW3DC calculations, three-dimensional periodic
comparison between the results from simulations using boundary conditions were applied. L z was chosen to be 90 Å
EW3D and EW2D methods shows that the EW3D method which is approximately four times larger than L x . Ewald
produces unsatisfactory results even when the length of the parameter ␣ of 0.3 Å⫺1 was used. As customary in the
empty space in z direction is significantly larger than L x or EW3D method, only minimum image ( 兩 n兩 ⫽0) was consid-
L y . 8 This apparent contradiction suggests that the Ewald ered with the real space cut-off radius of 9.5 Å. The recip-
summation using tinfoil boundary condition and spherical rocal space cut-off radius of 1.75 Å⫺1 has been used.
summation geometry which is commonly used in the Ewald Since the reciprocal space term in the EW2D is compu-
summation may not be suitable for the calculation in the slab tationally very expensive, it is advantageous to have less
geometry. terms for the reciprocal space part and more terms for the
Smith32 showed that if a geometry of a rectangular plate real space part. Therefore, for the EW2D calculation, the
( P⫽R) or disk which are infinitely thin in z direction are parameter ␣ was chosen to be 0.104 Å⫺1 and the real space
used as a summation geometry in the Ewald summation, then terms which satisfy the condition m 2x ⫹m 2y ⭐4 and the recip-
the shape-dependent term J(M,R) is given by rocal space terms which satisfy m ⬘x 2 ⫹m ⬘y 2 ⭐9 have been
2␲ 2 considered. The direct use of the EW2D formula is so time
J 共 M,R 兲 ⫽ Mz, 共10兲 consuming that a precalculated table of potential energy,
V
forces and second derivatives on a three-dimensional grid
where M z is the z component of the total dipole moment of with the size of 0.2⫻0.2⫻0.2 Å 3 has been constructed as
the simulation cell. This is equivalent to adopting a plane- suggested by Spohr.8 The EW2D calculations have been per-
wise sum method34 共summing x and y directions first then formed by interpolation of the table. For smaller distances
progressing in z direction兲. The contribution to the force (r i j ⬍3.3 Å), the exact EW2D formula has been used. For
from this term is 兩 z i j 兩 ⬎L y , the parallel plate capacitor approximation given in
Eqs. 共8兲 and 共9兲 has been utilized.
F x,i ⫽F y,i ⫽0, 共11兲 The Verlet algorithm has been used to propagate the
⳵ J 共 M,R 兲 4␲qi trajectories with a time step of 2.5 fs and SHAKE routine has
F z,i ⫽⫺ ⫽⫺ Mz . 共12兲 been used to preserve the rigidity of the water molecules.1
⳵zi V
The coordinates were saved at every 10 time steps for further
Note that Eqs. 共5兲 and 共12兲 differ by a factor of 3 and analysis. The temperature of the run was kept at 300 K by
that only the z component of the dipole moment appears in coupling the system to the heatbath using the algorithm of
Eq. 共12兲. The planewise sum combined with a sufficient Berendsen et al.38 200 ps run after at least 50 ps equilibration
empty space in z direction enables us effectively utilize the has been used for the analysis.
parallel plate capacitor approximation to eliminate contribu- In our previous work19 where we determined the dielec-
tions from image cells in z direction which are unwanted in tric constant of water as a function of the electric field we
2DP systems. Therefore, we can use the regular EW3D performed simulations on water lamina embedded between
method but with the correction term given by the Eq. 共12兲 to two surfaces. To find the value of the dielectric constant we
calculate long-range Coulombic forces for systems which are needed to calculate the total electric field inside the lamina.

Downloaded 22 May 2013 to 131.94.186.10. This article is copyrighted as indicated in the abstract. Reuse of AIP content is subject to the terms at: http://jcp.aip.org/about/rights_and_permissions
3158 J. Chem. Phys., Vol. 111, No. 7, 15 August 1999 I.-C. Yeh and M. L. Berkowitz

FIG. 1. Comparison of simulation results for water between Pt共111兲 walls at FIG. 2. Comparison of simulation results for water between Pt共111兲 walls at
zero external electric field obtained by using different methods to treat the E 0 of 1.0 V/Å calculated by different Ewald methods. Top: Oxygen density
long-range forces. Top: Oxygen density distributions. Middle: Charge den- distributions. Middle: Charge density distributions. Bottom: Electric field E p
sity distributions. Bottom: Electrostatic potential. calculated by Eq. 共14兲.

z⫽0 共the center of the simulation cell兲 is taken to be the total


This total electric field 关 E(z) 兴 was obtained using the fol-
electric field E that enters the equation determining the di-
lowing relation:
electric constant.
E 共 z 兲 ⫽E 0 ⫹E p 共 z 兲 , 共13兲 The electrostatic potential 共␾兲 has been calculated by the
following equation:
where E p (z) is the electric field due to orientational polar-
ization of water sample and is given by the following
expression:39,40

兰 ⫺L /2␳ q 共 z ⬘ 兲 dz ⬘
z
z
E p共 z 兲 ⫽ , 共14兲
⑀0
where ␳ q (z) is a charge density distribution.
The relative permitivity 共dielectric constant ⑀兲 of water
in the external electric field E 0 and the total electric field E
can be obtained from the following equation:

E0
⑀⫽ . 共15兲
E
To find the permittivity we calculated the total field in
the vicinity of the center of the slab. In previous simulation
studies on water–Pt interface it was found that the influence
of the walls on the orientational distributions of water is
almost absent for water about 10 Å away from the closest
approach of the water molecule to the Pt wall.18,35 Therefore,
it is expected that water–wall interaction has no influence on
the estimate of E when using the current method. To estimate
the total electric field E around the center of the sample cell,
10 Å interval averages have been taken across the sample
FIG. 3. Comparison of simulation results for water between Pt共111兲 walls at
cell in the z direction. Then to eliminate any local fluctuation E 0 of 2.0 V/Å calculated by different Ewald methods. Top: Oxygen density
of the electric field around the center, further 5 Å interval distributions. Middle: Charge density distributions. Bottom: Electric field E p
averages were taken. The resulting average electric field at calculated by Eq. 共14兲.

Downloaded 22 May 2013 to 131.94.186.10. This article is copyrighted as indicated in the abstract. Reuse of AIP content is subject to the terms at: http://jcp.aip.org/about/rights_and_permissions
J. Chem. Phys., Vol. 111, No. 7, 15 August 1999 Ewald summation for a slab 3159

TABLE I. The ‘‘effective’’ external electric field E 0⬘ and total electric field E for water between Pt共111兲 walls
calculated by the EW3D method. Units of 具 E p 典 and (4 ␲ 具 M z 典 )/V are V/Å. Errors in parentheses are estimated
from standard deviations of the results of four consecutive 50 ps runs.

E 0 共V/Å兲 L z 共Å兲 具 E p典 (4 ␲ 具 M z 典 )/V E ⬘0 ⫽E 0 ⫹(4 ␲ 具 M z 典 )/V E⫽E ⬘0 ⫹ 具 E p 典

1 180 ⫺1.2060共⫾0.0006兲 0.2257共⫾0.0004兲 1.2257共⫾0.0004兲 0.020共⫾0.001兲


1 90 ⫺1.5535共⫾0.0054兲 0.5860共⫾0.0009兲 1.5860共⫾0.0009兲 0.032共⫾0.006兲
2 90 ⫺2.7025共⫾0.0032兲 1.0511共⫾0.0005兲 3.0511共⫾0.0005兲 0.349共⫾0.004兲
3 90 ⫺2.9429共⫾0.0008兲a 1.1535共⫾0.0005兲 4.1535共⫾0.0005兲 1.211共⫾0.001兲
a
The average is taken over the 10.6 Å interval to take into account the periodic structure in z direction
introduced by the phase transition.

␾ 共 z 兲 ⫽⫺
1
⑀0
冕 z

⫺L z /2
␳ q 共 z ⬘ 兲共 z⫺z ⬘ 兲 dz ⬘ , 共16兲
field E ⬘ , which is the sum of two components E ⬘ ⫽E p
⫹E 0 , has a negative value when EW3D method is used.
While in simulations of the lamina using EW2D method E ⬘
where ␳ q is the charge density. would be the total field, since it is negative in simulations
with EW3D it indicates that overcompensation of the exter-
IV. RESULTS AND DISCUSSION nal field E 0 occurred in this case. This type of overcompen-
sation of the electric field in thermodynamically stable sys-
A. Water–Pt„111… interface tem is highly unlikely and it is a consequence of an improper
Oxygen density profiles, charge density distributions, treatment of electrostatic forces using the EW3D method
and electrostatic potential profiles for water between Pt共111兲 without considering the slab geometry. Imposing tinfoil
walls at zero external electric field calculated with different boundary condition and thus neglecting the correction term
methods to treat the long-ranged Coulombic forces 共EW2D, seem to introduce an extra external electric field contribution
EW3D, EW3DC, and the spherical cutoff兲 are compared in in addition to the initially assigned value of E 0 . As a matter
Fig. 1. For the spherical cutoff method, all the interactions of fact, using Eq. 共12兲 the external field E 0⬘ that molecules of
with the distance larger than the cutoff radius of 9.5 Å are water experience in simulations which employ the EW3D
ignored. Oxygen density profiles and charge density distribu- method can be estimated by the following relation:
tions are almost identical regardless of methodology. But the
value of the electrostatic potential at the center of the lamina 4 ␲ 具 M z典
E 0⬘ ⫽E 0 ⫹ , 共17兲
calculated with spherical cutoff is significantly larger than V
when other methods are used. This is consistent with the
results from previous simulation studies.8,24 This result where 具 M z 典 is the average of the z-component of the dipole
shows that the spherical cutoff should be avoided even for a moment of the sample. The second term in this equation is
symmetric system. Therefore the spherical cutoff results are the contribution due to images of the lamina from the central
not considered any longer in the following comparisons. The cell. Figure 3 shows results similar to the one from Fig. 2,
electrostatic potential profiles calculated with EW2D is in but for E 0 of 2 V/Å. Again, the result from EW3D without
good agreement with those obtained by EW3D and EW3DC. the correction term deviates significantly from that of
The correction term has very little influence on the calcula- EW2D, while the result from EW3DC agrees well with that
tion results since the system is symmetric in z direction and from EW2D.
there is no net dipole moment in z direction (M z ⫽0). From Simulations at E 0 of 3 and 4 V/Å have been also carried
Fig. 1 we also notice that for the value of L z ⫽90 Å an empty out. In our recent simulations on water–Pt共111兲 interface, a
spacing with a length in z direction of at least 56 Å exists in phase transition to proton ordered cubic ice was observed
the system, which is about 2.5 L x . when E 0 was somewhere between 3 and 4 V/Å with the
Figure 2 shows oxygen density profiles, charge density EW2D method18,19 and between 2 and 3 V/Å with the EW3D
distributions, electric field profiles for water between Pt共111兲 method.35 In this study, a phase transition to a proton ordered
walls at E 0 ⫽1 V/Å when we use EW2D, EW3D, and cubic ice has been observed in a region between 3 and 4 V/Å
EW3DC methods. For the EW3D calculations, two different with EW3DC. This again confirms that water feels stronger
values of L z 共90 and 180 Å兲 have been used to see the effect ‘‘effective’’ external electric field when EW3D is used, re-
of the value of L z . Oxygen density profiles show very little sulting in a lower critical E 0 for a phase transition. Table I
difference. The charge density distribution in the water presents a summary of the results for the calculations done
lamina obtained from simulations with the EW3D method on water lamina in the external electric field when EW3D is
are significantly different from those obtained by EW2D and used. This table shows that the data are consistent with the
EW3DC methods. A good agreement between the results by previously obtained results. Thus, for example, in calcula-
EW2D and EW3DC methods has been found. Due to the tions with EW3D when the external field E 0 is 3 V/Å the
difference in the charge density distributions obtained from effective external field E 0⬘ is actually ⬃4.15 V/Å and the
simulations that use EW2D and EW3D methods, the corre- total field E is 1.21 V/Å. As our previous simulations
sponding E p (z) distributions are also different. From the fig- showed,19 for water to undergo the transition, the total field
ure we notice that around bulk region (⫺5 Å⬍z⬍5 Å), the is supposed to be somewhat smaller than 1 V/Å. This is why

Downloaded 22 May 2013 to 131.94.186.10. This article is copyrighted as indicated in the abstract. Reuse of AIP content is subject to the terms at: http://jcp.aip.org/about/rights_and_permissions
3160 J. Chem. Phys., Vol. 111, No. 7, 15 August 1999 I.-C. Yeh and M. L. Berkowitz

TABLE II. The dielectric constant ⑀ and 具 cos ␪␮,E0典 for water between
Pt共111兲 walls. ␪ ␮ ,E0 is the angle between a water dipole ␮ and the direction
of the external electric field E0. Errors in parentheses are estimated from
standard deviations of the results of four consecutive 50 ps runs.

E 0 共V/Å兲 Method ⑀ 具 cos ␪␮,E0典


1 EW2D 59.9共⫾11兲 0.330共⫾0.001兲
1 EW3DC 67.5共⫾7.1兲 0.329共⫾0.001兲
2 EW2D 38.1共⫾1.3兲 0.664共⫾0.002兲
2 EW3DC 37.1共⫾1.7兲 0.664共⫾0.002兲
3 EW2D 9.2共⫾0.1兲 0.905共⫾0.001兲
3 EW3DC 9.3共⫾0.1兲 0.907共⫾0.002兲
FIG. 5. Comparison of the z component of the force acting on the unit point
charge at 共4.5 Å, 4.5 Å, z兲 by another oppositely charged unit point charge
fixed at 共0,0,0兲 in two-dimensionally periodic systems calculated by differ-
ent Ewald methods.
the phase transition was observed in a field with E 0 below 3
V/Å when the EW3D method was used.
We also calculated ⑀ by Eq. 共15兲 and average satisfy the condition m 2x ⫹m 2y ⭐4 and the reciprocal space
cos ␪␮,E0 ( 具 cos ␪␮,E0 典 ) where ␪ ␮ ,E0 is the angle between a wa- terms which satisfy m x⬘ 2 ⫹m ⬘y 2 ⭐9 have been considered.
ter dipole ␮ and the direction of the external electric field We calculated the pair forces between two oppositely
E0 . Values for ⑀ and 具 cos ␪␮,E0 典 obtained by using EW2D charged unit point charges at 共0,0,0兲 and (0,0,z) using
and EW3DC have been compared in Table II. An excellent EW2D, EW3D, and EW3DC methods. z changes from 0 to
agreement has been observed. about L z /2 in our tests. This type of arrangement of charges
is also used in Spohr’s work8 and creates a dipole moment in
z direction. The results are shown in Fig. 4. The deviations of
B. Forces between two particles
the EW3D results without the correction term from the
Calculation of the pair forces is the most direct and ac- EW2D results reported in Spohr’s work8 have been repro-
curate measure to compare different methods for the treat- duced. At the same time the results from the EW3DC are
ment of long-range forces.8,16,17 Spohr8 compared the pair almost identical to the EW2D results. It is to be noted that
forces calculated by EW2D and EW3D. He attributed the there are empty spaces with lengths of at least 1.5⫻L x and
deviations of the EW3D results from the EW2D results to 2.5⫻L x in z direction for L z of 3⫻L x and 5⫻L x , respec-
the coupling between the periodic replicas of the interface. tively, for the results shown in Fig. 4. This clearly shows that
The same geometry of the simulation cell used in to use EW3D in 2DP systems, the empty space need not be
Spohr’s work has been used here 共L x ⫽L y ⫽18 Å and L z huge but the correction term should be included.
⫽3⫻L x or 5⫻L x 兲. ␣ of 0.45 Å⫺1 and the reciprocal space Figure 5 shows the pair forces experienced by two op-
cut off radius of 5.0 Å⫺1 have been used. The parameters positely charged unit point charges at 共0,0,0兲 and 共4.5 Å, 4.5
have been chosen for better accuracy because we want to Å, z兲. For EW3D and EW3DC calculations, L z of 5⫻L x 共90
eliminate any unwanted error due to numerical artifacts Å兲 has been used. z again changes from 0 to L z /2. This type
when we compare the results for the EW2D and EW3D. The of arrangement of charges creates a dipole moment not only
choice of parameters could be relaxed for better computa- in z direction but also in x and y directions. The z compo-
tional efficiency. For the EW2D calculation, the parameter ␣ nents of forces are shown and an excellent agreement be-
was chosen to be 0.111 Å⫺1 and the real space terms which tween EW2D and EW3DC results is evident. Note that even
for the cases when M x and M y are not zero, the correction
term 关Eq. 共12兲兴 which involves only M z is sufficient.
Figure 6 considers a rather extreme case when there is a

FIG. 4. Comparison of the z component of the force acting on the unit point
charge at (0,0,z) by another oppositely charged unit point charge fixed at FIG. 6. Comparison of the z component of the force acting on the unit point
共0,0,0兲 in two-dimensionally periodic systems calculated by different Ewald charge at (0,0,z) by another oppositely charged unit point charge fixed at
methods. The logarithmic scale is used for better comparison with the result 共0,0,⫺44 Å兲 in two-dimensionally periodic systems calculated by different
in Spohr’s work 共Ref. 8兲. Ewald methods.

Downloaded 22 May 2013 to 131.94.186.10. This article is copyrighted as indicated in the abstract. Reuse of AIP content is subject to the terms at: http://jcp.aip.org/about/rights_and_permissions
J. Chem. Phys., Vol. 111, No. 7, 15 August 1999 Ewald summation for a slab 3161

TABLE III. Comparison of computing times per time step calculated by compared. We found that EW3DC shows better accuracy
EW2D and EW3DC methods. than the EW2D with the precalculated table compared with
Method Time 共s兲 the direct EW2D calculation. We think that an accumulation
of errors introduced by the interpolation of the table and the
EW2D 59.9
parallel plate capacitor approximation results in a loss of
EW2D 共optimized兲 18.1
EW2D 共table兲 7.52 accuracy when the EW2D method with the precalculated
EW3DC 0.71 table is used.

V. CONCLUSION
very little empty space between periodic replicas in z direc- In this study, Ewald summation techniques for systems
tion. Forces between two oppositely charged unit point periodic in two dimensions with a finite length in the third
charges at 共0,0,⫺44 Å兲 and (0,0,z) are calculated. z is dimension have been tested. In terms of speed and accuracy,
changed from ⫺43 to 44 Å. L z used in EW3D and EW3DC the usual three-dimensional Ewald method with a correction
is 90 Å, which means that one of the charges is fixed near the term for the slab geometry 共EW3DC兲 seems to be the best
end of the simulation cell in z direction at 共0,0,⫺44 Å兲. Fig- choice. The inclusion of the correction term does not intro-
ure 6 shows that the result from EW3D without the correc- duce any significant computational difficulty and can be eas-
tion term deviates from the EW2D result in almost the entire ily incorporated in the standard EW3D program. Various op-
range of z values. The result from EW3DC agrees well with timization techniques available for the EW3D technique
EW2D result for z values up to ⬃28 Å where interaction could be readily applicable to the EW3DC.3,4
with the adjacent charges in periodic replicas in z direction Recently, there have been considerable interests in the
are beginning to dominate the interaction force. At z application of the first-principles simulations using the Car–
⫽28 Å, an empty space with a length of L x in z direction is Parrinello scheme41 to the interfacial systems such as water–
present in the box. This shows that to get good numerical metal interfaces.42 This very promising approach may play
results, there should be an empty space at least with a length an important role in the future simulations of various inter-
of L x or L y even when EW3DC is used. facial systems. The correct treatment of long-range forces in
this approach is required to come to any reliable conclusions
C. Speed and accuracy from the first-principles simulations, especially on charged
systems. The EW3D with the correction term can be conve-
Computational speeds of the direct use of the EW2D niently used for the calculation of long-range forces in the
formula, the EW2D method with a precalculated table and first-principles simulations.
the EW3DC calculations have been checked for water– In this study, we clearly demonstrated how simulations
Pt共111兲 system. Only interactions between water molecules of interfacial systems using the EW3D method without the
have been considered for more direct comparisons. Calcula- correction term can lead to erroneous results. Numerous
tions have been carried out on a Silicon Graphics Origin simulation studies on interfacial systems in the literature
2000 workstation. The geometry of the simulation cell and have been carried out by using the EW3D method without
the Ewald parameters are the same as the ones used in this considering the correction term. We do not know how seri-
work for water–Pt共111兲 systems. Since the actual computing ous the errors are for each studied system and which prop-
time may strongly depend on the number of particles, the erties are most likely to be affected by the negligence of the
choice of Ewald parameters, the machine used, and the de- correction term. More careful studies need to be done to
gree of the optimization, the numbers given here should be resolve this matter and we plan to carry out further simula-
interpreted with caution. tion studies in this direction. The safest and economical
Computational time per time step has been estimated for choice for the calculation of the long-range forces in most of
each Ewald method and is summarized in Table III. Since simulations of interfacial systems seems to be the EW3D
the value of ␣ is small, a reciprocal space term with h⫽0 with the correction term.
关the second term in Eq. 共6兲兴 could be neglected with very
little error as suggested by the previous studies.6,16 This op- ACKNOWLEDGMENT
timization of the EW2D method results in a significant re-
duction of the computing time in the direct use of EW2D We are grateful to the Office of Naval Research for the
formula as shown in Table III, but does not reduce the com- support.
puting time significantly in the EW2D calculation with the
table. The inclusion of the correction term into the EW3D 1
M. P. Allen and D. J. Tildesley, Computer Simulations of Liquids 共Oxford
formula 共EW3DC兲 hardly introduces any difference in the 2
University, New York, 1987兲.
S. W. de Leeuw, J. W. Perram, and E. R. Smith, Proc. R. Soc. London,
computing time compared with EW3D. The computing time
Ser. A 373, 27 共1980兲; 388, 177 共1983兲.
for the EW3DC is ⬃10 times faster than the time for EW2D 3
U. Essmann, L. Perera, M. L. Berkowitz, T. Darden, H. Lee, and L. G.
with the table. Pedersen, J. Chem. Phys. 103, 8577 共1995兲.
4
We also compared the accuracy of the calculations. The A. Y. Toukmaji and J. A. Board Jr., Comput. Phys. Commun. 95, 73
共1996兲.
components of forces acting on randomly selected atoms cal- 5
D. E. Parry, Surf. Sci. 49, 433 共1975兲; 54, 195 共1976兲.
culated by EW2D, EW2D with the table, and EW3DC from 6
D. M. Heyes, M. Barber, and J. H. R. Clarke, J. Chem. Soc., Faraday
a given configuration of 512 water molecules have been Trans. II 73, 1485 共1977兲.

Downloaded 22 May 2013 to 131.94.186.10. This article is copyrighted as indicated in the abstract. Reuse of AIP content is subject to the terms at: http://jcp.aip.org/about/rights_and_permissions
3162 J. Chem. Phys., Vol. 111, No. 7, 15 August 1999 I.-C. Yeh and M. L. Berkowitz

7
S. W. de Leeuw and J. W. Perram, Mol. Phys. 37, 1313 共1979兲. 26
G. Hummer, L. R. Pratt, and A. E. Garcı́a, J. Phys. Chem. A 102, 7885
8
E. Spohr, J. Chem. Phys. 107, 6342 共1997兲. 共1998兲.
9
F. E. Harris, Int. J. Quantum Chem. 68, 385 共1998兲. 27
P. H. Hünenberger and J. A. McCammon, J. Chem. Phys. 110, 1856
10
J. Hautman, J. W. Halley, and Y.-J. Rhee, J. Chem. Phys. 91, 467 共1989兲. 共1999兲.
11
Y.-J. Rhee, J. W. Halley, J. Hautman, and A. Rahman, Phys. Rev. B 40, 28
S. Boresch and O. Steinhauser, Ber. Bunsenges. Phys. Chem. 101, 1019
36 共1989兲. 共1997兲.
12
E. Wasserman, J. R. Rustad, A. R. Felmy, B. P. Hay, and J. W. Halley, 29
S. Bogusz, T. E. Cheatham III, and B. R. Brooks, J. Chem. Phys. 108,
Surf. Sci. 385, 217 共1997兲.
13
J. Hautman and M. L. Klein, Mol. Phys. 75, 379 共1992兲. 7070 共1998兲.
14
G. Aloisi, M. L. Foresti, R. Guidelli, and P. Barnes, J. Chem. Phys. 91,
30
J. E. Roberts and J. Schnitker, J. Chem. Phys. 101, 5024 共1994兲.
5592 共1989兲.
31
J. E. Roberts and J. Schnitker, J. Phys. Chem. 99, 1322 共1995兲.
15
J. Lekner, Physica A 176, 485 共1991兲.
32
E. R. Smith, Proc. R. Soc. London, Ser. A 375, 475 共1981兲.
33
16
S. Y. Liem and J. H. R. Clarke, Mol. Phys. 92, 19 共1997兲. R. P. Feynman, R. B. Leighton, and M. Sands, The Feynman Lectures on
17
A. H. Widmann and D. B. Adolf, Comput. Phys. Commun. 107, 167 Physics 共Addison-Wesley, Reading, 1964兲, Vol. 2.
共1997兲. 34
J. A. Hernando, Phys. Rev. A 44, 1228 共1991兲.
18
M. L. Berkowitz, I.-C. Yeh, and E. Spohr, to appear in Interfacial Elec- 35
I.-C. Yeh and M. L. Berkowitz, J. Electroanal. Chem. 450, 313 共1998兲.
trochemistry: Theory, Experiment, and Applications, edited by A. Wieck- 36
H. J. C. Berendsen, J. R. Grigera, and T. P. Straatsma, J. Phys. Chem. 91,
owski 共Marcel Dekker, New York兲 in press. 6269 共1987兲.
19
I.-C. Yeh and M. L. Berkowitz, J. Chem. Phys. 110, 7935 共1999兲. 37
K. Raghavan, K. Foster, K. Motakabbir, and M. Berkowitz, J. Chem.
20
I.-C. Yeh and M. L. Berkowitz, Chem. Phys. Lett. 301, 81 共1999兲. Phys. 94, 2110 共1991兲.
21
J. C. Shelley and G. N. Patey, Mol. Phys. 88, 385 共1996兲. 38
22 H. J. C. Berendsen, J. P. M. Postma, W. van Gunsteren, A. DiNola, and J.
J. Alejandre, D. J. Tildesly, and G. A. Chapela, J. Chem. Phys. 102, 4574
R. Haak, J. Chem. Phys. 81, 3684 共1984兲.
共1995兲. 39
23
J. C. Shelley, G. N. Patey, D. R. Bérard, and G. M. Torrie, J. Chem. Phys. M. A. Wilson, A. Pohorille, and L. R. Pratt, J. Phys. Chem. 91, 4873
107, 2122 共1997兲. 共1987兲.
24
S. E. Feller, R. W. Pastor, A. Rojnuckarin, S. Bogusz, and B. R. Brooks,
40
J. N. Glosli and M. R. Philpott, Electrochim. Acta 41, 2145 共1996兲.
J. Phys. Chem. 100, 17011 共1996兲.
41
R. Car and M. Parrinello, Phys. Rev. Lett. 55, 2471 共1985兲.
25 42
G. Hummer, N. Grønbech-Jensen, and M. Neumann, J. Chem. Phys. 109, J. W. Halley, A. Mazzolo, Y. Zhou, and D. Price, J. Electroanal. Chem.
2791 共1998兲. 450, 273 共1998兲.

Downloaded 22 May 2013 to 131.94.186.10. This article is copyrighted as indicated in the abstract. Reuse of AIP content is subject to the terms at: http://jcp.aip.org/about/rights_and_permissions

You might also like