Legendre transforms for electrostatic energies
aa r X i v : . [ c ond - m a t . s t a t - m ec h ] N ov Legendre transforms for electrostaticenergies
Justine S. Pujos and A.C. Maggs
CNRS Gulliver, ESPCI, 10 rue Vauquelin, 75231 Paris, Cedex 05.
Abstract
We review the use of Legendre transforms in the formulation of electrostatic energies incondensed matter. We show how to render standard functionals expressed in terms of theelectrostatic potential, φ , convex – at the cost of expressing them in terms of the vectorfield D . This leads to great simplification in the formulation of numerical minimisation ofelectrostatic energies coupled to other physical degrees of freedom. We also demonstratethe equivalence of recent functionals for dielectrics derived using field theory methods toclassical formulations in terms of the electric polarisation. I. Introduction
The Legendre transform is a powerful tool with multiple applications in physics [1]. In classicalmechanics it allows one to interchange the Lagrangian and Hamiltonian viewpoints; in ther-modynamics one regularly transforms ensembles to simplify calculations, choosing the ensemblewhich most closely idealizes a given experimental setup. In this article we will demonstrate theutility of Legendre transforms in reformulating energies and free energies in electrostatics, witha particular eye for numerical applications and mean field theory.Our principal motivation for a deeper study of this transformation applied to electrostaticproblems is quite practical. Many formulations of (free) energy functions in condensed matterphysics involve the electrostatic potential, an important example is the Poisson-Boltzmann energyfunctional in the theory of ionic solutions. However when we examine closely these functionalswe see that they are concave functions of the potential. While the stationary value of thefunctional is indeed the correct value of the energy that we wish to study, the concavity leads tocomplications in many situations. In particular we can not perform a simultaneous minimisationof both electrostatic and configurational energies in a simulation. One is generally obliged tofully solve by iterative methods the electrostatic problem at each time step of the iteration overthe configurational degrees of freedom - such as densities or polymer configuration. This leadsto codes which are complicated to write, and sometimes slow to run.We remind the reader that for a convex function f ( x ), its Legendre transform is defined [1]from the expression L [ f ] ( s ) = g ( s ) = sx − f ( x ) (1)where on the right of eq. (1) we express x as a function of s from the equation s = dfdx . Thistransformation is an involution: L [ g ] ( x ) = f ( x ). The simplest example is an Hookian spring forwhich f ( x ) = kx / g ( s ) = s / (2 k ). We will also usethe notation L ( f ) = ˜ f . In this article we show that by introducing new variational parametersin a free energy with the help of Lagrange multipliers and then performing a Legendre transformof the resulting free energy we can find functionals that are convex in all degrees of freedom;we will illustrate this with a mean field formulation of phase separation coupled to electrostaticinteractions.We now illustrate the approach with the simplest possible electrostatic problem, interactionbetween free charges, ρ f in a heterogeneous dielectric medium: Consider the energy functionalexpressed in terms of the electric potential φ . U = Z (cid:26) − ǫ ( r )( ∇ φ ) ρ f φ (cid:27) d r (2)1he variational equation for the field is then the Poisson equation:div ǫ ( r )grad φ = − ρ f ( r ) (3)Substituting the solution of the Poisson equation in the electrostatic energy we find U = 12 Z φ ( r ) ρ f ( r ) d r (4)We convert the variational problem for the potential by introducing the new variable E = −∇ φ .To do so we introduce the (vector) Lagrange multiplier D . The stationary point of eq. (2) isidentical to that of the following expression [2]: U = Z (cid:26) − ǫ ( r ) E ρ f φ + D · ( E + ∇ φ ) (cid:27) d r (5)It is at this point that we recognise that the variational equations for E correspond to a Legendretransform with dual variable D . We also integrate by parts the product D · ∇ φ to find − φ div D ,dropping boundary terms assumed to be zero. Thus the stationary point of eq. (2) is identicalto the stationary point of U = Z (cid:26) D ǫ ( r ) + φ ( ρ − div D ) (cid:27) d r (6)Variations in φ now impose Gauss’ law, div D − ρ f = 0, while the energy has been renderedconvex by the transformations introduced, [3, 4].We now illustrate applications of this transformation to two problems: Firstly the theoryof phase separation of immiscible fluids in the presence of electrostatic interactions due to ions.Secondly we provide a translation between two very different visions of the theory of dielectrics.Recent formulations of implicit dielectrics pass by elaborate field-theory mappings and find ageneralised Poisson-Boltzmann equation with a Langevin correction. We show how to map thisdescription onto a free energy expressed in terms of a polarisation field with long-ranged dipolarinteractions. We believe that these equivalent descriptions can lead to a deeper understandingof the underlying physics.In the following we will work with free energy densities, rather than the integrated energiesand we (silently) integrate by parts when needed. II. Phase separation coupled to electrostatics
A mixture of two solvents (A and B) near their miscibility limit and in the presence of salt displaysinteresting properties which have been explored in recent experiments [5]. Density fluctuationscouple to the dielectric properties of the medium, and in turn influence the partition of ions inthe fluctuating solvent field. The experimental system has turned out to be very rich, and allowsone to adjust the effective interaction between colloidal particles using temperature as a controlparameter.A simplified theoretical description of such systems is given in [6, 7] who propose the followingfree energy density expressed in terms of the densities and potentials: f ( φ, Ψ , c + , c − ) = f m (Ψ) − ǫ (Ψ)( ∇ φ ) + ( c + − c − ) eφ − (cid:0) ∆ u + c + + ∆ u − c − (cid:1) Ψ + k B T X j ( c j ln ( c j /c j ) − c j ) (7)Ψ describes the composition fluctuations of the fluid mixture. c + and c − are the concentrationof positive and negative monovalent ions, with ∆ u + and ∆ u − their relative preferences between2 A-liquid environment and a B-liquid environment. As above φ is the electrostatic potential.We see that fluctuations in concentration couple via ǫ (Ψ) to a coupling with the concentrationfluctuations of the ions. f m (Ψ) includes all the terms that are only dependent on Ψ: f m (Ψ) = f (Ψ) + c ( ∇ Ψ) − µ Ψ;with f (Ψ) the free energy due to the mixing of the two solvents. It can, for exemple, be writtenas a binary mixture free energy density: f (Ψ) ∝ Ψ log(Ψ) + (1 − Ψ) log(1 − Ψ) + χ Ψ(1 − Ψ),with χ the Flory parameter [8, 9], or as a Landau expansion f (Ψ) ∝ α (Ψ − Ψ c ) + γ (Ψ − Ψ c ) ,with α being temperature dependent, γ positive, and Φ c the critical composition [6].Optimising eq. (7) over c + and c − , the density becomes : f (Ψ , φ ) = f m (Ψ) − ǫ (Ψ)( ∇ φ ) − k B T c exp( β ∆ u + Ψ − βeφ ) − k B T c − exp( β ∆ u − Ψ + βeφ ) (8)With a symmetric electrolyte: c = c − , and if we assume the ions are similar in theirinteraction with the solvents : ∆ u + = ∆ u − , f (Ψ , φ ) simplifies into : f (Ψ , φ ) = f m (Ψ) − ǫ (Ψ)( ∇ φ ) − k B T c exp( β ∆ u Ψ) cosh( βeφ ) (9)We recognise here a generalisation of the well known Poisson-Boltzmann functional for a symmet-ric electrolyte. The description is adapted to analytical solutions but in the monophase regionof the phase diagram f (Ψ , φ ) is convex in Ψ but concave in φ . In complicated geometries if onewishes to minimize this free energy numerically one has to solve saddle point equations, simpleminimization will not give the correct answer. We now implement the transformation introducedabove from the potential φ to the electric displacement D and use the fact that the Legendretransform of cosh is : L [ A cosh( Bφ )]( ξ ) = A (cid:20) ξ/ ( AB )asinh ( ξ/AB ) − q ( ξ/AB ) + 1 (cid:21) = Ag ( ξ/AB ) (10)After some calculation we find f (Ψ , D ) = f m (Ψ) + D ǫ (Ψ) + 2 k B T c e β ∆ u Ψ g (cid:18) div ( D ) e − β ∆ u Ψ c e (cid:19) (11)We have thus reached our objective: we have built an equivalent description of the system withthe stationary conditions conserved and a local and convex function. The disadvantage is thatthere are more degrees of freedom in the vector field D than in the scalar field φ , but theadvantage is that a global minimising principle can be used and the functional can be directlyprogrammed for the solution of the coupled electrostatic-phase separation problem.We note that mean field description of the packing of DNA in a virus [10] contains manysimilar theoretical features and is also amenable to similar transformations. In this problem thefield Ψ corresponds to the square root of the monomer density. III. From Poisson-Langevin to Polarization
We now consider theories of explicit Langevin dipoles and how these can be incorporated intothe formulation of the free energy in terms of convex free energy functions. Recent work onimproving the description of solvation of proteins [11] has considered an explicit model for thesolvent in terms of Langevin dipoles. If we neglect the volume of ions and dipoles they find thefree energy density for a mixture of symmetric ions and neutral dipoles : f = ρ f φ − ǫ ( ∇ φ ) − λ ion cosh ( βqφ ) − λ dip sinh( βp |∇ φ | ) βp |∇ φ | (12)3here to simplify the presentation we have neglected effects of finite ion size. The parameters λ are related to the chemical activities of the ions and the dipoles.As in previous work [12] we start by using a Lagrangian multiplier, D to replace ( ∇ φ ) by itselectrostatic equivalent − E . We find f = ρ f φ − ǫ E − g ( φ ) − h ( E ) + D · ( ∇ φ + E ) (13)where h ( E ) is the free energy density due to the dipoles and g ( φ ) the free energy due to freeions. We now diverge from our previous treatment and introduce a new variable P which wewill show is the physical polarisation variable. We do this by performing a Legendre transformon h ( E ) to find ˜ h ( P ); we then find f = φ ( ρ f − div D ) − ǫ E − g ( φ ) + ˜ h ( P ) + E · ( D − P ) (14)Clearly by definition of the Legendre transform performing variations with respect to P oneq. (14) gives eq. (13).We now perform two more transforms firstly to eliminate the potential, but secondly toeliminate the electric field E . We find f = ( D − P ) ǫ + ˜ h ( P ) + ˜ g ( ρ f − div D ) (15)In the absence of free ions the function ˜ g reduces to the constraint of Gauss’ law. This is exactlythe form postulated in [13]. It is particularly transparent for understanding the physical limitson response functions [14, 15] and the origin of the negative dielectric constant observed instructured fluids.We will now work from eq. (15) to demonstrate its equivalence to other formulations ofelectrostatic interactions expressed in terms of the polarization P . To do this we will eliminatethe variable D , which will bring us back to other more familiar forms for the electrostatic energyat the cost of re-introducing long-ranged dipole-dipole interactions between the polarizationvariables. Eliminating the Displacement field
Let us work in the limit where linear response is valid, in which case we expand ˜ h to quadraticorder: ˜ h ( P ) = P ǫ χ (16)where χ is a material parameter. Taking variations of eq. (14) with respect to P and then E wefind that P = ǫ χ E , ǫ E = D − P (17)Thus the parameter χ is the electric susceptibility of the medium. The polarisation variableis indeed playing the role we expect from standard treatments of Maxwell’s equations. Thefree energy of the fluctuating dipoles (in the absence of free ions) can then be found from thefunctional f = ( D − P ) ǫ + P ǫ χ ( r ) − φ (div D − ρ f ) (18)where the last term is a Lagrange multiplier for the constraint of Gauss’ law. On taking variationsof eq. (18) with respect to D we find that D − P = − ǫ ∇ φ (19)4hus the free energy density can be written as f = ǫ ( ∇ φ ) P ǫ χ (20)where ǫ ∇ φ = − ρ f + div P φ ( r ) = Z πǫ | r − r ′ | ( ρ ( r ′ ) − div P ( r ′ )) d r ′ (21)We now substitute eq. (21) in eq. (20) and introduce the bare electric field E as follows: E = −∇ φ with ǫ ∇ φ = − ρ f . The free energy density can then be expressed in terms of thepolarization as U = 12 Z div P ( r )div P ( r ′ )4 πǫ | r − r ′ | d r d r ′ + Z (cid:26) ǫ E − E · P + P ǫ χ ( r ) (cid:27) d r (22)This formulation of the free energy is widely used in theoretical chemistry and is that used by[16]The energy eq. (22) can be expressed in an even more physically transparent manner byintegrating by parts the first double integral to transfer the derivatives from the polarization tothe function 1 / | r − r ′ | . If we do this we find that the double integral is transformed to12 Z P ( r ) T ( r − r ′ ) P ( r ′ ) d r d r ′ (23)where the dipole operator is T ( r ) = (cid:20) − | r ih r | πr ǫ + δ ( r )3 ǫ (cid:21) (24)We now proceed in a more abstract manner, considering that the polarisation variables areassembled into a vector and the dipolar interactions form a matrix, ¯ T . Eq. (22) is simply aquadratic form in P , so that U = P ( ¯ K + ¯ T ) P − E · P + ǫ E ǫ K r , r = χ − r . If we now calculate the response of the polarization fieldto an external perturbation E we find P = 1¯ K + ¯ T E (26)The total electric field is then given by two contributions, the original imposed field E andthat due to the dipole density P : E = E − ¯ T P (27)= ¯ K ¯ K + ¯ T E (28)We also use D − P = ǫ E (29)5o find D = I + ǫ ¯ K ¯ K + ¯ T E (30)Again all these equations are non-local - since they involve the long-ranged operator ¯ T but wefind that D = (1 + χ r ) ǫ E = ǫ E (31)a purely local constitutive equation between the electric field and the electric displacement.We conclude that by careful study of the mean field equations coming from the formulationof the dielectric properties of a medium in eq. (12) we have been able to derive the equivalenceto the standard continuum formulation of electrostatic arising from Maxwell’s equations. IV. Conclusions
We have shown that the Legendre transform can be used to translate between multiple forms ofthe energy in mean-field theories. All the formulations are numerically equivalent but differentforms put the emphasis on different degrees of freedom in electromagnetism. For numerical workit is advantageous to work with a formulation which is both convex and local. This is achieved inPoisson-Boltzmann theory by choosing the electric displacement D as the fundamental thermo-dynamic field. In this way all physical degrees of freedom can be treated in an equivalent mannerin numerical solvers. It is no longer necessary to completely solve the electrostatic problem foreach iteration of other external degrees of freedom. Very similar conclusions have also been foundin quantum chemistry [17]We have also demonstrated that energy functionals for dielectrics can be translated intoequivalent forms by introducing the physical polarization. We then mapped a linearised form ofthe theory to the Marcus energy function, widely used in the theoretical chemistry literature. IV.References [1] Zia, R. K. P., Redish, E. F. & McKay, S. R. Making sense of the Legendre transform.
American Journal of Physics , 614–622 (2009).[2] Courant, R. & Hilbert, D. Methods of Mathematical Physics: Volume I, Chapter 4.9 (JohnWiley and Sons, 1989).[3] Maggs, A. C. Dynamics of a local algorithm for simulating Coulomb interactions.
TheJournal of Chemical Physics , 1975–1981 (2002).[4] Maggs, A. C. Auxiliary field monte carlo for charged particles.
The Journal of ChemicalPhysics , 3108–3118 (2004).[5] Bonn, D. et al.
Direct observation of colloidal aggregation by critical casimir forces.
Phys.Rev. Lett. , 156101 (2009).[6] Tsori, Y. & Leibler, L. Phase-separation in ion-containing mixtures in electricfields.
Proceedings of the National Academy of Sciences , 7348–7350 (2007). .[7] Onuki, A. Ginzburg-landau theory of solvation in polar fluids: Ion distribution around aninterface.
Phys. Rev. E , 021506 (2006).[8] Marcus, G., Samin, S. & Tsori, Y. Phase-separation transition in liquid mixtures nearcurved charged objects. The Journal of Chemical Physics , 061101 (2008).69] Samin, S., Galanis, J. & Yoav, T. this volume: Electrostatics of liquid mixtures - phasetransitions and colloidal stabilization (Pan Standford, 2013).[10] ˇSiber, A. & Podgornik, R. Nonspecific interactions in spontaneous assembly of empty versusfunctional single-stranded rna viruses.
Phys. Rev. E , 051915 (2008).[11] Azuara, C., Orland, H., Bon, M., Koehl, P. & Delarue, M. Incorporating dipolar solventswith variable density in Poisson-Boltzmann electrostatics. Biophysical journal , 5587–5605 (2008).[12] Maggs, A. C. A minimizing principle for the Poisson-Boltzmann equation. EPL (EurophysicsLetters) , 16012 (2012).[13] Maggs, A. C. & Everaers, R. Simulating nanoscale dielectric response. Phys. Rev. Lett. ,230603 (2006).[14] Dolgov, O. V., Kirzhnits, D. A. & Maksimov, E. G. On an admissible sign of the staticdielectric function of matter. Rev. Mod. Phys. , 81–94 (1981).[15] Kornyshev, A. A. & Sutmann, G. Nonlocal dielectric saturation in liquid water. Phys. Rev.Lett. , 3435–3438 (1997).[16] Marcus, R. A. On the theory of oxidation-reduction reactions involving electron transfer. i. J. Chem. Phys. , 966–978 (1956).[17] Stengel, M., Spaldin, N. A. & Vanderbilt, D. Electric displacement as the fundamentalvariable in electronic-structure calculations. Nature Physics5