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

Determination of the chemical potential using energy-biased sampling

관련 수소연료전지 · (7) MEA(막전극접합체)

기본 정보

저자
  1. Delgado-Buscalioni, R.
  2. De Fabritiis G
  3. Coveney, P. V.
DOI
10.48550/arxiv.physics/0506152
저널
arXiv (Cornell University)
발행년도
2022
발행기관
Cornell University
피인용수
0
라이선스
0
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.48550/arxiv.physics/0506152
토픽
Chemical and Physical Properties of Materials
OpenAlex ID
W6910507239

평가 내용

관련도
관련
사업분야
수소연료전지 · (7) MEA(막전극접합체)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > MEA(막전극접합체)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

An energy-biased method to evaluate ensemble averages requiring test-particle insertion is presented. The method is based on biasing the sampling within the subdomains of the test-particle configurational space with energies smaller than a given value freely assigned. These energy-wells are located via unbiased random insertion over the whole configurational space and are sampled using the so called Hit&Run algorithm, which uniformly samples compact regions of any shape immersed in a space of arbitrary dimensions. Because the bias is defined in terms of the energy landscape it can be exactly corrected to obtain the unbiased distribution. The test-particle energy distribution is then combined with the Bennett relation for the evaluation of the chemical potential. We apply this protocol to a system with relatively small probability of low-energy test-particle insertion, liquid argon at high density and low temperature, and show that the energy-biased Bennett method is around five times more efficient than the standard Bennett method. A similar performance gain is observed in the reconstruction of the energy distribution.

본문 45,188자

본문 펼치기
Determination of the chemical potential using energy-biased sampling R. Delgado-Buscalioni, <sup>1, ∗</sup> G. De Fabritiis, <sup>2, †</sup> and P. V. Coveney <sup>2, ‡</sup> 1Depto. Ciencias y T´ecnicas Fisicoqu´ımicas, Facultad de Ciencias, UNED, Paseo Senda del Rey 9, Madrid 28040, Spain. 2Centre for Computational Science, Department of Chemistry, University College London, 20 Gordon Street, WC1H 0AJ London, U.K. (Dated: October 8, 2018) An energy-biased method to evaluate ensemble averages requiring test-particle insertion is presented. The method is based on biasing the sampling within the subdomains of the test-particle configurational space with energies smaller than a given value freely assigned. These energy-wells are located via unbiased random insertion over the whole configurational space and are sampled using the so called Hit&Run algorithm, which uniformly samples compact regions of any shape immersed in a space of arbitrary dimensions. Because the bias is defined in terms of the energy landscape it can be exactly corrected to obtain the unbiased distribution. The test-particle energy distribution is then combined with the Bennett relation for the evaluation of the chemical potential. We apply this protocol to a system with relatively small probability of low-energy test-particle insertion, liquid argon at high density and low temperature, and show that the energy-biased Bennett method is around five times more efficient than the standard Bennett method. A similar performance gain is observed in the reconstruction of the energy distribution. I. INTRODUCTION The chemical potential is a central quantity underpinning many physical and chemical processes, such as phase equilibria, osmosis, thermodynamic stability, binging affinity and so on <sup>1</sup> . However, its evaluation by computer simulation is more complicated and timeconsuming than for other intensive thermodynamic quantities, such as the pressure P or temperature T . While P and T can be evaluated from averages over mechanical properties of molecules (forces, velocities and positions), the chemical potential is a thermal average and therefore it requires sampling the phase space of the system. Indeed, computing the chemical potential is a special case of the more general problem of computing a free-energy difference A1 − A0 between two states (labelled as 0 and 1), a problem for which the inherent difficulty is well understood <sup>1,2,3,4</sup> . Free energy perturbation (FEP) is an important category of methods for free energy calculation; we refer to the recent works by Lu et al. <sup>1</sup> and by Shirts and Pande <sup>5</sup> for review and comparisons. As explained by Lu et al. <sup>1</sup>, the general working equation for FEP methods can be cast as energy of the system which depends on the number of molecules N, the volume V and temperature of the system. In order to express the averages of Eq. (1) in terms of one-dimensional integrals of the energy difference u one can then introduce the following distribution functions <sup>6</sup> f (u) = ⟨δ (u − U1 + U0)⟩0V <sup>−1</sup> dr, (2) exp[−β(A1 − A0)] = <sup>⟨w(u) exp[−βu/2]⟩0</sup> ⟨w(u) exp[−βu/2]⟩1 , (1) g(u) = ⟨δ (u − U1 + U0)⟩1, (3) where δ(.) is the Dirac delta function. In Eq. (2), U1 = U1(R <sup>N</sup>, r), where R <sup>N</sup> is the configuration of the first N molecules and r denotes the configuration of the N+1 molecule. Note that in Eq. (2) the N+1 molecule acts as a “test-molecule” which probes the system “0” (i.e. the system with N molecules), but does no interact with it. Therefore f (u) is the probability density of the N molecule ensemble increasing in potential energy by an amount u if this test-molecule were randomly inserted into the ensemble. Conversely, g(u) is the probability density of the (N+1)-molecule ensemble decreasing in potential energy by an amount u if a randomly selected real molecule were removed from the ensemble. ¿From Eq. (1)-(3) an expression for the excess chemical potential µ = A1 − A0 - µid (where µid is the ideal gas chemical potential <sup>3</sup> ) can be derived in terms of the f and g distributions <sup>1,6,7</sup> with β = 1/kBT and u ≡ U1 - U0 the energy difference between both systems; KB is the Boltzmann constant. The angular brackets denote ensemble averages performed on the system labelled by the subscript “0” or “1”. The weighting function w(u) is arbitrary and differs for each method introduced in the literature. The chemical potential is the free energy difference between two thermodynamic states differing by the presence of a single molecule. In other words, the chemical potential is A1 - A0 where A1 = A(N + 1, V, T ) and A0 = A(N, V, T ). Here A(N, V, T ) is the Helmholtz free exp(βµ) = w(u)g(u)du (4) w(u�)f (u) exp(−βu)du <sup>.</sup> A good choice of the weighting function w(u) is key for the efficiency of the method. For instance, the Widom method <sup>2,3</sup> (w(u) = 1) is known to provide very poor convergence at large densities. The Widom method is a single stage FEP, meaning that sampling is only performed in the reference system “0” (i.e., in the f distribution, see Eq. (4)). As discussed by Lu et al. <sup>1</sup>, multiple staging provides much better efficiency. The efficiency is generally defined as the reciprocal of the product of the variance of the estimator multiplied by its cost ncost (that is, the total number of energy evaluations performed by the algorithm) ε = (ncostVar[βµ]) <sup>−1</sup> . (5) Bennett <sup>8</sup> showed that the variance of Eq. (4) is minimised if the weighting function is w(u) = F [β(u − c)], where F (x) = 1/(1 + exp(x)) is the Fermi function and c is an arbitrary constant. The Bennett estimator is then step. A drawback of the cavity-biased method is that it is only indirectly related to the test-particle energy via the excluded volume. This fact introduces a certain inaccuracy in the estimation of the chemical potential, as it can depend on the value of the cavity radius Rc selected. For instance, the CIW has recently been used to calculate the chemical potential of several species across a lipid bilayer <sup>9</sup> . As a test calculation the authors estimated the chemical potential of water in water and reported variations of about 1 Kcal/mol as Rc was varied from 2.6 <sup>˚</sup> A to 2.8 <sup>˚</sup> A. Also, using Rc ∈ [2.6, 2.9] <sup>˚</sup> A resulted in uncertainties of about 2 Kcal/mol in estimates of the excess chemical potential of some species across the lipid layer. Note that the important region of the cavity-biased method is constructed over the translational degrees of freedom of a “coarse-grained” spherical molecule with an effective radius. This means that it can only be applied to small solutes with spherical or roughly spherical shapes <sup>6</sup> . In this work we present an energy-biased method for the estimation of the chemical potential and reconstruction of the energy distribution f (u) in dense phases. The idea is to restrict the sample to an important region defined by the set of bounded domains in the configurational space of the test-molecule where the energy u is smaller than a given free parameter uw. We denote as an energy-well each compact subdomain within the test-molecule energy-landscape for which u < uw. Note that the present approach retains the main benefit of the cavity-biased method, but provides an exact evaluation of the energy distribution f (u) and the chemical potential, because the energy-wells are defined directly in terms of the energy landscape. Moreover our energybiased method does not assume any particular molecular shape and therefore it may be used for non-spherical molecules and can coherently sample over rotational degrees of freedom as well. We also note that the number of stages are not limited to two. When systems 0 and 1 are very different it may be impossible within the simulation time to sample the importance region of the two systems. In this case it is more efficient to compute the total free energy difference by using a set of intermediate states. The energy bias method can be applied on each of these intermediate state transitions at the cost of performing independent simulations for each state. Other approaches include, for instance, slow and fast growth methods where the system is changed from one state to another within a certain simulation time τ (large for slow growth). The fast growth method consists of sampling rapid transformation from many simulations which are then combined by using Jarzynski nonequilibrium work relation <sup>11</sup> to obtain the total free energy difference. The rest of the paper proceeds as follows. The energybiased method is explained in Sec. II, while in Sec. III we derive an analytical expression for the efficiency of the method and estimate the optimal parameter uw by maximising the efficiency. In Sec IV the method is tested in liquid argon at high density (modelled as Lennard + βc, (6) βµ = ln - ⟨F⟨F[−[ββ(u(u − −cc)])]⟩f⟩g where the subscripts g and f indicate (simple) averages over the distributions g(u) and f (u). The value of c providing the minimum variance and maximum overlap is c = µ and to evaluate µ using the optimum c(= µ) one requires to use a self-consistent procedure, iterating the value of c in Eq. (6) and resetting c = µ until ⟨F [−β(u − c)]⟩g = ⟨F [β(u − c)]⟩f . In practise, this step only requires a small number of iterations. Recent publications <sup>1,5</sup> demonstrate that the Bennett method remains the best general method to compute the chemical potential for many applications. Note that the Bennett method is a two-stage FEP and therefore it also requires sampling of the system “1”. In the case of the determination of the chemical potential this system has N+1 molecules and g(u) is obtained from its single-molecule energy distribution. However this extra requirement is not really a drawback. Lu et al. <sup>1</sup> showed that, provided N - O(100), the g−average can be evaluated in the same simulation as is used to sample the f distribution (system “0”) without any noticeable loss in accuracy. The g distribution (constructed from the energy of the real particles) is thus a byproduct of the simulation so the average ⟨F⟩g does not demand any extra computational cost. Another group of methods for determination of the chemical potential are based on biased instead of uniform sampling. In particular, cavity-biased methods first select spherical cavities of minimum radius Rc (a free parameter) in which to insert the test-molecule. This accelerates the evaluation of the ensemble average in dense phases because the low-energy configurations of the testmolecule (with large Boltzmann factors) are usually located in larger cavities with less steric hindrance. Variations of this method have been proposed by several authors; these include the Cavity Insertion Widom method (CIW) due to Mezei and coworkers <sup>9</sup>, the Excluded Volume Map Sampling by Deitrick et al. <sup>6</sup> and the method proposed by Pohorille and Wilson <sup>10</sup> . The cavities are located by a grid search over the whole simulation cell. A cavity centre is assigned at each grid point whose distance to the closest particle is greater than Rc. In order to correct the bias introduced in sampling only inside the cavities one also has to calculate the probability of finding a cavity, which is obtained in the same grid-search Jones atoms) where it is used to reconstruct the testparticle energy distribution f (u) and the chemical potential. We also demonstrate the gain in efficiency obtained with energy-biased sampling with respect to uniform sampling. We conclude with a summary of our findings in Sec. V. Finally in Appendix A we briefly explain the Hit&Run algorithm which efficiently samples bounded regions of arbitrary shape immersed in an arbitrary number of dimensions. II. OVERVIEW OF THE METHOD As stated in the introduction, energy-biased sampling consists of uniform sampling of the importance region defined by the set of subdomains in the test-molecule configurational space where its potential energy is less than uw. The probability density is therefore given by h(u) = f (u)/Fw u ≤ uw (7) - 0 u > uw, where the normalisation factor Fw ≡ −∞ <sup>f</sup> <sup>(u)du</sup> <sup>is</sup> <sup>the</sup> cumulative probability of the unbiased�distributionuw f (u) and uw is an arbitrary energy (free parameter). Note that the energy-biased distribution of Eq. (7) can be straightforwardly combined with any of the popular methods to calculate the chemical potential from Eq. (4). We shall use the Bennett method due to its excellent performance. Introducing the weighting function w(u) = F [β(c - u)] in Eq. (6) and using Eq. (7), one obtains the energy-biased Bennett estimator for βµ, + βc, (8) FIG. 1: Energy landscape for the three-dimensional configurational space generated by inserting an argon atom in a cube of side 16 <sup>˚</sup> A of argon fluid. The isosurfaces of regions Auw are shown for uw equal to 1 (dark grey) and to 10 Kcal/mol (light grey). a uniform probability distribution 1 puw (r) = Ω(Auw ) <sup>,</sup> (10) where Ω(Auw ) is the volume of the region. For a given energy bias uw, the algorithm for selecting configurations r according to Eq. (10) can be described in terms of two main steps which are applied iteratively: 1. Locate a compact energy-well A <sup>α</sup> uw <sup>in</sup> <sup>the</sup> <sup>configu-</sup> rational space D, where u < uw. 2. Sample the energy-well A <sup>α</sup> uw <sup>with</sup> <sup>a</sup> <sup>uniform</sup> <sup>prob-</sup> ability density. The simplest procedure for locating energy wells in step (1) is to perform a random search over the whole configurational space until a fixed number of cavities is found. This procedure, however, does not avoid the probability of exploring the same well more than once, and we observed that it can easily lead to highly correlated data. Instead we perform step (1) by choosing points on a grid within the whole configurational space of the test-molecule. In the case of the Lennard-Jones fluid, the three-dimensional configurational space is probed at the nodes of a Cartesian grid of size nx × ny × nz, where nα is the number of nodes along the coordinate α. We observed that the minimum distance between nodes that guarantees statistically independent samples is around 0.5σ. βµ = ln - Fw⟨F⟨Fc⟩cg⟩h where we have introduced the notation Fc ≡F [β(u − c)] to indicate that after the ensemble average we still have a function of c. As before, the subscript h indicates the average over the biased distribution of Eq. (7). Sampling from the energy probability distribution h(u) requires a more careful consideration of the energy landscape of the system. We indicate by r a configuration of the (N+1)th molecule and by R the configuration of the remaining N molecules. For a simple argon fluid r ∈ D where D ⊂ R <sup>3</sup>, while for a 3 sites flexible water model like TIP3P D ⊂ R <sup>9</sup>, which includes the three Euler angles determining the molecule orientation, the H-O-H angle and the two H-O distances. As shown in Fig. (1), the region Auw = {r ∈ D : u(r, R) < uw} (9) is composed of many disconnected bounded regions of different sizes such that Auw = ∪αAu <sup>α</sup> w <sup>,</sup> <sup>where</sup> <sup>each</sup> <sup>Aα</sup> uw is now a connected region. Of course, for uw →∞ we have that all the regions A <sup>α</sup> uw <sup>connect</sup> <sup>and</sup> <sup>A</sup> ∞ <sup>α</sup> <sup>= D,</sup> <sup>the</sup> entire domain. The sampling algorithm must reproduce u <sup>α</sup> w <sup>,</sup> <sup>where</sup> <sup>each</sup> <sup>Aα</sup> u <sup>α</sup> uw <sup>connect</sup> <sup>and</sup> <sup>A</sup> ∞ <sup>α</sup> An energy well is found at each node where the energy of the test-molecule is u < uw. Then, the locations of each of these nodes are used as starting configurations for independent well samplings. In this way we ensure that we are sampling different cavities for each explored configuration (snapshot) of the system. Note that using grid-sampling the number of cavities found per snapshot is a fluctuating quantity. The search requires an average of n0 = 1/Fw energy evaluations to locate one well (i.e. one configuration with energy u < uw.) During this same step (1) one can calculate the cumulative probability Fw from the estimator m/n0, with n0 being the total number of samples (Bernoulli trials) and m the number of successful trials with u < uw, i.e., the total number of energy-wells found. This number m/n0 converges to Fw as n0 →∞ and, for a finite number of statistically independent trials n0, its variance is (1 − Fw)Fw/n0. In practise, the estimation of Fw requires the number of unbiased samples to be n0 >> 1/Fw; this condition also ensures that a significant number of energy-wells (m > 0) are to be found. Step (2) of the loop mentioned above requires a procedure to sample in an unbiased way the interior of each energy well. This is a delicate step because any bias incurred in sampling the importance region will be transfered to the estimator for βµ, resulting in inaccuracy of the method. To tackle this problem we use the so-called Hit&Run algorithm <sup>12</sup>, which is explained in Appendix A. III. EFFICIENCY AND OPTIMAL PARAMETERS OF THE METHOD We now calculate the efficiency of the method and provide a way of choosing the optimal value of the parameter uw by maximising the efficiency. We also compare the efficiency of the estimator in Eq. (8) based on energybiased sampling with that of the standard Bennett algorithm of Eq. (6). A. Energy-biased Bennett method The variance of the Bennett method can be cast in terms of the probability densities f (u) and g(u). Starting from Eq. (6), after some algebra the variance of the Bennett method assumes the form Let us now consider the variance of the estimator in Eq. (8), which is the sum of the variance of the estimator for Fw and the estimator for the ensemble average In deriving Eq.(15) we used that ⟨Fc⟩f = Fw⟨Fc⟩h up to a negligible amount. This can be seen by noticing that the function F [β(u - c)] in the integrand of ⟨Fc⟩f = −∞ <sup>f</sup> <sup>(u)F</sup> <sup>[β(u −</sup> <sup>c)]du</sup> <sup>decays</sup> <sup>exponentially</sup> <sup>for</sup> <sup>u</sup> <sup>></sup> <sup>c.</sup> Hence, in any practical case (� ∞ uw - c) most of the integral weight comes from u < uw, for which the energy-biased reconstruction of the energy profile f (u) is exact (see Fig. 3). We now evaluate the cost, which is given by the total number of energy evaluations of the test molecule needed to obtain nw samples: ncost = n0 + nw/a, (16) where a < 1 is the acceptance ratio of the Hit&Run sampling algorithm, defined in Appendix A. Introducing Eq.(14) into Eq. (16) we obtain 1 + nw⟨Fc⟩h 1 VarEB[βµ] = Var[ln Fw] + nw⟨Fc⟩h 1 ≃ n0Fw , (13) where we have used the relation Var[ln(Fw)] ≃ Var[Fw]/Fw <sup>2</sup> <sup>= (1 −</sup> <sup>Fw)/(n0Fw) ≃</sup> <sup>1/(n0Fw),</sup> <sup>for</sup> <sup>Fw</sup> <sup><<</sup> 1. Here n0 is the number of random insertions in the entire configurational space and nw is the number of independent samples within the importance region u < uw. The probability of finding an energy-well with u < uw using uniform sampling over the whole configurational space is Fw, so the number of cavities found after n0 trials is m = Fwn0. If the number of statistically independent samples per well is s, the total number of independent samples within the restricted configurational space u < uw is nw = n0sFw. (14) We note that the number of independent samples per well s depends on the fluid considered and, of course, on the biasing energy uw. In Appendix B we provide a way of estimating s from the outcome of the data obtained from Hit&Run sampling. Inserting Eq. (14) into Eq. (13) one obtains for the energy-biased algorithm 1 + s⟨Fc⟩f VarEB[βµ] = <sup>1</sup> n0 - F1w . (15) 1 VarB[βµ] = n0⟨F [β(u − c)]⟩f , (11) ncost = n0 �1 + <sup>sF</sup> a <sup>w</sup> . (17) where n0 is the number of insertions used to sample the complete configurational space of the test-particle. Note that the computational cost of the standard Bennett method is n0, so according to (5) and Eq. (11) its maximum efficiency is given by εB = ⟨Fc⟩f . (12) 1 ε <sup>−</sup> EB <sup>1</sup> <sup>=</sup> Fw For the energy-biased algorithm the efficiency is ε = (ncostVarEB[βµ]) <sup>−1</sup> . Using Eq.(15) and Eq.(17) one obtains + <sup>s</sup> Fw a <sup>+</sup> a⟨Fc⟩f 1 + s⟨Fc⟩f . (18) By maximising the efficiency ε = ε(Fw) in Eq. (18) with respect to Fw, one obtains the optimal value Fw <sup>opt</sup> and respect to Fw, one obtains the optimal value Fw <sup>opt</sup> and the maximum efficiency εEBmax = εEB(Fw <sup>opt):</sup> Using Var(H) = H(1 − H)/nw and Var(Fw) = Fw(Fw − 1)/n0 one obtains w <sup>opt):</sup> w <sup>H)F 2</sup> nw . + <sup>FwH(1 −</sup> <sup>H)</sup> n0nw VarEB = <sup>Fw(Fw</sup> <sup>−</sup> <sup>1)H</sup> <sup>2</sup> Fw <sup>opt</sup> = a⟨Fc⟩f (19) n0 w + <sup>H(1 −</sup> <sup>H)F 2</sup> 1 <sup>−</sup> EB <sup>1</sup> max <sup>=</sup> <sup>2</sup> �a⟨Fc⟩f . (20) ε <sup>−</sup> EB <sup>1</sup> + <sup>s</sup> a <sup>s</sup> 1 a <sup>+</sup> s⟨Fc⟩f (23) Note that, as expected, for H ≃ 1 one recovers the variance of the unbiased insertion method. The interesting part of the energy distribution is the importance region, located in the low energy range, where H << 1. In this regime one can make the approximation 1−H ≃ 1. Using F = HFw and nw = n0sFw, one gets Finally, we compare the efficiency of the energy-biased algorithm with that provided by the Bennett algorithm, given by εB = ⟨Fc⟩f . According to Eq. (20) the ratio of efficiencies is given by + <sup>1</sup> 1 s <sup>+</sup> n0sFw - FFw . (24) εB εEBmax <sup>1</sup> s <sup>.</sup> (21) = 2 ⟨Fc⟩f - a c⟩f + <sup>s⟨Fc⟩f</sup> a a <sup>c⟩f</sup> + <sup>1</sup> a s VarEB = <sup>F</sup> n0 Equation (21) yields the range of values of ⟨Fc⟩f for which the energy-biased Bennett estimator for βµ method is more efficient than the standard (unbiased) Bennett algorithm. Note that for s = a/⟨Fc⟩f the effi Bennett algorithm. Note that for s = a/⟨Fc⟩f the effi ciency ratio given by Eq. (21) reaches its minimum value,� εB/εEBmax = 4�⟨Fc⟩f /a, and therefore εB < εEB if ε⟨FBc/ε⟩fEB>max a/16.= Hence4�⟨Fcthe⟩f /aenergy-biased method, and therefore εB <isεsuitedEB if for fluids at high densities or low temperatures or for molecular fluids with low insertion probability. In this regime ⟨Fc⟩f << a/16 and the dominant term in Eq. (21) is 1/s, hence εEBmax ≃ sεB. In other words, the maximal efficiency of the present energy-biased method is limited by the average number s of independent samples that can be obtained within one energy-well. As shown in Appendix B, for the Lennard-Jones fluid we have observed that in the most unfavourable case (high density and low temperature) s ∼ [5 − 10]. B. Reconstruction of the energy distribution We now show that the reconstruction of f (u) using the energy-biased procedure (EB) is faster and more efficient than that obtained using any unbiased sampler which uniformly explores the whole configurational space. To that end we consider the evaluation of the cumulative probability F (u) = −∞ <sup>f</sup> <sup>(u′)du</sup> <sup>for</sup> <sup>u</sup> <sup><</sup> <sup>uw</sup> <sup>(i.e.</sup> for Fprobability(u) < Fw).F (Weu) =shall�−∞u compare <sup>f</sup> <sup>(u′)du</sup> the <sup>for</sup> variance <sup>u</sup> <sup><</sup> <sup>uw</sup> of <sup>(i.e.</sup> two forestimators for F : one based on uniform insertion over the whole domain and the other based on the energy-biased procedure. The variance of the unbiased estimator is simply Var(F ) = F (1−F )/n0 and for low energies (F << 1) its efficiency is 1/F . The expected value of the energybiased estimator is HFw, where H(u) = −∞ <sup>h(u′)du′</sup> is the cumulative probability of the biased�distributionu in Eq. (7). This estimator is constructed as a product of two statistically independent fluctuating variables and its variance is <sup>13</sup> −∞ <sup>h(u′)du′</sup> �distributionu Note that the term in brackets is the reduction in variance with respect to uniform unbiased sampling. Because Fw is evaluated from n0 probes, this means that necessarily n0 >> 1/Fw so the third term inside the brackets is much smaller than unity. On the other hand, for the low energy range considered F << Fw and one finally concludes that VarEB ≃ Var(F )/s, where Var(F ) ≃ F/n0 is the variance obtained in the unbiased uniform sampling of the whole domain. The cost associated with the energy-biased procedure is ncost = n0(1 + sFw/a). In the case of a LennardJones liquid we have found that a ≃ 0.17 and s ∼ O(10), while the optimal cumulative probability is Fw ≲ 10 <sup>−3</sup> . This means that, in practical situations, sFw/a ≲ 1 and ncost ≳ n0. Thus, according to Eq. (24) the energybiased sampling procedure is around s times faster than a uniform unbiased (grid or random) sampler in reconstructing the low energy range of f (u). As before, s is the average number of independent samples taken per well. IV. RESULTS In order to confirm the foregoing theoretical relations about efficiency and variance reduction, we performed molecular dynamics simulations of a Lennard-Jones liquid at high density and low temperature (ρ = 0.0236 <sup>˚</sup> A <sup>−3</sup> and T = 84K). These simulations were performed in a cubic periodic box of side L = 10σ. We used the standard Verlet method <sup>2</sup> to integrate Newton’s equations of motion, incorporating a Langevin thermostat <sup>14</sup> to keep the system in the NVT ensemble. During the simulation, the iterative loop (1)+(2) explained in Sec. II was performed m times per time interval δtsamp = 0.5τ, which corresponds to about three times the collision time. The search for wells performed in step (1) was done by probing at the nodes of a Cartesian grid comprising 15 <sup>3</sup> nodes. This ensured that the explored cavities are independent. All the cavities found in step (1) were sampled using the Hit&Run algorithm (see Appendix A). VarEB(F ) = Var(HFw) = Fw <sup>2</sup> <sup>Var(H)</sup> (22) + H <sup>2</sup> Var(Fw) + Var(Fw)Var(H). A. Estimation of the chemical potential One way to measure the efficiency of the method is to evaluate the convergence of the estimated value of the chemical potential for an increasing number of test-particle probes ncost. Convergence can be calculated from the difference between successive values of µn, where n(= ncost) indicates the total number of evaluations of the test-particle energy. Figure 2 shows how this difference decreases in calculations based on both the energy-biased and the unbiased samples. These calculations correspond to liquid argon with number density ρ = 0.0236 <sup>˚</sup> A <sup>−3</sup> and temperature T = 84K (these values correspond to ρ = 0.92σ <sup>3</sup> and T = 0.7 in Lennard-Jones units), for which the average of the Fermi function is ⟨Fc⟩f = 8.9 × 10 <sup>−6</sup> . According to Eq. (19) the optimum value of Fw is 0.0012, which corresponds to uw ≃ 14.19 Kcal/mol. We selected the predicted optimum parameter (uw = 14.19 Kcal/mol) and performed d = 15 samples per well. As can be seen in Fig. 2, for equal numbers of energy probes (n = ncost), the average difference between successive estimates of the chemical potential via the energy-biased method is about five times smaller than that obtained with the unbiased sampler. As predicted by Eq. (21), such a gain in efficiency is consistent with the average number s of independent samples per well (see table II), which for this simulation was s ≃ 5. Evaluations of the chemical potential for LennardJones (LJ) fluids are shown in Table I together with the estimated efficiency of each calculation. For a LJ fluid with ρ = 0.02360 <sup>˚</sup> A <sup>−3</sup> and T = 84K the numerically obtained net gain is around 7, which coincides with the prediction in Eq. (21) using s = 7. For illustrative purposes we also analysed a case for which the efficiency of our implementation of the energy-biased sampling is similar to the uniform-unbiased Bennett method. For instance, ⟨Fc⟩f = 0.0102 for ρ = 0.01755 <sup>˚</sup> A <sup>−3</sup> and T = 178.5K. Using a = 0.165 and the (optimum) numbertainsofεBsamples/εEBmaxs =≃ �1; aour/⟨Fcnumerical⟩f ≃ 4 in calculations,Eq. (21) onewithob uw = 7.33 and d = 8, confirmed this conclusion. We note that for any value of uw considered the energy-biased estimation of the chemical potential µ agrees within about 0.01 Kcal/mol with the unbiased Bennett result. This is illustrated in Table II where we show the estimated µ for the higher density liquid, using several values of uw. B. Reconstruction of the energy distribution f (u) In Fig. 3 we compare the reconstructed energy distribution f (u) at energies u < uw with that computed from an unbiased method, which consists of a large number of random insertions within the entire configurational space. Figure 3 clearly illustrates that the energy-biased method exactly reproduces the unbiased distribution f (u) for energies smaller that uw. This attractive feature is a consequence of the fact that it is easy to exactly cor -0.35 0 ~~.0~~ 2.0 × 10 <sup>~~6~~</sup> 4.0 × 10 <sup>~~6~~</sup> 6.0 × 10 <sup>~~6~~</sup> ncost 10 <sup>-4</sup> Energy-biased Bennet ~~<u>t</u>~~ Unbiased Bennett 10 <sup>-5</sup> 10 <sup>-6</sup> 10 <sup>-7</sup> 3 × 10 <sup>~~6~~</sup> 4 × 10 <sup>~~6~~</sup> 5 × 10 <sup>~~6~~</sup> 6 × 10 <sup>~~6~~</sup> 7 × 10 <sup>~~6~~</sup> ncost FIG. 2: (Top) The estimation of the chemical potential plotted against the overall number of energy probes (ncost). We compare the standard (uniform sampling) Bennet and Widom methods with the corresponding energy-biased versions of these methods. The calculations correspond to a Lennard-Jones fluid with ρ = 0.0236 <sup>˚</sup> A <sup>−3</sup>, and T = 84K (ρ = 0.92σ <sup>3</sup> and T = 0.7ǫ/kB in reduced LJ units); the energy-biased sampling was done using uw = 14.19 Kcal/mol and d = 15 samples per well. (Bottom) The convergence measured as the squared difference between consecutive estimations with increasing cost (∆n = 10 <sup>5</sup> ). In the energybiased method the cost is given by ncost = n0 (1 + dFw/a), where n0 is the number of random probes used to evaluate Fw(= F (uw) = 0.00122) and a = 0.165 is the acceptance ratio of the Hit&Run sampler. Circles are the successive values of (µn − µn+∆n) <sup>2</sup> (shown only for the energy-biased case) and solid lines are the average over twenty consecutive differences. rect for the bias in terms of the cavity energies. This is not true for the accessible volume of the molecule, as in cavity-biased procedures <sup>6,9</sup> . In order to illustrate the above conclusion we show in Fig. 4 the estimation of the cumulative probability F (u) versus the total number of test-particle energy probes used for the evaluation. The particular case shown corresponds to u = 5 Kcal/mol, for a LJ liquid at ρ = 0.0236 <sup>˚</sup> A <sup>−3</sup> and T = 84K. The energy-biased sampling was done using uw = 14.19 Kcal/mol and d = 15 Unbiased Widom Energy-biased Widom Unbiased Bennett Energy-biased Bennett µ n -0.1 -0.15 -0.2 -0.25 -0.3 ρ ( <sup>˚</sup> A <sup>−3</sup> ) T (K) µEB µB ε <sup>−</sup> B <sup>1</sup> <sup>−</sup> B <sup>1</sup> ε <sup>−</sup> EB <sup>1</sup> ρ ( <sup>˚</sup> A <sup>−3</sup> ) T (K) µEB µB ε <sup>−</sup> B <sup>1</sup> ε <sup>−</sup> EB <sup>1</sup> εEB/εB Fw d 0.02360 84 -0.336 -0.323 0.9 × 10 <sup>5</sup> (1.2 ± 0.1) × 10 <sup>4</sup> 7 ± 1 0.00122 15 TABLE I: Comparison of the chemical potential (in Kcal/mol) calculated via the standard Bennett method (i.e. using uniform unbiased sampling) and the energy-biased Bennett (subscript EB). The inefficiency of both methods (reciprocal of efficiency) is also shown. In the case of the standard Bennett method we write the minimum inefficiency (ε <sup>−</sup> B <sup>1</sup> <sup>= ⟨Fµ⟩f</sup> <sup>) while</sup> <sup>the inefficiency</sup> of the energy-biased method was obtained from numerical calculation of the variance of βµ, using block-analysis (see Appendix B or e.g. Refs. <sup>2,3</sup> ) and agrees within error bars with the theoretical expression of Eq. (18) (see text). The error in εEB/εB comes mainly from the uncertainty in the numerical calculation of VarEB. 0.0006 0.0005 0.0004 0.0003 0.0002 0.0001 0 unbiased sampling uw=11.8 uw=47.00 uw=165.53 ~~<u><mark>0</mark></u>~~ ~~50~~ ~~100~~ ~~150~~ ~~20~~ 0 energy (kcal/mol) 0.0002 0.00015 0.0001 Energy-biased sampling Uniform unbiased sampling FIG. 3: The energy distribution f (u) obtained from 4 × 10 <sup>6</sup> random insertions over the whole configurational domain is compared with energy-biased sampling in the restricted configurational space u < uw. The calculations correspond to the same case as in Fig. 2. The energy cavities are sampled using the Hit&Run algorithm, which provides an unbiased reconstruction of the energy distribution for any value of uw chosen. samples per well, and for this calculation we obtained s ≃ 5 (see Appendix and Table II). Compared with the unbiased procedure, the reduction of variance provided by the energy-biased sampler is immediately apparent on inspection of Fig. 4. A numerical evaluation of the variance of each data set in Fig. 4 provides: VarEB = 4.14 × 10 <sup>−5</sup> /n0, while the (best) result for the algorithm based on uniform unbiased sampling is Var(F ) = F/n0 = 1.9 × 10 <sup>−4</sup> /n0. Hence the net gain in efficiency is about 4.6, in agreement with the value of s = 5 obtained from the independent correlation analysis explained in Appendix B. As shown in Table I, the estimated net gain in the evaluation of the chemical potential compared with the unbiased Bennett method is 7 ± 1, which is close to the estimate s ≃ 5 obtained from the analysis of the cumulative probability. ~~0~~ ~~4e+06~~ ~~8e+06~~ ## ncost uFIG. = 5 Kcal/mol4: The cumulative versus the total number of energy evaluationsprobability F (u) = �−∞u <sup>f</sup> <sup>(u′)du′</sup> <sup>for</sup> of the test-particle ncost. The liquid is the same as in Fig. 2. We compare the estimations of F (u) for grid-sampling (with a regular mesh of 36 <sup>3</sup> nodes) and for energy-biased samplings within u < uw = 14.19 Kcal/mol, performing d = 15 samples per well. The cumulative probability at uw is Fw = F (uw) = 0.00122. V. CONCLUSION We have presented a new method for sampling the energy of a test-molecule in order to calculate singleparticle ensemble averages and, in particular, the chemical potential. The method, called energy-biased sampling, restricts the important region to the bounded domains in the test-molecule energy-landscape where the test-molecule energy u is smaller than a given free parameter uw. This energy-biased sampling retains the principal benefit of cavity-biased methods <sup>6,9</sup> in the sense that, by sampling only within regions with a significant Boltzmann factor, convergence is greatly accelerated with respect to uniform sampling. Furthermore, because the energy-biased sampling is accurately defined in terms of the test-particle energy it has some important benefits: first, it allows accurate reproduction of the test-particle energy distribution f (u) and the chemical potential; second, it is possible to sample cavities of arbitrary shape (not only spherical ones) and to generalise the cavity dimensionality to include the rotational degrees of freedom in the energy-well reconstruction; finally, and rather importantly, it enables one to combine the sampling results with standard free energy perturbation (FEP) formulae. In particular, we combined it with the Bennett method <sup>8</sup> which minimises the variance of the estimator and has proved to be the best method in the literature <sup>1,5</sup> . Energy-biased sampling is a general protocol to bias the sampling and consists of two sequential steps: (1) searching and (2) sampling the interior of energy-wells. In this work we have implemented these two steps using relatively simple algorithms: uniform unbiased search and Hit&Run sampling. However we note that other solutions are also possible. For instance, non-uniform sampling of the importance region may surely increase the efficiency of the present method. In dense systems, the searching step becomes the most difficult one and a more effective extension of this method could be to perform a biased search (using, for instance, some variation of the usher algorithm <sup>15,16</sup> ) so as to significantly increase the probability of finding favourable cavities for insertion of the test particle. These extensions are left for future studies. Acknowledgments This research was supported by the EPSRC Integrative Biology project GR/S72023 and by the EPSRC RealityGrid project GR/67699. R.D-B acknowledges support from the European Commission via the MERG-CT2004-006316 grant and from the Spanish research grants FIS2004-01934 and CTQ2004-05706/BQU. APPENDIX A: SAMPLING BOUNDED REGIONS WITH THE HIT&RUN ALGORITHM There exists a relatively large literature on sampling a bounded connected region (see for instance Ref. <sup>17</sup> and references therein). In this work we have used the socalled Hit&Run algorithm for its simplicity and good performance <sup>17</sup> . The Hit&Run sampler is a special Monte Carlo Markov chain which draws numbers from an assigned distribution <sup>12,17</sup> p(r), where r ∈ A lies within a bounded connected region of an n-dimensional space A ⊂ R <sup>n</sup> . In our case, p(r) is a uniform probability density over the region A <sup>α</sup> uw <sup>such</sup> <sup>that</sup> 1 p(r) = Ω(A <sup>α</sup> uw ) <sup>.</sup> (A1) The Hit&Run algorithm starts from a point r0 within the bounded region A and performs the following steps: i. Choose a random direction e and find the intersec tions of the cavity border with the line r(λ) = r0+λe, where λ is a real number. As the cavity A is bounded the intersection is composed by two points r(λ <sup>+</sup> ) and r(λ <sup>−</sup> ) (here λ <sup>+</sup> - 0 and λ <sup>−</sup> < 0). ii. Select a point r1 within the segment (r(λ <sup>+</sup> ), r(λ <sup>−</sup> )), i.e., r1 = r(λ <sup>−</sup> ) + ξ(r(λ <sup>+</sup> ) − r(λ <sup>−</sup> )) (A2) where ξ ∈ (0, 1) is a uniformly distributed random number. iii. Sample at r1, set r1 → r0 as the new starting point and go to (i). The above procedure is repeated to obtain the desired number of samples d. In our case the starting point for the sample chain, r0, is the test-particle configuration returned by the algorithm for energy-well searching (U (r0, R) < uw). In order to locate the borders of the energy well r(λ <sup>+</sup> ) and r(λ <sup>−</sup> ) we use the following procedure. Starting from r0 we cross the well along the line defined by the random unit vector e moving in steps of size δs, i.e., according to r(k) = r0 + k δs e, (A3) with k being an integer starting from k = ±1. The energy is computed at each point r(k) until one crosses the edges of the well at k = k <sup>+</sup> and k = k <sup>−</sup> (for which u(r(k <sup>±</sup> ), R) > uw). An approximate location of the cavity borders is provided by setting λ <sup>±</sup> = k <sup>±</sup> . We used typically δs ≃ 0.3 <sup>˚</sup> A and required, on average, about five iterations to cross the well in one random direction (this value depends on the density and uw). Note that the acceptance ratio is a = ⟨k <sup>+</sup> - k <sup>−</sup> ⟩ <sup>−1</sup> and for the high density cases considered here a ≃ 0.17. APPENDIX B: OPTIMAL NUMBER OF SAMPLING DIRECTIONS It is possible to reduce the cost without increasing the variance by setting the number of samples per cavity d equal to or somewhat larger than s, the average number of independent samples per cavity. Note that the number of statistically independent samples within one cavity is s = d/τc, where τc is an empirically estimated autocorrelation length of the whole chain of data. This number τc can be estimated from the large m limit of the quantity m Var[F <sup>(m)</sup> ]/Var[F ], where Fc = F [β(u − c)] is the Fermi function evaluated at a single energy u and F <sup>(m)</sup> denotes the mean of m consecutive F values. The value of s can be estimated by performing several Hit&Run samplings with an increasing number of directions per cavity d - s, then computing τc for the chain of samples and evaluating d/τc, which should be nearly independent of d. We carried out this evaluation of s for varying values of uw within the same system and for fixed uw and varying density. The results of this study, reported in Table II, clearly indicate that s does not greatly vary for a broad range of values of the cavityborder energy uw. In fact, at low and moderate values of uw the energy-cavities are isolated and their average size (in <sup>˚</sup> A) grows quite slowly with uw. This is due to the steepness of the hard-core part of the Lennard-Jones potential. Above a certain energy uw the cavities become connected and a steep rise in the average size of the energy-cavities is observed. This is reflected in the ∗ [r.delgado-buscalioni@ucl.ac.uk](mailto:r.delgado-buscalioni@ucl.ac.uk) - [g.defabritiis@ucl.ac.uk](mailto:g.defabritiis@ucl.ac.uk) - [p.v.coveney@ucl.ac.uk](mailto:p.v.coveney@ucl.ac.uk) 1 N. Lu, J. K. Singh, and D. A. Kofke, J. Chem. Phys. 118, 2977 (2003). 2 M. Allen and D. Tildesley, Computer Simulations of Liquids (Oxford University Press, 1987). 3 D. Frenkel and B. Smith, Understanding Molecular Simulation: From Algorithms to Applications (Academic Press, San Diego, 2nd edition, 2002). 4 P. Kollman, Chem. Rev. 93, 2395 (1993). 5 M. R. Shirts and V. S. Pande, J. Chem. Phys. 122, 144107 (2005). 6 G. L. Deitrick, L. E. Scriven, and H. T. Davis, J. Chem. Phys. 90, 2370 (1989). 7 K. S. Shing and K. E. Gubbins, Mol. Phys. 46, 1109 (1982). value of s. As shown in Table II for uw = 14.19 Kcal/mol we obtained s ≃ 4.5 and s ≃ 11 for two calculations using d = 15 and d = 100 respectively. We obtained a relatively close value s ≃ 7 for twice as large an energy limit uw = 28.38 Kcal/mol. However using uw = 165.53 Kcal/mol the average number of independent samples increased up to 25, reflecting the more complex shape and larger volume of these energy cavities. In summary, for the optimum range of values of uw ∼ [10 − 30] Kcal/mol we find s ≃ [5 - 10] in the case of the Lennard-Jones liquid. 8 C. H. Bennett, J. Comput. Phys. 22, 245 (1976). 9 P. Jedlovszky and M. Mezei, J. Am. Chem. Soc. 122, 5125 (2000). 10 A. Pohorille and M. A. Wilson, J. Chem. Phys. 104, 3760 (1996). 11 C. Jarynski, Phys. Rev. Lett. 78, 2690 (1997). 12 R. L. Smith, Operations Research 32, 1296 (1984). 13 L. Goodman, J. Amer. Stat. Assoc. 55, 708 (1960). 14 K. Kremer and G. Grest, J. Chem. Phys. 92, 5057 (1990). 15 R. Delgado-Buscalioni and P. V. Coveney, J. Chem. Phys. 119, 978 (2003). 16 G. De Fabritiis, R. Delgado-Buscalioni, and P. V. Coveney, J. Chem. Phys. 121, 12139 (2004). 17 J. S. Liu, Monte Carlo Strategies in Scientific Computing (New York: Springer-Verlag, 2001). uw(Kcal/mol) d n0 ⟨Fc⟩h s ncost/n0 µ (Kcal/mol) 28.38 20 4.2 10 <sup>5</sup> 1.1 10 <sup>−3</sup> 7 1.5 -0.32 28.38 100 2.95 10 <sup>6</sup> 1.08 10 <sup>−3</sup> 7 3.8 -0.353 14.19 100 4.3 10 <sup>6</sup> 2.66 10 <sup>−3</sup> 12 1.7 -0.335 14.19 15 1.0 10 <sup>7</sup> 2.77 10 <sup>−3</sup> 5 1.1 -0.334 165.53 200 2.76 10 <sup>5</sup> 1.3 10 <sup>−5</sup> 25 85.8 -0.357 TABLE II: Details of the energy-biased calculations in a Lennard-Jones (LJ) liquid at density ρ = 0.0236 <sup>˚</sup> A <sup>−3</sup> and temperature T = 84K (ρ = 0.92 and T = 0.7 in LJ units). We compare the results for varying values of the energy parameter uw, samples per cavity d and varying number n0 of energy probes within the unbiased distribution. The cumulative probabilities of the averageunbiasedofdistributionthe Fermi (functionFw = F (inuwthe) = biased�−∞uw <sup>f</sup> <sup>(</sup> distribution <sup>u)du)</sup> <sup>are</sup> <sup>Fw</sup> ⟨F <sup>(165</sup> c⟩h <sup>.53)</sup> is defined <sup>=</sup> <sup>0.0704</sup> in <sup>, F</sup> Eq. <sup>w(28</sup> (8). <sup>.38)</sup> <sup>=</sup> The <sup>0.00458</sup> average <sup>, Fw</sup> number <sup>(14.19)</sup> <sup>=</sup> of <sup>0</sup> independent <sup>.00122.</sup> <sup>The</sup> samples per cavity s is obtained from s = d/τc, where the correlation number τc is calculated from the correlation between the whole chain of data. The overall number of energy probes in the energy-biased method is ncost = n0 (1 + dFw/a), where a is the acceptance ratio obtained for the Hit&Run sampler, a ≃ 0.17. The estimation of the chemical potential using the standard (unbiased) Bennett method with 1.1 × 10 <sup>7</sup> energy samples is µ = −0.323 Kcal/mol.

섹션 본문

섹션 본문이 없습니다.

참고문헌

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