multi-grid solver for the reference interaction site model of

33
Multi-grid Solver for the Reference Interaction Site Model of Molecular Liquids Theory Volodymyr P. Sergiievskyi, Wolfgang Hackbusch, Maxim V. Fedorov , Max Planck Institute of Mathematics in the Sciences, Inselstrasse 22, 04103 Leipzig, Germany May 15, 2011 Abstract In this paper we propose a new multi-grid based algorithm for solving integral equations of the Reference Interactions Site Model (RISM). We also investigate the relationship between the parameters of the algorithm and the numerical accuracy of the hydration free energy calculations by RISM. For this purpose we analyzed the per- formance of the method for several numerical tests with polar and non- polar compounds. The results of this analysis provide some guidelines for choosing an optimal set of parameters to minimize computational expenses. We compared the performance of the proposed multi-grid- based method with the one-grid Picard iteration and nested Picard iteration methods. We show that the proposed method is over 30 times faster than the one-grid iteration method, and in the high accu- racy regime it is almost 7 times faster than the nested Picard iteration method. 1 Introduction Integral equations theory of liquids (IETL) is a powerful method for the de- scription of structural and thermodynamical parameters of liquids [1, 2]. In * e-mail:[email protected], phone:+49 (0) 341 9959 804, fax:+49 (0) 341 9959 999 1

Upload: truongphuc

Post on 31-Dec-2016

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Multi-grid Solver for the Reference Interaction Site Model of

Multi-grid Solver for the Reference Interaction

Site Model of Molecular Liquids Theory

Volodymyr P. Sergiievskyi, Wolfgang Hackbusch, Maxim V. Fedorov∗,Max Planck Institute of Mathematics in the Sciences,

Inselstrasse 22, 04103 Leipzig, Germany

May 15, 2011

Abstract

In this paper we propose a new multi-grid based algorithm forsolving integral equations of the Reference Interactions Site Model(RISM). We also investigate the relationship between the parametersof the algorithm and the numerical accuracy of the hydration freeenergy calculations by RISM. For this purpose we analyzed the per-formance of the method for several numerical tests with polar and non-polar compounds. The results of this analysis provide some guidelinesfor choosing an optimal set of parameters to minimize computationalexpenses. We compared the performance of the proposed multi-grid-based method with the one-grid Picard iteration and nested Picarditeration methods. We show that the proposed method is over 30times faster than the one-grid iteration method, and in the high accu-racy regime it is almost 7 times faster than the nested Picard iterationmethod.

1 Introduction

Integral equations theory of liquids (IETL) is a powerful method for the de-scription of structural and thermodynamical parameters of liquids [1, 2]. In

∗e-mail:[email protected], phone:+49 (0) 341 9959 804, fax:+49 (0) 341 9959 999

1

Page 2: Multi-grid Solver for the Reference Interaction Site Model of

terms of computational expenses, it offers a compromise between computa-tionally expensive fully-atomistic simulations [3, 4, 5] and rather approximatecontinuum electrostatic models [6, 7, 8].

IETL describes the structure of a liquid in terms of the correlation func-

tions. The most important relation in the theory is the Ornstein-Zernike(OZ) equation [9, 1]. For a simple liquid of spherical particles this equa-tion reduces to an one-dimensional integral equation (1D-OZ). However, formolecular liquids the correlation functions depend on the mutual displace-ments and mutual orientations of the molecules resulting in a six dimensionalintegral equation - the Molecular Ornstein-Zernike (MOZ) equation [1].

To solve an OZ equation one should complete this by a closure rela-tion which gives additional non-linear relations for the correlation functions,and, therefore, makes the system OZ+closure solvable. However, the closurerelation incorporates a so-called bridge function, which is practically incom-putable due to the infinite number of terms in the exact representation ofthis functional[1, 10]. Therefore, in practice one uses approximate closurerelations [11, 2].

Nowadays, only few methods exist for solving the 6D MOZ equation. Oneclass of methods is based on the decomposition of the correlation functionsinto the basis of rotational invariants [12, 13]. Recently an implementationof straightforward method which explicitly treats angular degrees of freedomwas reported [14]. Nevertheless, till now the mentioned above methods wereapplied to the small and simple molecules only. This can be explained by thehigh computational cost of solution of six-dimensional problem with reason-able accuracy. Therefore, in practice one usually uses simplified models andthe Reference Interaction Sites Model (RISM) is the most popular amongthem. The model was proposed by Chandler and Andersen [15]. The mainassumption in the model is that the molecular correlation functions can berepresented as a sum of spherically symmetric functions corresponding to theselected parts of the molecule (so-called sites). As a result, the operationswith the spherically symmetric functions can be reduced to the operationswith only their radial parts and that makes the RISM integral equationseffectively one-dimensional. The six-dimensional MOZ equation is replacedby a set of one-dimensional non-linear integral equations. Later on, therehas been proposed more sophisticated theories which allow to obtain three-dimensional correlation functions, e.g. 3D-RISM theory [16, 2], or methodsbased on the solid harmonics decomposition [17, 18]. These methods betterdescribe the structural solute-solvent correlations [19, 20, 21, 22]. For the

2

Page 3: Multi-grid Solver for the Reference Interaction Site Model of

sake of simplicity we illustrate our method for the 1D RISM equations. Aswe describe our method in a general way, an extension of the method tothe 3D RISM theory is straightforward. Despite of its relative simplicity 1DRISM theory have several important applications. 1D RISM equations canbe self-consistently used to introduce an implicit solvent model in Quantummechanical calculations (RISM-SCF method) [23, 24, 25, 26]. This methodgives much better description of the solvent structure than continuum elec-trostatics models. Another application of 1D RISM theory is the predictionof thermodynamical properties of solutions, such as the Hydration Free En-ergy (HFE). The approach is based on end-point relations for HFE [11, 27]and semi-empirical parametrization [28, 29, 30]. It has been recently shownthat after proper parametrization of the 1D RISM-based method, this canprovide good correspondence with experimental data for HFEs [28, 29, 30].The goal of the present paper is to introduce a fast solver for RISM equationswith emphasis on the efficiency of HFE calculations by RISM.

The simplest scheme for solving equations of the integral equation the-ory of liquids uses the Picard iteration [31], which, however, may convergerather slowly. One may use faster convergent schemes, such as the Newton-Raphson (NR) iteration [32], NR-GMRES algorithm [33], modified methodof direct inversion in iterative subspace(DIIS)[34], combination of modifiedNR and DIIS iteration[35] or vector extrapolation technique [36]. However,for the grids with a large number of points and/or molecular systems witha large number of interacting sites these methods are computationally ex-pensive. An alternative way to increase efficiency is to use a multi-scaleapproach. A Commonly used approach is the combined two-level NR-Picardscheme, so-called Gillan method [37]. Similar two-level NR-Picard schemesare used also in the Labık-Malijevsky-Vonka method [38, 39] or wavelet-based methods [40, 41, 42, 43]. Although two-level methods give an essentialimprovement with respect to Picard iteration, the two level approach haslimitations, because fine-grid and coarse-grid resolutions cannot differ toomuch. Recently, an effective multilevel NR-GMRES algorithm has been ap-plied to the problem [44]. This algorithm does not have such restrictions, asthe two-level methods; NR-GMRES algorithm is a fast convergent method,and it needs much less iteration steps to converge, than the Picard iteration.However, faster convergence in terms of number of iterations does not nec-essarily mean better performance in terms of computer time. The Newton-Raphson method requires computation and inversion of Jacobian matrix ofsize N × N , where N is number of discretization points on the coarse grid

3

Page 4: Multi-grid Solver for the Reference Interaction Site Model of

(typically N ≈ 50 − 100). Although the NR implementation in the work[44] does not need inversion of Jacobian matrix, it requires operations withmatrices of size N ×N , which demand additional storage and computationaltime and make each iteration step much more computationally expensive,than a Picard iteration step. For the 1D RISM, where number of coarse-gridpoints N is not very large these additional computational expanses for eachiteration step can be compensated with much less number of iteration steps.However, it is not so for the three dimensional problem, where the numberof grid points grows cubically with respect to the one-dimensional problem.Because operations with matrices of size N3 ×N3 are unfeasible, NR-basedmethods have only limited applicability.

Despite the fact that many methods use sophisticated algorithms to en-hance computational performance, these methods do not fully exploit theadvantages of the multi-scale approach. The multi-grid method is a multi-scale technique in the sense that the iteration makes use of different grids(different discretization levels) and is more efficient than simple nested iter-ation schemes [45]. The multi-grid scheme is not restricted to a specific typeof iterations and can be applied to any kind of iteration process. Multi-gridmethods are actively used in different applications in computational chem-istry [46, 47, 48, 49]. Recently it has been shown that a multi-grid techniqueincorporating the Picard iteration of 1D OZ equation for simple liquids isable to improve the computational efficiency up to several dozen times [50].

In the current paper we propose an algorithm using the multi-grid schemefor the solution of the RISM equations. In our work we are focused on thepractical application of the solver to the Hydration Free Energy calculation.We perform additional investigations to determine some guidelines for choos-ing algorithm parameters which are optimal for the Hydration Free Energycalculations. We compare the numerical performance of the proposed algo-rithm with the one-grid Picard iteration and with the nested Picard iteration.

2 Theory

2.1 RISM equations

In the RISM theory, the molecular interaction potential is a superpositionof spherically symmetric site-site potentials. The interacting sites are de-scribed by their displacement with regards to the centre of the molecule.

4

Page 5: Multi-grid Solver for the Reference Interaction Site Model of

Spherically symmetric site-site correlation functions are found by averagingsix-dimensional molecular correlation functions over the rotational degrees offreedom. The following functions are involved in the RISM equation for theinfinitely diluted solution: (i) total and direct site-site correlation functions{hsα(r)} and {csα(r)} describing correlations between the site s of the solutemolecule and sites α of the solvent molecules, (ii) intramolecular correlationfunctions {wss′(r)} describing the structure of the solute molecule, and (iii)bulk solvent susceptibility functions {χαα′(r)} describing the structure of thepure solvent. Assume that the solute molecule has M sites and the solventmolecule has K sites. The RISM convolution equation is easier to formulatein the Fourier space:

H = W · C · X, (1)

where the matrices H, C, W, X are defined as follows: H = [hsα(k)]M×K ,C = [csα(k)]M×K , W = [wss′(k)]M×M , X = [χαα′(k)]K×K . Here the hatsymbol (ˆ) denotes the Fourier transformed function. The transformationof a spherically symmetric function f(r) is defined by the Bessel-Fouriertransform F [·]:

F [f(r)](k) = f(k) =4π

k

∞∫

0

f(r)r sin kr dr. (2)

The inverse Bessel-Fourier transform is defined by

F−1[f(k)](r) = f(r) =1

2πr

∞∫

0

kf(k) sin kr dk. (3)

Intramolecular correlation functions in the Fourier space wss′(k) are foundvia the relation

wss′(k) = δss′ + (1− δss′)sin krss′

krss′, (4)

where δss′ is the Kronecker delta and rss′ is the distance between the sites sand s′ of the solute molecule. Susceptibility functions of bulk solvent func-tions are defined as

χαα′(k) = wsolvαα′ (k) + ρhsolv

αα′ (k), (5)

where ρ is the density of the solvent and {wsolvαα′ (k)} and {hsolv

αα′ (k)} are in-tramolecular and total correlation functions of the bulk solvent. In the cur-rent work we use previously calculated water susceptibility functions [40],

5

Page 6: Multi-grid Solver for the Reference Interaction Site Model of

therefore we do not discuss these calculations here, and just assume them tobe known functions in Eq.(1). There are two matrices of unknown functions:H and C in Eq.(1), but only one relation for them. Therefore, Eq.(1) mustbe completed by the closure relation:

hsα(r) + 1 = exp (−βusα(r) + hsα(r)− csα(r) + Bsα(r)) , (6)

where β = 1/kBT , kB is a Boltzmann constant, T is a temperature, usα(r)is the site-site potential and Bsα(r) is the so-called bridge function.

Rigorously speaking, the bridge function is expressed as a series of inte-grals in growing dimensions [10], and, therefore, practically incomputable.One should find a reasonable approximation for this functional, which is stilla challenging problem in the field. The simplest bridge approximation is theHyper-Netted-Chain (HNC) approximation: Bsα(r) ≡ 0. However, such anapproximation can cause uncontrolled growth of the argument of the expo-nent in Eq.(6) during the numerical solution. To overcome this drawback,it has been proposed to use the so-called Partially-Linearized HNC (PL-HNC) closure which linearizes the HNC expression, when the argument ofthe exponent is positive [51]:

hsα(r) + 1 =

{eΞsα(r), Ξsα(r) < 0,Ξsα(r) Ξsα(r) > 0,

(7)

where Ξsα(r) = −βusα(r) + hsα(r) − csα(r) appears in the argument of theexponential function in Eq.(6).

For the numerical treatment of the problem the site-site potential, usα(r)is split into the long-term Coulomb part uL

sα(r) and short-term part uSsα(r).

Usually, the Gauss error function erf(x) = 2√π

∫ x

0e−z2dz is used for this split-

ting:

uLsα(r) =

qsqαr

erf(tr), uSsα(r) = usα(r)− uL

sα(r), (8)

whereqsqαr

is the Coulomb potential, qs, qα are partial charges of the sites

s and α, and the parameter t controls the smoothness of transition betweenthe long and short range parts (usually t = 1). One should note that theBessel-Fourier transform of the functions {uL

sα(r)} can be found analyticallyyielding a rapidly decaying function in the Fourier space [52]:

uLsα(k) =

4πqsqαk2

e−k2

4t2 . (9)

6

Page 7: Multi-grid Solver for the Reference Interaction Site Model of

The long-term parts of the direct correlation functions {cLsα(r)} are foundusing the Mean Spherical Approximation [53]:

cLsα(r) = −βuLsα(r). (10)

The short range functions {cSsα(r)} are defined as

cSsα(r) = csα(r)− cLsα(r) = csα(r) + βuLsα(r). (11)

As well, instead of the total correlation functions, it is helpful to use theindirect correlation functions

γsα(r) = hsα(r)− cSsα(r). (12)

In such definitions, the RISM equation is reformulated as

Γ = W · (CS − βUL) · X− CS, (13)

where UL = [uLsα(k)]M×K is a matrix of long-term site-site potentials, Γ =

[γsα(k)]M×K , and CS = [cSsα(k)]M×K

Eq.(13) is completed by the closure relation in the real space:

CS = C[Γ] =[

e−βuSsα(r)+γsα(r)+Bsα(r) − γsα(r)− 1

]

M×K. (14)

3 Method

3.1 Discretization of the problem

In both, real and Fourier space, we discretize the problem on a uniform grid.The grid sizes in the real and Fourier spaces are connected by ∆k = π

∆R. We

denote the real space grid with N points and step size ∆R as {N,∆R}. Eachgrid is also characterized by the cutoff distance, which is the upper limit ofthe support. For the grid {N,∆R}, the cutoff distance is Rcutoff = N∆R.The corresponding grid in the Fourier space is denoted by {N,∆k}.

Functions are represented by vectors which contain the values of the func-tions on the grid points. We denote these grid functions by bold letters andindicate their grid in the superscript:

γ{N,∆R}sα = (γsα(∆R), . . . , γsα(N∆R)) , (15)

7

Page 8: Multi-grid Solver for the Reference Interaction Site Model of

cS{N,∆R}sα =

(cSsα(∆R), . . . , cSsα(N∆R)

), (16)

uS{N,∆R}sα =

(uSsα(∆R), . . . , uS

sα(N∆R)). (17)

The grid functions in the Fourier space are indicated by the hat symbol(ˆ):

γ{N,∆k}sα = (γsα(∆k), . . . , γsα(N∆k)) , (18)

cS{N,∆k}sα =

(cSsα(∆k), . . . , cSsα(N∆k)

), (19)

w{N,∆k}ss′ = (wss′(∆k), . . . , wss′(N∆k)) , (20)

χ{N,∆k}αβ = (χαβ(∆k), . . . , χαβ(N∆k)) , (21)

uL{N,∆k}sα =

(uLsα(∆k), . . . , uL

sα(N∆k)). (22)

Similarly, matrix-valued grid functions carry a subscript denoting thegrid. Matrices without a hat sign symbolize real-space functions: Γ{N,∆R} =

[γ{N,∆R}sα (k)]M×K . We use the hat symbol (ˆ) to denote the matrices of

functions in the Fourier space: Γ{N,∆k} = [γ{N,∆k}sα (k)]M×K , CS

{N,∆k} =

[cS{N,∆k}sα ]M×K , W{N,∆k} =

[

w{N,∆k}ss′

]

M×M, UL

{N,∆k} = [uL{N,∆k}sα ]M×K , and

X{N,∆k} = [χ{N,∆k}αβ ]K×K .

To map the grid functions from the real to the Fourier space and back, weuse the discrete forward and inverse Bessel-Fourier transformations F{N,∆R}[·],F−1

{N,∆k}[·] respectively:

f{N,∆k} = F{N,∆R}[f{N,∆R}], (23)

f{N,∆R} = F−1{N,∆k} [f

{N,∆k}]. (24)

Vectors f{N,∆R}, f{N,∆k} are defined as

f{N,∆R} = (f(r1), . . . , f(rN)) , rn = n∆R, (25)

f{N,∆k} =(

f(k1), . . . , f(kN))

, km = m∆k, (26)

and components of these vectors are connected via the relations

f(km) =4π

km

N∑

n=1

f(rn)rn sin(πmn

N)∆R, (27)

8

Page 9: Multi-grid Solver for the Reference Interaction Site Model of

f(rm) =1

2π2rn

N∑

m=1

f(km)km sin(πmn

N)∆k. (28)

Discrete analogues of equation Eq.(13) and the closure relation Eq.(14)are formulated as

Γ{N,∆R} =

W{N,∆R} ·(

CS

{N,∆R} − βUL

{N,∆R}

)

· X{N,∆R} − CS

{N,∆R},(29)

CS{N,∆R} = C[Γ{N,∆R}] =[

e−βuSsα+γsα+Bsα − γsα − 1

]

M×K,

(30)

where the mathematical operations between vectors are understood entry-wise.

3.2 Picard iteration

Combining Eq.(29) andEq.(30) , we can define the iterative operatorK{N,∆R}[·]:

K{N,∆R}[Γ{N,∆R}] ≡ F−1{N,∆k}

[

W{N,∆k}

(

F{N,∆R}[C[Γ{N,∆R}]

]− βUL

{N,∆k}

)

X{N,∆k}

−F{N,∆R}[C[Γ{N,∆R}]

]]

,

(31)

We consider the generalized task

Γ{N,∆R} = K{N,∆R}[Γ{N,∆R}] + f{N,∆R} (32)

for a given right-hand side vector f{N,∆R}. Problem Eq.(29) - Eq.(30) cor-responds to the case f{N,∆R} = 0. Necessity of introducing the generalizedproblem will be described bellow during the description of the multi-gridmethod.

The n-th iterate of an iterative scheme is denoted by Γ(n){N,∆R}. The

damped Picard iteration with the damping parameter λ is defined as

Γ(n+1){N,∆R} = (1− λ)Γ

(n){N,∆R} + λΓ′

{N,∆R}, (33)

where Γ′

{N,∆R} abbreviates

Γ′

{N,∆R} = K{N,∆R}[Γ(n){N,∆R}] + f{N,∆R}. (34)

9

Page 10: Multi-grid Solver for the Reference Interaction Site Model of

We use a short notation for this operator:

Υ{N,∆R}[Γ(n){N,∆R}, f{N,∆R}]≡(1− λ)Γ

(n){N,∆R}+ λΓ′

{N,∆R}. (35)

One iteration step of the algorithm consists of the partial steps

Γ(n){N,∆R}

closure−−−−→Eq.(30)

CS{N,∆R}

BFT−−−−→Eq.(23)

CS

{N,∆k}RISM−−−−→Eq.(29)

Γ{N,∆k}IBFT−−−−→Eq.(24)

Γ′

{N,∆R}damping−−−−−→Eq.(33)

Γ(n+1){N,∆R}.

(36)

As a measure of accuracy we use the L2 norm between two successiveiterates averaged over all site-site functions:

∥∥∥Γ

(n+1){N,∆R} − Γ

(n){N,∆R}

∥∥∥ =

1

MK

√√√√

N∑

m=1

(γ(n+1)sα (m∆R)− γ(n)

sα (m∆R))2

∆R.(37)

We stop the iteration when the iterates differ by less than a given thresholdε : ∥

∥∥Γ

(n+1){N,∆R} − Γ

(n){N,∆R}

∥∥∥ ≤ ε. (38)

By n(N,∆R, ε) we denote the minimal number n such that Eq.(38) holds.So, using the operator power notation, the iterative process to obtain thesolution Γε

{N,∆R}with accuracy ε can be written as

Γε{N,∆R} =

(Υ{N,∆R}

)n(N,∆R,ε)[Γ

(0){N,∆R}, f{N,∆R}]. (39)

3.3 Mapping approximated solutions from one grid to

another

In the multi-scale methods which we discuss below, several grids are used. Be-low we define operators, which map grid functions from one grid to another:restriction operator r[·], interpolation operator p[·] and extension operator

e[·]The restriction operator r[·] maps the matrix of grid functions to the

coarser grid with doubled grid size and, therefore, half the number of gridpoints. For example, the restriction maps from the grid {2N,∆R} to thegrid {N, 2∆R}:

r[Γ{2N,∆R}] = Γ{N,2∆R}. (40)

10

Page 11: Multi-grid Solver for the Reference Interaction Site Model of

In the current work we use the trivial injection as a restriction operator. LetΓ{2N,∆R} = [γ

{2N,∆R}sα ]M×K , where

γ{2N,∆R}sα = (γsα(∆R), γsα(2∆R) . . . , γsα(2N∆R)) (41)

and Γ{N,2∆R} = [γ{N,2∆R}sα ]M×K = r[Γ{2N,∆R}]. Then the vectors γ

{N,2∆R}sα are

defined by

γ{N,2∆R}sα = (γsα(2∆R), γsα(4∆R), . . . , γsα(2N∆R)). (42)

We should mention that the restriction operator r[·] is linear:

r[aΓ′{2N,∆R} + bΓ′′

{2N,∆R}] =

a · r[Γ′{2N,∆R}] + b · r[Γ′′

{2N,∆R}].(43)

The interpolation operator p[·] maps the matrix of grid functions to thegrid with half the grid size and, thereby, the double number of grid points.For example, the interpolation maps from the grid {N, 2∆R} to the grid{2N,∆R}:

p[Γ{N,2∆R}] = Γ{2N,∆R} = [γ{2N,∆R}sα ]. (44)

In the current work we use cubic spline interpolation as interpolation opera-tor. Let Γ{N,2∆R} = [γ

{N,2∆R}sα ]M×K , where vectors {γ

{N,2∆R}sα } are defined by

Eq.(42) . Then γ{2N,∆R}sα in Eq.(44) are defined by

γ{2N,∆R}sα = (γsα(∆R), γsα(2∆R), γsα(3∆R), . . .

. . . , γsα((2N − 1)∆R), γsα(2N∆R)),(45)

where the values γsα((2k − 1)∆R) are obtained from the values γsα(2k∆R)using the cubic spline interpolation.

We note that r[·] is the left-inverse of p[·], i.e., r[p[Γ{N,2∆R}]] = Γ{N,2∆R},but not the right-inverse:

Γ{2N,∆R} = p[r[Γ{2N,∆R}]] 6= Γ{2N,∆R}. (46)

However, sufficiently smooth functions satisfy

Γ{2N,∆R} = p[r[Γ{2N,∆R}]] = Γ{2N,∆R} +O(∆R). (47)

The extension operator e[·] does not change the grid size, but doubles thenumber of points. For example, the extension maps from the grid {N,∆R}to the grid {2N,∆R}:

e[Γ{N,∆R}] = Γ{2N,∆R} = [γ{2N,∆R}sα ]M×K (48)

11

Page 12: Multi-grid Solver for the Reference Interaction Site Model of

Indirect correlation functions decay fast to zero as the distance increases.Thus, it is natural to extend them by zeros yielding the zero extension op-

erator which we use in the current work. Let Γ{N,∆R} = [γ{N,∆R}sα ]M×K with

vectors {γ{N,∆R}sα } defined by Eq.(15). Then the functions {γ

{2N,∆R}sα } in

Eq.(48) are defined by

γ{2N,∆R}sα = (γsα(∆R), . . . , γsα(N∆R), 0, . . . , 0

︸ ︷︷ ︸

N

). (49)

3.4 Nested Picard iteration

Independently of the convergence rate of an iterative scheme, the error ofthe n-th iterate is the smaller the better the initial guess is. Having at handdifferent grids, the idea of the nested Picard iteration [45] is straightforward:use as initial guess the (approximate) solution from the coarse grid with asmaller number of grid points. Here we exploit that computations in thecoarse grid are cheaper. Below we describe the scheme of the nested Picard

iteration. Consider two grids: the “coarse” grid {N, 2∆R} and the “fine” grid

{2N,∆R}. We start from the coarse-grid solution Γ(0){N,2∆R}. We perform

an iteration process of type Eq.(39) to obtain a solution with accuracy εon the coarse grid, interpolate it to the fine grid and use it as the initialapproximation for the fine-grid iteration.

The scheme for performing the two-grid nested Picard iteration is writtenas follows:

Γ(0){N,2∆R}

Υ{N,2∆R}−−−−−→ Γε

{N,2∆R}p−→

→ Γ(0){2N,∆R}

Υ{2N,∆R}−−−−−→ Γε

{2N,∆R}.(50)

The nested Picard iteration scheme for more than two grids {N, 2L∆R},{2N, 2L−1∆R}, . . . , {2LN,∆R} with the same cutoff distance Rcutoff =2LN∆R is

Γ(0)

{N,2L∆R}Υ

{N,2L∆R}−−−−−−→ Γε

{2N,2L−1∆R}p−→ Γ

(0)

{2N,2L−1∆R}Υ

{2N,2L−1∆R}−−−−−−−−→ . . .

. . .p−→ Γ

(0)

{2LN,∆R}Υ

{2LN,∆R}−−−−−−→ Γε

{2LN,∆R}.

(51)

To obtain the solution on a grid with larger cutoff distance, we may continue

12

Page 13: Multi-grid Solver for the Reference Interaction Site Model of

the process in a similar way using the extension operator e[·]:

Γ(0)

{2L+1N,∆R} = e[Γε{2LN,∆R}],

Γε{2L+1N,∆R}=

(Υ{2L+1N,∆R}

)n(2L+1N,∆R,ε)[Γ

(0)

{2L+1N,∆R}].(52)

The same process can be defined for multiple grids {2LN,∆R}, {2L+1N,∆R},..., {2L+PN,∆R}:

Γε{2LN,∆R}

e−→ Γ

(0)

{2L+1N,∆R}Υ

{2L+1N,∆R}−−−−−−−−→ Γε

{2L+1N,∆R}e−→

. . .e−→ Γ

(0)

{2L+PN,∆R}Υ

{2L+PN,∆R}−−−−−−−−→ Γε

{2L+PN,∆R}.(53)

3.5 Two- and multi-grid iteration

Although the nested Picard iteration scheme is able to essentially enhancethe performance of numerical iteration, there is a drawback which limits itsefficiency. Consider two grids {N, 2∆R} and {2N,∆R}, to which we referbelow as coarse and fine grid, respectively. Denote the exact solutions Γ∗

coarse,Γ∗

fine on the respective coarse and fine grids by

Γ∗coarse = Kcoarse[Γ

∗coarse] + r[ffine],

Γ∗fine = Kfine[Γ

∗fine] + ffine.

(54)

We note, that the restricted fine grid solution is not the coarse grid solution:

Γ∗coarse 6= r[Γ∗

fine] (55)

Due to this fact, the coarse-grid iteration is not able to give a very goodapproximation of the fine-grid solution, which limits the performance of thenested iterative schemes. The multi-grid scheme is able to overcome thislimitation. For the complete description of the different multi-grid schemeswe refer to the book [45]. Below we briefly describe the multi-grid-basedalgorithm for solving the RISM equation which is used in the current work.

The following grid difference operator G[·] applies to fine-grid functionsand indicates the difference of Kfine and Kcoarse:

G[Γfine] = r[Kfine[Γfine]]−Kcoarse[r[Γfine]]. (56)

One may say, that the fact that G[Γfine] 6= 0 means that the restriction anditeration operators do not commute. However, this is not a strict statement,

13

Page 14: Multi-grid Solver for the Reference Interaction Site Model of

because formally there is not only one iterative operator, but there existseveral ones ( coarse-grid and fine-grid operators are in principle different).Thus, although the conception of commutativity can help to understand themulti-grid method, we will avoid this term below.

Let us consider the task

Γcoarse = Kcoarse[Γcoarse] + r[ffine] +G[Γ∗fine]. (57)

Substituting here the restricted exact fine grid solution Γcoarse = r[Γ∗fine] and

using the definition Eq.(56) , we have:

r[Γ∗fine] = r[Kfine[Γ

∗fine]] + r[ffine]. (58)

This equality holds due to the linearity of the restriction operator Eq.(43)and second equality in Eq.(54) . One can see, that the task Eq.(57) is ofthe form of Eq.(32) where fcoarse = r[ffine] + G[Γ∗

fine]. This shows the role ofthe vector fcoarse : it accumulates the grid differences between the finer andcoarser grids during the multi-grid iteration.

The task Eq.(57) can be used to find the solution r[Γ∗fine]. We do not know

the exact difference G[Γ∗fine]. However, even if the approximate solution is far

from the exact solution, the value G[Γ(0)fine] can be accurate enough:

∥∥∥G[Γ

(0)fine]−G[Γ∗

fine]∥∥∥ ≪

∥∥∥Γ

(0)fine − Γ∗

fine

∥∥∥ . (59)

In the two-grid scheme one performs a small number ν1 of fine-grid itera-tion steps before solving the coarse grid task and uses the coarse-grid solutionto eliminate the low-frequency errors of fine-grid iterate. However, for someoperators the interpolation of the coarse-grid solution may be not smoothenough. That is why one may need to perform some additional number ν2of so-called smoothing fine-grid iteration steps. Let Γ

(n)fine be the fine-grid ap-

proximation on the n-th step of two-grid iteration. The two-grid iterationprocess can be written in a following way:

Γ(n+1)fine = T [Γ

(n)fine, ffine] (60)

where the two-grid operator T [·, ·] is defined by the following algorithm:

Input: Γ(n)fine, ffine

Output: Γ(n+1)fine

14

Page 15: Multi-grid Solver for the Reference Interaction Site Model of

1. Perform ν1 fine-grid iteration steps:

Γ′fine = (Υfine)

ν1 [Γ(n)fine, ffine].

2. Define a coarse-grid analogue of Γ′fine:

Γ(0)coarse = r[Γ′

fine].

3. Calculate the grid correction G[Γ′fine]:

G[Γ′fine] = r[Kfine[Γ

′fine]]−Kcoarse[Γ

(0)coarse].

4. Determine the solution Γ∗coarse the coarse grid problem

Γcoarse = Kcoarse[Γcoarse] +G[Γ′fine] + r[ffine]. (61)

5. Add the coarse-grid correction:

Γ′′fine = Γ′

fine + p[Γ∗coarse − Γ(0)

coarse].

6. Perform ν2 smoothing fine-grid iteration steps:

Γ(n+1)fine = (Υfine)

ν2 [Γ′′fine, ffine].

In the two-grid algorithm it is not specified how the coarse-grid equationon the step 4 is solved. If the same algorithm is used recursively for solvingthe coarse-grid problem, we obtain the multi-grid iterative scheme [45]. As-sume that we have the grids {N, 2L∆R}, {2N, 2L−1∆R}, . . . , {2LN,∆R}.We will use the subscript grid to refer to any of these grids. On each gridwe define the multi-grid iteration with iterative operator Mlevel

grid [Γ(n)grid, fgrid]:

Γ(n+1)grid = Mlevel

grid [Γ(n)grid, fgrid], (62)

where Γ(n)grid is the n-th multi-grid iterate, fgrid is given, and the superscript

level indicates the number of recursions which are done while calculating theoperator. The multi-grid iteration converges to the solution of the task

Γgrid = Kgrid[Γgrid] + fgrid. (63)

15

Page 16: Multi-grid Solver for the Reference Interaction Site Model of

The multi-grid operator at level zero is a single-grid solver of Eq.(63) onthe coarsest grid. In our work we use n steps of the damped Picard iteration:

M0{N,2L∆R}[Γ

(0)

{N,2L∆R}, f{N,2L∆R}] =(Υ{N,2L∆R}

)n[Γ

(0)

{N,2L∆R}, f{N,2L∆R}](64)

The proper choice of the number n of iteration steps on the coarsest grid isdiscussed in Subsection3.7 . For the sake of brevity, below we use the sub-script “fine” to refer to the grid {2ℓN, 2L−ℓ∆R} and the subscript “coarse” to

refer to the grid {2ℓ−1N, 2L−ℓ+1∆R}. The multi-grid operatorMℓfine[Γ

(n)fine, ffine]

of level ℓ > 0 is defined by the following algorithm:Input: Γ

(n)fine, ffine, ℓ

Output: Γ(n+1)fine

1. Perform ν1 steps of the fine-grid Picard iteration:

Γ′fine = (Υfine)

ν1 [Γ(n)fine, ffine].

2. Define a coarse-grid analogue of Γ′fine and use it as starting guess of the

iteration in Step 4:Γ(0)

coarse = r[Γ′fine].

3. Calculate grid correction G[Γ′fine]:

G[Γ′fine] = r[Kfine[Γ

′fine]]−Kcoarse[Γ

(0)coarse].

4. Perform, recursively, µ steps of the coarse-grid multi-grid iteration oflevel (ℓ− 1):

Γ(µ)coarse =

(Mℓ−1

coarse

)µ[Γ(0)

coarse, r[ffine] +G[Γ′fine]].

5. Add the coarse-grid correction:

Γ′′fine = Γ′

fine + p[Γ(µ)coarse − Γ(0)

coarse].

6. Perform ν2 steps of the fine-grid Picard iteration:

Γ(n+1)fine = (Υfine)

ν2 [Γ′′fine, ffine].

16

Page 17: Multi-grid Solver for the Reference Interaction Site Model of

If in Step 4 the number of the multi-grid iteration steps is µ = 1, themulti-grid iteration is called V-cycle. If µ = 2, the iteration is called W-cycle

[45]. In the current work we use µ = 1. In our case the iterative operatorK[·] is smooth enough, thus for the multi-grid iteration we use ν1 = 1 andν2 = 0 on the steps 1, 6 of the algorithm, which is standard for the multi-gridof the second kind [45].

Now we assume that grids with different cutoff distances are given: {2LN,∆R},{2L+1N,∆R}, . . . , {2L+PN,∆R}. We can use a scheme similar to Eq.(53)for the multi-grid iteration: having solved the task on the grid {2LN,∆R}by the multi-grid iteration up to accuracy ε, extend the solution to the grid{2L+1N,∆R} and use it as initial guess for a next multi-grid iteration and

so on. We denote by Γ(0)grid the initial approximation on the grid grid and by

Γεgrid the solution with the L2-norm accuracy ε, obtained via the iterative

process Eq.(62) . The multi-grid iteration with the grid extension can bewritten schematically as follows:

Γ(0)

{2LN,∆R}

ML

{2LN,∆R}−−−−−−−→ Γε

{2LN,∆R}e−→

Γ(0)

{2L+1N,∆R}

ML

{2L+1N,∆R}−−−−−−−−→ . . .

. . .e−→ Γ

(0)

{2L+PN,∆R}

ML

{2L+PN,∆R}−−−−−−−−→ Γε

{2L+PN,∆R}.

(65)

3.6 Nested multi-grid

In any iteration the error of the n-th iterate is the smaller, the better theinitial guess is. The nested iteration technique suggests to use an approxi-mate coarse-grid solution as initial guess for the fine-grid iteration. In themulti-grid iteration the fine-grid initial guess can be found via the multi-griditeration on the coarser grid. Typically, it is enough to perform a single multi-grid iteration on the coarser grid to obtain a good initial guess for the fine-griditeration. Assume grids {N, 2L∆R}, {2N, 2L−1∆R}, . . . , {2LN,∆R} and an

initial guess Γ(0)

{N,2L∆R} on the coarsest grid are given. We find an initial guess

Γ(0)

{2LN,∆R} on the fine grid {2LN,∆R} by the following algorithm:

Input: Γ(0)

{N,2L∆R}

Output: Γ(0)

{2LN,∆R}for ℓ=0. . .L-1:

17

Page 18: Multi-grid Solver for the Reference Interaction Site Model of

1. Perform one multi-grid iteration on the coarse grid:

Γ(1)

{2ℓN,2L−ℓ∆R} = Mℓ{2ℓN,2L−ℓ∆R}(Γ

(0)

{2ℓN,2L−ℓ∆R})

2. Interpolate the result to the finer grid:

Γ(0)

{2ℓ+1N,2L−ℓ−1∆R} = p[Γ(1)

{2ℓN,2L−ℓ∆R}]

The same can be written schematically:

Γ(0)

{N,2L∆R}

M0

{N,2L∆R}−−−−−−−→ Γ

(1)

{N,2L∆R}p−→

Γ(0)

{2N,2L−1∆R}

M1

{2N,2L−1∆R}−−−−−−−−−→ . . .

. . .ML−1

{N,2L∆R}−−−−−−−→ Γ

(1)

{2L−1N,2∆R}p−→

Γ(0)

{2LN,∆R}

(66)

Having the initial guess Γ(0)

{2LN,∆R} one can use the multi-grid iteration

process Eq.(62) to obtain the approximate solution on the grid {2LN,∆R}with a given accuracy ε. After that, using scheme Eq.(65) , one may ex-tend the solution to the grid {2L+PN,∆R}. In the current paper we callthe process Eq.(66) - Eq.(62)- Eq.(65) the nested multi-grid iteration, andcompare its performance to the multi-grid iteration Eq.(62) - Eq.(65) , tothe nested Picard iteration Eq.(51)- Eq.(53) , and to the one-level Picarditeration Eq.(36).

3.7 Determining the optimal number of coarse-grid it-

eration steps

In the multi-grid algorithm on the coarsest grid we solve the task of typeEq.(61) with correction G[Γ′

fine]. Because G[Γ′fine] is only an approximation

of the G[Γ∗fine] there is no need to solve this task with accuracy better than

the accuracy εG[Γ′fine

] of calculation of G[Γ′fine], which is defined as follows:

εG[Γ′fine

] = ‖G[Γ′fine]−G[Γ∗

fine]‖ . (67)

The value of εG[Γ′fine

] can be estimated using the expression

εG[Γ′fine

] ≈∥∥∥G[Γ′

fine]−G[Γ(n+1)fine ]

∥∥∥ (68)

18

Page 19: Multi-grid Solver for the Reference Interaction Site Model of

Let us assume that the error ε(n) of the solution decays exponentiallywith the number n of the coarse-grid iteration steps:

ε(n) =∥∥Γ(n)

coarse − Γ∗coarse

∥∥ = ε(0) · δn (69)

The value of δ can be found to be

δ =ε(1)

ε(0)(70)

We may estimate ε(1) and ε(0) by the expressions

ε(1) ≈∥∥∥Γ

(1)coarse − Γ

(n)coarse

∥∥∥ ,

ε(0) ≈∥∥∥Γ

(0)coarse − Γ

(n)coarse

∥∥∥ .

(71)

For the optimal number nopt of iteration steps we obtain

ε(nopt) = ε(0) · δnopt = εG[Γ′fine

] (72)

Let the actual number of the iteration steps be n.Dividing Eq.(69) by Eq.(72) we get

ε(n)

εG[Γ′]

=ε(0)δn

εG[Γ′]

= δn−nopt (73)

and find the optimal number of iteration steps as

nopt = logδεG[Γ′]

ε(0)(74)

where δ, εG[Γ′], ε(0) are estimated through Eq.(70), Eq.(68), Eq.(71) , respec-tively. So after each multi-grid iteration step we may estimate the optimalnumber of iteration steps on the coarsest grid and use this number in thenext multi-grid iteration step. To avoid fast change of n from one multi-griditeration step to another, we start from some number n(0) of coarse-grid it-eration steps and use a damped iteration process for the number n(k) of thecoarsest-grid iteration steps on the k-th multi-grid iteration step:

n(k+1) = αn(k) + (1− α)nopt (75)

where 0 < α < 1 is the damping parameter.

19

Page 20: Multi-grid Solver for the Reference Interaction Site Model of

3.8 Choice of optimal grid parameters for Hydration

Free Energy calculations

In the sections above we explained how to solve the RISM equations Eq.(29)- Eq.(30) numerically. During the numerical solution we perform iterationsteps on several grids with different grid sizes and cutoff distances. In princi-ple, we are free to choose the parameters of the iterations. However, we planto apply the RISM for calculations of the Hydration Free Energy (HFE).Thus, we would like to choose parameters which yield HFE values with givennumerical accuracy at minimal computational cost. HFE can be calculatedusing the Kirkwood’s thermodynamic integration formula [54]. In the RISMapproximation, the HFE of a molecule is found as the sum of the partialHFEs of the sites. In the scope of the HNC approximation, the thermo-dynamic integration can be performed analytically and HFE (∆G) may befound explicitly from the solutions of the RISM equation [11]:

∆GHNC =

2πρkT∑

∞∫

0

[−2csα(r) + γsα(r) (csα(r) + γsα(r))] r2dr

(76)

where ρ is the bulk number density, k is the Boltzmann constant and T isthe temperature.

Usually, HFE is measured in kilo-calories per mole (kcal/mol). The ac-curacy of experimental HFE measurements for bioactive compounds is & 0.1kcal/mol [55]. To make some theoretical and statistical investigations, wetypically need to obtain a computational accuracy of about 100 times higherthan the experimental one. That means that we should choose the grid pa-rameters which allow us to calculate the expression Eq.(76) with accuracy ofat least 0.001 kcal/mol. We use a uniform grid which can be described bythe grid size ∆R and cutoff distance Rcutoff . First, we try to determine anappropriate grid size ∆R. We perform series of RISM calculations with samecutoff distance and different grid sizes, and for each grid size we calculatethe free energy of solvation using Eq.(76) . We assume that the solutionon the finest grid yields an almost exact value of ∆GHNC . Let us denote by∆G∆R

HNC the HFE-value calculated on the grid with step ∆R, and by ∆GbestHNC

the value of the HFE calculated on the finest grid. We can estimate the errorof the HFE calculations as difference of ∆G∆R

HNC and the best value ∆GbestHNC :

Error(∆G∆RHNC) =

∣∣∆G∆R

HNC −∆GbestHNC

∣∣ (77)

20

Page 21: Multi-grid Solver for the Reference Interaction Site Model of

In our calculations, we measure distances in atomic units (Bohr, 1 Bohr≈ 0.52 A) as they are the most natural for the atomic scale. As the basegrid size we choose ∆R0 = 0.1 Bohr, and then make the solvation free energycalculations for the different grid sizes ∆R = ∆R0

2k, k = −3 . . . 6 (grid sizes

from 0.8 Bohr to 1640

Bohr). The value of 1640

Bohr is taken to be an approx-imation ∆Gbest

HNC of the exact HFE-value. The cutoff distance is 204.8 Bohr.Calculations on all grids are performed up to L2-norm accuracy ε = 10−10.

To find the optimal cutoff distance Rcutoff, we perform calculations withthe fixed ∆R but different Rcutoff . We estimate the error of HFE calculationsby taking the integral in Eq.(76) over the interval (Rcutoff,∞), because thisis the part of the axis which we omit while using the function with finitesupport:

Error(∆GHNC) =

2πρkT∑

∞∫

Rcutoff

[−2csα(r) + γsα(r) (csα(r) + γsα(r))] r2dr (78)

To evaluate the infinite integral Eq.(78) , we can calculate functions γsα(r)and csα(r) on the grid with a very large cutoff distance R∞

cutoff and calculatethe integral over the interval (Rcutoff,R

∞cutoff) . As large cutoff distance we use

R∞cutoff = 409.6 Bohr.The most of computational time in the multi-grid iteration is spent on the

coarsest grid. The coarsest-grid solution should give a good approximationto the low-frequent part of the exact solution. That means that using thecoarsest-grid solution, we as well should be able to roughly approximatechemical properties of the system, in particular the free energy of hydration.HFE-values for a wide class of compounds lie in the range from -5 kcal/molto +5 kcal/mol. That means that to obtain some qualitative informationabout the value of HFE we need to have an accuracy in the calculations ofat least 1-2 kcal/mol. In the current work grid size and cutoff distance of thecoarsest grid are chosen to give the numerical error in HFE calculations ≤1kcal/mol.

It is known that the solution of the RISM equations behave differently forneutral and charged systems. That is why for determining the optimal gridparameters we have chosen five different systems: single uncharged atom(Argon), simple charged ion pair (Sodium chloride), uncharged molecule(methane), polar molecule with high partial charges of atoms (methanol)

21

Page 22: Multi-grid Solver for the Reference Interaction Site Model of

Figure 1: Dependencies of the error in hydration free energy calculations onthe grid step ∆R (logarithmic scale). Calculations are done for the cutoffdistance Rcutoff=204.8 Bohr.

1/400.050.10.20.40.81.6

10−5

10−4

10−3

10−2

10−1

100

101

∆ R (Bohr)

Err

or o

f ∆ G

HN

C (

kcal

/mol

)

Desired coarsegrid accuracy

Desired fine−gridaccuracy

NaClArmethanemethanolwater

and water.We can find how much faster are nested Picard iteration, multi-grid and

nested multi-grid than the one-grid Picard iteration. To do the comparisonwe use the speed-up factors:

SNMG(ε) =tone−grid(ε)

tNMG(ε)(79)

SMG(ε) =tone−grid(ε)

tMG(ε)(80)

SNest(ε) =tone−grid(ε)

tNP(ε)(81)

where tNMG(ε), tMG(ε), tNP(ε), tone−grid(ε) are the computer times to solve theRISM equations by the nested multi-grid method, multi-grid method, nestedPicard iteration method and one-level Picard iteration method up to the L2-norm accuracy ε respectively. The values tNP(ε)/tMG(ε) and tNP(ε)/tNMG(ε)show how many times faster are the multi-grid and nested multi-grid methodsthan the nested Picard iteration respectively.

22

Page 23: Multi-grid Solver for the Reference Interaction Site Model of

Figure 2: Dependencies of the error in hydration free energy calculations onthe cutoff distance Rcutoff (logarithmic scale).

12.8 25.6 51.2 102.4 204.810

−5

10−4

10−3

10−2

10−1

100

Rcutoff

(Bohr)

Err

or o

f ∆ G

HN

C (

kcal

/mol

)

Desired coarsegrid accuracy

Desired fine−gridaccuracy

NaClArmethanemethanolwater

4 Results

4.1 Optimal grid parameters

To determine the appropriate grid parameters, the RISM Hydration Free En-ergy calculations were performed for grids with different fine-grid sizes anddifferent cutoff distances. One can find details of calculation in the support-ing information of the paper. In Figure 1 one can see how the error of HFEcalculations depends on the grid size. For all investigated systems startingfrom the grid size ∆R = 0.05 Bohr, the error is smaller than the desiredthreshold 0.001 kcal/mol. We take the grid with ∆R = 0.05 Bohr as thefine-grid for the numerical solution of the RISM equations. To determine theoptimal cutoff distance, we performed the RISM calculations for the systemswith very large cutoff distance R∞

cutoff = 409.6 Bohr and calculated the nu-merical error of HFE calculations with Eq.(78) for argon, sodium chloride,methane, methanol and water. We use grids with 2p (p = 8 . . . 13) pointswhich gives cutoff distances from 12.8 Bohr to 409.6 Bohr. The results of thecalculations are presented in Figure 2. We can see that to achieve the desiredaccuracy of HFE calculations one should use a cutoff distance 204.8 Bohr,which corresponds to 4096 grid points with the grid size 0.05 Bohr.

Also, from Figure 1 and Figure 2 one can see that a grid with ∆Rcoarse=0.8Bohr, Rcoarse

cutoff=25.6 Bohr is enough to give a numerical error in the HFE

23

Page 24: Multi-grid Solver for the Reference Interaction Site Model of

Figure 3: Dependencies of the nested multi-grid speedup SNMG(ε) =tone−grid(ε)/tNMG(ε), the multi-grid speedup SMG(ε) = tone−grid(ε)/tMG(ε) andthe nested Picard iteration speedup SNP(ε) = tone−grid(ε)/tNP(ε) on the L2-norm accuracy of calculations.

10−10

10−8

10−6

10−4

0

5

10

15

20

25

30

35

40

45

L2−norm accuracy

spee

dup

(ton

e−le

vel/t m

etho

d)

4.5

27.2

31.3

Nested Picard

multi−grid

Nested multi−grid

calculations less than 1 kcal/mol. Thus, this grid size and cutoff distance areused in the current work as parameters of the coarsest-grid in the multi-gridalgorithm.

4.2 Comparison of performance of the one-grid Picard

iteration, nested Picard iteration, multi-grid and

nested multi-grid

We compare the numerical performance of the one-grid iteration Eq.(36) ,the nested Picard iteration Eq.(51) -Eq.(53) , the multi-grid iteration Eq.(62)- Eq.(65) and the nested multi-grid iteration Eq.(66) - Eq.(62) Eq.(65) .

In the experiments, the coarsest grid has 32 grid points, grid size ∆R =0.8 Bohr and cutoff distance Rcutoff = 25.6 Bohr. The finest grid has 4096 gridpoints, grid size ∆R = 0.05 Bohr and cutoff distance Rcutoff = 204.8 Bohr.The one-level iteration was performed on the finest grid only.

To compare the efficiency of the methods, the RISM equations were solvednumerically for the same molecule (methane), with the same accuracy, withthe one-level Picard iteration, nested Picard iteration and the proposed multi-grid-based algorithms.

24

Page 25: Multi-grid Solver for the Reference Interaction Site Model of

Figure 4: Dependencies of the nested multi-grid and multi-grid speedup withregards to the nested Picard iterations (tNP(ε)/tNMG(ε), tNP(ε)/tMG(ε)) onthe L2-norm accuracy of calculations.

10−10

10−8

10−6

10−4

0

1

2

3

4

5

6

7

8

L2−norm accuracy

spee

dup:

t Nes

t/t MG

6.0

6.9multi−gridNested multi−grid

Table 1: Comparison between the multi-grid and nested Picard iteration.Number of iteration steps and percent of total computational time, spent oneach grid.

Grid Number of iteration steps % of time spent on level

Grid Points∆R(Bohr)

Rcutoff

(Bohr)multi-grid Nested Picard multi-grid Nested Picard

4096 0.05 204.8 2 8 0.9% 0.5%2048 0.05 102.4 4 394 0.9% 8.0%1024 0.05 51.2 18 3624 2.0% 33.0%

512 0.05 40.6 52 3868 2.9% 18.8%

406 0.1 40.6 52 4406 1.5% 11.1%128 0.2 40.6 57 6399 1.1% 11.7%64 0.4 40.6 4843 7895 27.2% 8.3%32 0.8 40.6 11336 10422 63.6% 8.7%

25

Page 26: Multi-grid Solver for the Reference Interaction Site Model of

The dependencies of the speed-up factors Eq.(80), Eq.(81) on the accu-racy of the calculations are presented in Figure 3.

As one can see, the speed-up decreases when accuracy increases. Thiscan be explained by the fact that for higher accuracies high frequencies ofthe solution are essential, so we need to perform more time-consuming Pi-card iteration steps on the fine grids. Nevertheless, even for an accuracyof ε = 10−10 multi-grid methods are about 30 times faster than one-leveliteration. One can see, that for low accuracies multi-grid and nested multi-grid have almost the same performance, while for the high accuracies nestedmulti-grid is slightly faster. The speedup of the nested Picard iteration islower and decreases faster. For ε = 10−10, the nested Picard iteration is only4.5 times faster than the one-level iteration. Figure 4 presents the depen-dency of the multi-grid speedup tNP(ε)/tMG(ε) and nested multi-grid speeduptNP(ε)/tNMG(ε) with regard to the nested Picard iteration.

We see that for the low accuracy regime, the nested Picard iterationis less than 1.5 times slower than the multi-grid iteration, but when theaccuracy increases, the efficiency of the nested Picard iteration becomes worsethan the efficiency of the multi-grid methods. Indeed, for an accuracy ofε = 10−10 the nested multi-grid iteration is almost 7 times faster than thenested iteration method. This happens because in the nested Picard iterationthere is no correction for the difference between accurate solutions on differentgrids. While the accuracy of the solution is less than the difference betweenthe accurate solutions on different grids, the multi-grid and nested Picarditeration have similar efficiency. But for the high accuracy regime, using thenested Picard iteration process it is not possible to produce a correct resulton the coarse grid, thus the number of expensive fine-grid iteration stepsincreases and efficiency goes down. If we look at the Table 1 , we see that foran accuracy of ε = 10−10 multi-grid performs most of elementary iterationsteps and spends most of the time on the coarse grids, while nested Picarditeration method performs a large number of iteration steps on the fine grids.

5 Conclusions

In the paper we described a new multi-grid-based algorithm for solving RISMequations. We adopted a general non-linear multi-grid scheme for solving theRISM equations. We also proposed an extension of the algorithm for the gridswith different cutoff distances. Additionally we investigated the efficiency of

26

Page 27: Multi-grid Solver for the Reference Interaction Site Model of

the coarse-grid solver and proposed an adaptive algorithm for calculatingthe optimal number of iteration steps on the coarsest grid. We performednumerical investigations to optimize the algorithm parameters to give therequired numerical accuracy of the Hydration Free Energy calculations byRISM. The investigated parameters were: fine-grid cutoff distance, fine-griddiscretization step, coarsest grid cutoff distance and coarsest grid size. Bynumerical tests on polar and non-polar simple and multi-atom molecules itwas shown that RISM calculations with a fine grid {4096, 0.05 Bohr} areable to give a numerical accuracy of the Hydration Free Energy value of 0.001kcal/mol, which is satisfactory for most of the chemical applications. It wasshown that the multi-grid calculations with coarsest grid {32, 0.8 Bohr} areoptimal.

The proposed multi-grid methods were compared to the one-grid Picarditeration scheme, which is the reference algorithm, and to the nested Picarditeration algorithm, which is the most straightforward implementation ofthe multi-scale scheme. It was shown that for high accuracies the proposedmethods are about 30 times faster than the single-grid Picard iteration, andalmost 7 times faster than the nested Picard iteration.

6 Acknowledgements

We would like to acknowledge the Deutsche Forschungsgemeinschaft (DFG)- German Research Foundation, and Research Grant FE 1156/2-1 for financesupport of research. We would like to acknowledge David Palmer, GennadyChuev, Andrey Frolov and Ekaterina Ratkova for discussions and criticalreading of the manuscript.

7 Toc Entry

0

10

20

30

40

accuracy

>30 times faster

Speedup of RISM solver

27

Page 28: Multi-grid Solver for the Reference Interaction Site Model of

Speedup factors of RISM solvers with regards to one-level Picard methodfor different L2-norm accuracies. Solid red line - nested multi-grid (proposedmethod), dash-dotted black line - multi-grid method, dashed green line -nested Picard iteration. One can see that the performance of the RISMequations solver can be improved more than 30 times with the Multi-Gridtechnique.

References

[1] J.-P. Hansen and I. R. McDonald. Theory of Simple Liquids, 4th ed.Elsevier Academic Press, Amsterdam, The Netherlands, 2000.

[2] F. Hirata, editor. Molecular theory of solvation. Kluwer Academic Pub-lishers, Dordrecht, Netherlands, 2003.

[3] Daan Frenkel and Berend Smit. Understanding molecular simulation.Academic Press, 2002.

[4] M. V. Fedorov, J. M. Goodman, and S. Schumm. The effect of sodiumchloride on poly-l-glutamate conformation. Chem. Commun., (8):896–898, 2009.

[5] M. V. Fedorov, J. M. Goodman, and S. Schumm. To switch or notto switch: The effects of potassium and sodium ions on alpha-poly-l-glutamate conformations in aqueous solutions. J. Am. Chem. Soc.,131(31):10854–10856, August 2009.

[6] J. Tomasi, B. Mennucci, and R. Cammi. Quantum mechanical contin-uum solvation models. Chem. Rev., 105(8):2999–3094, August 2005.

[7] J. Tomasi and M. Persico. Molecular-interactions in solution - anoverview of methods based on continuous distributions of the solvent.Chem. Rev., 94(7):2027–2094, November 1994.

[8] Benedetta Mennucci and Roberto Cammi, editors. Continuum Solvation

Models in Chemical Physics. Wiley, Chippenham, Wiltshire, UK, 2007.

[9] L. S. Ornstein and F. Zernike. Acculental deviations of density andopalescence at the critical point of a simple substance. Proceedings of

28

Page 29: Multi-grid Solver for the Reference Interaction Site Model of

the Koninklijke Akademie Van Wetenschappen Te Amsterdam, 17:793–806, 1914.

[10] E. Meeron. Series expansion of distribution functions in multicomponentfluid systems. J. Chem. Phys., 27(6):1238–1246, 1957.

[11] S. J. Singer and D. Chandler. Free-energy functions in the extendedrism approximation. Mol. Phys., 55(3):621–625, 1985.

[12] R. Ramirez, R. Gebauer, M. Mareschal, and D. Borgis. Density func-tional theory of solvation in a polar solvent: Extracting the functionalfrom homogeneous solvent simulations. Physical Review E, 66(3):031206,September 2002.

[13] T. Urbic, V. Vlachy, Y. V. Kalyuzhnyi, and K. A. Dill. Orientation-dependent integral equation theory for a two-dimensional model of wa-ter. J. Chem. Phys., 118(12):5516–5525, March 2003.

[14] L. Gendre, R. Ramirez, and D. Borgis. Classical density functionaltheory of solvation in molecular solvents: Angular grid implementation.Chem. Phys. Lett., 474(4-6):366–370, June 2009.

[15] D. Chandler and H. C. Andersen. Optimized cluster expansions for clas-sical fluids. 2. Theory of molecular liquids. J. Chem. Phys., 57(5):1930–1937, 1972.

[16] D. Beglov and B. Roux. Numerical-solution of the hypernetted-chainequation for a solute of arbitrary geometry in 3 dimensions. J. Chem.

Phys., 103(1):360–364, July 1995.

[17] D. Yokogawa, H. Sato, T. Imai, and S. Sakaki. A highly paralleliz-able integral equation theory for three dimensional solvent distributionfunction: Application to biomolecules. J. Chem. Phys., 130(6):064111,February 2009.

[18] D. Yokogawa, H. Sato, and S. Sakaki. An integral equation theory for 3Dsolvation structure: A new procedure free from 3D Fourier transform.Chem. Phys. Lett., 432(4-6):595–599, 2006.

[19] K. Amano and M. Kinoshita. Entropic insertion of a big sphere into acylindrical vessel. Chem. Phys. Lett., 488(1-3):1–6, March 2010.

29

Page 30: Multi-grid Solver for the Reference Interaction Site Model of

[20] T. Yamazaki, H. Fenniri, and A. Kovalenko. Structural water drivesself-assembly of organic rosette nanotubes and holds host atoms in thechannel. Chemphyschem, 11(2):361–367, February 2010.

[21] M. Kinoshita. Structure of aqueous electrolyte solutions near a hy-drophobic surface. Condens. Matter Phys., 10(3):387–396, 2007.

[22] K. Hirano, D. Yokogawa, H. Sato, and S. Sakaki. An analysis of 3dsolvation structure in biomolecules: Application to coiled coil serine andbacteriorhodopsin. J. Phys. Chem. B, 114(23):7935–7941, June 2010.

[23] S. Ten-no, F. Hirata, and S. Kato. Reference interaction site modelself-consistent-field study for solvation effect on carbonyl-compounds inaqueous-solution. J. Chem. Phys., 100(10):7443–7453, May 1994.

[24] H. Sato, F. Hirata, and S. Kato. Analytical energy gradient for thereference interaction site model multiconfigurational self-consistent-fieldmethod: Application to 1,2-difluoroethylene in aqueous solution. J.

Chem. Phys., 105(4):1546–1551, July 1996.

[25] D. Yokogawa, H. Sato, and S. Sakaki. New generation of the referenceinteraction site model self-consistent field method: Introduction of spa-tial electron density distribution to the solvation theory. J. Chem. Phys.,126(24):244504, June 2007.

[26] D. Yokogawa, H. Sato, and S. Sakaki. Analytical energy gradient forreference interaction site model self-consistent field explicitly includingspatial electron density distribution. J. Chem. Phys., 131(21):214504,December 2009.

[27] S. Ten-no. Free energy of solvation for the reference interaction sitemodel: Critical comparison of expressions. J. Chem. Phys., 115(8):3724–3731, August 2001.

[28] G.N. Chuev, M.V. Fedorov, and J. Crain. Improved estimates for hydra-tion free energy obtained by the reference interaction site model. Chem.

Phys. Lett., 448(4-6):198–202, 2007.

[29] D. S. Palmer, V. P. Sergiievskyi, F. Jensen, and M. V. Fedorov. Accuratecalculations of the hydration free energies of druglike molecules using the

30

Page 31: Multi-grid Solver for the Reference Interaction Site Model of

reference interaction site model. J. Chem. Phys., 133(4):044104, July2010.

[30] E. L. Ratkova, G. N. Chuev, V. P. Sergiievskyi, and M. V. Fedorov.An accurate prediction of hydration free energies by combination ofmolecular integral equations theory with structural descriptors. J. Phys.Chem. B, 114(37):12068–12079, 2010.

[31] P. A. Monson and G. P. Morriss. Recent progress in the statistical-mechanics of interaction site fluids. Adv. Chem. Phys., 77:451–550, 1990.

[32] G. Zerah. An efficient newtons method for the numerical-solution offluid integral-equations. J. Comput. Phys., 61(2):280–285, 1985.

[33] Michael J. Booth, A.G. Schlijper, L.E. Scales, and A.D.J. Haymet. Effi-cient solution of liquid state integral equations using the newton–gmresalgorithm. Comput. Phys. Commun., 119:122–134, 1999.

[34] A. Kovalenko, S. Ten-No, and F. Hirata. Solution of three-dimensionalreference interaction site model and hypernetted chain equations forsimple point charge water by modified method of direct inversion initerative subspace. J. Comput. Chem., 20(9):928–936, July 1999.

[35] M. Kawata, C. M. Cortis, and R. A. Friesner. Efficient recursive imple-mentation of the modified broyden method and the direct inversion inthe iterative subspace method: Acceleration of self-consistent calcula-tions. J. Chem. Phys., 108(11):4426–4438, March 1998.

[36] H.H.H. Homeier, S. Rast, and H. Krienke. Iterative solution of theOrnstein-Zernike equation with various closures using vector extrapola-tion. Comput. Phys. Commun., 92(2-3):188–202, 1995.

[37] M. J. Gillan. New method of solving the liquid structure integral-equations. Mol. Phys., 38(6):1781–1794, 1979.

[38] S. Labik, A. Malijevsky, and P. Vonka. A rapidly convergent method ofsolving the Ornstein-Zernike equation. Mol. Phys., 56(3):709–715, 1985.

[39] S. Woelki, H.H. Kohler, H. Krienke, and G. Schmeer. Improvements ofDRISM calculations: symmetry reduction and hybrid algorithms. Phys.Chem. Chem. Phys., 10(6):898–910, 2008.

31

Page 32: Multi-grid Solver for the Reference Interaction Site Model of

[40] G. N. Chuev and M. V. Fedorov. Wavelet algorithm for solving integralequations of molecular liquids. a test for the reference interaction sitemodel. J. Comput. Chem., 25(11):1369–1377, August 2004.

[41] G. N. Chuev and M. V. Fedorov. Wavelet treatment of structure andthermodynamics of simple liquids. J. Chem. Phys., 120(3):1191–1196,January 2004.

[42] M. V. Fedorov and G. N. Chuev. Wavelet method for solving integralequations of simple liquids. J. Mol. Liq., 120(1–3):159–162, June 2005.

[43] M. V. Fedorov, H. J. Flad, G. N. Chuev, L. Grasedyck, and B. N.Khoromskij. A structured low-rank wavelet solver for the Ornstein-Zernike integral equation. Computing, 80(1):47–73, May 2007.

[44] C. T. Kelley and B. M. Pettitt. A fast solver for the Ornstein-Zernikeequations. J. Comput. Phys., 197(2):491–501, JUL 2004.

[45] W. Hackbusch. Multi-grid methods and Applications. Springer-Verlag,Berlin, 1985.

[46] H. Y. Wang, W. Jiang, and Y. N. Wang. Implicit and electrostaticparticle-in-cell/monte carlo model in two-dimensional and axisymmetricgeometry: I. analysis of numerical techniques. Plasma Sources Science

& Technology, 19(4):045023, August 2010.

[47] M. Heiskanen, T. Torsti, M.J. Puska, and R.M. Nieminen. Multi-grid method for electronic structure calculations. Physical Review B,63(24):245106, JUN 15 2001.

[48] W. Janke and T. Sauer. Multicanonical multigrid Monte-Carlo method.Physical Review E, 49(4, Part B):3475–3479, APR 1994.

[49] F. Gygi and G. Galli. Real-space adaptive-coordinate electronic-structure calculations. Physical Review B, 52(4):R2229–R2232, 1995.

[50] M. V. Fedorov and W. Hackbusch. A multigrid solver for the integralequations of the theory of liquids. Preprint 88, Max-Planck-Institut fuerMathematik in den Naturwissenschaften, 2008.

32

Page 33: Multi-grid Solver for the Reference Interaction Site Model of

[51] A. Kovalenko and F. Hirata. Potential of mean force between two molec-ular ions in a polar molecular solvent: A study by the three-dimensionalreference interaction site model. J. Phys. Chem. B, 103:7942–7957, 1999.

[52] K. C. Ng. Hypernetted chain solutions for the classical one-componentplasma up to γ =7000. J. Chem. Phys., 61(7):2680–2689, 1974.

[53] J. L. Lebowitz and J. K. Percus. Mean spherical model for latticegases with extended hard cores and continuum fluids. Physical Review,144(1):251–258, 1966.

[54] J. G. Kirkwood. Statistical mechanics of fluid mixtures. J. Chem. Phys.,3:300–313, 1935.

[55] J. P. Guthrie. A blind challenge for computational solvation free ener-gies: Introduction and overview. J. Phys. Chem. B, 113(14):4501–4507,April 2009.

33