ABSTRACT
We develop a generalized Newton scheme called IHNC (inverse hypernetted-chain iteration) for the construction of effective pair potentials for systems of interacting point-like particles. The construction is realized in such a way that the distribution of the particles matches a given radial distribution function. The IHNC iteration uses the hypernetted-chain integral equation for an approximate evaluation of the inverse of the Jacobian of the forward operator.
In contrast to the full Newton method realized in the Inverse Monte Carlo (IMC) scheme, the IHNC algorithm requires only a single molecular dynamics computation of the radial distribution function per iteration step and no further expensive cross-correlations. Numerical experiments are shown to demonstrate that the method is as efficient as the IMC scheme, and that it easily allows to incorporate thermodynamical constraints.
1. Introduction
A common problem in material science is the quantification of interactions between a set of given particles. For example, in computer simulations of complex materials, where all sorts of numerical multiscale techniques are inevitable tools to treat relevant timescales and/or spatial resolutions (cf., e.g. Potestio, Peter, and Kremer [Citation1]), larger atomistic structures are often replaced by artificial particles, so-called beads, and the simulation of these beads requires the knowledge of effective interactions between them and other molecules or atoms.
In the simplest case, one may assume that the beads are point-like particles, whose interactions are governed by a potential , which only depends on the distance r>0 of each interacting pair of particles and vanishes in the limit . According to Henderson [Citation2] such a pair potential is uniquely determined by the so-called radial distribution function , which measures the number of particle pairs with a given distance in a homogeneous fluid in thermal equilibrium. The inverse Henderson problem of computing the pair potential from the given radial distribution is therefore exactly what needs to be solved in order to settle the aforementioned problem in physical chemistry.
One of the difficulties with this problem is the fact that the associated map (1) (1) which takes the pair potential onto the corresponding radial distribution function (for specified values of density and temperature of the fluid) is not given in closed terms, but has to be evaluated numerically, using expensive molecular dynamics or Monte-Carlo simulations. It goes without saying that the inverse map is not known, either. Methods for solving the inverse Henderson problem therefore can be distinguished in two classes: one class uses closed-form approximations of G or , respectively, most notably the hypernetted-chain or the Percus–Yevick approximations, cf., e.g. Ben–Naim [Citation3] or Hansen and McDonald [Citation4]; the other class uses iterative schemes which start from a certain educated guess of u, simulate the corresponding radial distribution function and use this information to determine an improved approximation by some sophisticated update rule, proceeding in this manner until convergence. Most prominent representatives of the latter class are the Iterative Boltzmann Inversion (IBI) or Inverse Monte Carlo (IMC); cf., e.g. Mirzoev and Lyubartsev [Citation5], Rühle et al. [Citation6] or Tóth [Citation7].
In this paper, we suggest a new method of the second class, i.e. an iterative method, which combines the advantages of the two aforementioned schemes, namely the simplicity and robustness of IBI, and the rapid convergence of IMC for an appropriate initial guess. Our method is a generalized Newton iteration – as opposed to IMC, which corresponds to the much more expensive full Newton scheme for inverting (Equation1(1) (1) ) – and we use the hypernetted-chain approximation to compute a simplified derivative of G. We show by numerical examples for simulated and measured radial distribution data that the method outperforms IBI and requires about the same number of iterations as does IMC, even when the density and the temperature of the fluid are near a phase transition. We also demonstrate how to include thermodynamical constraints like a known value for the pressure of the system into our scheme. In this work, we only treat the case of a homogeneous fluid of single particles; we plan to show in a forthcoming paper how to extend the method to binary mixtures.
The outline of this paper is as follows. In the following section, we briefly summarize the necessary ingredients from statistical mechanics which are fundamental for this work. Then, in Section 3, we derive the approximation of the inverse of the Jacobian of G which will be used for our generalized Newton scheme. Section 4 presents the mathematical core of this paper and is concerned with the well-posedness of different variants of our algorithm. Readers who are only interested in the algorithms and in implementation details can skip this part without any loss. In the subsequent two sections, we then discuss the numerical implementation and further extensions of these schemes; in particular, we show in Section 6 how to incorporate pressure constraints. Finally, numerical results for some benchmark systems are presented in Section 7. In the appendix, we include a proof for an extension of the classical Wiener lemma (cf., e.g. Jörgens [Citation8]) to some weighted space, which is needed for our mathematical analysis.
2. Mathematical setting of the problem
Consider an ensemble of identical classical point-like particles in thermodynamical equilibrium, where the interaction of the particles is given in terms of a pair potential of Lennard–Jones type, i.e. there exist a core radius and a parameter such that (2) (2) for suitable constants a, b>0. We assume that the number of particles and the size of the spatial domain under consideration are so big that one can treat this ensemble in the thermodynamical limit, i.e. as if it fills the full space . For our mathematical analysis, we further assume that the counting density of the ensemble is sufficiently small and the temperature T>0 is sufficiently large, so that the system is in its so-called gas phase, cf., e.g. Ruelle [Citation9, p. 84].
The radial distribution function , referred to in the introduction, measures the number of particle pairs at distance r>0, normalized in such a way that as ; see [Citation4] for the precise definition of this function. Then, as shown in [Citation10], the map G of (Equation1(1) (1) ), which takes u onto g, is well-defined and differentiable in a certain neighbourhood of u with respect to the Banach space of perturbations v of u, for which the corresponding norm (3) (3) is sufficiently small; here, (4) (4) is a weight function associated with the parameter α of (Equation2(2) (2) ), and for a real interval the expression refers to the supremum norm of real functions defined on this respective interval.
In [Citation11], it has been shown that the so-called pair correlation function h = g−1 for a Lennard–Jones type pair potential given by (Equation2(2) (2) ) belongs to the Banach space of functions with finite norm (5) (5) where ϱ is defined in (Equation4(4) (4) ). Since , the radially symmetric extension of any to the full space is absolutely integrable and has a well-defined (three-dimensional) continuous Fourier transform. This is important, because although u, g, and h are defined as functions of a positive argument r>0, they can be viewed as representations of radial functions of a three-dimensional spatial variable in full space. In particular, the Fourier transform of the corresponding extension of h – which is again radially symmetric and can therefore be represented by a function by some slight abuse of the standard notation – is used to define the structure factor (6) (6) which is known to be continuous and nonnegative.
Going one step further, if , then the three-dimensional convolution integral of their radially symmetric extensions to is again a radial function and – as has also been shown in [Citation11] – its representation (as a function defined in ) again belongs to ; we adopt the notation for the resulting convolution product, which turns into a (commutative) Banach algebra.
Proposition 2.1
Let u be a Lennard–Jones type pair potential (Equation2(2) (2) ) with parameter , and let the counting density of the ensemble be sufficiently small. Using the pair correlation function h of this ensemble and the above definition of the convolution product in , define (7) (7) Then I + A is invertible in , if the structure factor (Equation6(6) (6) ) is strictly positive.
The proof of this result follows from a weighted version of the Wiener lemma, stated and proved in the appendix, cf. Lemma A.1.
Under the assumptions of Proposition 2.1, it follows in particular that the so-called Ornstein–Zernike relation (8) (8) has a unique solution , known as the direct correlation function, cf. [Citation4]. Then, with the Boltzmann constant and the inverse temperature, the hypernetted-chain approximation mentioned in the introduction states that (9) (9) Historically (Equation9(9) (9) ) has been used to approximate g without lengthy molecular dynamics simulations, but by solving a (nonlinear) integral equation instead. On the other hand, (Equation9(9) (9) ) can be solved for u to provide an explicit approximation of the true pair potential, namely (10) (10) which only depends on quantities that are readily available from the given radial distribution function.
We close this section by formally differentiating U of (Equation10(10) (10) ) to determine the impact of small perturbations of g on , namely (11) (11) where is the derivative of c with respect to g or h, respectively: Using (Equation8(8) (8) ) and the fact that is a Banach algebra, we conclude that (12) (12) Convolving this equation with , adding the result to (Equation12(12) (12) ) again, and using the associativity and commutativity of the convolution product, we obtain and inserting (Equation8(8) (8) ), this yields With the operator A of Proposition 2.1, the latter can be rewritten as showing that is well-defined when the structure factor is positive. Inserting this identity into (Equation11(11) (11) ), we eventually obtain (13) (13) where (14) (14)
3. Generalized Newton schemes for the inverse Henderson problem
We now present iterative algorithms for an approximate solution of the inverse Henderson problem, i.e. for determining a pair potential , for which the associated radial distribution function is close to the given data g for specified values of and β.
One of the most successful methods of this kind is the Iterative Boltzmann Inversion (IBI) (15) (15) , originally suggested by Schommers [Citation12]. In (Equation15(15) (15) ), as in Section 2, and are functions of , and we continue to omit the independent variable r as long as there is no danger of confusion. Note that each iteration of IBI requires an expensive evaluation of the forward operator G. IBI is widely used, because it has been found to be fairly robust. Soper, who redeveloped this scheme in [Citation13], gave some heuristic arguments to support this observation. However, a rigorous convergence analysis is still lacking; see [Citation11] for some preliminary results in this direction.
A certain shortcoming of IBI is that it may require quite a few iterations to determine a sufficiently accurate potential. In [Citation14], Lyubartsev and Laaksonen therefore proposed the Newton method (16) (16) , as an alternative. In this scheme, now called Inverse Monte Carlo (IMC),Footnote1 the numerical evaluation of the Fréchet derivative of G can be implemented by using higher order statistics of the ensemble corresponding to some integrated 3- and 4-particle distribution functions. As it requires longer forward simulations to achieve sufficiently accurate statistics of these higher order distribution functions, each IMC iteration is much more expensive than one step of IBI. Another shortcoming of IMC is the need to start the iteration with a fairly accurate initial guess. It is therefore sometimes recommended to first run a number of IBI steps before switching to IMC, cf., e.g. Mirzoev and Lyubartsev [Citation5] or Murtola et al. [Citation15].
Here we consider a generalized Newton scheme, where in (Equation16(16) (16) ) is replaced by some approximation. Note, for example, that the low-density approximation which is correct of order as , suggests to replace cf. [Citation16]. When using this approximation in (Equation16(16) (16) ) we arrive at the iterative scheme (17) (17) Note that this is reminiscent of the IBI scheme (Equation15(15) (15) ), because for close to g. In fact, in numerical experiments that we have made, we did not observe a significant difference between the performance of the two iterative schemes (Equation15(15) (15) ) and (Equation17(17) (17) ).
We therefore propose a more sophisticated approximation of G, namely one that is based on the hypernetted-chain approximation (Equation9(9) (9) ), which is correct of order as , cf. [Citation4], to obtain a useful compromise between IBI and IMC. To be specific, with U of (Equation10(10) (10) ) we approximate (18) (18) cf. (Equation13(13) (13) ), where g is the measured radial distribution function and ϕ is given by (Equation14(14) (14) ) with A of (Equation7(7) (7) ). Inserting (Equation18(18) (18) ) into (Equation16(16) (16) ) we thus obtain the iteration (19a) (19a) with (19b) (19b) We call (Equation19(19a) (19a) ) the hypernetted-chain Newton iteration (HNCN). Take note that this approach does not involve a computation of the hypernetted-chain approximation of (Equation10(10) (10) ) itself; the hypernetted-chain approximation is only used formally to determine an approximate Newton inverse. Accordingly, when the iteration (Equation19(19a) (19a) ) converges, i.e. when and as , then the limit u is the true solution of the Henderson problem for the given data.
Note that HNCN coincides with (Equation17(17) (17) ) up to an additive correction term. The similarity between (Equation17(17) (17) ) and IBI therefore suggests to consider also the alternative IBI-type scheme (20) (20) with of (Equation19b(19b) (19b) ), which we call the inverse hypernetted-chain iteration (IHNC).
We finally mention that IHNC and HNCN differ from the so-called LWR scheme developed by Levesque, Weis, and Reatto [Citation17] and rediscovered recently by Heinen [Citation18]: in our notation the LWR scheme proceeds by computing where c is the direct correlation function (Equation8(8) (8) ), and is defined accordingly via with . It is straightforward to verify that the LWR scheme can also be rewritten as with U of (Equation10(10) (10) ), hence the LWR update of the potential can be seen as the secant approximation of used by the HNCN scheme. While this may appear on first sight to be a minor difference only between the two schemes, the tangent approximation turns out to be crucial to allow for subsequent extensions of the HNCN scheme described in Section 6.
4. Well-posedness of the IHNC and HNCN schemes
We are now going to analyse the two new iterative schemes (Equation19(19a) (19a) ) and (Equation20(20) (20) ) similar to the analysis of IBI in [Citation11]. For this we work in the topology of the Banach space defined in (Equation3(3) (3) ).
Proposition 4.1
Let u be a Lennard–Jones type pair potential and be sufficiently small. Moreover, assume that the structure factor (Equation6(6) (6) ) is a strictly positive function. Then the IHNC iteration (Equation20(20) (20) ) is well-posed in the following sense: If is sufficiently small, then is again a Lennard–Jones type pair potential, and there holds for some C>0, depending on u, , and the inverse temperature β.
Proof.
In the analysis of IBI in [Citation11] it has been shown that (21) (21) for some constant C>0, cf. [Citation11, (6.3)]. Furthermore, since is continuously embedded in because of (Equation2(2) (2) ), and since A and belong to by virtue of Proposition 2.1, it follows from (Equation19b(19b) (19b) ) that for some (other) constants C>0 that may be different in each of the individual terms; here, the last inequality is borrowed from [Citation11, Theorem 5.3]. Together with (Equation20(20) (20) ) and (Equation21(21) (21) ) we thus obtain the assertion.
Concerning HNCN we have a similar result which is stated next, but this one requires to be close to u in the stronger norm of .
Theorem 4.2
Under the assumptions of Proposition 4.1, the HNCN iteration (Equation19(19a) (19a) ) is conditionally well-posed in the following sense: If is sufficiently small, then is again a Lennard–Jones type pair potential, and there holds for some C>0, depending on u, , and the inverse temperature β.
Proof.
According to (Equation19(19a) (19a) ), there holds where for some constant C>0 by virtue of (Equation21(21) (21) ), because is continuously embedded in . It therefore remains to prove that (22) (22) for some (other) suitable C>0.
Consider first a fixed radius . We rewrite in terms of the cavity distribution function y, compare [Citation4], which is known to be bounded away from zero for small enough density according to Proposition 3.1 in [Citation11]. It follows that g is bounded away from zero for , and hence, there exist positive constants C>0 such that (23) (23) compare (Equation21(21) (21) ) again for the final estimate.
For a fixed radius r with , on the other hand, we use the cavity distribution functions and y corresponding to and u, respectively, and rewrite Since y is bounded away from zero we deduce from the mean value theorem that for some C>0 independent of r and some between and . Note that the latter implies that Since the cavity distribution function in depends locally Lipschitz continuously on the pair potential in (see Proposition 3.1 in [Citation11]) it follows that for some suitable constants C>0, provided that is sufficiently small. This being independent of , we have thus achieved to establish (Equation23(23) (23) ) also for , and hence the proof of (Equation22(22) (22) ) is done.
Theorem 4.2 indicates that the HNCN iteration requires a better initial approximation of the true potential within the core region than IHNC. Nevertheless, as shown in [Citation11], if the data g are exact, then the potential of mean force, (24) (24) which is often taken as initial guess in practice, does satisfy , which means that the assumptions of Theorem 4.2 are not too far-fetched. We have used the potential of mean force in all our experiments (with the simulated, i.e. noisy radial distribution function g as input), and both HNCN and IHNC performed well with this choice, see Section 7.
5. Numerical discretization
Compared with IBI the only additional difficulty in a numerical implementation of HNCN and IHNC consists in computing of (Equation19b(19b) (19b) ). To simplify notation let us denote by (25) (25) the operator occurring in (Equation19b(19b) (19b) ). Recall that A corresponds to a three-dimensional convolution integral with times the radially symmetric extension of the pair correlation function h = g−1 as convolution kernel, cf. (Equation7(7) (7) ). The natural framework for discretizing A and T is therefore the Fourier space, using the representation (26a) (26a) for the three-dimensional Fourier transform of the radially symmetric extension of , where is the absolute value of the three-dimensional frequency. Likewise, we can compute f from by using the formula (26b) (26b) To implement for we therefore need to determine and the corresponding representation for h, form (27) (27) and transform back using (Equation26b(26b) (26b) ) to obtain ϕ.
In order to achieve reasonable accuracy of the low frequencies of the Fourier transform of h, the simulation box and the particle count need to be sufficiently large. Generally this implies that the radial distribution function is being sampled on a larger radial interval than is used for tabulating the pair potential. To be specific, we will assume that the radial distribution function g is given on a grid (28) (28) with m grid points and spacing , and that is negligible for . On the other hand, the potentials are being tabulated on the subgrid (29) (29) with grid points and the understanding that for . Note that from a theoretical point of view n>m would not make much sense, while n = m would be just fine. However, to reduce computational costs of the forward simulation, a choice of n<m is very reasonable and natural; a good value of the associated cut-off parameter , however, is largely a matter of experience.
For a generic function which is vanishing for and which has been sampled on Δ the integral (Equation26a(26a) (26a) ) can be discretized with the trapezoidal quadrature rule. Introducing the odd extension of to the whole real line (and to the extended grid with nonpositive grid points with ), and taking into account that for , the quadrature approximation of (Equation26a(26a) (26a) ) can be written as (30) (30) This approximation is in good agreement with the true values of the Fourier transform of f as long as provided that f is negligible for and is negligible for , cf, e.g. Henrici [Citation19, § 13.3]. Note that if the term in brackets in (Equation30(30) (30) ) is to be evaluated at the frequencies then this can be implemented efficiently with a one-dimensional fast Fourier transform (fft) of length , simultaneously for all these frequencies.
Alternatively, a matrix representation of the operator T of (Equation25(25) (25) ) can be assembled as (31) (31) where corresponds to the Fourier matrix which takes onto given by (Equation30(30) (30) ), and is a diagonal matrix with the entries on its diagonal; compare (Equation27(27) (27) ). Note that the multiplication of with the vector of samples of results in an m-dimensional vector with the values of of (Equation19b(19b) (19b) ) over Δ. If is a true subset of Δ, then we simply cut off the redundant entries when updating the pair potential , as it is done in IBI.
Remark 5.1
We mention that common software like votcaFootnote2 [Citation6] for running IBI typically comes with additional tricks for pre- and postprocessing the relevant quantities, which are not explicit in the recursion (Equation15(15) (15) ). The same applies to the new schemes HNCN and IHNC; more precisely the following items have been addressed in our implementation of (Equation19(19a) (19a) ) and (Equation20(20) (20) ):
The simulated radial distribution functions will be numerically zero in the core region , in which case IBI as well as the new iterative schemes (Equation19(19a) (19a) ) and (Equation20(20) (20) ) fail to produce a well-defined potential update for these radii; instead, the potential needs to be extrapolated into the core regionFootnote3 by some ad hoc scheme. In our implementation, we fit and extrapolate the computed values of in the core region to a function of the form with appropriate positive parameters and .
After each iteration the new potential is shifted by an additive constant to satisfy , so that the extension of by zero for arguments is continuous.
We have used gromacs, version 2016.3 [Citation20,Citation21] for the numerical computation of , with interpolated input values of on a grid which is 10 times finer than .
We finally emphasize that our implementation of HNCN and IHNC uses no postprocessing (e.g. smoothing) of the computed radial distribution functions, nor of the approximate potentials.
6. Extensions of the method
Due to the many simplifying modelling assumptions, and also due to inevitable noise in the given data, the inverse Henderson problem may not have a solution, and even when, it may not be appropriate to determine a pair potential u which satisfies exactly. Rather, one should think of the problem as of an optimization problem in some suitable norm, where the goal is to find an approximate minimizer only. In the context of our generalized Newton approach, the obvious way of treating this minimization problem numerically is via a Gauss–Newton type scheme, where each iteration consists of solving the linearized minimization problem (32) (32) before updating ; compare, e.g. Lyubartsev et al [Citation22] or Murtola et al [Citation15]. In view of (Equation18(18) (18) ) we again propose to replace by . With the same discretization as in Section 5, this leads to the minimization problem (33) (33) over , where denotes the standard Euclidean norm in , is an appropriate nonnegative diagonal weighting matrix, and (34) (34) is the discretized approximation of , cf. (Equation18(18) (18) ); here, is the diagonal matrix with the samples of the given radial distribution function on its diagonal and is defined in (Equation31(31) (31) ).
In view of Remark 5.1, there are some numerical problems with the definition (Equation34(34) (34) ) of . As the samples of the radial distribution function in the core region are numerically zero, the matrix will fail to be invertible; but since the potential is extended by extrapolation into the core region, anyway, we neither need to keep track of the corresponding samples of g nor of the respective function values of . So, by some abuse of notation, we assume in the sequel that the grid Δ only consists of the grid points in the exterior of the core region; we still denote the number of grid points in Δ by m. The resulting restriction of is invertible and defines a corresponding restriction of to the exterior of the core region.
As has been mentioned in the previous section, Δ will typically have more grid points than , and similar to above we assume below that consists of the first n<m grid points of Δ outside the core region. If , then we only admit vectors for updating the pair potential which have zero entries for grid points . Moreover, for several reasons we prefer to restrict admissible vectors for (Equation33(33) (33) ) somewhat further by substituting with and (35) (35) stands for a discrete (negative) antiderivative operator and is an zero block; accordingly, corresponds to a piecewise linear function v over Δ which is vanishing on and whose piecewise constant derivative on the grid intervals of is given by the entries of .
We thus determine the vector with the values of over by considering the weighted linear least squares problem (36a) (36a) to be solved for , and then update (36b) (36b) This we call the hypernetted-chain Gauss–Newton iteration (HNCGN).
One advantage of minimizing (Equation36a(36a) (36a) ) over rather than as in (Equation33(33) (33) ) is that this adds some correlations to neighbouring function values of the pair potentials; another advantage is that we automatically respect the normalization condition , and therefore we avoid the extra shifting step mentioned in Remark 5.1 (ii).
With HNCGN it is easy to impose additional constraints on . As a simple example, we treat the case that a certain value p for the pressure of the system is being imposed, because this particular constraint has often been addressed in the literature as a possibility for improving the thermodynamical properties of coarse-grained models resulting from IBI or IMC iterations, cf., e.g. [Citation1,Citation15,Citation23–26]. In the thermodynamical limit, the pressure of the system is given by the virial integral provided that the pair potential is differentiable and that its derivative decays sufficiently rapidly near infinity; compare [Citation4]. One way to enforce (approximately) the same pressure for the ensemble corresponding to the pair potential – assuming that the simulated radial distribution function is sufficiently close to the true one – is by constraining to satisfy where is the pressure corresponding to ; the latter can either be evaluated within the simulation run for evaluating or by numerical quadrature of the corresponding virial integral. Since the entries of approximate the values of over the interval , the left-hand side of the previous equation can be discretized as for a corresponding vector , and this leads to a discrete constraint of the form (36c) (36c) for all , over which (Equation36a(36a) (36a) ) is to be minimized.
The standard recommendation for dealing with the constrained minimization problem (Equation36a(36a) (36a) ), (Equation36c(36c) (36c) ) numerically is to solve (Equation36c(36c) (36c) ) for one of the entries in , say, and to use the resulting expression to eliminate this variable from (Equation36a(36a) (36a) ); cf., e.g. Björck [Citation27]. To achieve maximal stability should be the very index for which the corresponding element of has maximal modulus. Once has been eliminated, (Equation36a(36a) (36a) ) becomes an unconstrained minimization problem over the remaining entries of , the solution of which is given by the corresponding normal equation system, cf. [Citation27]. The final algorithm is slightly more expensive than IHNC, but the extra cost is negligible compared to the overall costs of an individual iteration of either of the schemes.
It remains to discuss the choice of the weighting matrix in (Equation32(32) (32) ). A natural candidate is , the identity matrix. Alternatively, since it is known that for some exponent , one could also think of using to enforce that the discrete approximation of shows a similar qualitative behaviour for larger radii. In this case, the diagonal entries of should increase with increasing index, e.g. (37) (37) for some exponent . However, we found that the choice (Equation37(37) (37) ) for lent too much flexibility to the values of for radii r near the core region, so that the computed potentials became worse eventually. In our numerical results in Section 7.3 we therefore have used throughout.
7. Numerical results
We now present some numerical results to illustrate the performance of the new methods as compared to IBI and IMC. For this we concentrate on the results of IHNC; in all our tests we did not see significant differences between IHNC and HNCN, but the theoretical results of Section 4 indicate that IHNC may be slightly more robust.
Our benchmark problems include simulated data for a truncated and shifted Lennard–Jones potential as well as measured data for liquid argon taken from the literature. We mention that for the latter problem, in particular, our mathematical assumption that the system be in its gas phase, is violated. As it turns out this does not affect the applicability of our algorithms, but we have no theory to explain this observation.
In all our numerical examples, we have used gromacs to evaluate the forward operator G with a molecular dynamics simulation: to be specific, we have used the leap-frog integrator with time step (in dimensionless units corresponding roughly to in real units), coupled to the Langevin thermostat with a unit inverse friction constant to simulate ensembles with N = 2000 particles and periodic boundary conditions, i.e. -ensembles. In each iteration, the ensemble has been equilibrated with timesteps (corresponding to about ) starting from a distribution of the particles on a regular lattice, and afterwards the radial distribution function has been determined from 3500 uncorrelated snapshots of the system (the decorrelation times between two snapshots depends on the system and spans approximately 2000 time steps, i.e. ). For IMC the same snapshots have also been used to set up the sensitivity matrix corresponding to . Remark 5.1 applies to our implementations of IBI and IMC in the same way.
7.1. Truncated and shifted Lennard–Jones fluids near phase transitions
Let (38) (38) be the classical Lennard–Jones potential with parameters . Taking , i.e. working in reduced (dimensionless) units with Boltzmann constant , we consider the truncated and shifted Lennard–Jones potential (39) (39) i.e. the Lennard–Jones potential is shifted, so that it becomes zero at r = 2.5, and is extended continuously by zero for . The corresponding ensemble is studied at two different state points, namely
the critical point with counting density and temperature T = 1.316, cf. Smit [Citation28],
a state point in the liquid phase close to the triple point with counting density and temperature T = 1, cf. Hansen and Verlet [Citation29].
In both cases, the radial distribution function is sampled on an equidistant grid with mesh width ; for state point (a) we have data for m = 463 grid points covering a radial interval , for state point (b) we have m = 335 grid points within the interval . The latter interval is smaller than the former one, because the density of the system is larger, and hence the simulation box is smaller. The given data are displayed as little circles in Figure . Note that the pair correlation function h = g−1 decays much faster at the critical point than near the triple point; as a consequence the inverse problem is much more difficult near the triple point.
To solve the inverse problem, we have tabulated the approximate potentials on the first n = 125 grid points of the same grid. Because of the particular definition of the IBI and IMC schemes, cf. (Equation15(15) (15) ) and (Equation16(16) (16) ), only those n grid points of the radial distribution function have been used for these two methods; this radial interval is indicated by the dashed lines in Figure . For IHNC, we have used the full data displayed in Figure . In all three iterative schemes, the same potential (Equation24(24) (24) ) of mean force has been used as initial guess.
The approximate radial distribution functions obtained by IBI, IHNC and IMC, respectively, are also shown in Figure . Essentially, all three functions are on top of each other in both plots, and they constitute perfect fits of the given data for each of the two state points. But IHNC and IMC require far less iterations to achieve this goal: Figure provides the corresponding iteration histories of the data fit, i.e. the graphs of the functions for all three individual iteration schemes and for each of the two state points, respectively; here, measures the maximal absolute error between all given measurement data and the corresponding approximations in the exterior of the core region. (For some obscure reason, this measure of the data fit is slightly increasing for IBI and IMC in the first iteration.) From these plots, it can be seen that IHNC requires about 5 iterations at the critical point and 11 iterations near the triple point to reach the global minimum of the data fit, while IMC requires 9 (or 5) iterations at the critical point and 7 iterations near the triple point; the data fit of the two methods is comparable, eventually. IBI, on the other hand, needs 10 iterations at the critical point and more than 20 near the triple point.
While the data fit is a straightforward indicator of the performance of the iterative schemes, the true error history is the really relevant quality measure. However, the latter is not available in practice. It is the advantage of this particular example that the true solution is known, so that the error history can be computed. For a particular potential given on the grid , we define the error measure (40a) (40a) which approximates the weighted norm (40b) (40b) of the error . This norm can be motivated by a more detailed analysis of the operator G, but this is beyond the scope of this paper; here we only emphasize that the factor g in (Equation40b(40b) (40b) ) compensates for the divergence of the potentials as .
Figure shows the relative error (41) (41) as a function of the iteration count for all iterative schemes and both state points, respectively. The plots confirm that the particular iterates recommended above do indeed provide good approximations of the true truncated and shifted Lennard–Jones potential. Accordingly, IMC and IHNC both converge very rapidly in much the same number of iterations, whereas IBI is doing significantly worse. To illustrate this further the corresponding reconstructions for the more difficult problem near the triple point are shown in Figure . This plot displays the 11th IHNC iterate, the 7th IMC iterate and the 50th (!) IBI iterate, together with the true pair potential as a black solid line (marked ‘LJ’) and the potential of mean force as a dotted line. As can be seen the IHNC and IMC approximations are hardly distinguishable from the true truncated and shifted Lennard–Jones potential, while even after 50 iterations IBI is still relatively far off.
7.2. Liquid argon
As a second example, we have determined approximate pair potentials for argon, using measurements by Schmidt and Tompson [Citation30] for a state point with temperature C and mass density in the liquid phase near the critical point.Footnote4 The corresponding data are given on an equidistant gridFootnote5 with m = 200 grid points and mesh width . The approximate pair potentials have been tabulated on the first n = 100 grid points of this grid, and taken to be identically zero for .
The iteration history shown in Figure documents that, again, IHNC and IMC match the data much faster than IBI does: according to this plot 6 IHNC (5 IMC) iterations are sufficient, whereas IBI needs 39 iterations to achieve the same accuracy. Figure presents the corresponding approximations of the radial distribution function and Figure the corresponding potentials, together with the potential of mean force as dotted line. As before, all computed approximations are very close to each other.
We have chosen argon as benchmark test case, because the interactions between argon atoms are widely considered to be well described by the Lennard–Jones pair potential (Equation38(38) (38) ) with parameters cf., e.g. Tuckerman [Citation31, p. 127]. This Lennard–Jones potential is given by the thin black line in Figure , but it differs quite a bit from our computed pair potentials. In fact, the radial distribution function corresponding to this Lennard–Jones approximation, which has also been included in Figure , does not fit the measured data well, as can easily be seen in the magnified detail in the right-hand plot. Even the initial approximation from the potential of mean force is doing better than that. So for this real-world example, we cannot trust this Lennard–Jones potential to be the ‘ground truth’ to compare our numerical results to.
7.3. The pressure constrained HNCGN scheme
Finally, we show some numerical results for p-HNCGN, i.e. the pressure constrained hypernetted-chain Gauss–Newton iteration described in Section 6. For this we have used the same data set for liquid argon as in the previous example and have imposed the corresponding value of the pressure reported by Mikolaj and Pings [Citation32].
Figures and present the corresponding numerical results. In the left-hand plot of Figure , we recollect the data fit history of Figure and also show the corresponding graph for the performance of p-HNCGN: since the latter aims for a best possible fit of all 200 data points , it reaches a smaller value than all other competing methods.
The right-hand plot of Figure , on the other hand, displays the average pressure (as returned by gromacs) of all corresponding ensembles for each individual iterate of the respective methods. The correct value of the pressure is indicated by the dotted horizontal line. As can be seen, except for p-HNCGN all methods fail to reproduce this number by a factor of 3 or more. p-HNCGN, on the other hand, achieves an excellent match of the target pressure after about 12 iterations.
Assessing both plots of Figure we consider the 14th iterate of p-HNCGN to be ‘optimal’, because it corresponds to the first local minimum of the data fit after having reached a fairly accurate value of the pressure. The corresponding pair potential is compared in Figure with the Lennard–Jones reference and the IHNC potential from Figure . It can be seen that the match of the pressure has a discernible (positive) impact on the computed pair potential.
Remark 7.1
Since p-HNCGN fits the data points of the measured radial distribution function, it does provide a good fit of the compressibility of the fluid as well, because the compressibility is given by the Kirkwood–Buff integral which only depends on the pair correlation function h = g−1. Therefore p-HNCGN is able to fit both the compressibility and the pressure of a fluid to a reasonable accuracy. In the pertinent literature, this has been considered impossible when using isotropic pair potentials, compare, e.g. Wang, Junghans, and Kremer [Citation26].
8. Conclusion
We have determined new generalized Newton schemes for the inverse Henderson problem, where we approximate the inverse of the Jacobian by the functional derivative of the hypernetted-chain approximation of the pair potential. These methods have about the same computational costs per iteration as IBI, but need much less iterations near phase transitions. In terms of iteration counts they are competitive to IMC, but the individual iterations are much cheaper than the IMC ones, because no cross-correlations need to be evaluated in the numerical simulation of the corresponding ensemble of particles. While these methods turn out to be similar (but not identical) to the LWR scheme of Levesque, Weis and Reatto, they are more flexible by construction, and can easily be modified, e.g. to also match the true pressure of the target ensemble.
We finally mention that one can also use the Percus–Yevick approximation instead of the hypernetted-chain approximation for the derivation of a corresponding generalized Newton method. The resulting scheme is very similar to (Equation20(20) (20) ), the only difference being that is replaced by , where is the cavity distribution function associated with the kth pair potential . In our numerical experiments, we found the iteration (Equation20(20) (20) ) to perform better near phase transitions of the truncated and shifted Lennard–Jones potentials than the corresponding Percus–Yevick recursion, and therefore we have restricted our attention to the IHNC scheme in this work.
In future work, we plan to extend our methods to binary mixtures of different fluids.
Acknowledgments
We are grateful to Gergely Tóth for pointing out to us references [Citation7,Citation12,Citation17].
Disclosure statement
No potential conflict of interest was reported by the authors.
Additional information
Funding
Notes
1 We mention that this name may be misleading in that the approximate pair potential computed by IMC is not the result of some sophisticated Monte-Carlo simulation.
3 For the core region the radius is chosen in each iteration as the smallest grid point of (Equation28(28) (28) ), such that g and are nonzero for every .
4 According to the US National Institute of Standards and Technology the critical point of argon is located at about temperature C and mass density ; see https://webbook.nist.gov/cgi/inchi?ID=C7440371&Mask=4.
5 For only every second data point is tabulated in [Citation30]; the missing data have been filled in by linear interpolation.
References
- Potestio R, Peter C, Kremer K. Computer simulations of soft matter: linking the scales. Entropy. 2014;16:4199–4245. doi: 10.3390/e16084199
- Henderson RL. A uniqueness theorem for fluid pair correlation functions. Phys Lett A. 1974;49:197–198. doi: 10.1016/0375-9601(74)90847-0
- Ben-Naim A. Molecular theory of solutions. New York: Oxford University Press; 2006.
- Hansen J-P, McDonald IR. Theory of simple liquids. 4th ed. Oxford: Academic Press; 2013.
- Mirzoev A, Lyubartsev AP. MagiC: software package for multiscale modeling. J Chem Theory Comput. 2013;9:1512–1520. doi: 10.1021/ct301019v
- Rühle V, Junghans C, Lukyanov A, et al. Versatile object-oriented toolkit for coarse-graining applications. J Chem Theory Comput. 2009;5:3211–3223. doi: 10.1021/ct900369w
- Tóth G. Interactions from diffraction data: historical and comprehensive overview of simulation assisted methods. J Phys Condens Matter. 2007;19:335220.
- Jörgens K. Linear integral operators. Boston: Pitman; 1982.
- Ruelle D. Statistical mechanics: rigorous results. New York: W.A. Benjamin Publ.; 1969.
- Hanke M. Fréchet differentiability of molecular distribution functions I. L∞ analysis. Lett Math Phys. 2018;108:285–306. doi: 10.1007/s11005-017-1009-0
- Hanke M. Well-posedness of the iterative Boltzmann inversion. J Stat Phys. 2018;170:536–553. doi: 10.1007/s10955-017-1944-2
- Schommers W. A pair potential for liquid rubidium from the pair correlation function. Phys Lett. 1973;43A:157–158. doi: 10.1016/0375-9601(73)90591-4
- Soper AK. Empirical potential Monte Carlo simulation of fluid structure. Chem Phys. 1996;202:295–306. doi: 10.1016/0301-0104(95)00357-6
- Lyubartsev AP, Laaksonen A. Calculation of effective interaction potentials from radial distribution functions: a reverse Monte Carlo approach. Phys Rev E. 1995;52:3730–3737. doi: 10.1103/PhysRevE.52.3730
- Murtola T, Falck E, Karttunen M, et al. Coarse-grained model for phospholipid/cholesterol bilayer employing inverse Monte Carlo with thermodynamic constraints. J Chem Phys. 2007;126:075101.
- Ivanizki D. Numerical analysis of the relation between interactions and structure in a molecular fluid. PhD Thesis. Johannes Gutenberg-Universität Mainz; 2015.
- Levesque D, Weis JJ, Reatto L. Pair interaction from structural data for dense classical liquids. Phys Rev Lett. 1985;54:451–454. doi: 10.1103/PhysRevLett.54.451
- Heinen M. Calculating particle pair potentials from fluid-state pair correlations: iterative Ornstein–Zernike inversion. J Comput Chem. 2018;39:1531–1543. doi: 10.1002/jcc.25225
- Henrici P. Applied and computational complex analysis. Vol. 3. New York: John Wiley & Sons; 1986.
- Abraham MJ, van der Spoel D, Lindahl E, et al. the Gromacs development team. Gromacs User Manual version 2016.3, www.gromacs.org (2017).
- Hess B, Kutzner C, van der Spoel D, et al. GROMACS 4: algorithms for highly efficient, load-balanced, and scalable molecular simulation. J Chem Theory Comput. 2008;4:435–447. doi: 10.1021/ct700301q
- Lyubartsev A, Mirzoev A, Chen L, et al Systematic coarse-graining of molecular models by the Newton inversion method. Faraday Discuss. 2010;144:43–56. doi: 10.1039/B901511F
- Fu CC, Kulkarni PM, Shell MS, et al. A test of systematic coarse-graining of molecular dynamics simulations: thermodynamic properties. J Chem Phys. 2012;137:164106.
- Jain S, Garde S, Kumar SK. Do inverse Monte Carlo algorithms yield thermodynamically consistent interaction potentials? Ind Eng Chem Res. 2006;45:5614–5618. doi: 10.1021/ie060042h
- Reith D, Pütz M, Müller-Plathe F. Deriving effective mesoscale potentials from atomistic simulations. J Comput Chem. 2003;24:1624–1636. doi: 10.1002/jcc.10307
- Wang H, Junghans C, Kremer K. Comparative atomistic and coarse-grained study of water: what do we lose by coarse-graining? Eur Phys J E. 2009;28:221–229. doi: 10.1140/epje/i2008-10413-5
- Björck Å. Numerical methods for least squares problems. Philadelphia: SIAM; 1996.
- Smit B. Phase diagrams of Lennard–Jones fluids. J Chem Phys. 1992;96:8639–8640. doi: 10.1063/1.462271
- Hansen J-P, Verlet L. Phase transitions of the Lennard–Jones system. Phys Rev. 1969;184:151–161. doi: 10.1103/PhysRev.184.151
- Schmidt PW, Tompson CW. X-ray scattering studies of simple fluids. In: Frisch HL and Salsburg ZW, editors. Simple Dense Fluids, New York: Academic Press; 1968. p. 31–110.
- Tuckerman ME. Statistical mechanics: theory and molecular simulation. Oxford: Oxford University Press; 2010.
- Mikolaj PG, Pings CJ. Structure of liquids. III. An X-ray diffraction study of fluid argon. J Chem Phys. 1967;46:1401–1411. doi: 10.1063/1.1840864
Appendix
The Wiener lemma
Throughout this appendix we only consider functions of three variables, whether they be radial functions, or not. If is radially symmetric, then its representation defined in belongs to the Banach space introduced in (Equation5(5) (5) ). The three-dimensional Fourier transform of is denoted by .
For ϱ defined in (Equation4(4) (4) ), we have shown in [Citation11] that the space of all functions , for which constitutes a Banach algebra with respect to convolution. We can extend to a Banach algebra with unit element e (given by the delta distribution at the origin), using the canonical norm where is a small enough constant to make the norm of submultiplicative.
The standard Wiener lemma for the Fourier transform starts with a similar construction for the Banach algebra and states that if is such that , then (A1) (A1) for some with Fourier transform , cf., e.g. Jörgens [Citation8]. The weighted Wiener lemma which is required for the proof of Proposition 2.1 reads as follows.
Lemma A.1
Let be such that . Then the function c of (EquationA1(A1) (A1) ) belongs to . If f is a radial function, so is c.
Proof.
We choose u (not to mix up with the pair potential in the remainder of this paper) from the standard Schwartz space , sufficiently close to f in so that . Then we can apply the classical Wiener lemma to deduce that there exist which satisfy (EquationA1(A1) (A1) ) and (A2) (A2) respectively. Moreover, in as in ; see [Citation8]. Evidently, and hence, , and (A3) (A3) with provided u is sufficiently close to f. In (EquationA3(A3) (A3) ) and below the symbol refers to the standard three-dimensional convolution, i.e. Since has been shown to be less than 1, Corollary 4.3 in [Citation11] allows to conclude that the series (A4) (A4) of the n-fold autoconvolutions of w converges in , and hence, It turns out that this very function coincides with c, for we have and when inserting (EquationA3(A3) (A3) ) and (EquationA2(A2) (A2) ) it follows that (A5) (A5) as has been claimed. This shows that .
If f is a radial function, so is and also according to (EquationA5(A5) (A5) ). Hence, c is a radial function, too.
Motivated by (EquationA5(A5) (A5) ), we simply write (A6) (A6) for the solution c of (EquationA1(A1) (A1) ) in the sequel. For the ease of completeness, we also include the following result on continuous dependence of .
Lemma A.2
Let satisfy the assumptions of Lemma A.1, and let c be given by (EquationA6(A6) (A6) ). If is sufficiently close to f in , then the Ornstein–Zernike relation (EquationA1(A1) (A1) ) with f replaced by has a well-defined solution , and there holds
Proof.
We write with (A7) (A7) and note that for sufficiently small. Using (EquationA1(A1) (A1) ) it follows that (A8) (A8) where is the series (EquationA4(A4) (A4) ) of the n-fold autoconvolutions of . Note that (A9) (A9) for some C>0 which only depends on the upper bound q of , cf. [Citation11]. Rewriting c as by virtue of (EquationA1(A1) (A1) ) and (EquationA6(A6) (A6) ), we conclude from (EquationA8(A8) (A8) ) that and hence, the assertion follows from (EquationA9(A9) (A9) ) and (EquationA7(A7) (A7) ).
We finally mention that if h is the radially symmetric extension of the pair correlation function and if , then coincides with the direct correlation function in the Ornstein-Zernike relation (Equation8(8) (8) ); compare (EquationA5(A5) (A5) ).