{'fraction_non_alphanumeric': 0.030760836203662652, 'fraction_numerical': 0.007707260512225898, 'mean_word_length': 4.613323124042879, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Maximum Entropy approach to a Mean Field Theory for Fluids

Making statistical predictions requires tackling two problems: one must assign appropriate probability distributions and then one must calculate a variety of expected values. The method of maximum entropy is commonly used to address the first problem. Here we explore its use to tackle the second problem. We show how this use of maximum entropy leads to the Bogoliuvob variational principle which we generalize, apply to density functional theory, and use it to develop a mean field theory for classical fluids. Numerical calculations for Argon gas are compared with experimental data.


Introduction
The method of Maximum Entropy (ME) has been designed to solve the general problem of updating from a prior probability distribution to a posterior distribution when new information in the form of a constraint becomes available [1]. The method reflects the deep conviction that one should not change one's mind frivolously, that whatever was learned in the past is important. Indeed, this concern for prior information is the only guarantee that the new information itself will not be easily discarded in the future. The chosen posterior distribution should coincide with the prior as closely as possible: one should only update those aspects of one's beliefs for which hard new evidence has been supplied [2]- [6].
The purpose of this work is to explore the use of the ME method as a means to tackle problems of a very different kind. The assignment of a probability distribution that faithfully codifies our state of knowledge is only a first step towards answering our questions about a physical system. There is a second and crucial step that requires us to extract the desired answers from the probability distribution. It is not enough to write down a probability distribution, we must also be able to read it, to figure out what it means, what it implies. We must be able to calculate the expected values of whatever quantities happen to be of interest to us. This is a difficult practical problem for which no solution of universal applicability is known and, accordingly, a wide variety of different techniques, both analytical and numerical, have been developed.
The approach we explore here consists of approximating the 'exact' distribution by a more tractable one. Then, the question is: given a family of trial tractable distributions, which one should we select? Which distribution within the given family best approximates the exact one? When phrased in this way it is clear that this is the kind of question that can be tackled using the method of ME: one must select the trial distribution that reflects the least misrepresentation of our state of knowledge. More specifically, the chosen distribution should be that which maximizes the appropriate relative entropy.
The purpose of this work is to explore the use of ME as a method to generate approximations. As a simple illustration, in section 2, we apply the ME method to canonical Gibbs-Boltzmann distributions. The resulting variational technique, when expressed in terms of the free energies, is recognized as the Bogoliuvob variational principle [7]. This is a well known technique for generating mean field approximations for discrete systems on a lattice. What is perhaps not as widely known is that the Bogoliuvob principle is just another application of the ME method (however, see [8]).
In the bulk of the paper we explore the use of the ME method to generate mean field (MF) approximations for classical fluids. Ever since the pioneering work of van der Waals many different versions of MF theories have been proposed and it is not always clear what they have in common -except perhaps for neglecting correlation effects. It appears that none of these versions have been derived as a systematic application of the ME method.
The study of classical fluids is an old and mature field. There exist extensive treatments in many excellent books and reviews [9]. Our goal here is not so much to contribute to the study of the fluids themselves but rather to use this wellexplored but still non-trivial field as a testing ground for further development of the ME method. In future work we intend to build on our current results and extend the method to generate other more sophisticated approximations involving canonical transformations to collective coordinates; only then do we expect to obtain significantly new contributions to the theory of fluids.
The study of both homogeneous and inhomogeneous fluids is currently best approached using density functional methods [10][11] [12] which have been noted to show a remarkable formal similarity to statistical thermodynamics [13]. In section 3 we show that the resemblance goes beyond a mere accident: density functional methods constitute a generalization of the Gibbs grand canonical ensemble to the case of a spatially dependent chemical potential. The resulting 'density' distribution is, however, too complicated for actual calculations and approximations are needed. In section 4 the MF approximation for the density, various thermodynamic potentials and pair distribution functions is derived. Following an idea due to Percus [14], a second, somewhat improved MF estimate of the two-particle distribution of a homogeneous fluid is obtained by expressing it in terms of the one-particle distribution of the fluid placed in a suitable external potential. An explicit comparison with experimental data for Argon is carried out in section 5. This serves both to determine the parameters of the Lennard-Jones potential used to model the interaction between Argon atoms and to explore the limitations of the MF approximation. Conclusions and final comments appear in section 6.

Maximum Entropy as an approximation technique
Let the microstates of a system (for example, its location in phase space or perhaps the values of spin variables) be labelled by coordinates q, and let us assume that the probability that the system is in a microstate within a particular range dq is given by the canonical distribution In principle knowing the distribution P we should be able to answer any question we might care to ask but in practice complications arise. Any realistic Hamiltonian H(q) will usually include complicated non linear interactions that make the task of calculating expected values or most other integrals over P impossibly difficult. A possible way around this problem consists of replacing the 'exact' distribution P by another more tractable distribution P 0 that approximately represents the same state of knowledge. This is perhaps too much to ask for. What we really want is a distribution P 0 that approximately represents those aspects of the information in P that happen to be relevant to those very few, very specific questions that we are actually asking.
The practical problem of choosing a P 0 is dealt with in two steps. First we search for a family of trial distributions that are simple enough that actual calculations are feasible and that we have some reason to suspect might codify the appropriate relevant information. This step is the difficult one because there is no known systematic procedure to carry it out; it is a matter trial and error guided by intuition. The second and easier step is to select the one member within the trial family that best resembles the exact P . This step is easier because there exists a systematic, mechanical procedure to be followed. As discussed in [6] (and other references therein) there is a unique selection criterion satisfying natural desiderata of consistency and objectivity: the distribution to be selected is that which maximizes the entropy of P 0 relative to P , The success of the whole method hinges crucially on the first step, the choice of the family of trial distributions. To increase the likelihood that important relevant features (e.g., symmetries or dominant interactions) are not left out it is usual -but not necessary -to select trial distributions that could conceivably model an idealized system. Such trial distributions are also canonical but with a modified Hamiltonian H 0 (q; α) where α are parameters labeling each distribution within the family, (3) Substituting into eq.(2) gives, where . . . 0 refers to averages over the trial P 0 . The inequality S[P 0 , P ] ≤ 0, can then be written as Thus, one selects P 0 (q; α) by maximizing S over all values of α or equivalently by minimizing the quantity F 0 + H − H 0 0 . This alternate form of the variational principle and its use to generate approximations is well known. It is usually associated with the name of Bogoliuvob [7] and it is the main technique to generate MF approximations for discrete systems of spins on a lattice. What is perhaps not as widely known is that the Bogoliuvob variational principle is just a peculiar application of the ME method. After this brief formal illustration we are ready to tackle the problem of fluids.

The canonical 'density' ensemble
Many of the most interesting questions we ask when discussing fluids can be addressed once we know the density of the fluid under various experimental conditions. Examples include the transitions between the gas and liquid phase, the structure of the gas-liquid interface, surface tension and capillarity effects and so on. We therefore would like to have a formalism where the (possibly nonuniform) density n(r) appears as an explicit variable. It is very easy to do this, just find the probability distribution that maximizes entropy subject to constraints on the expected energy and on the expected density. The resulting distribution is a generalized canonical ensemble we will call the 'density' ensemble.
The logic of the previous paragraph may sound unfamiliar and require further comments. When justifying the use of the ME method to obtain the canonical Boltzmann-Gibbs distribution (P q ∝ e −βEq ) one might say something like "we seek the minimally biased (i.e. maximum entropy) distribution that codifies the information we do possess (the expected energy) and nothing else". Many authors -even those who fully appreciate the value of the concept of entropy in inductive reasoning -find this justification unsatisfactory. Indeed, they would argue, for example, that the spectrum of black body radiation is what it is independently of our knowledge. We prefer to phrase the objection differently: in most realistic situations the one thing that is not known is the expected energy, and even then one still makes correct predictions by maximizing entropy subject to a constraint on the (unknown) expected energy. But then, how can we justify the imposition of such 'unknown' constraints in the ME method?
We propose here that the motivation behind imposing a constraint on the expected energy should not be that this is a quantity we happen to knowbecause we do not -but rather that we recognize the expected energy as the quantity we need to know. We recognize that in many experimental situations the expected energy, even if unknown, is the crucial quantity that codifies the relevant information and we proceed to theorize as if we knew it. All resulting predictions will contain the temperature as a free unknown parameter. Later, when it comes to actually comparing theoretical predictions with experimental data we expect that part of the data analysis will consist of adjusting the unknown temperature parameter to provide the best fit to the data. In other words, the information on expected energy or temperature is something to be obtained from the experiment itself.
Thus, the motivation behind imposing a constraint on the density is not that it is something we know, but rather that it is what we should know; it is the quantity that codifies information that is very relevant for most questions of interest and therefore it is important that it appear explicitly in the formalism.
The probability that the fluid is composed of N particles with positions and momenta within the phase space volume dq N at the location q N = {p i , r i ; i = 1, ..., N } is given by where and where λ(r) are Lagrange multipliers that enforce the constraint on the expected density n(r) at each point in space and the density iŝ H(q N ) is the Hamiltonian, where r ij = r i − r j , u(r ij ) is the two-body interparticle potential, and v(r) is an external potential. The partition function is where we introduced the thermodynamic potential Ω(T, λ), a function of the temperature T ≡ 1/β (units are such that k B = 1), and a functional of λ(r).
The interparticle and the external potential energies can be rewritten in terms of the density, and wheren (2) (r, r ′ ) is the two-particle distribution, We remark that a constraint on n(r) also constrains the expected number of particles Therefore the density ensemble is a generalization of the grand-canonical ensemble. Indeed, when λ(r) is a constant the density distribution reduces to the grand-canonical distribution and −λ coincides with the chemical potential µ.
Notice also that the effects of the Lagrange multiplier field λ(r) are indistinguishable from the effects of the external potential v(r). Similarly, when two-particle correlations n (2) (r, r ′ ) carry relevant information we might want to develop a formalism where they appear explicitly. The effects of the corresponding Lagrange multipliers are indistinguishable from those of the two-body potentials u(r, r ′ ). Perhaps this is the ultimate reason why potentials in general are valuable in physics: they establish control over the relevant physical quantities, the density, and the two-particle correlations.
The expected value of the density is and the entropy is These two equations can be combined into To achieve a formulation in terms of the density n(r) rather than the multiplier λ(r) we consider the Legendre transform so that The density functional formalism of Hohenberg and Kohn [10] is founded upon a theorem proving the existence of a functional Φ[T, n] that is independent of the external potential v(r). From the perspective afforded by the ME approach the independence of Φ[T, n] on the potential v(r) is a triviality achieved by construction -through the Legendre transform -and their truly nontrivial insight is the recognition of the density as the correct choice of relevant variable.

Mean field approximation 4.1 MF trial distributions
We want to approximate the 'exact' probability distribution by a more tractable trial distribution in which the interparticle interactions U are replaced by an interaction with an external potential, the mean field. The problem consists of selecting the best trial distribution, that which best approximates the exact distribution. The drastic approximation being made is the neglect of two-particle correlations induced by the interparticle potential.
The trial MF distribution is where where v 0 (r) is the mean field to be determined. First we compute several thermodynamic quantities of interest. It is convenient to absorb the external potential v(r), the mean field v 0 (r), and the multiplier field λ(r) into a single potential V (r), The partition function Z 0 is The expected density is or

ME optimization of the mean field
Within the family of trial MF distributions the one that is closest to the canonical density ensemble is that which maximizes the relative entropy Substituting Eqs. (8) and (21) we obtain (The subscript 0 in · · · 0 indicates the averages are computed over the trial distribution P 0 .) Since S[P 0 |P ] ≤ 0, we have and maximizing S[P 0 |P ] is equivalent to minimizing Ω U over all mean fields v 0 .
Therefore n and the result for U 0 is The best choice of mean field v 0 (r) is given by where the multiplier λ(r) and the external field v(r) are assumed fixed and we used Eqs. (31) and (27). Therefore, the best mean field, which we will denote bȳ v(r) is a function of the temperature T and a functional of the multiplier λ(r) and the external field defined by the equation wheren 0 is a function ofv, To summarize, the MF approximation to the exact thermodynamic potential is given byΩ andv(r) is given by Eq.(40). Throughout we will use overbars to denote quantities evaluated in the MF approximation. Notice that in replacing the exact distribution P by the approximate P 0 we are not quite replacing the fluid described by the Hamiltonian H by a different fluid described by H 0 : we compute the expectation of the exact H in the approximate P 0 rather than the expectation of the approximate H 0 in the approximate P 0 .

Density in the MF approximation
Entropy and density are obtained as derivatives of the thermodynamic potential, Using Eq.(40) and (41) the density n(r) is given bȳ This permits us to interpret Eq.(40) as a self consistency equation: the mean fieldv(r) is generated by a molecular distribution described by the densityn(r), while the molecules distribute themselves according to the mean field. The Legendre transform ofΩ[t, λ], gives the MF approximation to the density functional, The densityn(r) in a given external potential and multiplier fields is determined by δΦ δn(r) = −λ(r) , which is clearly equivalent to Eqs.(40) and (41). If the only constraint on the density is a constraint on the expected total number of particles then the multiplier field λ(r) is a constant which we set equal to minus the chemical potential. Therefore, We can either consider this equation as determining the chemical potential given the density, or alternatively, it determines the density for a given chemical potential.

Correlation functions -General
First we recall some standard definitions. Density correlation functions are given by derivatives of the partition function Z[T, λ, v] with respect to λ(r i ). Derivatives of the thermodynamic potential Ω[T, λ, v] yield the so called 'connected' correlation functions; the first is the expected density itself, .
The second is the density fluctuation correlation, Using G (2) can be reexpressed as To introduce the direct (or one-particle irreducible) correlations define Γ (2) as the inverse of G (2) , Γ (2) = [G (2) ] −1 , Therefore, using Eq.(53) and the chain rule, From Eq.(48) we see that for an ideal gas we have The difference between Γ (2) and Γ (2) id is attributed to the interactions and defines the direct correlation function c, It is convenient to introduce the pair-distribution function g(r 1 , r 2 ) n (2) (r 1 , r 2 ) = n(r 1 )n(r 2 )g(r 1 , r 2 ) .
Substituting this and Eq.(55) into Eq.(56) gives This is called the Oernstein-Zernicke equation. Notice that there is no physical content to the OZ equation; it follows exactly from the definitions of Γ (2) , c and g. This concludes our brief summary of definitions. At high fluid densities there is data from x-ray and neutron diffraction experiments that gives the radial distribution g(r) directly. At low densities the experimental data is less direct. The data that will be discussed below is derived from the virial expansion to the equation of state, in particular the second virial coefficient, and from measurements of the internal energy of the fluid.
For a homogeneous, isotropic fluid of bulk density N/V = n b the equation of state is given in terms of g(r) by [9] Using eq.(13) and (60) the internal energy is where, setting the external potential v(r) equal to zero, the potential energy per particle is
The functional derivative on the right is obtained from the selfconsistency equation defining the mean fieldv, Eq.(40). The expression forΓ (2) is much simpler and can be written in closed form, Therefore the direct correlation function is Using this expression forc in the case of a homogeneous, isotropic fluid of bulk density n b in the OZ equation (61), gives where we have set r 2 = 0. This is the integral equation that must be solved to obtainḡ(r) for each T and n b .

An improved MF approximation to g(r)
The approximation in which each particle moves in a MF field generated by all the others is too drastic. One can obtain a somewhat better approximationstill of the MF type -by using an elegant argument due to Percus [14]. The strategy is to write multiparticle distribution functions for a fluid in terms of the single particle density of the same fluid placed in a suitable external potential. The idea is simple and revolves around the product rule for probabilities. The probability P (r)d 3 r that a particle is found within d 3 r at r is obtained from Eq.(8) by marginalizing over the remaining N − 1 particles, where the average is taken with the exact distribution, Eq. (8), and for later convenience the dependence on the external potential v is indicated explicitly. Similarly, the probability that one particle is found at r and a second one at r s is given by P (2) (r, r s )d 3 rd 3 r s with The product rule gives P (r, r s ) = P (r s )P (r|r s ) , but is exactly the one-particle distribution of a fluid in a modified external potential, v s (r) = v(r) + u(r − r s ). Therefore, and using n (2) (r, r s |v) = n(r|v)n(r s |v)g(r, r s |v) , we get g(r, r s |v) = n(r|v s ) n(r|v) .
This is exact and can be trivially generalized to multiparticle distributions. Now we return to the MF approximation. If there is no external potential, v(r) = 0 the fluid is homogeneous and isotropic with a density n b . We single out one molecule located at r s and treat it as special. Since the system is homogeneous n(r|v = 0) = n b . The remaining molecules are effectively moving in the external potential v s (r) = u(r − r s ) due to the special molecule. The densityn(r|v s ) at location r is given by Eq.(51), On the other hand, given n b , the chemical potential is determined from a similar equation with the external potential set to zero, Subtracting these two equations gives Therefore, setting r s = 0, the MF approximation to Eq.(75) is We have described two MF approximations to g(r|v). The first requires solving Eq.(68) forḡ(r). The second is an improved MF approximation, which does include some correlation effects, is obtained by solving Eq.(79) forḡ s (r).

An explicit example: Argon
Realistic model interatomic potentials must include a long range weak attraction and a short range strong repulsion if they are to predict the properties of dense fluids. A popular but by no means unique choice for spherically symmetric molecules is the Lennard-Jones (LJ) potential, where the parameter ε is interpreted as the depth of the potential well and σ is the molecular or 'collision' diameter. The reason for choosing this model over other qualitatively similar ones is a historical one. It is not that it affords a particularly accurate representation of the potential but rather that it was convenient for analytical calculations at a time when computers were not available.
The main difficulty in solving the integral equations forḡ(r) andḡ s (r) is immediately apparent. The integrals in Eqs.(68) and (79) are not defined if the potential u(r) diverges as r → 0. As a quick remedy we modify the short range behavior and set u(r) equal to a constant below a certain cutoff distance: u(r) = u(r c ) for r < r c . This arbitrary procedure is justifiable whenever the physical predictions are not sensitive to the particular value of r c . This is a serious restriction; we find that insensitivity to the cutoff holds for very low densities, it fails for even moderately low densities, and under no circumstances can the treatment be extended to liquid densities. This is not totally unexpected: behavior at high densities depends crucially on the short range correlations neglected in MF approximations.
First we discuss the iterative solution of Eqs.(68) and (79) forḡ(r) andḡ s (r). We assume the dilute gas approximation, as the initial guess that is substituted into the integrals in the right hand side of Eqs. (68) and (79). We find that for sufficiently low densities the iterative process converges well for both theḡ(r) andḡ s (r) and the two agree. For increasing densities the solutions develop oscillations of increasingly large amplitude until the iterations fail to converge.
In Fig.1 we show the dilute gas approximation (DGA) g d , the mean field approximation (MFA)ḡ, and the improved mean field approximation (IMFA) g s for Argon at n b = 0.00125Å −3 and T = 150.5 K. The values used for the LJ parameters are ε = 0.0103 eV and σ = 3.4Å (the choice of ε and σ will be discussed below) and the cutoff is set at r c = 2.9Å (the calculation is insensitive to changes of r c within a range from about 2.5 to 3.1Å). The temperature has been chosen sufficiently low and the density sufficiently high that one is already approaching the regime where the iterative solutions fail to converge. We find that only within the restricted region n b /kT 0.16/Å 3 eV the solutions converge satisfactorily.
The somewhat higher peak of the IMFA can be attributed to the fact that it partially takes some correlation effects into account. At longer distances we find that MFA and IMFA are in close agreement.
Next we briefly address the two closely related questions of the determination of the LJ parameters ε and σ from experimental data and the overall agreement or not of the IMFA predictions with experiment. We will use experimental data given in [15] for the equation of state of Argon and for its internal energy. The equation of state data are summarized through the coefficients B (T ) and C (T ) in the virial expansion and data on the internal energy is given in terms of the potential energy per particle U /N . These data will be compared with the DGA and IMFA predictions derived from Eqs.(62) and (64) and with the expression for the second virial coefficient given by In Fig.2 the DGA and IMFA equations of state for the parameters ε 1 and σ 1 are compared with experimental data. The IMFA curve is in sharp disagreement with the data. Also shown are the DGA and IMFA predictions for a second set of parameters, ε 2 = 0.01032 eV and σ 2 = 3.151Å .
The DGA curve fits the experimental curve for low density equally well for either set of parameters, while the IMFA curve for the second set is clearly the best match with the data. The difference between the ε parameters is not significant.
On the other hand, as shown in Fig.3 when the DGA and IMFA predictions for the potential energy per particle are compared with experiment it is not the second set of LJ parameters but the first that yields the better match.
To study this perhaps surprising result from a different perspective we plot in Fig.4 the second virial coefficient B at T = 273 K for both the DGA and the IMFA as a function of the collision diameter σ for ε = 0.01034 eV. Our calculation shows that there are two solutions for σ that match the experimental value, and these two values are precisely the σ 1 and σ 2 in Eqs.(84) and (85).
While it is clear that the IMFA is a definite improvement over the DGA a number of interesting questions remain unanswered. First, there is the question   of sensitivity of the MF approximations to the short range part of the potential and the issue of convergence of the iterative solutions. Both deserve to be studied further. Then, there is the fact that different sets of LJ parameters are needed to fit different data. Indeed, we found that different values of ε and σ are needed to fit data at different temperatures. This can be interpreted as due to intrinsic inaccuracies in the approximations (DGA, MFA or IMFA) employed or, perhaps more likely, to the fact that the Lennard-Jones potential is not a good representation of the true interatomic potential. Finally there are the inevitable uncertainties in the experimental data which can be considerable [16].

Conclusions
The method of maximum entropy is traditionally used to assign appropriate probability distributions. Here we have explored a different use of the method of maximum entropy, as a technique to generate approximations to probability distributions that may be intractably difficult to calculate with. We find that the resulting variational technique includes the well-known Bogoliuvob variational principle as a special case. The extension to other generalized canonical ensembles is straightforward and we explicitly show its application to the density functional formalism and the derivation of mean field approximations for classical fluids. A side result of some interest is a simple proof that the density functional formalism is itself an application of the method of maximum entropy.
Numerical calculations for Argon gas were compared with experimental data. Just as with other mean field approximations, the particular MF versions studied here represent improvements over the dilute gas approximation but remain restricted to very small densities where particle correlations are small. However, as with so many other variational principles the power of the method hinges on the right choice of family of trial distributions. Indeed, following the ME-based variational approach still has the advantage that the same method can easily be used to generate other approximations without these shortcomings. If one's interest lies in the physics of denser fluids the next natural step consists in choosing a family of trial distributions that provides a better representation of correlation effects.