원시데이터 수집 시스템
선정목록으로

An Efficient Algorithm for Classical Density Functional Theory in Three Dimensions: Ionic Solutions

관련 필름·전자재료 · (15) 디스플레이 패널재료

기본 정보

저자
  1. Knepley, Matthew G.
  2. Karpeev, Dmitry A.
  3. Davidovits Seth
  4. Eisenberg, Robert S.
  5. Gillespie Dirk
DOI
10.48550/arxiv.0910.1531
저널
arXiv (Cornell University)
발행년도
2022
발행기관
Cornell University
피인용수
0
라이선스
0
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.48550/arxiv.0910.1531
토픽
Electrostatics and Colloid Interactions
OpenAlex ID
W6910504613

평가 내용

관련도
관련
사업분야
필름·전자재료 · (15) 디스플레이 패널재료
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '필름·전자재료 > 디스플레이 패널재료' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Classical density functional theory (DFT) of fluids is a valuable tool to analyze inhomogeneous fluids. However, few numerical solution algorithms for three-dimensional systems exist. Here we present an efficient numerical scheme for fluids of charged, hard spheres that uses $\mathcal{O}(N\log N)$ operations and $\mathcal{O}(N)$ memory, where $N$ is the number of grid points. This system-size scaling is significant because of the very large $N$ required for three-dimensional systems. The algorithm uses fast Fourier transforms (FFT) to evaluate the convolutions of the DFT Euler-Lagrange equations and Picard (iterative substitution) iteration with line search to solve the equations. The pros and cons of this FFT/Picard technique are compared to those of alternative solution methods that use real-space integration of the convolutions instead of FFTs and Newton iteration instead of Picard. For the hard-sphere DFT we use Fundamental Measure Theory. For the electrostatic DFT we present two algorithms. One is for the \textquotedblleft bulk-fluid\textquotedblright functional of Rosenfeld [Y. Rosenfeld. \textit{J. Chem. Phys.} 98, 8126 (1993)] that uses $\mathcal{O}(N\log N)$ operations. The other is for the \textquotedblleft reference fluid density\textquotedblright (RFD) functional [D. Gillespie et al., J. Phys.: Condens. Matter 14, 12129 (2002)]. This functional is significantly more accurate than the bulk-fluid functional, but the RFD algorithm requires $\mathcal{O}(N^{2})$ operations.

본문 62,311자

본문 펼치기
An Efficient Algorithm for Classical Density Functional Theory in Three Dimensions: Ionic Solutions Matthew G. Knepley _Computation_ _Institute_ _University_ _of_ _Chicago_ <sup>_∗_</sup> Dmitry A. Karpeev _Mathematics_ _and_ _Computer_ _Science_ _Division_ _Argonne_ _National_ _Laboratory_ <sup>_†_</sup> Seth Davidovits _Department_ _of_ _Applied_ _Physics_ _and_ _Applied_ _Mathematics_ _Columbia_ _University_ Robert S. Eisenberg <sup>_‡_</sup> and Dirk Gillespie <sup>_§_</sup> _Department_ _of_ _Molecular_ _Biophysics_ _and_ _Physiology_ _Rush_ _University_ _Medical_ _Center_ (Dated: November 12, 2018) Classical density functional theory (DFT) of fluids is a valuable tool to analyze inhomogeneous fluids. However, few numerical solution algorithms for three-dimensional systems exist. Here we present an efficient numerical scheme for fluids of charged, hard spheres that uses _O_ ( _N_ log _N_ ) operations and _O_ ( _N_ ) memory, where _N_ is the number of grid points. This system-size scaling is significant because of the very large _N_ required for three-dimensional systems. The algorithm uses fast Fourier transforms (FFT) to evaluate the convolutions of the DFT Euler-Lagrange equations and Picard (iterative substitution) iteration with line search to solve the equations. The pros and cons of this FFT/Picard technique are compared to those of alternative solution methods that use real-space integration of the convolutions instead of FFTs and Newton iteration instead of Picard. For the hard-sphere DFT we use Fundamental Measure Theory. For the electrostatic DFT we present two algorithms. One is for the “bulk-fluid” functional of Rosenfeld [Y. Rosenfeld. _J._ _Chem._ _Phys._ 98, 8126 (1993)] that uses _O_ ( _N_ log _N_ ) operations. The other is for the “reference fluid density” (RFD) functional [D. Gillespie et al., J. Phys.: Condens. Matter 14, 12129 (2002)]. This functional is significantly more accurate than the bulk-fluid functional, but the RFD algorithm _N_ <sup>2´</sup> operations. requires _O_ ` PACS numbers: I. INTRODUCTION Since its inception 30 years ago (reviewed by Evans [1]), classical density functional theory (DFT) of fluids has developed into a fast and accurate theoretical tool to understand the fundamental physics of inhomogeneous fluids. To determine the structure of a fluid, DFT minimizes a free energy functional Ω[ _{ρk_ ( _⃗x_ ) _}_ ] by solving the Euler-Lagrange equations _δ_ Ω _/δρk_ = 0 for the inhomogeneous density profiles _ρk_ ( _⃗x_ ) of all the particle species _k_ . This approach has been used to model electrolytes, colloids, and charged polymers in confining geometries and at liquid-vapor interfaces (reviewed by Wu [2]). Our group has applied one dimensional DFT to biological problems involving ion channel permeation, successfully matching and predicting experimental data [3, 4]. DFT is different from direct particle simulations where the trajectories of many particles are followed over long times to compute averaged quantities of interest (e.g., density profiles). DFT computes these ensemble-averaged quantities directly. However, developing an accurate DFT is difficult and not straightforward. In fact, new, more accurate DFTs are still being developed for such fundamental systems as hard-sphere fluids [5, 6, 7], electrolytes [8, 9], and polymers [10]. When a functional does exist, DFT calculations are, in principle, much faster than particle simulations because DFT requires solving only a small set of Euler-Lagrange equations. This is especially true for systems with planar, spherical, or cylindrical symmetry because in many cases the Euler-Lagrange equations can be integrated analytically over the extra dimensions. The resulting equations have only one space variable, while particle simulations are always performed in three dimensions. In systems with little or no symmetry, however, the situation is different. Many of the DFTs for important systems like hard spheres [5, 6, 7, 11, 12], Lennard-Jones dispersion forces [13], and electrostatic interactions [8, 9, 11] require computing a significant number of convolutions. This increased computational complexity quickly increases _∗_ Electronic address: [knepley@ci.uchicago.edu](mailto:knepley@ci.uchicago.edu) _†_ Electronic address: [karpeev@mcs.anl.gov](mailto:karpeev@mcs.anl.gov) _‡_ Electronic address: [beisenbe@rush.edu](mailto:beisenbe@rush.edu) _§_ Electronic address: [dirk˙gillespie@rush.edu](mailto:dirk_gillespie@rush.edu) computational time. Moreover, commonly-used numerical techniques scale poorly with system size, requiring _O_ - _N_ <sup>2�</sup> operations (where _N_ is the number of grid points). For a complex system (e.g., in biology) that requires _N_ ≳ 10 <sup>6</sup> for sufficient spatial resolution, this can, in our experience, mean the difference between 1 week of computer time for an algorithm versus 1 hour for an _O_ ( _N_ log _N_ ) algorithm. For this reason, the vast majority of DFT calculations _O_ - _N_ <sup>2�</sup> are performed in one dimension, although there are software packages for three-dimensional system. For example, Tramonto Software for Nanostructured Fluids in Materials and Biology has been freely available since 2007 [14]. For three-dimensional DFT equations, several different methods are available to iteratively solve the equations and to evaluate the convolution integrals. Each choice offers different trade-offs in programming difficulty, computation time, memory usage, and system size scalability. For example, Newton iteration requires very few iteration steps compared to Picard (iterative substitution) iteration, but each Newton step generally takes significantly longer than a Picard step. For the convolution integrals, either fast Fourier transforms (FFTs) or real-space methods can be used. FFTs require a regular, evenly-spaced grid and _O_ ( _N_ log _N_ ) operations. On the other hand, real-space methods can (in principle) use an unevenly-spaced grid (giving a smaller _N_ than required by the FFTs), but require _O_ operations. The Tramonto software used Newton iteration with real-space convolution evaluation. - _N_ <sup>2�</sup> In this paper, we describe a FFT-based Picard iteration method. We chose this approach for several reasons. First, our numerical experiments showed that Picard iteration was generally faster than Newton and that in systems with liquid-like concentrations Newton did not always converge. Second, we found that real-space methods are impractical for DFT because of the specific kernels of the convolution integrals used in DFT. These convolutions integrate the densities _ρk_ ( _⃗x_ ) over the interiors and surfaces of spheres (described in detail in Section II). Neither the sphere interior nor surface can be represented with sufficient accuracy using real-space methods; however, they can be represented exactly using Fourier transforms. Lastly, our solution method requires _O_ ( _N_ log _N_ ) operations and _O_ ( _N_ ) memory for hard-sphere fluids. Therefore, it scales optimally with system size. Currently, this optimal scalability is for uncharged hard spheres. Electrostatics is more complicated. There are two kinds of electrostatic DFTs in general use, both based upon a perturbation technique. In the “bulk-fluid” (BF) method, the electrostatic component of the free energy functional is expanded around a BF [11], while the “reference fluid density” (RFD) method updates the reference fluid with information from the ionic densities _ρk_ ( _⃗x_ ) [8, 9]. The BF method is the most commonly used (in Tramonto, for example) and we show how to implement it with the optimal _O_ ( _N_ log _N_ ) operations and _O_ ( _N_ ) memory scaling. The BF electrostatic technique can, however, be _qualitatively_ incorrect [15] (see Fig. 2–4). As we describe in Section IV C, the mathematical structure of the RFD equations is fundamentally different from the convolution-based DFTs of hard spheres and the bulk-fluid electrostatics method. operations and _O_ ( _N_ ) memory implementation of the RFD electrostatics In this paper we also describe an _O_ - _N_ <sup>2�</sup> method. Reducing the number of operations for the RFD electrostatics method is the subject of future work. II. THEORY The DFT Euler-Lagrange equations determine the densities _ρi_ ( _⃗x_ ) in equilibrium in the grand canonical ensemble which is defined by the electrochemical potential for each ion species _i_ in the bath, _µ_ <sup>_bath_</sup> _i_ <sup>_bath_</sup> _i_ . The _µ_ <sup>_bath_</sup> _i_ <sup>_bath_</sup> _i_, in turn, are determined by the bath concentrations _ρ_ <sup>_bath_</sup> _i_, detailed in Appendix A. In equilibrium, the flux density for each ion species is identically zero, so that _∇µi_ = 0 _,_ (1) constraining the electrochemical potential for each ion species _µi_ to be a constant, _µ_ <sup>_bath_</sup> _i_ . Here the total electrochemical potential _µi_ ( _x_ ) is a functional of the densities _ρi_ ( _⃗x_ ), which is divided into three parts, an _external_ (ext) potential, an _ideal_ _gas_ portion, and an _excess_ (ex) chemical potential: <sup>_ext_</sup> _i_ ( _⃗x_ ) + _µ_ <sup>_ideal_</sup> _i_ <sup>_ex_</sup> _i_ <sup>(</sup> <sup>_⃗x_</sup> <sup>)</sup> <sup>_._</sup> (2) _µi_ ( _x_ ) = _µ_ <sup>_ext_</sup> _i_ <sup>_ideal_</sup> _i_ ( _⃗x_ ) + _µ_ <sup>_ex_</sup> _i_ The ideal gas part is given by _µ_ <sup>_ideal_</sup> _i_ ( _⃗x_ ) = _kT_ ln _ρi_ ( _⃗x_ ) _,_ (3) where _ρi_ represents the number density of species _i_, _k_ is Boltzmann’s constant, and _T_ is the Kelvin temperature. Moreover, _µ_ <sup>_ext_</sup> _i_ is the concentration independent part of the electrochemical potential arising from an external field. We use this to define the problem geometry, such as a hard wall. Lastly, _µ_ <sup>_ex_</sup> _i_ comes from particle interactions. Thus, in equilibrium we have - _<u>µbathi</u>_ _<u>−</u>_ _<u>µ</u>_ <sup>_ext_</sup> _<u>i</u>_ _._ (4) _ρi_ ( _⃗x_ ) = exp <sup>_ext_</sup> _<u>i</u>_ <u>(</u> _<u>x⃗</u>_ <u>)</u> _<u>−</u>_ _<u>µ</u>_ <sup>_ex_</sup> _<u>i</u>_ <sup>_⃗_</sup> <u>(</u> _<u>x⃗</u>_ <u>)</u> _<u>−</u>_ _<u>µ</u>_ <sup>_ex_</sup> _<u>i</u>_ <sup><u>(</u></sup> <sup>_<u>x⃗</u>_</sup> <sup><u>)</u></sup> _kT_ This paper outlines an algorithm for Eq. 4 for charged, hard spheres. For a system of charged hard spheres, DFT decomposes the excess chemical potential into two components, the hard sphere (HS) and electrostatic (ES) interactions, _µ_ <sup>_ex_</sup> _i_ <sup>_ex_</sup> _i_ = _µ_ <sup>_HS_</sup> _i_ <sup>_HS_</sup> _i_ ( _⃗x_ ) + _µ_ <sup>_ES_</sup> _i_ <sup>_ES_</sup> _i_ ( _⃗x_ ) = _µ_ <sup>_HS_</sup> _i_ <sup>_HS_</sup> _i_ ( _⃗x_ ) + _µ_ <sup>_SC_</sup> _i_ <sup>_SC_</sup> _i_ ( _⃗x_ ) + _zieφ_ ( _⃗x_ ) (5) where the electrostatic component is further decomposed into a mean field contribution, arising from interactions between uncorrelated ions, and a _screening_ (SC) term arising from electrostatic correlations. We define _zi_ to be the valence of species _i_ and _e_ the elementary charge. The mean electrostatic potential _φ_ satisfies Poisson’s equation _−_ _ϵ_ ∆ _φ_ = _e_ _i_ _ziρi_ ( _⃗x_ ) (6) where the dielectric coefficient _ϵ_ is a constant throughout the entire system. The definition of the hard-sphere and the screening components of _µi_ in terms of _ρi_ constitute the heart of the density functional theory approach and are discussed in detail in subsequent sections. III. HARD SPHERE INTERACTION The essential DFT-specific modeling of particle interactions is contained in the definition of the chemical potentials _µ_ <sup>_HS_</sup> _i_ <sup>_ES_</sup> _i_ . In order to model the interaction of hard spheres, which defines _µ_ <sup>_HS_</sup> _i_ <sup>_HS_</sup> _i_ and _µ_ <sup>_ES_</sup> _i_ <sup>_HS_</sup> _i_, we use the Fundamental Measure Theory (FMT) [12] developed by Rosenfeld. In FMT, a suitable basis is produced which best captures the dependence of the potential on the densities. These basis functions, _nα_, are obtained from averages of the densities _ρi_ ( _⃗x_ <sup>_′_</sup> ) _ωi_ <sup>_α_</sup> <sup>(</sup> <sup>_⃗x′ −⃗x_</sup> <sup>)</sup> <sup>_d_</sup> <sup>3</sup> <sup>_x′,_</sup> (7) _nα_ ( _⃗x_ ) = _i_ where the integral is taken over all space and _α ∈{_ 0 _,_ 1 _,_ 2 _,_ 3 _, V_ 1 _, V_ 2 _}_ . The weighting functions _ωi_ <sup>_α_</sup> <sup>are</sup> <sup>given</sup> <sup>by</sup> _<u>i</u>_ <sup>_⃗_</sup> _i_ <sup>0(</sup> <sup>_⃗r_</sup> <sup>) =</sup> <sup>_<u>ω</u>_</sup> <sup>2</sup> 4 _<u>i</u>_ <sup><u>(</u></sup> <sup>_⃗_</sup> _i_ <sup>1(</sup> <sup>_⃗r_</sup> <sup>) =</sup> <sup>_<u>ω</u>_</sup> <sup>2</sup> _<u>i</u>_ <sup><u>(</u></sup> <sup>_⃗r_</sup> <sup><u>)</u></sup> <sup>_<u>ω</u>_</sup> <sup>2</sup> (8) 4 _πRi_ _ωi_ <sup>0</sup> <sup>_<u>ω</u>_</sup> _<u>i</u>_ <sup>2(</sup> <sup>_<u>r⃗</u>_</sup> <sup><u>)</u></sup> 4 _πRi_ <sup>2</sup> _ωi_ <sup>1</sup> _i_ <sup>2(</sup> <sup>_⃗r_</sup> <sup>) =</sup> <sup>_δ_</sup> <sup>(</sup> <sup>_|⃗r| −_</sup> <sup>_Ri_</sup> <sup>)</sup> _ωi_ <sup>3</sup> _ωi_ <sup>2</sup> _i_ <sup>3(</sup> <sup>_⃗r_</sup> <sup>) =</sup> <sup>_θ_</sup> <sup>(</sup> <sup>_|⃗r| −_</sup> <sup>_Ri_</sup> <sup>)</sup> _i_ <sup>_V_</sup> <sup>1</sup> ( _⃗r_ ) = _⃗_ <sup>_<u>ω</u>_</sup> _<u>i</u>_ <sup>_V_</sup> <sup>2</sup> _i_ <sup>_V_</sup> <sup>2</sup> ( _⃗r_ ) = _⃗_ <sup>_<u>r</u>_</sup> _|⃗r_ _⃗_ <sup>_<u>r</u>_</sup> _|⃗r|_ <sup>_δ_</sup> <sup>(</sup> <sup>_|⃗r| −_</sup> <sup>_Ri_</sup> <sup>)</sup> _ωi_ <sup>_V_</sup> <sup>1</sup> _<u>i</u>_ <u>(</u> _⃗r_ <u>)</u> _⃗_ 4 <sup>_V_</sup> _πR_ <sup>2</sup> _i_ _ωi_ <sup>_V_</sup> <sup>2</sup> where _⃗r_ is the spherical radial vector. Note that the _V_ 1 and _V_ 2 functions are vectors, as are the associated _nV_ 1 and _nV_ 2 functions. If constant concentrations are used in equation (7), the “fundamental geometric measures” of the hard spheres (surface area, volume) are recovered. The HS chemical potential is given by [12] - _<u>∂</u>_ <u>Φ</u> _<u>HS</u>_ _∂nα_ _µ_ <sup>_HS_</sup> _i_ ( _⃗x_ ) = _kT_ _α_ ( _nα_ ( _⃗x_ <sup>_′_</sup> )) _ωi_ <sup>_α_</sup> <sup>(</sup> <sup>_⃗x −⃗x′_</sup> <sup>)</sup> <sup>_d_</sup> <sup>3</sup> <sup>_x′._</sup> (9) A number of different Φ _HS_ ( _nα_ ) functions have been developed [5, 6, 7, 11, 12], which have different consequences, most notably the equation of state for a hard sphere fluid modeled with the DFT formalism. We have used the anti-symmetrized version developed by Rosenfeld et al. [16], Φ _HS_ ( _nα_ ) = _−n_ 0 ln (1 _−_ _n_ 3) + <sup>_<u>n</u>_</sup> <sup><u>1</u></sup> <sup>_<u>n</u>_</sup> <sup><u>2</u></sup> <sup>_<u>−⃗</u>_</sup> <sup>_<u>nV</u>_</sup> <sup><u>1</u></sup> <sup>_<u>·⃗</u>_</sup> <sup>_<u>nV</u>_</sup> <sup><u>2</u></sup> 1 _−_ _n_ 3 + _<u>n</u>_ <sup>3</sup> <u>2</u> 24 _π_ (1 _−_ _n_ 3) <sup>2</sup> �1 _−⃗_ <sup>_<u>nV</u>_</sup> <sup><u>2</u></sup> <sup>_<u>·⃗</u>_</sup> <sup>_<u>nV</u>_</sup> <sup><u>2</u></sup> _n_ <sup>2</sup> 2 �3 _._ (10) However, other choices for Φ _HS_ ( _nα_ ) do not change the numerical scheme we describe below. It is also important to note that the _nα_ integrals (7) are, up to the sign of the argument of the weight function, convolutions. Since the weight functions _ω_ <sup>_α_</sup> are either even or odd, we can always convert the integral to a proper convolution. Therefore, they may be evaluated using the Fourier transform and the convolution theorem: _ρi_ ( _⃗x_ <sup>_′_</sup> ) _ωi_ <sup>_α_</sup> <sup>(</sup> <sup>_⃗x′ −⃗x_</sup> <sup>)</sup> <sup>_d_</sup> <sup>3</sup> <sup>_x′_</sup> _nα_ ( _⃗x_ ) = _i_ = _F_ <sup>_−_</sup> <sup>1</sup> ( _F_ ( _ρi_ ) _· F_ ( _ωi_ <sup>_α_</sup> <sup>))</sup> = _F_ <sup>_−_</sup> <sup>1 �</sup> _ρ_ ˆ _i ·_ _ω_ <sup>ˆ</sup> _i_ <sup>_α_</sup> - _,_ (11) where _F_ is the Fourier transform operator and the hat denotes the Fourier image of the function. The chemical <sup>_HS_</sup> _i_ can be calculated in exactly the same way, with _ρi_ replaced by <sup>_<u>∂</u>_</sup> <sup><u>Φ</u></sup> <sup>_<u>HS</u>_</sup> potential _µ_ <sup>_HS_</sup> _i_ _∂nα_ . In order to evaluate equation (11), we use the Fast Fourier Transform (FFT) for both the transformation of _ρi_ and the inverse transform of the product _ρ_ ˆ _i_ _·_ _ω_ <sup>ˆ</sup> _i_ <sup>_α_</sup> _i_ <sup>_α_</sup> <sup>are</sup> <sup>distributions,</sup> <sup>and</sup> <sup>are</sup> <sup>not</sup> <sup>easily</sup> <sup>represented</sup> <sup>on</sup> _i_ <sup>_α_</sup> <sup>.</sup> <sup>However,</sup> <sup>the</sup> <sup>_ω_</sup> _i_ <sup>_α_</sup> the rectangular grid required by the FFT. Even a very fine discretization introduces unacceptably large errors and destroys conservation properties of the basis (e.g., conservation of total mass). Thus, if constant concentrations are used in Eq. 7, the geometric measures of the sphere are not recovered with straightforward real space methods. In three dimensions, unlike one dimension, in our numerical experiments these errors persist no matter how fine a grid is used. This is a severe problem for real space methods, such as those used in Tramonto. This problem might be resolved through a specialized quadrature, however, the authors know of no solution yet proposed. Rather than attempt to discretize the weight functions on a grid, we compute the Fourier transform of each weight function analytically, and then evaluate them on the same mesh in Fourier space as used by the FFT. The calculations of the analytic Fourier transforms of _ω_ <sup>_α_</sup> are given in detail in Appendix B. This strategy allows us to calculate machine precision convolutions with arbitrary density fields, whereas the naive discretization of the weight functions produce substantial errors, often in excess of the field value itself. For example, using the convolution theorem, Eq. 11, we recover the geometric measures for a constant density field only when using analytic Fourier Transforms of the weight functions. IV. ELECTROSTATICS A. Mean Field In order to obtain _φ_, we solve the Poisson equation (6), for which the source is the charge density <sup>�</sup> _i_ <sup>_ziρi_</sup> <sup>.</sup> <sup>Since</sup> we have access to _ρ_ ˆ _i_ from the calculation of _nα_, we may solve (6) in the Fourier domain, in which the Laplacian is diagonal. Then the mean electrostatic potential _φ_ can be calculated by dividing by the eigenvalues of the discrete Fourier transform. At grid vertex _⃗j_, we have _φ_ ˆ( _⃗j_ ) = _<u>e</u>_ <sup><u>�</u></sup> <sup>_⃗_</sup> <sup><u>cos</u></sup> <sup>_<u>ky</u>_</sup> + <sup><u>1</u></sup> <sup>_<u>−</u>_</sup> <sup><u>cos</u></sup> <sup>_<u>kz</u>_</sup> _h_ <sup>2</sup> _y_ _h_ <sup>2</sup> _z_ _<u>i</u>_ <sup>_<u>ziρ</u>_</sup> <sup><u>ˆ</u></sup> <sup>_<u>i</u>_</sup> <sup><u>(</u></sup> <sup>_<u>j⃗</u>_</sup> <sup><u>)</u></sup> 2 _ϵ_ <u>�</u> <u>1</u> _<u>−</u>_ <u>cos</u> _<u>kx</u>_ + <sup><u>1</u></sup> <sup>_<u>−</u>_</sup> <sup><u>cos</u></sup> <sup>_<u>ky</u>_</sup> _h_ <sup>2</sup> _x_ _h_ <sup>2</sup> _y_ _h_ <sup>2</sup> _z_ (12) <u>�</u> where _hx_, _hy_, _hz_ are the grid spacings in each direction, and _kx_, _ky_, _kz_ are calculated as described in Appendix B. In order to fully specify the potential, we choose _φ_ <sup>ˆ</sup> (0) = 0, which is equivalent to having the additional constraint _φ_ = 0 _._ (13) _D_ for a domain _D_ . B. Bulk Fluid Method The _µ_ <sup>_SC_</sup> _i_ component of Eq. 5 attempts to account for electrostatic screening interactions. In the bulk fluid (BF) model, it is calculated as an expansion around the bath concentration. From [8] we have ∆ _ρj_ ( _⃗x_ <sup>_′_</sup> ) _d_ <sup>3</sup> _x_ <sup>_′_</sup> (14) <sup>_SC_</sup> _i_ = _µ_ <sup>_ES,bath_</sup> _i_ _µ_ <sup>_SC_</sup> _i_ <sup>_ES,bath_</sup> _i_ _−_ _j_ _|⃗x−⃗x_ <sup>_′_</sup> _|≤Rij_ - _c_ <sup>(2)</sup> _ij_ <sup>(2)</sup> _ij_ <sup>(</sup> <sup>_⃗x,⃗x′_</sup> <sup>) +</sup> <sup>_ψij_</sup> <sup>(</sup> <sup>_⃗x,⃗x′_</sup> <sup>)</sup> <sup>_bath_</sup> _j_, _c_ <sup>(2)</sup> _ij_ where _Rij_ = _Ri_ + _Rj_, _Ri_ is the radius of ions of species _i_, ∆ _ρj_ = _ρj_ _−_ _ρ_ <sup>_bath_</sup> _j_ <sup>(2)</sup> _ij_ <sup>(</sup> <sup>_⃗x,⃗x′_</sup> <sup>)</sup> <sup>is</sup> <sup>the</sup> <sup>two-particle</sup> <sup>direct</sup> correlation function, _ψij_ ( _⃗x,⃗x_ <sup>_′_</sup> ) is the interaction potential of two point particles of charges _zie_ and _zje_ located at _⃗x_ and _⃗x_ <sup>_′_</sup>, so that [17] _c_ <sup>(2)</sup> _ij_ <sup>(</sup> <sup>_⃗x,⃗x′_</sup> <sup>) +</sup> <sup>_ψij_</sup> <sup>(</sup> <sup>_⃗x,⃗x′_</sup> <sup>)</sup> <sup>_<u>i</u>_</sup> 8 <sup>_<u>z</u>_</sup> _πϵ_ <sup>_<u>j</u>_</sup> <sup>_<u>e</u>_</sup> <sup>2</sup> - _<u>|</u>_ 2 _⃗xλ−iλ⃗x_ <sup>_′_</sup> _j|_ (15) �� = <sup>_<u>zi</u>_</sup> 8 <sup>_<u>z</u>_</sup> _πϵ_ <sup>_<u>j</u>_</sup> <sup>_<u>e</u>_</sup> <sup>2</sup> _<u>|⃗x−⃗x</u>_ <sup>_′_</sup> _<u>|</u>_ <u>1</u> 2 _λiλj_ <sup>_−_</sup> <sup>_<u>λ</u>_</sup> _λ_ <sup>_<u>i</u>_</sup> _i_ <sup><u>+</u></sup> _λ_ <sup>_<u>λ</u>_</sup> _j_ <sup>_<u>j</u>_</sup> <sup>+</sup> _|⃗x−⃗x_ <sup>_′_</sup> _|_ - <u>(</u> _<u>λi−λj</u>_ <u>)</u> <sup>2</sup> + 2 2 _λiλj_ where _λk_ = _Rk_ + _s_ with _s_ = 2Γ1 <sup>,</sup> <sup>the</sup> <sup>screening</sup> <sup>length</sup> <sup>of</sup> <sup>the</sup> <sup>bath</sup> <sup>[18,</sup> <sup>19].</sup> <sup>The</sup> <sup>mean</sup> <sup>spherical</sup> <sup>approximation</sup> <sup>(MSA)</sup> screening parameter Γ is derived in [19] (see also Appendix A). The integral in the expansion for _µ_ <sup>_SC_</sup> _i_ is a convolution, which we also evaluate in the Fourier domain. This requires _F_ (∆ _ρj_ ), calculated using the FFT, and the transform of equation (15) which is calculated analytically below. It should be noted that in this model of electrostatics, transformations of the _c_ <sup>(2)</sup> _ij_ <sup>+</sup> <sup>_ψij_</sup> <sup>need</sup> <sup>only</sup> <sup>be</sup> <sup>calculated</sup> <sup>once,</sup> since they are fixed by the problem parameters. Additionally, _F_ (∆ _ρj_ ) = _F_ ( _ρj_ _−_ _ρbath_ ) = _F_ ( _ρj_ ) _−F_ ( _ρbath_ ) (16) where we have already calculated _F_ ( _ρj_ ) for the _nα_ calculation in Eq. (11), and _F_ ( _ρbath_ ) is a constant. Thus, the only necessary Fourier transform each iteration is the inverse transformation. The accuracy of the transform of Eq. 15 is key to the convergence of the nonlinear iteration for the equilibrium condition. In fact, we were unable to obtain convergence when evaluating these transforms numerically using the FFT, and were forced to develop analytical expressions. In order to calculate each piece of _c_ ˆ <sup>(2)</sup> _ij_ <sup>+</sup> <sup>_ψ_</sup> <sup>ˆ</sup> <sup>_ij_</sup> <sup>,</sup> <sup>we</sup> <sup>must</sup> <sup>take</sup> the Fourier transform of powers of _r_ . The generic term has the form _B_ ( _R_ ) _r_ <sup>_n_</sup> _e_ <sup>_i⃗k·⃗v_</sup> = <sup><u>4</u></sup> <sup>_<u>π</u>_</sup> _k_ - _R_ _R_ _dr_ _r_ <sup>_n_</sup> <sup>+1</sup> sin( _kr_ ) = <sup><u>4</u></sup> <sup>_<u>π</u>_</sup> 0 _k_ _k_ <sup>_<u>π</u>_</sup> <sup>_In,_</sup> (17) where _k_ is the magnitude of _⃗k_ . We derive a recursive definition for the integral _In_ using integration by parts: - _R_ (18) 0 <sup>+</sup> <sup>_<u>n</u>_</sup> <sup><u>+1</u></sup> _k_ <sup>_Jn_</sup> _n ≥−_ 1   0 _n < −_ 1 - _−_ <sup>_<u>rn</u>_</sup> _k_ <sup>+1</sup> _k_ <sup>+1</sup> cos( _kr_ ) _In_ = - _R_ _dr_ _r_ <sup>_n_</sup> <sup>+1</sup> sin( _kr_ ) = 0 - _R_ _._ (19) 0 <sup>_−_</sup> <sup>_<u>n</u>_</sup> _k_ <sup>_Jn−_</sup> <sup>2</sup> _n ≥_ 0    0 _n <_ 0 - _<u>r</u>_ <sup>_n_</sup> <sup>+1</sup> <sup>+1</sup> _k_ sin( _kr_ ) _Jn_ = For Eq.15, we need the terms - _R_ _dr_ _r_ <sup>_n_</sup> cos( _kr_ ) = 0 _I−_ 1 = <sup><u>1</u></sup> (20) _k_ <sup>(1</sup> <sup>_−_</sup> <sup>cos(</sup> <sup>_kR_</sup> <sup>))</sup> _I_ 0 = _−_ <sup>_<u>R</u>_</sup> _k_ _I_ 1 = _−_ <sup>_<u>R</u>_</sup> _k_ <sup>2</sup> <sup>_<u>R</u>_</sup> _k_ <sup>cos(</sup> <sup>_kR_</sup> <sup>) +</sup> _k_ <sup><u>12</u></sup> _k_ <sup>_<u>R</u>_</sup> <sup>2</sup> <sup>sin(</sup> <sup>_kR_</sup> <sup>)</sup> <sup>_−_</sup> _k_ <sup><u>2</u></sup> (21) _k_ <sup><u>12</u></sup> <sup>sin(</sup> <sup>_kR_</sup> <sup>)</sup> <sup>_<u>R</u>_</sup> _k_ <sup>2</sup> <sup>cos(</sup> <sup>_kR_</sup> <sup>) + 2</sup> _k_ <sup>_<u>R</u>_</sup> <sup>2</sup> (22) _k_ <sup><u>23</u></sup> <sup>(1</sup> <sup>_−_</sup> <sup>cos(</sup> <sup>_kR_</sup> <sup>))</sup> <sup>_._</sup> We also need their limits as _k_ tends to 0, Then we have lim _k→_ 0 <u>4</u> _<u>π</u>_ _k_ <sup>_I−_</sup> <sup>1</sup> <sup>=</sup> <sup>2</sup> <sup>_πR_</sup> <sup>2</sup> (23) lim _k→_ 0 lim _k→_ 0 <u>4</u> _<u>π</u>_ (24) _k_ <sup>_I_</sup> <sup>0</sup> <sup>=</sup> <sup><u>4</u></sup> <sup>_<u>πR</u>_</sup> 3 <sup>3</sup> <u>4</u> _<u>π</u>_ _k_ <sup>_I_</sup> <sup>1</sup> <sup>=</sup> <sup>_πR_</sup> <sup>4</sup> <sup>_._</sup> (25) - <u>(</u> _<u>λi −</u>_ _<u>λj</u>_ <u>)</u> <sup>2</sup> + 2 2 _λiλj_ - <u>(</u> _<u>λi −</u>_ _<u>λj</u>_ <u>)</u> <sup>2</sup> _I−_ 1 <sup>(2)</sup> _ij_ <sup>+</sup> <sup>_ψ_</sup> <sup>ˆ</sup> <sup>_ij_</sup> <sup>=</sup> <sup>_<u>zizje</u>_</sup> <sup>2</sup> <u>1</u> _I_ 1 _−_ <sup>_<u>λi</u>_</sup> <sup><u>+</u></sup> <sup>_<u>λj</u>_</sup> 2 _λiλj_ _λiλj_ _c_ ˆ <sup>(2)</sup> _ij_ _ϵ|⃗k|_ _._ (26) _I_ 0 + C. Reference Fluid Density Method The Reference Fluid Density (RFD) method is an alternative to the BF method to compute _µ_ <sup>_SC_</sup> _i_ . As shown in [15] and Fig. 2–4 below, it is more accurate than the BF method. The RFD electrostatic functional is detailed in [8, 9], and briefly summarized here. This perturbation method approximates _µ_ <sup>_SC_</sup> _i_ [ _{ρk_ ( _⃗y_ ) _}_ ] with a functional Taylor series, truncated after the quadratic term, expanded around a reference fluid: <sup>ref</sup> _k_ <sup>(</sup> <sup>_⃗y_</sup> <sup>)</sup> _c_ <sup>(1)</sup> _i_ _µ_ <sup>_SC_</sup> _i_ <sup>_SC_</sup> _i_ [ _{ρk_ ( _⃗y_ ) _}_ ] _≈_ _µ_ <sup>_SC_</sup> _i_ _i_ <sup>ref</sup> _k_ <sup>(</sup> <sup>_⃗y_</sup> <sup>)</sup> �� _−_ _kT_ - ; _⃗x_ _i_ �� _ρ_ <sup>ref</sup> _k_ - ∆ _ρi_ ( _⃗x_ ) _d_ <sup>3</sup> _x_ (27) �� _ρ_ <sup>ref</sup> _k_ �� _ρ_ <sup>ref</sup> _k_ <sup>ref</sup> _k_ <sup>(</sup> <sup>_⃗y_</sup> <sup>)</sup> _−_ <sup>_<u>kT</u>_</sup> 2 _i,j_ �� _c_ <sup>(2)</sup> _ij_ �� _c_ <sup>(2)</sup> _ij_ ∆ _ρi_ ( _⃗x_ ) ∆ _ρj_ ( _⃗x_ <sup>_′_</sup> ) _d_ <sup>3</sup> _x_ _d_ <sup>3</sup> _x_ <sup>_′_</sup> - ; _⃗x,⃗x_ <sup>_′_</sup> <sup>�</sup> with ∆ _ρi_ ( _⃗x_ ) = _ρi_ ( _⃗x_ ) _−_ _ρ_ <sup>ref</sup> _i_ ( _⃗x_ ) (28) where _ρ_ <sup>ref</sup> _i_ ( _⃗x_ ) is a given (and possibly inhomogeneous) reference density profile. By defining RFD densities to be the bulk densities, we recover the BF perturbation method. The RFD approach makes the reference fluid densities functionals of the particle densities _ρi_ ( _⃗x_ ) [9]: _ρ_ <sup>ref</sup> _k_ <sup>(</sup> <sup>_⃗y_</sup> <sup>) =</sup> <sup>_ρ_</sup> <sup>¯</sup> <sup>_k_</sup> <sup>[</sup> <sup>_{ρi_</sup> <sup>(</sup> <sup>_⃗x_</sup> <sup>)</sup> <sup>_}_</sup> <sup>;</sup> <sup>_⃗y_</sup> <sup>]</sup> <sup>_,_</sup> (29) where _ρ_ ¯ _k_ is the RFD functional. In [9], it is shown that the first-order direct correlation function (DCF) is given by <sup>(1)</sup> _i_ ( _⃗x_ ) = _−_ <sup><u>1</u></sup> _c_ <sup>(1)</sup> _i_ _kT_ _<u>δµ</u>_ <sup>_SC_</sup> _<u>i</u>_ (30) _δρi_ ( _⃗x_ ) _≈_ _c_ ¯ <sup>(1)</sup> _i_ ( _⃗x_ ) + _j_ _c_ ¯ <sup>(2)</sup> _ij_ <sup>(</sup> <sup>_⃗x,⃗x′_</sup> <sup>) ∆</sup> <sup>_ρj_</sup> <sup>(</sup> <sup>_⃗x′_</sup> <sup>)</sup> <sup>_d_</sup> <sup>3</sup> <sup>_x′_</sup> (31) where ∆ _ρk_ ( _⃗x_ ) = _ρk_ ( _⃗x_ ) _−_ _ρ_ ¯ _k_ ( _⃗x_ ) _,_ (32) _c_ ¯ <sup>(1)</sup> _i_ <sup>(1)</sup> _i_ ( _⃗x_ ) = _c_ <sup>(1)</sup> _i_ <sup>(1)</sup> _i_ [ _{ρ_ ¯ _k_ ( _⃗y_ ) _}_ ; _⃗x_ ] _,_ (33) _c_ ¯ <sup>(2)</sup> _ij_ <sup>(2)</sup> _ij_ <sup>(</sup> <sup>_⃗x,⃗x′_</sup> <sup>)</sup> <sup>=</sup> <sup>_c_</sup> <sup>(2)</sup> _ij_ <sup>(2)</sup> _ij_ <sup>[</sup> <sup>_{ρ_</sup> <sup>¯</sup> <sup>_k_</sup> <sup>(</sup> <sup>_⃗y_</sup> <sup>)</sup> <sup>_}_</sup> <sup>;</sup> <sup>_⃗x,⃗x′_</sup> <sup>]</sup> <sup>_._</sup> (34) For the RFD functional, the densities _ρ_ ¯ _k_ ( _⃗x_ ) must be chosen so that both the first- and second-order DCFs _c_ ¯ <sup>(1)</sup> _i_ and _c_ ¯ <sup>(2)</sup> _ij_ can be estimated. This is possible because the densities _{ρ_ ¯ _k_ ( _⃗x_ ) _}_ are a mathematical construct and do not represent a physical fluid. The particular choice of the RFD functional we use here is that of [8], which is also discussed in [9]: <u>3</u> _ρ_ ¯ _i_ [ _{ρk_ ( _⃗x_ <sup>_′_</sup> ) _}_ ; _⃗x_ ] = 4 _πRSC_ <sup>3</sup> <sup>(</sup> <sup>_⃗x_</sup> <sup>)</sup> _|⃗x_ <sup>_′_</sup> _−⃗x|≤RSC_ ( _⃗x_ ) _αi_ ( _⃗x_ <sup>_′_</sup> ) _ρi_ ( _⃗x_ <sup>_′_</sup> ) _d_ <sup>3</sup> _x_ <sup>_′_</sup> (35) where the _{αk}_ are chosen so that the fluid with densities _{αk_ ( _⃗x_ ) _ρk_ ( _⃗x_ ) _}_ is charge-neutral and has the same ionic strength as the fluid with densities _{ρk_ ( _⃗x_ ) _}_ at every point _⃗x_ . The radius of the sphere _RSC_ ( _⃗x_ ) over which we average is the local electrostatic length scale. Specific formulas for _αk_ ( _⃗x_ ) and _RSC_ ( _⃗x_ ) are given in [8, 9]. In order to estimate the electrostatic DCFs _c_ ¯ <sup>(1)</sup> _i_ <sup>(2)</sup> _ij_ <sup>(</sup> <sup>_⃗x,⃗x′_</sup> <sup>)</sup> <sup>at</sup> <sup>each</sup> <sup>point,</sup> <sup>we</sup> <sup>use</sup> <sup>a</sup> <sup>bulk</sup> <sup>formulation</sup> <sup>(specifically</sup> <sup>the</sup> <sup>MSA)</sup> <sup>at</sup> <sup>each</sup> <sup>(1)</sup> _i_ ( _⃗x_ ) and _c_ ¯ <sup>(2)</sup> _ij_ point _⃗x_ with densities _ρ_ ¯ _k_ ( _⃗x_ ), detailed in Appendix A. The RFD reference density _ρ_ <sup>_ref_</sup> ( _⃗x_ ) can be rewritten as the following smoothing operation _ρ_ <sup>_ref_</sup> ( _⃗x_ ) = _ρ_ ( _⃗x_ <sup>_′_</sup> ) <sup>_<u>θ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>|x⃗</u>_</sup> <sup>_′ −_</sup> <u>43</u> _<u>π</u>_ <sup>_⃗_</sup> <sup>_<u>xR| −</u>_</sup> _SC_ <sup>3</sup> <sup>(</sup> <sup>_<u>R⃗xSC</u>_</sup> <sup>)</sup> <sup><u>(</u></sup> <sup>_<u>x⃗</u>_</sup> <sup><u>))</u></sup> _dx_ <sup>_′_</sup> (36) where _θ_ ( _x_ ) = 1 _−_ _H_ ( _x_ ) and _H_ is the Heaviside function [20] _._ (37) _H_ ( _x_ ) =  0 _,_ _x <_ 0 1 _,_ _x ≥_ 0 Eq. 36 resembles a convolution, but unfortunately the screening radius _RSC_ ( _⃗x_ ) is nonconstant, and thus the convo lution theorem is inapplicable. We compute _RSC_ using (Eq. 42 in [8]) <u>�</u> <sup>_⃗_</sup> <sup>_<u>ρ</u>_</sup> <sup><u>˜</u></sup> <sup>_<u>i</u>_</sup> <sup><u>(</u></sup> <sup>_<u>x⃗</u>_</sup> <sup><u>)</u></sup> <sup>_<u>Ri</u>_</sup> <u>1</u> + (38) _i_ <sup>_ρ_</sup> <sup>˜</sup> <sup>_i_</sup> <sup>(</sup> <sup>_⃗x_</sup> <sup>)</sup> 2Γ( _⃗x_ ) _RSC_ ( _⃗x_ ) = _<u>i</u>_ <sup>_<u>ρ</u>_</sup> <sup><u>˜</u></sup> <sup>_<u>i</u>_</sup> <sup><u>(</u></sup> <sup>_<u>x⃗</u>_</sup> <sup><u>)</u></sup> <sup>_<u>Ri</u>_</sup> <u>�</u> where _ρ_ ˜ _i_ ( _⃗x_ ) indicates the density of species _i_ after we have forced the mixture be locally electroneutral, but have the same ionic strength. We can express Eq. 36 in the compact notation _ρ_ <sup>_ref_</sup> ( _⃗x_ ) = K <sup>_x_</sup> _⃗_ ( _⃗x_ <sup>_′_</sup> ) _ρ_ ( _⃗x_ <sup>_′_</sup> ) _dx_ <sup>_′_</sup> (39) where the kernel K <sup>_x_</sup> _⃗_ ( _⃗x_ <sup>_′_</sup> ) is given by K <sup>_x_</sup> _⃗_ ( _⃗x_ <sup>_′_</sup> ) = <sup>_<u>θ</u>_</sup> <sup><u>(</u></sup> <sup>_<u>|x⃗</u>_</sup> <sup>_′ −_</sup> <u>43</u> _<u>π</u>_ <sup>_⃗_</sup> <sup>_<u>xR| −</u>_</sup> _SC_ <sup>3</sup> <sup>(</sup> <sup>_<u>R⃗xSC</u>_</sup> <sup>)</sup> <sup><u>(</u></sup> <sup>_<u>x⃗</u>_</sup> <sup><u>))</u></sup> _._ (40) Since the Fourier transform is an _L_ 2 isometry, this expression is equivalent to _ρ_ <sup>_ref_</sup> ( _⃗x_ ) = �� - _∗_ Kˆ <sup>_x_</sup> _⃗_ ( _⃗k_ ) _ρ_ ˆ( _⃗k_ ) _dk_ (41) where we use the hat to indicate the Fourier transform and star to indicate complex conjugation. Furthermore, we can calculate the Fourier transform of our kernel analytically. We have Kˆ <sup>_x_</sup> _⃗_ ( _⃗k_ ) = = = K <sup>_x_</sup> _⃗_ ( _⃗x_ <sup>_′_</sup> ) _e_ <sup>_−i⃗k·⃗x′_</sup> _dx_ <sup>_′_</sup> (42) - _<u>θ</u>_ <u>(</u> _<u>|x⃗</u>_ _′ −⃗_ _<u>x| −</u>_ _<u>R</u>_ <u>)</u> <u>43</u> _<u>π</u>_ <sup>_R_</sup> <sup>3</sup> _e_ <sup>_−i⃗k·⃗x′_</sup> _dx_ <sup>_′_</sup> (43) - _<u>θ</u>_ <u>(</u> _<u>|x⃗</u>_ _′′| −_ _<u>R</u>_ <u>)</u> <u>43</u> _<u>π</u>_ <sup>_R_</sup> <sup>3</sup> _e_ <sup>_−i⃗k·_</sup> <sup>(</sup> <sup>_⃗x′′_</sup> <sup>+</sup> <sup>_⃗x_</sup> <sup>)</sup> _dx_ <sup>_′_</sup> (44) <u>3</u> - 2 _π_ = 4 _πR_ <sup>3</sup> <sup>_e−i⃗k·⃗x_</sup> 0 _dφ_ - _π_ _dθ_ sin _θ_ 0 - _R_ _drr_ <sup>2</sup> _e_ <sup>_−i⃗k·⃗x′′_</sup> (45) 0 (46) where _R_ = _RSC_ ( _⃗x_ ). This integral has been evaluated above in Section IV B, so that Kˆ <sup>_x_</sup> _⃗_ ( _⃗k_ ) = 3 _e_ <sup>_i⃗k·⃗x_</sup> - <u>1</u> <u>1</u> _−_ _k_ <sup>2</sup> _R_ <sup>2</sup> <sup>cos</sup> <sup>_kR_</sup> <sup>+</sup> _k_ <sup>3</sup> _R_ <sup>3</sup> <sup>sin</sup> <sup>_kR_</sup> _._ (47) Thus we can calculate the action of the screening operator by performing the dot product in Eq. 39 at each vertex of the real space grid. This algorithm has overall complexity _O_ ( _N_ <sup>2</sup> ), however it is accurate to machine precision. Alternative schemes to accelerate the operator application will be discussed in Section VII. In order for this formulation to be consistent, we demand that the screening radius used to construct the reference fluid density _ρ_ <sup>_ref_</sup> is identical to that given by the local MSA closure. Thus, we augment our system of equations with Γ _SC_ [ _ρ_ ] ( _⃗x_ ) = Γ _MSA_ - _ρ_ <sup>_ref_</sup> ( _ρ_ )� ( _⃗x_ ) _._ (48) Here, the lhs of Eq. 48 indicates the value of Γ used to determine the reference fluid density using Eq. 36, whereas the rhs is calculated using Eq. A6, with _ρ_ <sup>_ref_</sup> replacing _ρ_ <sup>_bath_</sup> as the local equilibrium value. This equation is added to our global system at each vertex, producing the same number of additional equations as another ion species. V. DISCRETIZATION AND SOLUTION IN EQUILIBRIUM Problem (4) is solved on a rectangular prism domain, supporting a different system size in each Cartesian direction. This geometry is well supported by the PETSc `DA` abstraction [21], which also allows for easy parallelization. The grid is uniform in each direction, which allows one to compute the convolutions using Fourier transform techniques. PETSc supports the FFTW package [22] automatically. Periodic boundary conditions are naturally enforced by the FFT. The bath potential, _µ_ <sup>_bath_</sup> _i_ <sup>_bath_</sup> _i_, and external potential, _µ_ <sup>_ext_</sup> _i_ <sup>_ext_</sup> _i_, are calculated just once during the problem setup. The geometry is defined using external potentials, _µ_ <sup>_ext_</sup> . The excess chemical potential is dependent on the concentration, as is the electrostatic potential, so these are recalculated at each residual evaluation. Moreover, the evaluation of the ten <sup>_<u>∂</u>_</sup> _∂n_ <sup><u>Φ</u></sup> <sup>_<u>HS</u>_</sup> _α_ and the _nα_ at each grid point must be done at each residual evaluation since they are also dependent upon _ρi_ . A. Nonlinear solver Equation (4) is a fixed point problem for each ion species _i_, _ρi_ ( _⃗x_ ) = _G_ [ _{ρk_ ( _⃗x_ <sup>_′_</sup> ) _}_ ] _._ (49) The problem is solved using a Picard iteration, since in our experiments Newton’s method was both less robust, in that it did not always converge, and less efficient, since it took more time when it did converge. Each new iterate _ρ_ <sup>(1)</sup> is generated from an initial guess _ρ_ <sup>(0)</sup> using _ρ_ <sup>(1)</sup> = _G_ ( _ρ_ <sup>(0)</sup> ) _,_ (50) where _ρ_ is understood as a vector of densities over ion species. However, with higher bath densities, it is necessary to use a line search during the Picard update rather than just successive substitution. Thus, our new guess _ρ_ <sup>_∗_</sup> is given by _ρ_ <sup>_∗_</sup> = (1 _−_ _α_ ) _ρ_ <sup>(1)</sup> + _αρ_ <sup>(0)</sup> _,_ (51) where _α_ is the line search parameter. We determine _α_ by sampling the function _G_ at several densities, fitting the residual values, _||ρ −_ _G_ ( _ρ_ ) _||_, to a polynomial in _α_, and choosing _α_ min corresponding to the minimum residual value. We currently have a quadratic line search, suggested to us by Roland Roth, which fits the squared _L_ 2 norms of the residuals from Eq. 50 as this seemed to better match curves in the search parameter we sampled for testing. In addition, because _n_ 3( _⃗x_ ) is the local packing fraction, it should never exceed unity. We bound it by 0.9 which allows us to bound the maximum allowable search parameter _α_ since _n_ 3 is a linear function, _||n_ 3((1 _−_ _α_ ) _ρ_ <sup>(0)</sup> ) + _n_ 3( _αρ_ <sup>(1)</sup> ) _||∞_ _<_ _||_ (1 _−_ _α_ ) _n_ 3( _ρ_ <sup>(0)</sup> ) _||∞_ + _||αn_ 3( _ρ_ <sup>(1)</sup> ) _||∞_ = (1 _−_ _α_ ) _||n_ 3( _ρ_ <sup>(0)</sup> ) _||∞_ + _α||n_ 3( _ρ_ <sup>(1)</sup> ) _||∞_ _<_ 0 _._ 9 _._ Here, _||⃗x||∞_ is the _L_ <sup>_∞_</sup> norm, which picks the maximum value of _⃗x_ in the finite dimensional case. This bound was also suggest by Roland Roth. Finally, we have <u>0</u> _<u>.</u>_ <u>9</u> _<u>−||n</u>_ <u>3(</u> _<u>ρ</u>_ <sup>(0)</sup> <u>)</u> _<u>||∞</u>_ _α <_ _||n_ 3( _ρ_ <sup>(1)</sup> ) _||∞_ _−||n_ 3( _ρ_ <sup>(0)</sup> ) _||∞_ _._ (52) We have also experimented with Newton’s method, forming the action of the Jacobian operator using finite differ ences. The linear systems are solved with GMRES. Both fixed linear system tolerances and those chosen according to the Eisenstat-Walker scheme were used. However, the Newton method was not competitive with Picard due to linear convergence through most Newton steps and the large cost of computing the Jacobian action. B. Numerical Stability With a coarse grid, there is a potential for serious roundoff error when calculating both the average over an ion surface, _n_ 2, and the directional average, _nV_ 2. From the definition (7) we have: _ρi_ ( _⃗x_ <sup>_′_</sup> ) _ωi_ <sup>2(</sup> <sup>_⃗x −⃗x′_</sup> <sup>)</sup> <sup>_d_</sup> <sup>3</sup> <sup>_x′_</sup> (53) _ρi_ ( _⃗x_ <sup>_′_</sup> ) _δ_ ( _|⃗x −⃗x_ <sup>_′_</sup> _| −_ _Ri_ ) _d_ <sup>3</sup> _x_ <sup>_′_</sup> (54) _ρi_ ( _x_ + _⃗r_ ) _d_ Ω _._ (55) _S_ ( _Ri_ ) _n_ 2( _⃗x_ ) = = = _i_ _i_ _i_ Here _⃗r_ = _Ri_ (sin _θ_ cos _φ,_ sin _θ_ sin _φ,_ cos _θ_ ) and _S_ ( _Ri_ ) is the surface of a sphere of radius _Ri_ . Likewise, _ρi_ ( _⃗x_ <sup>_′_</sup> ) _ωi_ <sup>_V_</sup> <sup>2</sup> ( _⃗x −⃗x_ <sup>_′_</sup> ) _d_ <sup>3</sup> _x_ <sup>_′_</sup> (56) _ρi_ ( _⃗x_ <sup>_′_</sup> ) _⃗_ <sup>_<u>r</u>_</sup> (57) _r_ <sup>_δ_</sup> <sup>(</sup> <sup>_|⃗x −⃗x′| −_</sup> <sup>_Ri_</sup> <sup>)</sup> _ρi_ ( _⃗x_ + _⃗r_ )(sin _θ_ cos _φ,_ sin _θ_ sin _φ,_ cos _θ_ ) _d_ Ω _._ (58) _S_ ( _Ri_ ) _<u>|n</u>_ <u>2</u> _<u>|</u>_ _|nV_ 2 _|_ <sup>_≤_</sup> <sup>1</sup> <sup>_._</sup> (59) _nV_ 2( _⃗x_ ) = = = _i_ _i_ _i_ Appendix C shows that However, discretization errors in the computation of the last term of Eqn. (10), or its derivative _∂n∂_ <u>Φ</u> _α_ <sup>,</sup> <sup>can</sup> <sup>combine</sup> to produce large values of this ratio, stalling the nonlinear solve and leading to unphysical artifacts. These artifacts produce large density oscillations at sharp corners along the geometric boundary. These oscillations eventually cause divergence of the nonlinear iteration and prevent accurate solution of the equations. We alleviate this problem by enforcing the bound explicitly. VI. VERIFICATION At several points in the calculation, we perform consistency checks of the results. Moreover, we compare our results to known thermodynamic solutions, in the limit of very fine meshes. We first check that we recover the fundamental measures, which are easily computed analytically, when we compute _nα_ ( _ρ_ ) with a constant unit density. We also check that in the bath, _n_ 3 is equal to the combined volume fraction of the ion bath concentrations. Moreover, we can verify that in symmetric situations, such as near a hard wall, the solution must be homogeneous over each plane parallel to the wall. As described earlier, these consistency checks are satisfied when analytic Fourier transforms of the weight functions _ωi_ are used, but not using the FFT or real space methods. We can solve an effectively one-dimensional problem with a wall at _z_ = 0 and periodic in each dimension in order to compare with thermodynamic results. With purely hard sphere interactions, we have another consistency check, namely a relation between the pressure _P_ in the bath and the density of each species at the wall [15, 23], _βP_ = _i_ _ρi_ ( _Ri_ ) _,_ (60) where we evaluate the density at the point of closest approach to the wall. The FMT DFT of hard spheres is known to satisfy Eq. 60, but this relation holds only approximately for electrostatic functionals described here [15]. A. Hard sphere fluids A very sensitive test for calculations of ionic solutions are thermodynamic sum rules, such as Eq. 60. We use this as the figure of merit to assess the accuracy of our hard sphere calculations. A notable advantage of the DFT formulation over particle simulations, such as a Monte Carlo for hard spheres, is that both very low and very high densities can be handled efficiently with no algorithmic changes. Low densities are difficult for canonical ensembles, such as canonical MC or Molecular Dynamics (MD), because very large systems are required for accurate statistics. A grand canonical formulation of MC can mitigate the problems for low densities, however, high densities still result in jamming and high rejection rates, requiring very long run times. This can sometimes be repaired using very specialized techniques [24, 25], however currently these cannot be applied to general systems of the type we present below. In order to demonstrate the performance of our algorithm across a range of densities, we simulate a hard sphere liquid against a hard wall. The particles have radius 0.1nm. In Fig. 1, we show both the simulation time and accuracy over volume fractions ranging from 10 <sup>_−_</sup> <sup>5</sup> to 0 _._ 4. Our results are quite accurate, and even at liquid densities the FIG. 1: Both accuracy and simulation time are shown for a hard sphere liquid of 0.1nm particles. The domain is divided into cubes which are 0.05nm _×_ 0.05nm _×_ .00625nm. calculations done on a laptop take less than 1.5 hours. Note that, although this is an effectively one dimensional problem to facilitate verification, the computation was performed in a full three dimensional geometry. B. Ionic fluids Calculation of ionic densities near a hard wall also provides a sensitive test for the accuracy of the DFT method. In [15], it is demonstrated that the BF version of DFT (Eq. 14–15) provides qualitatively incorrect densities, when compared with the RFD functional (Eq. 28–35) and high resolution Monte Carlo simulation. We have successfully reproduced the one-dimensional DFT and Monte Carlo results with the 3D code, attesting to the accuracy of our approach. Below, we detail a representative simulation. For our trial calculation, we examine a salt solution of univalent ions. The cation has radius 0.1nm, the anion 0.2125nm. Each species has a 1M bath concentration. The simulation cell, 2nm _×_ 2nm _×_ 6nm, is periodic in each direction. A hard, uncharged wall is placed a _z_ = 0. We discretize the density on a 21 _×_ 21 _×_ 161 grid. The results FIG. 2: Comparing 1D and 3D DFT cation concentrations to MC simulations. The wall is uncharged, the cation concentration is 1M, and the ions are univalent. The 1D RFD DFT is shown with the blue squares, 3D RFD DFT with blue circles, and MC with green squares. are insensitive to the resolution in the transverse ( _x −_ _y_ ) directions, but very sensitive in the normal ( _z_ ) direction. We verify the homogeneity of the solution across _x −_ _y_ planes to machine precision. In Fig. 2 and Fig. 3, we show the excellent match between 1D and 3D DFT results, with MC results shown for comparison. The mean electrostatic potential is shown in Fig. 4, also with good agreement. The BF calculations are currently much more efficient than the RFD calculations, needing only 1.5 minutes com pared to more than a day to run, since BF scales as _O_ ( _N_ log _N_ ), whereas the RFD method scales as _O_ ( _N_ <sup>2</sup> ) and additional iterates are needed to obtain a converged reference density. However, the extra investment of time for RFD computations is necessary because the BF solution is qualitatively incorrect compared to Monte Carlo simulations. FIG. 3: Comparing 1D and 3D DFT anion concentrations to MC simulations. The wall is uncharged, the cation concentration is 1M, and the ions are univalent. The 1D RFD DFT is shown with the blue squares, 3D RFD DFT with blue circles, and MC with green squares. VII. CONCLUSIONS AND FUTURE WORK We have presented a full numerical strategy for solving the three dimensional equilibrium DFT system. The hard sphere calculation accurately reproduces thermodynamic sum rules, and agrees with prior MC simulation. Moreover, using the improved RFD electrostatic formulation due to Gillespie et al. [8], we can accurately reproduce electrostatic behavior near a hard wall for species of differing radii. Thus, the DFT can now become a powerful tool for full three dimensional chemical simulation, accurately capturing both the energetic and entropic contributions to the solution. There are also several avenues for improvement of the RFD algorithm and extension of the capabilities of the current code. The dominant cost of this algorithm is the calculation of the reference density used to describe electrostatic screening. The current algorithm is very accurate, but requires _O_ ( _N_ <sup>2</sup> ) work. Since the Fourier kernel is smooth and has rapid decay, it should be possible to construct a multiresolution analysis of it, resulting in a fast method for application. Moreover, the many FFTs performed at each Picard step could be replaced by Unequally-Spaced FIG. 4: Comparing 1D and 3D DFT mean electrostatic potential to MC simulations. The wall is uncharged, the cation concentration is 1M, and the ions are univalent. The 1D RFD DFT is shown with the blue squares, 3D RFD DFT with blue circles, and MC with green squares. FFTs or wavelet decompositions, which would allow adaptive refinement and increase the size of problems we can efficiently compute. The FFT and Fast Wavelet Transform (FWT) lend themselves readily to a scalable parallel implementations. In fact, it should also be possible to offload these transforms onto a multicore co-processor, such as the Tesla 1060C GPU [26]. This will make large scale simulations of charged hard spheres accessible to working scientists even on a laptop or desktop computer. These algorithmic improvements are the focus of current research. Acknowledgments This material is based upon work supported by, or in part by, the U. S. Army Research Laboratory and the U. S. Army Research Office under contract/grant number W911NF-09-1-0488 (DG). The work was also supported by NIH grant GM076013 (RSE). APPENDIX A: CALCULATION OF THE BATH CHEMICAL POTENTIAL Here we describe the formulas for the electrochemical potential in a homogeneous fluid. When the DFT for hard spheres uses a Percus-Yevick equation of state [27], and the electrostatics is described using MSA [18, 19]. We follow the treatment in [28]. The bath chemical potential _µ_ <sup>_bath_</sup> _i_ has two components, hard sphere and electrostatic, <sup>_bath_</sup> _i_ = _µ_ <sup>_HS,bath_</sup> _i_ <sup>_ES,bath_</sup> _i_ (A1) _µ_ <sup>_bath_</sup> _i_ <sup>_HS,bath_</sup> _i_ + _µ_ <sup>_ES,bath_</sup> _i_ which are calculated thermodynamically [29], <sup><u>9</u></sup> 2∆ <sup>_<u>ξ</u>_</sup> <u>2</u> <sup>2</sup> <sup>_<u>σ</u>_</sup> <sup>2</sup> _<u>i</u>_ <sup>2</sup> <sup>+</sup> <sup>_<u>πP</u>_</sup> 6 _<u>bath</u>_ <sup>_HS_</sup> _kT_ <sup>_<u>σ</u>_</sup> _<u>i</u>_ <sup>3</sup> _<u>i</u>_ 6 <sup>_HS_</sup> _kT_ _µ_ <sup>_HS,bath_</sup> _i_ = _kT_ _<u>i</u>_ _−_ ln ∆+ <sup><u>3</u></sup> <sup>_<u>ξ</u>_</sup> <sup><u>2</u></sup> <sup>_<u>σi</u>_</sup> <sup><u>+ 3</u></sup> <sup>_<u>ξ</u>_</sup> <sup><u>1</u></sup> <sup>_<u>σ</u>_</sup> <sup>2</sup> _<u>i</u>_ <u>2</u> <sup><u>+ 3</u></sup> <sup>_<u>ξ</u>_</sup> <sup><u>1</u></sup> <sup>_<u>σ</u>_</sup> <sup>2</sup> + <sup><u>9</u></sup> <sup>_<u>ξ</u>_</sup> <sup>2</sup> ∆ 2∆ (A2) based upon the auxiliary variables, where _σi_ is the ion diameter of species _i_, _ξn_ = <sup>_<u>π</u>_</sup> 6 _j_ <sup>_bath_</sup> _j_ _σj_ <sup>_n_</sup> _ρ_ <sup>_bath_</sup> _j_ _j_ <sup>_n_</sup> _n ∈{_ 0 _, . . .,_ 3 _}_ (A3) ∆= 1 _−_ _ξ_ 3 (A4) and the pressure due to hard sphere interaction in the bath, <u>2</u> <sup><u>3</u></sup> <sup>_<u>ξ</u>_</sup> <sup>3</sup> ∆ <sup>3</sup> _bath_ <sup>_HS_</sup> <sup>=</sup> <sup><u>6</u></sup> <sup>_<u>kT</u>_</sup> - _<u>ξ</u>_ ∆0 <sup>+</sup> <sup><u>3</u></sup> ∆ <sup>_<u>ξ</u>_</sup> <sup><u>12</u></sup> <sup>_<u>ξ</u>_</sup> <sup><u>2</u></sup> <u>2</u> <sup><u>3</u></sup> ∆ <sup>_<u>ξ</u>_</sup> <sup><u>12</u></sup> <sup>_<u>ξ</u>_</sup> <sup><u>2</u></sup> + <sup><u>3</u></sup> ∆ <sup>_<u>ξ</u>_</sup> <sup>33</sup> _._ (A5) _Pbath_ <sup>_HS_</sup> _π_ The calculation of _µ_ <sup>_HS,bath_</sup> _i_ <sup>_HS,bath_</sup> _i_ as given above is straightforward, but _µ_ <sup>_ES,bath_</sup> _i_, <sup>_ES,bath_</sup> _i_, on the other hand, is dependent on an implicitly defined parameter Γ, the MSA inverse screening length, �2 4Γ <sup>2</sup> = <sup>_<u>e</u>_</sup> <sup>2</sup> _kTϵ_ _j_ _ρ_ <sup>_bath_</sup> _j_ - _zj_ _−_ _ησj_ <sup>2</sup> 1 + Γ _σj_ (A6) where _η_ represents the effects of nonuniform ionic diameters _η_ = <sup><u>1</u></sup> _<u>π</u>_ Ω 2∆ _j_ _ρ_ <sup>_bath_</sup> _<u>j</u>_ _σjzj_ (A7) 1 + Γ _σj_ and Ωis determined by Ω= 1 + <sup>_<u>π</u>_</sup> 2∆ _j_ _ρ_ <sup>_bath_</sup> _<u>j</u>_ _<u>j</u>_ _<u>j</u>_ (A8) 1 + Γ _σj_ <sup>_bath_</sup> _<u>j</u>_ _σj_ <sup>3</sup> This implicit relationship is a quartic equation in Γ, which we solve using Newton’s method. We may then calculate the bath potential _<u>e</u>_ <sup>2</sup> <sup>_ES,bath_</sup> _i_ = _−_ - <u>Γ</u> _<u>zi</u>_ <sup>2</sup> - <u>2</u> _<u>zi −</u>_ _<u>ησi</u>_ 2 _<u>i</u>_ + <sup>_<u>ησ</u>_</sup> <sup>2</sup> 1 + Γ _σi_ 3 �� _._ (A9) _µ_ <sup>_ES,bath_</sup> _i_ 4 _πϵϵ_ 0 - <u>Γ</u> _<u>zi</u>_ <sup>2</sup> + _ησi_ 1 + Γ _σi_ APPENDIX B: EVALUATION OF THE FOURIER TRANSFORM OF THE WEIGHTING FUNCTIONS We must be careful to evaluate our analytic transforms at the same _⃗k_ values, in the same order, as those computed using the particular implementation of FFT we use. Given a _D_ dimensional grid, the vector _{kd}_ which corresponds to the vertex _{jd}_ of our Cartesian grid is given by    _N_ <u>(</u> _<u>Ndhdd−jd</u>_ <u>)</u> _jd_ _>_ <sup>_<u>N</u>_</sup> 2 <sup>_<u>d</u>_</sup> 2 (B1) _kd_ = _N_ <u>2</u> _<u>πjdhdd</u>_ _jd_ _≤_ <sup>_<u>N</u>_</sup> 2 <sup>_<u>d</u>_</sup> _<u>−</u>_ <u>2</u> _<u>π</u>_ <u>(</u> _<u>Nd−jd</u>_ <u>)</u> where _Nd_ is the number of grid points in dimension _d ∈{x, y, z}_, and _hd_ is the grid spacing _NLd−d_ 1 <sup>.</sup> We begin with the calculation of _ω_ ˆ _i_ <sup>2,</sup> _dθ_ sin _θRi_ <sup>2</sup> 0 - _∞_ _dr_ _r_ <sup>2</sup> _δ_ ( _|r| −_ _Ri_ ) _e_ <sup>_−ı⃗k·⃗x_</sup> (B2) 0 - _∞_ _ω_ ˆ _i_ <sup>2</sup> <sup>=</sup> = - 2 _π_ _dφ_ 0 - 2 _π_ _dφ_ 0 - _π_ _dθ_ sin _θ_ 0 - _π_ _i_ <sup>2</sup> <sup>_e−ıRi⃗k·x_</sup> <sup>ˆ</sup> <sup>_._</sup> (B3) We now choose a rotated coordinate system (the prime system) in which _⃗k_ points purely in the _z_ <sup>_′_</sup> direction, in order to take advantage of the rotational symmetry of the problem. In the new coordinate system, _dθ_ <sup>_′_</sup> sin _θ_ <sup>_′_</sup> _Ri_ <sup>2</sup> 0 _i_ <sup>2</sup> <sup>_e−ıRik_</sup> _z_ <sup>_′_</sup> _z_ <sup>_′_</sup> <sup>cos</sup> <sup>_θ′_</sup> (B4) _ω_ ˆ _i_ <sup>2</sup> = - 2 _π_ _dφ_ <sup>_′_</sup> 0 - _π_ _z_ <sup>_′_</sup> <sup>cos</sup> <sup>_θ′_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_ı_</sup> <sup>sin (</sup> <sup>_Rik_</sup> _z_ <sup>_′_</sup> _z_ <sup>_′_</sup> <sup>cos</sup> <sup>_θ′_</sup> <sup>))</sup> (B5) = 2 _πRi_ <sup>2</sup> - _π_ _dθ_ <sup>_′_</sup> sin _θ_ <sup>_′_</sup> (cos ( _Rikz_ <sup>_′_</sup> 0 = <sup><u>4</u></sup> <sup>_<u>πRi</u>_</sup> <sup><u>sin (</u></sup> <sup>_<u>Rik</u>_</sup> _<u>z</u>_ <sup>_′_</sup> <sup><u>)</u></sup> _kz_ <sup>_′_</sup> which, in the original coordinate system, is From Eq. (8), we also have _ω_ ˆ _i_ <sup>0</sup> <sup>=</sup> _Ri|⃗k|_ (B6) _._ (B7) _ω_ ˆ _i_ <sup>2</sup> <sup>=</sup> - 4 _πRi_ sin _Ri|⃗k|_ _|⃗k|_ _ω_ ˆ _i_ <sup>1</sup> <sup>=</sup> sin - _Ri|⃗k|_ - _Ri|⃗k|_ _|⃗k|_ sin _._ (B8) Recognizing that the theta function can be obtained as the integral of a delta function, we have _ω_ ˆ _i_ <sup>3</sup> <sup>=</sup> - _Ri_ _dr_ ˆ _ωi_ <sup>2</sup> 0 _i_ <sup>2</sup> <sup>_|R_</sup> _i_ <sup>=</sup> <sup>_r_</sup> (B9) = <sup><u>4</u></sup> <sup>_<u>π</u>_</sup> _|⃗k|_ - _Ri_ _dr_ _r_ sin 0 - _r|⃗k|_ (B10) = <sup><u>4</u></sup> <sup>_<u>π</u>_</sup> _|⃗k|_ <sup>3</sup> sin - _Ri|⃗k|_ _−_ _Ri|⃗k|_ cos - �� _Ri|⃗k|_ (B11) Following a similar procedure as in the _ω_ ˆ _i_ <sup>2</sup> <sup>calculation,</sup> <sup>but</sup> <sup>keeping</sup> <sup>track</sup> <sup>of</sup> <sup>the</sup> <sup>vector</sup> <sup>nature</sup> <sup>of</sup> <sup>_ωV_</sup> <sup>1</sup> <sup>and</sup> <sup>_ωV_</sup> <sup>2,</sup> _dθ_ <sup>_′_</sup> sin _θ_ <sup>_′_</sup> _Ri_ <sup>2</sup> 0 _i_ <sup>2</sup> <sup>_e−ıRik_</sup> _z_ <sup>_′_</sup> _z_ <sup>_′_</sup> <sup>cos</sup> <sup>_θx_</sup> <sup>ˆ</sup> (B12) _ω_ ˆ _i_ <sup>_V_</sup> <sup>2</sup> = - 2 _π_ _dφ_ <sup>_′_</sup> 0 - _π_ - _π_ _z_ <sup>_′_</sup> <sup>cos</sup> <sup>_θ′_</sup> <sup>)</sup> <sup>_k_</sup> <sup>ˆ</sup> _z_ <sup>_′_</sup> (B13) = _−_ 2 _πıRi_ _dθ_ <sup>_′_</sup> sin _θ_ <sup>_′_</sup> cos _θ_ <sup>_′_</sup> sin ( _Rikz_ <sup>_′_</sup> 0 = <sup>_<u>−</u>_</sup> <sup><u>4</u></sup> <sup>_<u>πı</u>_</sup> _|⃗k|_ <sup>2</sup> sin - _Ri|⃗k|_ _−_ _Ri|⃗k|_ cos _Ri|⃗k|_ - _Ri|⃗k|_ �� _k._ ˆ (B14) _Ri|⃗k|_ The preceding expressions for _ω_ ˆ _i_ <sup>_α_</sup> <sup>may</sup> <sup>be</sup> <sup>evaluated</sup> <sup>at</sup> <sup>_|⃗k|_</sup> <sup>= 0,</sup> <sup>but</sup> <sup>care</sup> <sup>must</sup> <sup>be</sup> <sup>taken</sup> <sup>when</sup> <sup>calculating</sup> <sup>the</sup> <sup>limit.</sup> _ω_ ˆ _i_ <sup>0</sup> sin - _Ri|⃗k|_ _Ri|⃗k|_ lim _|⃗k|→_ 0 _i_ <sup>0</sup> <sup>=</sup> <sup>lim</sup> _|⃗k|→_ 0 = 1 _Ri|⃗k|_ _ω_ ˆ _i_ <sup>1</sup> lim _|⃗k|→_ 0 _i_ <sup>1</sup> <sup>=</sup> <sup>_Ri_</sup> _ω_ ˆ _i_ <sup>2</sup> _i_ lim _|⃗k|→_ 0 _i_ <sup>2</sup> <sup>= 4</sup> <sup>_πR_</sup> _i_ <sup>2</sup> - �3 _Ri|⃗k|_ 6    _−_ _Ri|⃗k|_ 1 _−_ - �2 _Ri|⃗k|_ 2       _Ri|⃗k| −_ _ω_ ˆ _i_ <sup>3</sup> <u>4</u> _<u>π</u>_ _|⃗k|_ <sup>3</sup> lim _|⃗k|→_ 0 _i_ <sup>3</sup> <sup>=</sup> <sup>lim</sup> _|⃗k|→_ 0 = <sup><u>4</u></sup> _i_ 3 <sup>_πR_</sup> <sup>3</sup> _ω_ ˆ _i_ <sup>_V_</sup> <sup>1</sup> lim _|⃗k|→_ 0 _i_ <sup>_V_</sup> <sup>1</sup> = 0 _ω_ ˆ _i_ <sup>_V_</sup> <sup>2</sup> lim _|⃗k|→_ 0 _i_ <sup>_V_</sup> <sup>2</sup> = 0 It should be noted these are the limits one would expect, since in the _|⃗k|_ = 0 case we are simply integrating either a spherical delta or step function over all space, thereby recovering surface area and volume expressions for a sphere. APPENDIX C: DIRECTIONAL AVERAGE BOUND We can bound the directional average of the density over a sphere in terms of the unweighted average, and thus we can bound the ratio - _nV_ 2( _x_ )��2 (C1) _|n_ <sup>2</sup> ( _x_ ) _|_ <sup>2</sup> in the calculation of Φ( _n_ ) from Eq. 10. We let _ν_ ( _θ, φ_ ) be the unit vector at the surface of the sphere in the ( _θ, φ_ ) direction. Using Fubini’s Theorem and the Cauchy-Schwarz inequality, we have _S_ <sup>2</sup> <sup>_ν_</sup> <sup>(</sup> <sup>_θ′, φ′_</sup> <sup>)</sup> <sup>_ρj_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r′_</sup> <sup>)</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_′_</sup> (C2) _S_ <sup>2</sup> <sup>_ν_</sup> <sup>(</sup> <sup>_θ, φ_</sup> <sup>)</sup> <sup>_ρi_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r_</sup> <sup>)</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_·_</sup> _n_ <sup>2</sup> _V_ 2 <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>=</sup> = _≤_ _≤_ _≤_ = _ij_ _ij_ _ij_ _ij_ _ij_ _ij_ _S_ <sup>2</sup> <sup>_ρi_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r_</sup> <sup>)</sup> <sup>_d_</sup> <sup>Ω</sup> _S_ <sup>2</sup> _×S_ <sup>2</sup> <sup>_ν_</sup> <sup>(</sup> <sup>_θ, φ_</sup> <sup>)</sup> <sup>_· ν_</sup> <sup>(</sup> <sup>_θ′, φ′_</sup> <sup>)</sup> <sup>_ρi_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r_</sup> <sup>)</sup> <sup>_ρj_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r′_</sup> <sup>)</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_′_</sup> (C3) _S_ <sup>2</sup> _×S_ <sup>2</sup> <sup>_|ν_</sup> <sup>(</sup> <sup>_θ, φ_</sup> <sup>)</sup> <sup>_· ν_</sup> <sup>(</sup> <sup>_θ′, φ′_</sup> <sup>)</sup> <sup>_||ρi_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r_</sup> <sup>)</sup> <sup>_ρj_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r′_</sup> <sup>)</sup> <sup>_|d_</sup> <sup>Ω</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_′_</sup> (C4) _S_ <sup>2</sup> _×S_ <sup>2</sup> <sup>_|ν_</sup> <sup>(</sup> <sup>_θ, φ_</sup> <sup>)</sup> <sup>_||ν_</sup> <sup>(</sup> <sup>_θ′, φ′_</sup> <sup>)</sup> <sup>_|ρi_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r_</sup> <sup>)</sup> <sup>_ρj_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r′_</sup> <sup>)</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_′_</sup> (C5) _S_ <sup>2</sup> _×S_ <sup>2</sup> <sup>_ρi_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r_</sup> <sup>)</sup> <sup>_ρj_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r′_</sup> <sup>)</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_′_</sup> (C6) _S_ <sup>2</sup> <sup>_ρj_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_r′_</sup> <sup>)</sup> <sup>_d_</sup> <sup>Ω</sup> <sup>_′_</sup> (C7) = _n_ <sup>2</sup> 2 <sup>(</sup> <sup>_x_</sup> <sup>)</sup> (C8) so that [1] R. Evans, Adv. Phys. 28, 143 (1979). [2] J. Wu, J. AIChE 52, 1169 (2006). - _nV_ 2( _x_ )��2 _≤_ 1 _._ (C9) _|n_ <sup>2</sup> ( _x_ ) _|_ <sup>2</sup> [3] D. Gillespie, L. Xu, Y. Wang, and G. Meissner, J. Phys. Chem. B 109, 15598 (2005). [4] D. Gillespie, Biophys. J. 94, 1169 (2008). [5] R. Roth, R. Evans, A. Lang, and G. Kahl, J. Phys.: Condens. Matter 14, 12063 (2002). [6] Y.-X. Yu and J. Wu, J. Chem. Phys. 117, 10156 (2002). [7] H. Hansen-Goos and R. Roth, J. Phys.: Condens. Matter 18, 8413 (2006). [8] D. Gillespie, W. Nonner, and R. S. Eisenberg, J. Phys.: Condens. Matter 14, 12129 (2002). [9] D. Gillespie, W. Nonner, and R. S. Eisenberg, Phys. Rev. E 68, 031503 (2003). [10] Y.-X. Yu and J. Wu, J. Chem. Phys 116, 7094 (2002). [11] Y. Rosenfeld, J. Chem. Phys. 98, 8126 (1993). [12] Y. Rosenfeld, Phys. Rev. Lett. 63, 980 (1989). [13] R. Evans, _Fundamentals_ _of_ _Inhomogeneous_ _Fluids_ (CRC, 1992), chap. Density functionals in the theory of nonuniform fluids, pp. 85–176. [14] URL `[https://software.sandia.gov/DFTfluids/index.html](https://software.sandia.gov/DFTfluids/index.html)` . [15] D. Gillespie, M. Valisk´o, and D. Boda, J. Phys.: Condens. Matter 17, 6609 (2005). [16] Y. Rosenfeld, M. Schmidt, H. L¨owen, and P. Tarazona, Phys. Rev. E 55, 4245 (1997). [17] L. Blum and Y. Rosenfeld, Journal of Statistical Physics 63, 1177 (1991). [18] E. Waisman and J. L. Lebowitz, The Journal of Chemical Physics 56, 3086 (1972), URL `[http://link.aip.org/link/](http://link.aip.org/link/?JCP/56/3086/1)` `[?JCP/56/3086/1](http://link.aip.org/link/?JCP/56/3086/1)` . [19] L. Blum, Molecular Physics 30, 1529 (1975). [20] URL `[http://en.wikipedia.org/wiki/Heaviside_step_function](http://en.wikipedia.org/wiki/Heaviside_step_function)` . [21] S. Balay, K. Buschelman, V. Eijkhout, W. D. Gropp, D. Kaushik, M. G. Knepley, L. C. McInnes, B. F. Smith, and H. Zhang, Tech. Rep. ANL-95/11 - Revision 3.0.0, Argonne National Laboratory (2009), URL `[http://www.mcs.anl.gov/petsc/docs](http://www.mcs.anl.gov/petsc/docs)` . [22] M. Frigo and S. G. Johnson, Proceedings of the IEEE 93, 216 (2005), special issue on “Program Generation, Optimization, and Platform Adaptation”. [23] P. A. Martin, Rev. Mod. Phys. 60, 1075 (1988). [24] J. Goodman and A. D. Sokal, Phys. Rev. D 40, 2035 (1989). [25] D. Frenkel, PNAS 101, 17571 (2004). [26] URL `[http://www.nvidia.com/object/product_tesla_c1060_us.html](http://www.nvidia.com/object/product_tesla_c1060_us.html)` . [27] J. L. Lebowitz, Phys. Rev. 133, A895 (1964). [28] W. Nonner, L. Catacuzzeno, and B. Eisenberg, Biophys. J. 79, 1976 (2000). [29] W. Nonner, D. Gillespie, D. Henderson, and R. Eisenberg, J. Phys. Chem. 105, 6427 (2001).

섹션 본문

섹션 본문이 없습니다.

참고문헌

참고문헌 정보가 없습니다.