arXiv is now an independent nonprofit! Learn more
License: CC BY 4.0
arXiv:2608.28908v1 [physics.chem-ph] 28 Aug 2026

libNLPBE: An Open-Source Python Package for Solving the Non-Linear Poisson-Boltzmann Equation

Preprint: AIP/123-QED
Jun-Hyeong Kim Affiliation: Department of Chemistry, Duke University, Durham, North Carolina 27708, United States    Weitao Yang Email: weitao.yang@duke.edu Affiliation: Department of Chemistry, Duke University, Durham, North Carolina 27708, United States
August 28, 2026
Abstract

Solvent environments surrounding a solute can significantly alter its chemical properties. These changes become more prominent in electrolyte solutions, where mobile ions largely influence the solute through electrostatic interactions. A theoretical description of these ionic effects will benefit the design of chemistry performed in electrolyte solutions. As a result, the non-linear Poisson-Boltzmann equation (NLPBE) has emerged as an efficient implicit solvent model for electronic structure calculations to address such effects. However, the limited availability of NLPBE solvers for molecular electronic structure calculations greatly hinders theoretical investigation into the ionic effects. To improve accessibility of the NLPBE, we present libNLPBE, an open-source Python library, that solves the NLPBE for molecular systems in combination with density functional calculations, specifically to obtain electrostatic correction terms arising from the electrolyte solution environment for the Fock matrix. The library employs the density fitting (DF) approximation to efficiently calculate solute electrostatic potentials. Furthermore, we develop the modified Damped Inexact Newton Multigrid developed by Holst (mDINMH) method for solving the NLPBE. The mDINMH features a symmetric preconditioner for solving the Newton equation, which enables the use of robust multigrid methods designed for symmetric linear operators. In addition, an algebraic multigrid method has been incorporated into the mDINMH to support a broad range of grid points. We also present a GPU-accelerated version of libNLPBE to leverage parallelization efficiency of GPUs. For the evaluation of solute electrostatic potentials, the DF approach achieves ∼\sim82-fold and ∼\sim302-fold speedups on CPU and GPU, respectively. Furthermore, compared to the self-consistent method for solving the NLPBE, the mDINMH achieves ∼\sim10-fold and ∼\sim74-fold speedups on CPU and GPU, respectively. In comparison with standard solvent models, the DF+mDINMH method produces reasonable solvation free energies at zero electrolyte concentration. Furthermore, we demonstrate that, compared with the reference NLPBE solver available in Q-Chem software, the DF+mDINMH combination accurately calculates the electrostatic contribution of solvation energies, with an error up to 0.04 kcal/mol. Lastly, we show that the DF+mDINMH method is capable of accurately predicting the effects of mobile ions on the free energy of solvation. Given the efficiency of libNLPBE and its easy integration with various quantum chemistry packages, we expect the applicability of libNLPBE to a broad range of quantum chemistry platforms.

I Introduction

Interactions between molecules and their environment play a pivotal role in controlling a wide range of chemical phenomena. For example, it is well known that solvent effects critically influence stability, reactivity, and spectroscopic properties of the solute molecule.[49, 12] These effects become more prominent when the solvent contains electrolytes, where mobile ions in the solution give rise to interesting interfacial phenomena.[27, 42, 53] Thus, elucidating the effects of ions on the solute is crucial for understanding the the shift of its chemical properties.
Theoretical insights into these changes would help design chemistry performed in electrolyte solutions. For example, molecular dynamics simulations could be carried out to understand how electrolytes influence the solute molecule. This approach, however, requires a simulation box densely filled with solvent molecules and electrolytes. Consequently, their degrees of freedom generate a vast number of configurations, resulting in significant computational complexity in obtaining a converged free energy of the system.
In contrast to explicit modeling of electrolyte solutions, implicit solvent models replace the solvent environment with a polarizable continuum, thereby eliminating the complexity of sampling the enormous configurational space generated by explicit models.[38, 49, 35] Among these, the Poisson-Boltzmann equation (PBE) has emerged as an efficient implicit model for describing electrolyte solution environments.[39, 44, 36, 47, 30, 18, 40, 45, 21] The PBE treats ions in the solution as a charge density distributed over space according to Boltzmann statistics, where the associated Boltzmann factor is determined by electrostatic potentials.
Depending on whether the Boltzmann factor is linearized, the PBE is formulated as either the linearized (LPBE) or the non-linear Poisson-Boltzmann equation (NLPBE). The LPBE produces reasonable results under weak electrostatic potentials; however, it inherently fails to accurately describe ion distributions under strong electrostatic potentials. This limitation is evident particularly when describing solute-solution interfaces, where the solute generates a strong electrostatic potential in its vicinity.
Therefore, the NLPBE is necessary to accurately describe ion distributions around the solute molecule. Accordingly, efficient program packages for solving the NLPBE have been developed over the past decades. DelPhi[31] and APBS[25] are among the most popular software packages, both of which employ an atomic charge representation of the solute charge distribution. While this approach produces reasonable results for huge biomolecular systems, it might be insufficient for achieving atomistic accuracy that electronic structure calculations pursue. Some NLPBE solvers support electronic structure calculations such as BigDFT,[18] JDFTx,[30], and DL_MG[54]; however, these are primarily designed for quantum calculations under the periodic boundary conditions, which might be inappropriate for describing molecular systems. To the best of our knowledge, Q-Chem is the only software package that supports the NLPBE solver integrated with molecular calculations.[43, 45]
The limited availability of molecular NLPBE solvers motivated us to develop a library that can be easily integrated with molecular electronic structure codes. Furthermore, we aim to reduce the computational cost of solving the NLPBE, thereby expanding its applicability to a broad range of chemistry performed in electrolyte solutions.
Therefore, we present an open-source Python library for efficiently solving the NLPBE, namely libNLPBE. Our library features the density fitting (DF) approximation for calculating solute electrostatic potentials, the modified Damped Inexact Newton Multigrid developed by Holst (mDINMH), and GPU acceleration, all of which address the major computational bottlenecks in solving the NLPBE.
In the following, we first discuss the expression for the dielectric function and the size-modified ion charge density appearing in the NLPBE (Section II.1). Subsequently, we introduce the finite difference method for numerically solving the NLPBE (Section II.2). Next, we provide the theoretical background of the DF approximation for efficiently calculating solute electrostatic potentials (Section II.3) and the mDINMH method for solving the NLPBE (Section II.4). In Section IV, we show that both the DF approximation and the mDINMH algorithm significantly accelerate solving the NLPBE for molecules. Lastly, we provide hands-on examples of using libNLPBE for electronic structure calculations (Section V).

II Theory

II.1 Non-Linear Poisson-Boltzmann Equation

For a fixed solute charge density ρsol​(𝐫)\rho^{\text{sol}}(\mathbf{r}) surrounded by an electrolyte solution environment, the total electrostatic potential ϕtot​(𝐫)\phi^{\text{tot}}(\mathbf{r}) is given as the solution of the non-linear Poisson-Boltzmann equation (NLPBE)[44, 18, 45, 21]

∇⋅(ϵ(𝐫)∇ϕtot(𝐫))=−4π(ρsol(𝐫)+ρions[ϕtot]),\nabla\cdot\big(\epsilon(\mathbf{r})\nabla\phi^{\text{tot}}(\mathbf{r})\big)=-4\pi\big(\rho^{\text{sol}}(\mathbf{r})+\rho^{\text{ions}}[\phi^{\text{tot}}]\big), (1)

where ϵ⁡(𝐫)\epsilon(\mathbf{r}) and ρions​[ϕtot]\rho^{\text{ions}}[\phi^{\text{tot}}] is the dielectric function and the ion charge density, respectively. The expression for these two variables needs to be determined prior to solving the NLPBE, which we discuss in the following.
Determining the expression for ϵ⁡(𝐫)\epsilon(\mathbf{r}) is not trivial, as it sensitively depends on the structure of solute-solvent interfaces. While several researchers represent ϵ⁡(𝐫)\epsilon(\mathbf{r}) as a functional of the solute electron density n⁡(𝐫)n(\mathbf{r}),[1, 40] it still remains unclear whether this representation correctly captures a sudden change of the dielectric permittivity at the interface.
This uncertainty originates from the absence of a clear mathematical definition for solute-solvent interfaces, which leads to various expressions for ϵ⁡(𝐫)\epsilon(\mathbf{r}) in literature.[36, 1, 18] Given the ambiguity in determining solute-solvent interfaces, we adopt a rigid cavity model in expressing ϵ⁡(𝐫)\epsilon(\mathbf{r}) for simplicity,[18, 9, 45] where the solvent-accessible surface (SAS, S⁡(𝐫)S(\mathbf{r})) serves as the solute-solvent interface.
By representing the SAS as a product of atomwise functions sAs_{\text{A}} (S⁡(𝐫)=∏AsAS(\mathbf{r})=\prod_{\text{A}}s_{\text{A}}), ϵ⁡(𝐫)\epsilon(\mathbf{r}) can be defined as follows (See Figure 1).[18, 9, 45]

ϵ⁡(𝐫)=ϵ0+(ϵbulk−ϵ0)​∏AatomssA​(dA,Δ,|𝐫−𝐑A|),\begin{split}\epsilon(\mathbf{r})&=\epsilon_{0}+\big(\epsilon_{\text{bulk}}-\epsilon_{0}\big)\prod_{\text{A}}^{\text{atoms}}s_{\text{A}}(d_{\text{A}},\Delta;|\mathbf{r}-\mathbf{R}_{\text{A}}|),\end{split} (2)

where ϵ0\epsilon_{0} and ϵbulk\epsilon_{\text{bulk}} is the dielectric permittivity of vacuum and bulk solvent, respectively.
To ensure the smoothness of ϵ⁡(𝐫)\epsilon(\mathbf{r}) at the interface, we represent the atomwise function sAs_{\text{A}} with an error function with an interpolation parameter Δ\Delta[18, 9, 45]

sA​(dA,Δ,|𝐫−𝐑A|)=12​[1+erf​(|𝐫−𝐑A|−dAΔ)],s_{\text{A}}(d_{\text{A}},\Delta;|\mathbf{r}-\mathbf{R}_{\text{A}}|)=\cfrac{1}{2}\bigg[1+\text{erf}\bigg(\cfrac{|\mathbf{r}-\mathbf{R}_{\text{A}}|-d_{\text{A}}}{\Delta}\bigg)\bigg], (3)

where 𝐑A\mathbf{R}_{\text{A}} and dAd_{\text{A}} is the position and the atom-specific length of atom A, respectively (See Figure 1).
As a result, the structure of the SAS critically depends on the choice of dAd_{\text{A}} as shown in Equation (3), because it directly determines the location of the solute-solvent interface relative to atomic positions. We generally followed the standard protocol for determining atom-specific lengths,[49] where dAd_{\text{A}} is given as the sum of the van der Waals radius and the probe radius, dA=dA,vdW+dprobed_{\text{A}}=d_{\text{A,vdW}}+d_{\text{probe}} as schematically illustrated in Figure 1. Specifically, we employed the Bondi radii set for dA,vdWd_{\text{A,vdW}}, except for the hydrogen atom, which was set to 1.1 Å.[7, 41]
We next move on to the expression for ion charge density ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r}). The key assumption in the NLPBE is Boltzmann statistics for describing ion distributions in the solution.[44] Specifically, for species ii, its local ion concentration ci​(𝐫)c_{i}(\mathbf{r}) is given as a product of its bulk concentration cibc_{i}^{\text{b}} and the associated Boltzmann factor as below (β=1/kB​T\beta=1/k_{\text{B}}T, kBk_{\text{B}}: Boltzmann constant, TT: absolute temperature).

ci​(𝐫)=cib​exp⁡(−β​qi​e​ϕtot​(𝐫)),c_{i}(\mathbf{r})=c_{i}^{\text{b}}\exp(-\beta q_{i}e\phi^{\text{tot}}(\mathbf{r})), (4)

where qiq_{i} and ee is the charge of species ii in atomic unit and the elementary charge (e=1e=1 in atomic unit), respectively.
For simplicity, we consider a 1:1 electrolyte such as NaCl (cib=cbc_{i}^{\text{b}}=c^{\text{b}}) throughout this work, but our theoretical framework can be expanded to multivalent electrolytes without losing generality.[2] For a 1:1 electrolyte solution, the ion charge density is obtained from the sum of the cation (e​c+​(𝐫)ec_{+}(\mathbf{r})) and the anion (−e​c−​(𝐫)-ec_{-}(\mathbf{r})) charge densities. The resulting ρions​[ϕtot]\rho^{\text{ions}}[\phi^{\text{tot}}] is therefore expressed as follows.

ρions​[ϕtot]=−2​e​cb​sinh⁡(β​e​ϕtot​(𝐫))\rho^{\text{ions}}[\phi^{\text{tot}}]=-2ec^{\text{b}}\sinh(\beta e\phi^{\text{tot}}(\mathbf{r})) (5)

In principle, the above expression could be provided into the NLPBE; however it is limited in incorporating some important aspects of ions. While we have assumed an implicit ion model, ions in reality have finite size. These finite-sized ions create an ion-exclusion boundary around the solute, commonly referred to as the Stern layer, which prevents ions from overlapping with the solute cavity due to steric hindrance. To account for this aspect, we introduce an ion-exclusion function λ⁡(𝐫)\lambda(\mathbf{r}) in ρtot​[ϕtot]\rho^{\text{tot}}[\phi^{\text{tot}}].

ρions​[ϕtot]=−2​λ​(𝐫)​e​cb​sinh⁡(β​e​ϕtot​(𝐫)),\rho^{\text{ions}}[\phi^{\text{tot}}]=-2\lambda(\mathbf{r})ec^{\text{b}}\sinh(\beta e\phi^{\text{tot}}(\mathbf{r})), (6)

where λ⁡(𝐫)\lambda(\mathbf{r}) is defined using a surface separated from the SAS by the Stern layer thickness aa as below (See Figure 1).

λ⁡(𝐫)=∏Aatoms12​[1+erf​(|𝐫−𝐑A|−dA−aΔ)]\lambda(\mathbf{r})=\prod_{\text{A}}^{\text{atoms}}\cfrac{1}{2}\bigg[1+\text{erf}\bigg(\cfrac{|\mathbf{r}-\mathbf{R}_{\text{A}}|-d_{\text{A}}-a}{\Delta}\bigg)\bigg] (7)

In addition, finite-sized ions also require modification of the Boltzmann factor due to steric effects, leading to the size-modified ion charge density as below.[18, 40, 45]

ρions​[ϕtot]=−2​λ​(𝐫)​e​cb​sinh⁡(β​e​ϕtot​(𝐫))1−cbc1+2+cbc1+2​λ​(𝐫)​cosh⁡(β​e​ϕtot​(𝐫)),\rho^{\text{ions}}[\phi^{\text{tot}}]=-\cfrac{2\lambda(\mathbf{r})ec^{b}\sinh(\beta e\phi^{\text{tot}}(\mathbf{r}))}{1-\cfrac{c^{b}}{c_{1+2}}+\cfrac{c^{b}}{c_{1+2}}\lambda(\mathbf{r})\cosh(\beta e\phi^{\text{tot}}(\mathbf{r}))}, (8)

where c1+2c_{1+2} indicates the maximum electrolyte concentration given by (NAN_{A}: Avogadro number, p=0.74p=0.74 for the closest-packing factor)

c1+2=p43​π​NA​(R+3+R−3),c_{1+2}=\cfrac{p}{\cfrac{4}{3}\pi N_{\text{A}}(R_{+}^{3}+R_{-}^{3})}, (9)

where R+R_{+} and R−R_{-} is the radius of the cation and the anion, respectively.[45] We used R+=R−=4.3R_{+}=R_{-}=4.3 Å, representing the average value of the radius of hydrated Na+ and Cl–.[45] We employ the size-modified ion charge density (Equation (8)) for solving the NLPBE, and its distribution around the solute molecule will be discussed in Section IV.

Refer to caption
Figure 1: Schematic illustration for the solvent-accessible surface (SAS).

II.2 Discretization

Since the analytic solution of the NLPBE is unknown in general, numerical approaches through discretization are generally employed to obtain its numerical solution. Various discretization schemes, including finite difference,[44, 36, 45] finite element,[11, 23] and boundary element methods[19] have been applied for numerically solving the NLPBE. Among these, we chose the finite difference method in order to leverage efficient libraries developed for solving sparse linear systems (See Section II.4.3).

Refer to caption
Figure 2: Schematic illustration of the finite difference method. The molecular structure of vitamin C is drawn in the Figure for illustrative purpose.

To apply the finite difference method, we consider a cubic box with its edge length of LL, where the solute molecule is placed at its center (Figure 2). Subsequently, this box is discretized into uniform Cartesian grids with NxN_{x}, NyN_{y}, and NzN_{z} points with a grid spacing hh along each edge, resulting in a total of Nx​Ny​NzN_{x}N_{y}N_{z} or Nx3N_{x}^{3} grid points.
Similarly, the Laplacian (∇2\nabla^{2}) and the gradient (∇\nabla) operators appearing in the NLPBE need to be discretized as well. For the Laplacian operator, we employ the 8th order central finite difference method for its discretization under the Dirichlet boundary condition, i.e. ϕtot​(𝐫)=0\phi^{\text{tot}}(\mathbf{r})=0 at the boundaries. In contrast, the gradient operator is represented using a mixed discretization scheme: 8th order central finite difference for the interior of the cubic box and the 4th-order backward and forward finite difference method for the left-sided and the right-sided boundaries, respectively.[9]

II.3 Solute Electrostatic Potential

The NLPBE requires the solute charge density (ρsol​(𝐫)\rho^{\text{sol}}(\mathbf{r})) as an input variable to be solved (Equation (1)). This quantity can be, in principle, obtained by summing the nuclear and electronic contributions to the solute charge density, ρsol​(𝐫)=ρnucsol​(𝐫)+ρelecsol​(𝐫)\rho^{\text{sol}}(\mathbf{r})=\rho^{\text{sol}}_{\text{nuc}}(\mathbf{r})+\rho^{\text{sol}}_{\text{elec}}(\mathbf{r}). However, representing the nuclear charge density (ρnucsol​(𝐫)\rho^{\text{sol}}_{\text{nuc}}(\mathbf{r})) is not trivial, as most quantum chemical calculations treat nuclei as point charges. This point charge representation leads to Coulomb singularity in ρnucsol​(𝐫)\rho^{\text{sol}}_{\text{nuc}}(\mathbf{r}) at the nuclear positions, which poses a challenge in performing numerical calculations.[10]
Alternatively, ρsol​(𝐫)\rho^{\text{sol}}(\mathbf{r}) can be indirectly obtained by solving the Poisson equation for the solute electrostatic potential (ϕsol​(𝐫)\phi^{\text{sol}}(\mathbf{r})) in vacuum.[9]

ρsol​(𝐫)=−14​π​∇2ϕsol​(𝐫)\rho^{\text{sol}}(\mathbf{r})=-\cfrac{1}{4\pi}\nabla^{2}\phi^{\text{sol}}(\mathbf{r}) (10)

This approach does not require ρnucsol​(𝐫)\rho^{\text{sol}}_{\text{nuc}}(\mathbf{r}) to compute ρsol​(𝐫)\rho^{\text{sol}}(\mathbf{r}), thereby avoiding the singularity issue in ρnucsol​(𝐫)\rho^{\text{sol}}_{\text{nuc}}(\mathbf{r}). We thus adopt the indirect approach for obtaining ρsol​(𝐫)\rho^{\text{sol}}(\mathbf{r}), and ϕsol​(𝐫)\phi^{\text{sol}}(\mathbf{r}) is the quantity that needs to be computed for solving Equation (10). In the following, we discuss both the analytic and the density fitting (DF) approaches for calculating ϕsol​(𝐫)\phi^{\text{sol}}(\mathbf{r}).

II.3.1 Analytic Approach

We first begin by discussing the analytic approach for computing ϕsol​(𝐫)\phi^{\text{sol}}(\mathbf{r}) at grid points.[9, 45] Similar to ρsol​(𝐫)\rho^{\text{sol}}(\mathbf{r}), ϕsol​(𝐫)\phi^{\text{sol}}(\mathbf{r}) can be split into the nuclear (ϕnucsol​(𝐫)\phi^{\text{sol}}_{\text{nuc}}(\mathbf{r})) and the electronic contributions (ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r})).

ϕsol​(𝐫)=ϕnucsol​(𝐫)+ϕelecsol​(𝐫)\phi^{\text{sol}}(\mathbf{r})=\phi^{\text{sol}}_{\text{nuc}}(\mathbf{r})+\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) (11)

Under the point charge representation for nuclei, ϕnucsol​(𝐫)\phi^{\text{sol}}_{\text{nuc}}(\mathbf{r}) is given as a Coulomb potential generated by nuclear charge ZAZ_{\text{A}} located at nuclear positions 𝐑A\mathbf{R}_{\text{A}}.

ϕnucsol​(𝐫)=∑AatomsZA|𝐫−𝐑A|\phi^{\text{sol}}_{\text{nuc}}(\mathbf{r})=\sum_{\text{A}}^{\text{atoms}}\cfrac{Z_{\text{A}}}{|\mathbf{r}-\mathbf{R}_{\text{A}}|} (12)

Its computation only involves the calculation of the distance between grid points and the nuclear position |𝐫−𝐑A||\mathbf{r}-\mathbf{R}_{\text{A}}|, which can be done within negligible computational time. Thus, evaluating ϕnucsol​(𝐫)\phi^{\text{sol}}_{\text{nuc}}(\mathbf{r}) does not become a computational bottleneck in obtaining ϕsol​(𝐫)\phi^{\text{sol}}(\mathbf{r}).
A major bottleneck arises from evaluating the electronic contribution ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}), as we will see in the following. The electronic contribution ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) is expressed as a Coulomb potential generated by the solute electron density n⁡(𝐫)n(\mathbf{r}).

ϕelecsol(𝐫)=−∫n⁡(𝐫′)|𝐫−𝐫′|d𝐫′\quad\phi^{\text{sol}}_{\text{elec}}(\mathbf{r})=-\int\cfrac{n(\mathbf{r^{\prime}})}{|\mathbf{r}-\mathbf{r^{\prime}}|}d\mathbf{r^{\prime}} (13)

We further expand n⁡(𝐫)n(\mathbf{r}) using the density matrix (Pμ​νP_{\mu\nu}) and atomic orbitals (gμ​(𝐫)g_{\mu}(\mathbf{r})), which leads to the following expression.

ϕelecsol(𝐫)=−∑μ​νPμ​ν∫gμ​(𝐫′)​gν​(𝐫′)|𝐫−𝐫′|d𝐫′\phi^{\text{sol}}_{\text{elec}}(\mathbf{r})=-\sum_{\mu\nu}P_{\mu\nu}\int\cfrac{g_{\mu}(\mathbf{r^{\prime}})g_{\nu}(\mathbf{r^{\prime}})}{|\mathbf{r}-\mathbf{r^{\prime}}|}d\mathbf{r^{\prime}} (14)

By introducing a Dirac-δ\delta function centered at a grid point 𝐫\mathbf{r}, the integral in the equation above can be transformed into a three-center-two-electron integral as below.

ϕelecsol​(𝐫)=−∑μ​νPμ​ν∫gμ​(𝐫′)​gν​(𝐫′)|𝐫−𝐫′|d𝐫′=−∑μ​νPμ​ν∫δ⁡(𝐫′′−𝐫)​gμ​(𝐫′)​gν​(𝐫′)|𝐫′′−𝐫′|d𝐫′d𝐫′′=−∑μ​νPμ​ν(δ|μν)\begin{split}\phi^{\text{sol}}_{\text{elec}}(\mathbf{r})&=-\sum_{\mu\nu}P_{\mu\nu}\int\cfrac{g_{\mu}(\mathbf{r^{\prime}})g_{\nu}(\mathbf{r^{\prime}})}{|\mathbf{r}-\mathbf{r^{\prime}}|}d\mathbf{r^{\prime}}\\ &=-\sum_{\mu\nu}P_{\mu\nu}\int\cfrac{\delta(\mathbf{r}^{\prime\prime}-\mathbf{r})g_{\mu}(\mathbf{r^{\prime}})g_{\nu}(\mathbf{r^{\prime}})}{|\mathbf{r}^{\prime\prime}-\mathbf{r^{\prime}}|}d\mathbf{r}^{\prime}d\mathbf{r}^{\prime\prime}\\ &=-\sum_{\mu\nu}P_{\mu\nu}(\delta|\mu\nu)\end{split} (15)

For practical calculations, the Dirac-δ\delta function is approximated by a normalized Gaussian function with a sufficiently large exponent. With this representation, ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) can be efficiently evaluated using a robust electron repulsion integral (ERI) library, and we term this approach as the analytic approach.
Despite the use of highly optimized ERI libraries, the analytic approach suffers from its significant computational cost caused by the number of ERIs involved in Equation (15). For a system whose electron density is described by NaoN_{\text{ao}} number of atomic orbitals, the computational cost scales as Nao×(Nao+1)/2N_{\text{ao}}\times(N_{\text{ao}}+1)/2. This corresponds to quadratic scaling with respect to NaoN_{\text{ao}} (O⁡(Nao2)O(N_{\text{ao}}^{2})) for calculating ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}), leading to prohibitive computational cost as the system size increases. We therefore seek a more efficient approach for evaluating ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}), which we describe in the next section.

II.3.2 Density Fitting Approach

The quadratic scaling of the analytic approach motivated us to investigate a more efficient method for calculating ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}). Inspired by the work by Zhao,[55] we utilize the density fitting (DF) approximation[17] to lower the quadratic scaling to a linear scaling, thereby accelerating the evaluation of ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}).
The DF approach approximates the true electron density by a linear combination of auxiliary basis functions K⁡(𝐫)K(\mathbf{r}) as below.

n⁡(𝐫)=∑μ​νPμ​ν​gμ​(𝐫)​gν​(𝐫)≈∑KcK​K​(𝐫)=nfit​(𝐫)n(\mathbf{r})=\sum_{\mu\nu}P_{\mu\nu}g_{\mu}(\mathbf{r})g_{\nu}(\mathbf{r})\approx\sum_{K}c_{K}K(\mathbf{r})=n_{\text{fit}}(\mathbf{r}) (16)

The fitting coefficients cKc_{K} are determined by minimizing the Coulomb metric error ℒ⁡[{cK}]\mathcal{L}[\{c_{K}\}] defined as[17]

ℒ⁡[{cK}]=∫[n⁡(𝐫)−nfit​(𝐫)]​[n⁡(𝐫′)−nfit​(𝐫′)]|𝐫−𝐫′|​𝑑𝐫​d​𝐫′.\mathcal{L}[\{c_{K}\}]=\int\cfrac{[n(\mathbf{r})-n_{\text{fit}}(\mathbf{r})][n(\mathbf{r^{\prime}})-n_{\text{fit}}(\mathbf{r^{\prime}})]}{|\mathbf{r}-\mathbf{r^{\prime}}|}d\mathbf{r}d\mathbf{r^{\prime}}. (17)

Setting ∂ℒ/∂cK=0\partial\mathcal{L}/\partial c_{K}=0 gives the standard resolution of the identity equation for Coulomb potentials

∑μ​νPμ​ν​(μ​ν|L)=∑KcK​(K|L),\sum_{\mu\nu}P_{\mu\nu}(\mu\nu|L)=\sum_{K}c_{K}(K|L), (18)

which can be efficiently solved for cKc_{K} using the Cholesky decomposition.
Similar to the analytic approach (Equation (15)), ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) under the DF approximation, which we term the DF approach, can be evaluated by introducing a Dirac-δ\delta function centered at a grid point 𝐫\mathbf{r}, which reformulates ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) in terms of two-center-two-electron integrals as below.

ϕelecsol​(𝐫)≈−∑KcK∫δ⁡(𝐫′′−𝐫)​K​(𝐫′)|𝐫′′−𝐫′|d𝐫′d𝐫′′=−∑KcK(δ|K)\begin{split}\phi^{\text{sol}}_{\text{elec}}(\mathbf{r})&\approx-\sum_{K}c_{K}\int\cfrac{\delta(\mathbf{r}^{\prime\prime}-\mathbf{r})K(\mathbf{r^{\prime}})}{|\mathbf{r}^{\prime\prime}-\mathbf{r}^{\prime}|}d\mathbf{r}^{\prime}d\mathbf{r}^{\prime\prime}\\ &=-\sum_{K}c_{K}(\delta|K)\end{split} (19)

Thus, the total number of ERIs involved in Equation (19) scales to the number of auxiliary basis functions (NauxN_{\text{aux}}), indicating linear computational scaling with respect to NauxN_{\text{aux}} (O⁡(Naux)O(N_{\text{aux}})) for computing ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}). Furthermore, given that Naux≪Nao×(Nao+1)/2N_{\text{aux}}\ll N_{\text{ao}}\times(N_{\text{ao}}+1)/2 in most cases, we expect that the DF approach will show dramatic acceleration compared to the analytic approach, as will be demonstrated in Section IV.

II.4 Modified Damped Inexact Newton Method

This section discusses the modified Damped Inexact Newton Multigrid developed by Holst (mDINMH) method[24] as an efficient algorithm for solving the NLPBE. The complete algorithm is outlined in Algorithm 1, and readers are encouraged to refer to it while following the discussion in this section.

II.4.1 Inexact Newton Method

We begin with introducing the inexact Newton method for solving the NLPBE. Define a functional 𝒢⁡[ϕtot]\mathcal{G}[\phi^{\text{tot}}] by rearranging Equation (1)

𝒢⁡[ϕtot]=−𝒜​ϕtot​(𝐫)−4​πϵ⁡(𝐫)​(ρsol​(𝐫)+ρions​[ϕtot]),\mathcal{G}[\phi^{\text{tot}}]=-\mathcal{A}\phi^{\text{tot}}(\mathbf{r})-\cfrac{4\pi}{\epsilon(\mathbf{r})}\big(\rho^{\text{sol}}(\mathbf{r})+\rho^{\text{ions}}[\phi^{\text{tot}}]\big), (20)

where the operator 𝒜\mathcal{A} is given as

𝒜=∇lnϵ(𝐫)⋅∇+∇2.\mathcal{A}=\nabla\ln\epsilon(\mathbf{r})\cdot\nabla+\nabla^{2}. (21)

Note that our functional 𝒢⁡[ϕtot]\mathcal{G}[\phi^{\text{tot}}] differs from that in the original literature,[24] which defines ℱ[ϕtot]=−∇⋅(ϵ(𝐫)∇ϕtot(𝐫))−4π(ρsol(𝐫)+ρions[ϕtot])\mathcal{F}[\phi^{\text{tot}}]=-\nabla\cdot(\epsilon(\mathbf{r})\nabla\phi^{\text{tot}}(\mathbf{r}))-4\pi(\rho^{\text{sol}}(\mathbf{r})+\rho^{\text{ions}}[\phi^{\text{tot}}]). While this modification is made for implementation convenience, 𝒢⁡[ϕtot]\mathcal{G}[\phi^{\text{tot}}] still retains the important mathematical properties of ℱ⁡[ϕtot]\mathcal{F}[\phi^{\text{tot}}] used for solving the NLPBE.
By defining 𝒢⁡[ϕtot]\mathcal{G}[\phi^{\text{tot}}], solving the NLPBE becomes equivalent to finding its root. Given that its Jacobian 𝒢′​[ϕtot]\mathcal{G}^{\prime}[\phi^{\text{tot}}] can be easily found, it is straightforward to apply the Newton method for locating the root of 𝒢⁡[ϕtot]\mathcal{G}[\phi^{\text{tot}}]. Thus, we aim to iteratively update the solution ϕk+1tot=ϕktot+vk\phi^{\text{tot}}_{k+1}=\phi^{\text{tot}}_{k}+v^{k} through the Newton method until ‖𝒢⁡[ϕktot]‖||\mathcal{G}[\phi^{\text{tot}}_{k}]|| becomes sufficiently close to zero (for loop for kk in Algorithm 1, black arrows in Figure S1).
The update term vkv^{k} is obtained by solving the following Newton equation.

𝒢′​[ϕktot]​vk=−𝒢⁡[ϕktot],\mathcal{G}^{\prime}[\phi^{\text{tot}}_{k}]v^{k}=-\mathcal{G}[\phi^{\text{tot}}_{k}], (22)

where the Jacobian 𝒢′​[ϕktot]\mathcal{G}^{\prime}[\phi^{\text{tot}}_{k}] is

𝒢′​[ϕktot]=−𝒜−4​πϵ⁡(𝐫)⋅δ​ρionsδ​ϕtot|ϕktot.\mathcal{G}^{\prime}[\phi^{\text{tot}}_{k}]=-\mathcal{A}-\cfrac{4\pi}{\epsilon(\mathbf{r})}\cdot\cfrac{\delta\rho^{\text{ions}}}{\delta\phi^{\text{tot}}}\bigg|_{\phi^{\text{tot}}_{k}}. (23)

Equation (22) also requires an iterative method to find vkv^{k}, which updates a guess solution vikv^{k}_{i} through vi+1k=vik+Δ​vikv^{k}_{i+1}=v^{k}_{i}+\Delta v^{k}_{i} until the residual rik=𝒢′​[ϕktot]​vik+𝒢⁡[ϕktot]r^{k}_{i}=\mathcal{G}^{\prime}[\phi^{\text{tot}}_{k}]v_{i}^{k}+\mathcal{G}[\phi^{\text{tot}}_{k}] gets sufficiently close to zero.
These steps constitute the exact Newton method and should be applicable to solving the NLPBE in principle. However, solving Equation (22) at every Newton step leads to significant computational effort. Alternatively, it is sufficient to solve the Newton equation inexactly, provided that the current vikv_{i}^{k} is guaranteed to be a descent direction, i.e. ‖𝒢⁡[ϕk+1tot]‖<‖𝒢⁡[ϕktot]‖||\mathcal{G}[\phi^{\text{tot}}_{k+1}]||<||\mathcal{G}[\phi^{\text{tot}}_{k}]||. This approach substantially reduces computational time, which is the motivation of the inexact Newton method in the DINMH, which we describe in the following.[24]
We rewrite Equation (22) with the residual rikr^{k}_{i} to ensure that the Newton equation is solved inexactly.

𝒢′​[ϕktot]​vik=−𝒢⁡[ϕktot]+rik,\mathcal{G}^{\prime}[\phi^{\text{tot}}_{k}]v_{i}^{k}=-\mathcal{G}[\phi^{\text{tot}}_{k}]+r_{i}^{k}, (24)

and we stop iterations for index ii (for loop for ii in Algorithm 1, red arrows in Figure S1) once the current vikv^{k}_{i} is assured to be a descent direction. According to Holst,[24] a descent vikv_{i}^{k} is guaranteed if rikr_{i}^{k} satisfies the following condition.

‖rik‖<‖𝒢⁡[ϕktot]‖.||r_{i}^{k}||<||\mathcal{G}[\phi^{\text{tot}}_{k}]||. (25)

Additionally, we ensure local QQ-order(1+p1+p) convergence of the inexact Newton method by enforcing the following condition.[24]

‖rik‖≤C​‖𝒢⁡[ϕktot]‖1+p||r_{i}^{k}||\leq C||\mathcal{G}[\phi^{\text{tot}}_{k}]||^{1+p} (26)

This condition allows the algorithm to focus more on finding a descent direction through Equation (24), rather than achieving high accuracy when ϕktot\phi^{\text{tot}}_{k} is far from the solution ϕtot\phi^{\text{tot}}. Conversely, it demands greater accuracy when solving Equation (24) as ϕktot\phi^{\text{tot}}_{k} approaches ϕtot\phi^{\text{tot}}. Thus, Equation (26) dynamically controls the convergence threshold for solving Equation (24), thereby reducing the overall computational effort.[13, 24]
Taken together, we iteratively update vikv_{i}^{k} by vi+1k=vik+Δ​vikv^{k}_{i+1}=v^{k}_{i}+\Delta v^{k}_{i} until the residual rikr_{i}^{k} satisfies both the descent direction (Equation (25)) and QQ-order(1+p1+p) convergence (Equation (26)) conditions as summarized in Algorithm 1 (for loop for ii in Algorithm 1, red arrows in Figure S1). The update Δ​vik\Delta v_{i}^{k} at ii-th step is obtained by assuming that the residual at the next step vanishes (ri+1k→0r^{k}_{i+1}\rightarrow 0), which leads to the following equation.

𝒢′​[ϕktot]​Δ​vik=−rik\mathcal{G}^{\prime}[\phi^{\text{tot}}_{k}]\Delta v_{i}^{k}=-r_{i}^{k} (27)

This is the key equation of the inexact Newton method, and the detailed algorithm for solving it is discussed in the next section.

Algorithm 1 Algorithm of the modified DINMH method. Its flowchart is also provided Figure S1 in Supplementary Information.
Initialize 𝒫\mathcal{P} and multigrid hierarchy
ϕ0tot=0\phi^{\text{tot}}_{0}=0
for k=0k=0 do
   𝒢⁡[ϕktot]\mathcal{G}[\phi^{\text{tot}}_{k}], 𝒢′​[ϕktot]\mathcal{G}^{\prime}[\phi^{\text{tot}}_{k}]
   if ‖𝒢⁡[ϕktot]‖<threshold||\mathcal{G}[\phi^{\text{tot}}_{k}]||<\text{threshold} then
      ϕtot=ϕktot\phi^{\text{tot}}=\phi^{\text{tot}}_{k}
      return ϕtot\phi^{\text{tot}}
   end if
   v0k=0v_{0}^{k}=0
   for i=0i=0 do
      rik=𝒢′​[ϕktot]​vik+𝒢⁡[ϕktot]r_{i}^{k}=\mathcal{G}^{\prime}[\phi^{\text{tot}}_{k}]v_{i}^{k}+\mathcal{G}[\phi^{\text{tot}}_{k}]
      if ‖rik‖<‖𝒢⁡[ϕktot]‖||r_{i}^{k}||<||\mathcal{G}[\phi^{\text{tot}}_{k}]|| and ‖rik‖≤C​‖𝒢⁡[ϕktot]‖p+1||r_{i}^{k}||\leq C||\mathcal{G}[\phi^{\text{tot}}_{k}]||^{p+1} then
         vk←vikv^{k}\leftarrow v^{k}_{i}
         break
      end if
      𝒫​Δ​vik=−rik\mathcal{P}\Delta v_{i}^{k}=-r_{i}^{k}
      vi+1k←vik+Δ​vikv^{k}_{i+1}\leftarrow v_{i}^{k}+\Delta v_{i}^{k}
   end for
   λk0=1\lambda_{k}^{0}=1
   for n=0n=0 do
      if ‖𝒢⁡[ϕktot+λkn​vk]‖<‖𝒢⁡[ϕktot]‖||\mathcal{G}[\phi^{\text{tot}}_{k}+\lambda_{k}^{n}v^{k}]||<||\mathcal{G}[\phi^{\text{tot}}_{k}]|| then
         λk=λkn\lambda_{k}=\lambda_{k}^{n}
         break
      end if
      λkn+1=λkn/2\lambda_{k}^{n+1}=\lambda_{k}^{n}/2
   end for
   ϕk+1tot=ϕktot+λk​vk\phi^{\text{tot}}_{k+1}=\phi^{\text{tot}}_{k}+\lambda_{k}v^{k}
end for

II.4.2 Preconditioning

The goal of the inexact Newton method aligns with solving Equation (27). In the original DINMH, this equation is solved using a multigrid method enabled by a symmetrized representation for ∇ϵ(𝐫)⋅∇\nabla\epsilon(\mathbf{r})\cdot\nabla through discretization.[24, 54] Such a symmetrization is essential for most multigrid methods because, without it, the Jacobian is asymmetric in general and may require a more sophisticated method, such as the generalized minimal residual (GMRES) method.
These considerations drive us to introduce a symmetric preconditioner 𝒫\mathcal{P} by dropping asymmetric ∇lnϵ(𝐫)⋅∇\nabla\ln\epsilon(\mathbf{r})\cdot\nabla term in 𝒢′​[ϕtot]\mathcal{G}^{\prime}[\phi^{\text{tot}}] as below.

𝒫=−∇2−4​πϵ⁡(𝐫)⋅δ​ρionsδ​ϕtot|0\mathcal{P}=-\nabla^{2}-\cfrac{4\pi}{\epsilon(\mathbf{r})}\cdot\cfrac{\delta\rho^{\text{ions}}}{\delta\phi^{\text{tot}}}\bigg|_{0} (28)

Moreover, we use a constant δ​ρions/δ​ϕtot\delta\rho^{\text{ions}}/\delta\phi^{\text{tot}} evaluated at ϕtot=0\phi^{\text{tot}}=0 in order to fix 𝒫\mathcal{P} throughout the entire iterative procedure, including the electronic SCF cycles. This is intended to avoid reconstruction of the multigrid hierarchy, which we will discuss in the next section (Section II.4.3).
Thus, instead of directly solving Equation (27), we solve its preconditioned form to find Δ​vik\Delta v_{i}^{k}.

𝒫​Δ​vik=−rik\mathcal{P}\Delta v_{i}^{k}=-r_{i}^{k} (29)

As 𝒫\mathcal{P} is a symmetric operator by construction, Equation (29) can be solved using an efficient multigrid method developed for symmetric operators. Specifically, we perform the preconditioned defect correction method, where a single V-cycle sweep serves as an approximate inverse of 𝒫\mathcal{P}. Subsequently, the resulting Δ​vik\Delta v_{i}^{k} is added to vikv_{i}^{k} to obtain vik+1v_{i}^{k+1} (vi+1k=vik+Δ​vikv_{i+1}^{k}=v_{i}^{k}+\Delta v_{i}^{k}). We then iterate these steps until the updated residual ri+1kr_{i+1}^{k} satisfies both the descent direction (Equation (25)) and the QQ-order(1+p1+p) convergence (Equation (26)) conditions.
Compared to the original DINMH method, our approach, which we term the modified DINMH (mDINMH), features the introduction of a symmetric preconditioner (Equation (28)). As a result, the mDINMH method does not require a symmetric representation for ∇lnϵ(𝐫)⋅∇\nabla\ln\epsilon(\mathbf{r})\cdot\nabla through discretization, thereby allowing ∇ln⁡ϵ​(𝐫)\nabla\ln\epsilon(\mathbf{r}) and ∇\nabla to be treated separately. This feature enables the use of an analytic expression for ∇ln⁡ϵ​(𝐫)\nabla\ln\epsilon(\mathbf{r}) if available, which is expected to reduce discretization errors.

II.4.3 Algebraic Multigrid Method

Our preconditioner 𝒫\mathcal{P} (Equation (28)) uses a constant δ​ρions/δ​ϕtot\delta\rho^{\text{ions}}/\delta\phi^{\text{tot}} evaluated at ϕtot=0\phi^{\text{tot}}=0. This is to overcome limitations that the original DINMH method suffers from.[24, 54]
In the original work,[24] Equation (27) is solved using a geometric multigrid (GMG) method. GMG exploits a multigrid hierarchy automatically constructed from the grid structure (2n+1→2n−1+1→⋯2^{n}+1\rightarrow 2^{n-1}+1\rightarrow\cdots, See Figure 3a), along with the corresponding restriction and prolongation operators. While this feature allows GMG methods to avoid explicit construction of multigrid hierarchies, it results in strict restrictions on the number of grid points along each spatial direction (xx,yy, and zz-axis) to achieve optimal efficiency as a trade-off for this advantage.

Refer to caption
Figure 3: Schematic illustration of (a) geometric multigrid (GMG) and (b) algebraic multigrid (AMG).

To relax these restrictions while maintaining efficiency, we adopt algebraic multigrid (AMG) as a black-box method for solving Equation (29) (See Computationl Details for its settings). As AMG algebraically determines multigrid hierarchies, it no longer imposes any restrictions on the number of grid points for optimal efficiency. This feature provides greater flexibility in the choice grid points than GMG, making AMG be applicable for general purpose.
Despite the flexibility of AMG, its major drawback arises from the construction of its multigrid hierarchy. As schematically shown in Figure 3b, the hierarchy depends on the structure of the underlying linear operator. This indicates that the hierarchy has to be reconstructed whenever the operator changes, which results in significant computational overhead.
Fortunately, this overhead can be minimized by using a fixed linear operator, which motivates the use of a constant preconditioner as defined in Equation (28). By setting a constant δ​ρions/δ​ϕtot\delta\rho^{\text{ions}}/\delta\phi^{\text{tot}} in 𝒫\mathcal{P}, the AMG hierarchy remains unchanged throughout the entire calculations, thereby allowing its construction only once.
Therefore, the use of AMG alleviates the restrictions on grid points that GMG in the original DINMH suffers from. Furthermore, combined with a constant preconditioner, AMG can minimize the computational overhead associated with reconstruction of the AMG hierarchy, thereby offering both flexibility and computational efficiency.

II.4.4 Damping

The DINMH method also employs a damping factor (λk\lambda_{k}) when updating ϕktot\phi^{\text{tot}}_{k} (ϕk+1tot=ϕktot+λk​vk\phi^{\text{tot}}_{k+1}=\phi^{\text{tot}}_{k}+\lambda_{k}v^{k}) to ensure global convergence of the inexact Newton method (Algorithm 1, blue arrows in Figure S1).[24] Specifically, once a descent direction vkv^{k} is found, a damping factor λk\lambda_{k} is determined by the backtracking line search with its initial value of 1 (λk0=1\lambda_{k}^{0}=1) until the following condition is satisfied.

‖𝒢⁡[ϕktot+λkn​vk]‖<‖𝒢⁡[ϕktot]‖||\mathcal{G}[\phi^{\text{tot}}_{k}+\lambda_{k}^{n}v^{k}]||<||\mathcal{G}[\phi^{\text{tot}}_{k}]|| (30)

If the condition is not satisfied, the damping factor is updated by halving the current value, i.e. λkn+1←λkn/2\lambda_{k}^{n+1}\leftarrow\lambda_{k}^{n}/2, and the condition is reexamined.
The entire algorithm of the mDINMH is given in Algorithm 1, and its performance will be demonstrated in Section IV.

II.5 GPU Acceleration

As seen in Section II.3, both the analytic and the DF approaches for ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) require the evaluation of ERIs for all grid points. This results in a computational cost scaling as O⁡(Nx3)O(N_{x}^{3}), where NxN_{x} is the number of grid points along xx, yy, and zz-axis (See Figure 2). This cubic growth rapidly makes ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) computationally intractable as the number of grid points increases. For example, setting Nx=97N_{x}=97 produces 912,673 grid points, indicating that the total number of ERIs for ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) is equal to Nao×(Nao+1)/2×912,673N_{\text{ao}}\times(N_{\text{ao}}+1)/2\times 912,673 and Naux×912,673N_{\text{aux}}\times 912,673 for the analytic and the density fitting approach, respectively. Even for a few hundred NaoN_{\text{ao}} and NauxN_{\text{aux}}, the number of ERIs easily exceeds ten millions due to the cubic scaling with respect to NxN_{x}. This gigantic number of ERIs significantly increases the computational cost of ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) calculations, requiring massive parallelism to obtain ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) within a reasonable time.
To mitigate this computational bottleneck, we leverage the parallelization efficiency of GPU computations. Fortunately, GPU4PySCF offers a GPU-accelerated ERI library,[32] and we adapt it to accelerate ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) calculations for both the analytic and the DF approaches.
Furthermore, the mDINMH can be GPU-accelerated by integrating AMGCL library, a header-only C++ AMG library for both CPU and GPU.[14, 16, 15] Thus, we implemented a wrapper that allows the AMGCL functions to be accessed at the Python level.
To fully exploit GPU acceleration and avoid the overhead associated with CPU-GPU data transfers, we release a separate CuPy-based library, namely GPU4libNLPBE, as a GPU-accelerated version of libNLPBE. The computational efficiency of GPU4libNLPBE will also be discussed in Section IV.

III Computational Details

All density functional calculations[22, 28, 37] were carried out at B3LYP-D3/def2-TZVPPD level of theory[6, 29, 50, 5, 20, 51] as implemented in PySCF.[46] Resolution of the identity approximation with def2-TZVPP-JKFIT auxiliary basis set[52] was generally adopted to accelerate density functional calculations. The analytic and the DF approaches for ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) were implemented using PySCF[46] and GPU4PySCF[32] for CPU and GPU version of libNLPBE, respectively. The algebraic multigrid method in the mDINMH method was implemented using AMGCL library[14, 16, 15] for both CPU and GPU version of libNLPBE. After extensive numerical experiments, we found that 4-level V-cycle multigrid with the sparse approximate inverse relaxation of the zeroth variant (SPAI-0) relaxation method[8] delivers optimal efficiency, During travering the multigrid hierarchy, pre- and post-smoothening were performed once at each level, and the coarsest level was directly solved.
For the dielectric and the ion-exclusion functions (Equation (2) and (7)), we used Δ=0.265\Delta=0.265 Å, a=0.44a=0.44 Å, and dprobe=1.4d_{\text{probe}}=1.4 Å according to the literature, [45] and the room temperature (T=298.15T=298.15 K) is generally considered throughout this work.
We enforced the convergence threshold of ‖𝒢⁡[ϕktot]‖<1.0×10−9||\mathcal{G}[\phi^{\text{tot}}_{k}]||<1.0\times 10^{-9} for the mDINMH. To demonstrate the performance of the mDINMH, we used the self-consistent (SC) method as the reference method,[18, 10, 9, 45] and, to the best of our knowledge, it is the sole method that has been applied to molecular calculations.[45, 26] Its algorithm[18, 10, 9, 45] and implementation details[26] can be found elsewhere.
We note that the SC method was also implemented using AMGCL library, which allows rigorous performance comparison between the SC and the mDINMH methods. We also note that the convergence scheme for the SC method is different from that of mDINMH. To be specific, the SC method uses the ion charge density ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r}) and the polarization charge density ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) for convergence test, where the latter is defined as (ρtot​(𝐫)=ρsol​(𝐫)+ρions​(𝐫)\rho^{\text{tot}}(\mathbf{r})=\rho^{\text{sol}}(\mathbf{r})+\rho^{\text{ions}}(\mathbf{r}))

ρpol(𝐫)=1−ϵ⁡(𝐫)ϵ⁡(𝐫)ρtot(𝐫)+14​π∇lnϵ(𝐫)⋅∇ϕtot(𝐫).\rho^{\text{pol}}(\mathbf{r})=\cfrac{1-\epsilon(\mathbf{r})}{\epsilon(\mathbf{r})}\rho^{\text{tot}}(\mathbf{r})+\cfrac{1}{4\pi}\nabla\ln\epsilon(\mathbf{r})\cdot\nabla\phi^{\text{tot}}(\mathbf{r}). (31)

Convergence of the SC method is examined by testing whether Δ​ρions​(𝐫)\Delta\rho^{\text{ions}}(\mathbf{r}) and Δ​ρpol​(𝐫)\Delta\rho^{\text{pol}}(\mathbf{r}) are smaller than their respective threshold value for all grid points. We set Δ​ρpol​(𝐫)=1.0×10−5\Delta\rho^{\text{pol}}(\mathbf{r})=1.0\times 10^{-5} a.u. and Δ​ρions​(𝐫)=1.0×10−6\Delta\rho^{\text{ions}}(\mathbf{r})=1.0\times 10^{-6} a.u. for these threshold values, which are two orders of magnitude tighter than those in the original work.[45] Accordingly, the convergence threshold for the conjugate gradient step on each multigrid level was set to 1.0×10−81.0\times 10^{-8} a.u.. The reference data were calculated by Q-Chem 5.4.[43] For consistency with PySCF-calculated DFT results, 75 radial and 302 angular grids for numerical integrations and 50 radial and 194 angular grids for non-linear correlations. All computational results reported in this paper were produced using 8 threads of Intel Xeon Gold 6240 CPU, a NVIDIA GeForce RTX 2080 Ti 11GB GPU card, and 10000 MB of memory.

IV Results and Discussion

Table 1: Comparison between the analytic and the density fitting (DF) approach for calculating the electrostatic potential of vitamin C and 4-nitroaniline. Calculations were performed with a 20 Å cubic box discretized into 97×\times97×\times97 cubic grids. The solute electron density is computed at B3LYP-D3/def2-TZVPPD level of theory.
Vitamin C 4-nitroaniline
analytic DF speedup analytic DF speedup
CPU (sec) 1164.88 14.21 81.98 750.23 10.97 68.39
GPU (sec) 38.11 3.86 9.87 23.68 3.74 6.33
NaoN_{\text{ao}} 598 478
NauxN_{\text{aux}} 1056 866
Nao​(Nao+1)2​Naux\frac{N_{\text{ao}}(N_{\text{ao}}+1)}{2N_{\text{aux}}} 169.60 132.20

Density Fitting. Table 1 summarizes the computational time for calculating ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) of vitamin C and 4-nitroaniline using the analytic and the density fitting (DF) approaches on CPU and GPU for 97×\times97×\times97 cubic grids. The DF approach on CPU shows dramatic speedups of ×\times81.98 and ×\times68.39 for vitamin C and 4-nitroaniline, respectively, both of which highlight the efficiency of the DF approach.
These accelerations are enabled by a reduced number of ERIs involved in ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) as described in Section II.3 (See Equation (15) and (19)). Comparing the ratio of the numbers of ERIs required by the analytic and the DF approaches (See Table 1), the theoretical maximum speedup is estimated to be ×\times169.60 and ×\times132.20 for vitamin C and 4-nitroaniline, respectively. The actual speedup is less than the theoretical estimate because the entire calculation is divided into smaller batches to reduce the memory cost, resulting in additional computational overhead.
This overhead becomes more noticeable when the calculations are performed on GPU (See Table 1), where the actual speedup is ×\times9.87 and ×\times6.33 for vitamin C and 4-nitroaniline, respectively. The lower speedups observed on GPUs are expected because the analytic approach benefits more from GPU parallelization than the density fitting approach due to a more ERIs for evaluating ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}).
For vitamin C and 4-nitroaniline, the CPU-based analytic approach required 1164.88 and 750.23 seconds for ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}), whereas the GPU-accelerated DF approach took only 3.86 and 3.74 seconds. These numbers suggest ×\times301.78 and ×\times200.60 acceleration for vitamin C and 4-nitroaniline, confirming the efficiency of both the DF approach and GPU acceleration for computing ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) on grids.

Table 2: Comparison between the self-consistent (SC) and the modified DINMH (mDINMH) for solving the non-linear Poisson-Boltzmann equation of vitamin C and 4-nitroaniline in 1 M NaCl aqueous solution. Calculations were performed with a 20 Å cubic box discretized into 97×\times97×\times97 cubic grids. The solute electron density is computed at B3LYP-D3/def2-TZVPPD level of theory.
Vitamin C 4-nitroaniline
SC mDINMH speedup SC mDINMH speedup
CPU (sec) 41.84 10.03 4.17 43.87 10.37 4.23
GPU (sec) – 0.57 – – 0.59 –

mDINMN. We next evaluate the performance of the mDINMH method by comparing it with the self-consistent (SC) method.[18, 10, 9, 45] Vitamin C and 4-nitroaniline were again chosen as representative examples, and Table 2 summarizes the computational times required to solve the NLPBE on CPU and GPU.
Overall, the mDINMH (10.03 and 10.37 seconds for vitamin C and 4-nitroaniline) outperforms the SC approach (41.84 and 43.87 seconds for vitamin C and 4-nitroaniline) for both molecules in terms of computing time, approximately a 4-fold speedup on the CPU. This speedup clearly demonstrates the efficiency of the mDINMH over the SC approach.
Furthermore, the GPU-accelerated mDINMH shows a remarkable computing time, which only takes 0.57 and 0.59 seconds for vitamin C and 4-nitroaniline, respectively (Table 2). Compared to the SC method on CPU, these results correspond to ×\times73.40 and ×\times74.36 acceleration for vitamin C and 4-nitroaniline, respectively, highlighting the efficiency of GPU parallelization. While we intentionally omitted implementing the GPU-accelerated version of the SC approach due to the efficiency of the mDINMN on CPU, we do not expect that it would outperform the GPU-accelerated mDINMH, given the performance gap observed on CPU.

Refer to caption
Figure 4: Relative residual vs. iteration count for solving the NLPBE of vitamin C in 1 M NaCl aqueous solution using the self-consistent (SC) (blue) and the mDINMH (orange) methods. Calculations were performed with a 20 Å cubic box discretized into 97×\times97×\times97 cubic grids. The solute electron density is computed at B3LYP-D3/def2-TZVPPD level of theory.

Convergence Rate. The superior efficiency of the mDINMH over the SC method is primarily attributed to its faster convergence rate. To investigate the convergence rate, we plotted the relative residual (‖𝒢⁡[ϕk+1tot]‖/‖𝒢⁡[ϕktot]‖||\mathcal{G}[\phi^{\text{tot}}_{k+1}]||/||\mathcal{G}[\phi^{\text{tot}}_{k}]||) of both methods according to their iterative steps as illustrated in Figure 4.
The relative residual of the SC method (blue dots in Figure 4) remains nearly constant until convergence at the 32nd iteration, except for a kink at the second iteration due to a huge residual at the first iteration. This behavior suggests a linear convergence rate for the SC method, which often requires a large number of iterations to converge.
In contrast, the relative residual of the mDINMH (orange dots in Figure 4) shows a plateau until the 9th iteration, followed by an abrupt drop from the 10th iteration until convergence at the 13th iteration. This convergence pattern evidences superlinear convergence of the inexact Newton method enabled by the QQ-order(1+p1+p) convergence condition (Equation (26)),[24] which supports faster convergence of the mDINMH than the SC method as observed in Figure 4. As a result, the mDINMH needs fewer iterations to achieve convergence, thereby significantly reducing the computational time as shown in Table 2.

Refer to caption
Figure 5: Absolute residual of the mDINMH method in solving the NLPBE for 4-nitroaniline calculated with various number of grid points. Calculations were performed with a 20 Å cubic box. The solute electron density is computed at B3LYP-D3/def2-TZVPPD level of theory. For NxN_{x} = 257, NVIDIA A100-PCIE-40GB GPU is used for calculations due to the memory cost associated with the total grids.

Algebraic Multigrid. We next discuss the applicability of the mDINMH to various numbers of grid points along xx, yy, and zz-axis (NxN_{x}, See Figure 2) by examining their convergence according to iterative cycles, and the results are depicted in Figure 5. Note that NxN_{x} values in Figure 5 were carefully chosen to demonstrate the versatility of the AMG method across a broad range of grid points (See Section II.4.3).
Specifically, the GMG hierarchy in the original DINMH is contructed from the underlying grid structure, where the grid spacing is doubled at each coarser level and halved at each finer level when traversing the hierarchy (Figure 3).[24, 9, 54] Consequently, the original DINMH achieves optimal efficiency when Nx=2n+1N_{x}=2^{n}+1 (n∈ℕn\in\mathbb{N}), a condition satisfied by NxN_{x} = 65, 129, and 257 in Figure 5. In contrast, NxN_{x} = 100, 150, and 200 in Figure 5 are even-numbered grid points, which the original DINMH is limited in its ability to handle.
Our mDINMH method, however, is capable of handling both cases by employing AMG as illustrated in Figure 5. The absolute residual successfully reaches convergence within 20 iterations for all NxN_{x} considered in Figure 5, suggesting the stability of the mDINMH across a broad range of grid points enabled by AMG.

Refer to caption
Figure 6: mDINMH-calculated ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) and ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r}) of 4-nitroaniline in 1 M of NaCl aqueous solution. Calculations were performed with a 20 Å cubic box discretized into 97×\times97×\times97 cubic grids. The solute electron density is computed at B3LYP-D3/def2-TZVPPD level of theory. Colorbars are in atomic unit.

Polarization and Ion Charge Densities. Based on the efficiency of the DF approach (Table 1) and the mDINMH method (Table 2), we consider their combination (DF+mDINMH) as our default method in solving the NLPBE. In this section, we first verify the qualitative accuracy of the DF+mDINMH method. Specifically, we examine ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) (Equation (31)) and ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r}) (Equation (8)), both of which are derived from the DF+mDINMH-calculated ϕtot​(𝐫)\phi^{\text{tot}}(\mathbf{r}). Both quantities were computed for 4-nitroaniline in 1 M NaCl aqueous solution, and the results are illustrated in Figure 6.
The calculated ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) (Figure 6, left) exhibits a positively charged surface around the nitro group (–NO2). This positive ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) is primarily attributed to the nitro-oxygen atoms, which adopt a partial negative charge in nitro moieties. These negatively charged oxygen atoms are expected to induce a positive charge in the environment to maintain local charge neutrality, resulting in a positive ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) in their vicinity. Our speculation is supported by the restrained electrostatic potential (RESP) atomic charges (Table 3),[4] where the oxygen atoms carry a negative charge of –0.500. Similarly, the calculated ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r}) (Figure 6, right) shows a positive value near the nitro moiety, suggesting the accumulation of cations caused by the negatively charged oxygen atoms.
In contrast, both ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) (Figure 6, left) and ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r}) (Figure 6, right) show negative values around the amino group (–NH2), which result from the positively charged amino-hydrogen atoms. The RESP charge of the these atoms is +0.383 (Table 3), suggesting that the hydrogen atoms develop a negative charge in the environment while increasing the local anion concentration around them.
Overall, the distributions of the mDINMH-calculated ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) and ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r}) are consistent with those reported by Head-Gordon and coworkers,[45] suggesting the reliability of our mDINMH method.

Table 3: Restrained electrostatic potential atomic charges of 4-nitroaniline calculated at B3LYP-D3/def2-TZVPPD level of theory.
[Uncaptioned image]
Atom RESP Charge
N1 +0.775
O1 –0.500
O2 –0.500
N2 –0.863
H1 +0.383
H2 +0.383
Table 4: Electrostatic contribution to the free energy of solvation (Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}}, in kcal/mol) of 4-nitroaniline in 1 M NaCl aqueous solution calculated by four different computational schemes (self-consistent (SC)/mDINMH methods for solving the non-linear Poisson-Boltzmann equation and analytic/density fitting approaches for ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r})). Calculations were performed with a 20 Å cubic box discretized into 97×\times97×\times97 cubic grids. The solute electron density is computed at B3LYP-D3/def2-TZVPPD level of theory.
4-nitroaniline SC mDINMH Q-Chem
Analytic –4.73 –4.73 –4.74
Density Fitting –4.70 –4.70
Table 5: Electrostatic contribution to the free energy of solvation (Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}}, in kcal/mol) of vitamin C in 1 M NaCl aqueous solution calculated by four different computational schemes (self-consistent (SC)/mDINMH methods for solving the non-linear Poisson-Boltzmann equation and analytic/density fitting approaches for ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r})). Calculations were performed with a 20 Å cubic box discretized into 97×\times97×\times97 cubic grids. The solute electron density is computed at B3LYP-D3/def2-TZVPPD level of theory.
Vitamin C SC mDINMH Q-Chem
Analytic –5.26 –5.26 –5.29
Density Fitting –5.26 –5.26

Solvation Free Energy. While ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) and ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r}) can demonstrate the qualitative accuracy of the DF+mDINMH method, they are insufficient for validating its quantitative accuracy. Thus, we calculated the free energy of solvation (See Appendix A for its derivation) to demonstrate the quantitative accuracy of the DF+mDINMH method, and the results are summarized in Table 4. Specifically, the electrostatic contribution to the solvation free energy (Δ​Gessolv\Delta G^{\text{solv}}_{\text{es}}) was computed for 4-nitroaniline in 1 M NaCl aqueous solution using four different computational schemes (analytic/DF for calculating ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}) and SC/mDINMH for solving the NLPBE), and the calculated energies are compared with those from Q-Chem. See Section III for computational details.
We first confirm the accuracy of the DF approach by comparing Δ​Gessolv\Delta G^{\text{solv}}_{\text{es}} computed with the analytic and the DF approaches (Table 4). Both the SC and the mDINMH methods yield Δ​Gessolv\Delta G^{\text{solv}}_{\text{es}} of –4.73 for the analytic approach and –4.70 kcal/mol for the DF approach. Their difference is 0.03 kcal/mol only, which is negligible in practice. These results quantitatively confirm the accuracy of the DF approach.
Furthermore, Table 4 shows that the SC and the mDINMH methods produce the same Δ​Gessolv\Delta G^{\text{solv}}_{\text{es}} up to two digits irrespective to the computational approach for ϕelecsol​(𝐫)\phi_{\text{elec}}^{\text{sol}}(\mathbf{r}). Specifically, both methods produce –4.73 kcal/mol with the analytic approach and –4.70 kcal/mol with the DF approach. These agreements suggest the quantitative accuracy of the mDINMH method. The accuracy of the DF approach and the mDINMH method is further confirmed by Δ​Gessolv\Delta G^{\text{solv}}_{\text{es}} of vitamin C in 1 M NaCl aqueous solution (Table 5), where all four combinations results the same Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} of –5.26 kcal/mol.
We next evaluate the consistency of the DF+mDINMH method against the NLPBE solver in Q-Chem software (hereafter referred to as reference method).[43, 45] For 4-nitroaniline and vitamin C, the reference method produces Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} of –4.74 (Table 4) and –5.29 kcal/mol (Table 5), while the DF+mDINMH results –4.70 (Table 4) and –5.26 kcal/mol (Table 5). The deviations (0.04 and 0.03 kcal/mol for 4-nitroaniline and vitamin C, respectively) are practically negligible, suggesting that the DF+mDINMH is capable of producing reliable solvation free energies.
While the NLPBE has been developed primarily for modeling electrolyte solutions, it is also applicable to pure solvents by setting cb=0c^{\text{b}}=0 M. This enables us to compare the NLPBE-calculated Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} with those from popular implicit solvent models, such as C-PCM,[3] IEF-PCM,[48] COSMO,[38] and SMD.[35] For their rigorous comparison, we followed the standard PCM convention for the solvent-accessible surface, where atom-specific lengths are represented by scaled van der Waals radii dA=1.2×dA,vdWd_{\text{A}}=1.2\times d_{\text{A,vdW}}.
Using these scaled van der Waals radii for solvent-accessible surfaces, we computed the solvation free energies of 4-nitroaniline and vitamin C in pure water using various implicit solvent models, and the results are summarized in Table 6. The C-PCM, IEF-PCM, and COSMO models produce Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} of approximately –15 and –23 kcal/mol for 4-nitroaniline and vitamin C, respectively (first to third row of Table 6). The SMD model (fourth row of Table 6) gives a comparable result of –14.98 kcal/mol for 4-nitroaniline, but predicts a less negative Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} of –16.18 kcal/mol for vitamin C, an outlier among the energies computed by standard solvation models considered in this study.
In contrast, the NLPBE-calculated Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} (fifth row of Table 6) is –32.00 and –53.15 kcal/mol for 4-nitroaniline and vitamin C, respectively. Compared to the standard solvent models, the NLPBE negatively overestimate Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} to a large extent. This overestimation is attributed to, unlike standard solvent models, smooth ϵ⁡(𝐫)\epsilon(\mathbf{r}) at the solvent-accessible surface as defined in Equation (2), which consequently allows a non-zero ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) (See Equation (31) and Figure 6) inside the solute-accessible surface (See Figure 1). Given the distance from the solute, this non-zero ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) leads to strong electrostatic interactions with the solute charge density, thereby significantly contributing to the solvation free energy.
Therefore, we increased the scaling factor for atom-specific lengths from 1.20 to 1.45 (dA=1.45×dA,vdWd_{\text{A}}=1.45\times d_{\text{A,vdW}}) to minimize such interactions and recalculated the solvation free energy. As summarized in the sixth row of Table 6, Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} is computed to be –14.77 and –21.51 kcal/mol for 4-nitroaniline and vitamin C, respectively. These values are which are consistent with the values calculated by the C-PCM, IEF-PCM, COSMO, and SMD models, except for the SMD-calculated Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} for vitamin C as discussed above.

Table 6: Electrostatic contribution to the free energy of solvation (in kcal/mol) of 4-nitroaniline and vitamin C in pure water calculated by the C-PCM, IEF-PCM, COSMO, and NLPBE (DF+mDINMH) implicit solvent models. The NLPBE calculations were performed with a 20 Å cubic box discretized into 97×\times97×\times97 cubic grids. The solute electron density is computed at B3LYP-D3/def2-TZVPPD level of theory.
4-Nitroaniline Vitamin C
C-PCM –15.38 –23.30
IEF-PCM –15.28 –23.06
COSMO –15.21 –23.08
SMD –14.98 –16.18
NLPBEa –32.00 –53.15
NLPBEb –14.77 –21.51

a scaling factor = 1.20
b scaling factor = 1.45

We move on to ensuring the accuracy of the DF+mDINMH method by evaluating the effect of the electrolyte concentration to the solvation free energy of acetic acid [45] by calculating Δ​Δ​Gions\Delta\Delta G_{\text{ions}} defined as

Δ​Δ​Gions=Δ​Gessolv​(cb)−Δ​Gessolv​(cb=0).\Delta\Delta G_{\text{ions}}=\Delta G^{\text{solv}}_{\text{es}}(c^{b})-\Delta G^{\text{solv}}_{\text{es}}(c^{b}=0). (32)

We computed Δ​Δ​Gions\Delta\Delta G_{\text{ions}} with the DF+mDINMH and the reference method, and the results are depicted in Figure 7 (See Table S1 for raw data).

Refer to caption
Figure 7: Calculated Δ​Δ​Gions\Delta\Delta G_{\text{ions}} (in kcal/mol) of acetic acid with varying the concentration of NaCl aqueous solution. Calculations were performed with a 20 Å cubic box discretized into 97×\times97×\times97 cubic grids. The solute electron density is computed at ω\omegaB97X-V/def2-TZVPP level of theory.[34]

Similar to the work by Head-Gordon and coworkers (Figure 7, Orange line), [45] both the DF+mDINMH and the reference method predict Δ​Δ​Gions\Delta\Delta G_{\text{ions}} as a non-linear function of electrolyte concentration (Figure 7, Blue line), which consequently breaks the experimental linear trend (Figure 7, Gray line).[33] This deviation is well expected, as our theoretical framework also assumed a concentration-independent Stern layer thickness (aa) when defining the ion-exclusion function (λ⁡(𝐫)\lambda(\mathbf{r}), Equation (7)).[45] Aside from this deviation, the DF+mDINMH-calculated Δ​Δ​Gions\Delta\Delta G_{\text{ions}} values (Figure 7, Blue line) are in excellent agreement with those from the reference method (Figure 7, Orange line),[45] confirming the numerical consistency of the DF+mDINMH combination with the reference method.

Refer to caption
Figure 8: Calculated Δ​Δ​Gions\Delta\Delta G_{\text{ions}} (in kcal/mol) of 2-octanone with varying the Stern layer thickness and the concentration of NaCl aqueous solution with (a) the DF+mDINMH method, (b) the reference method available in Q-Chem software, and (c) their difference (See Table SX ). Calculations were performed with a 20 Å cubic box discretized into 97×\times97×\times97 cubic grids. The solute electron density is computed at ω\omegaB97X-V/def2-TZVPP level of theory.[34]

To further validate the consistency of the DF+mDINMH method with the reference method, we computed Δ​Δ​Gions\Delta\Delta G_{\text{ions}} for 2-octanone with varying the Stern layer thickness (See Equation (7)).[45] The results are depicted in Figure 8 (See Table S2–S4 for raw data).
Consistent with the reference method (Figure 8b), our DF+mDINMH method predicts not only an increasing Δ​Δ​Gions\Delta\Delta G_{\text{ions}} as the electrolyte concentration increases but also the trend of Δ​Δ​Gions\Delta\Delta G_{\text{ions}} vs. electrolyte concentration curve with respect to the Stern layer thickness (Figure 8a). The difference between the DF+mDINMH- and the reference method-calculated Δ​Δ​Gions\Delta\Delta G_{\text{ions}} is almost negligible as depicted in Figure 8c.
In summary, we have demonstrated that the DF+mDINMH implemented in libNLPBE provides an efficient and accurate framework for predicting electrostatic potential profiles that molecules in electrolyte solutions experience. Therefore, we expect that libNLPBE serves as a powerful library for correcting electrostatic effects in density functional calculations.

V Example Usage

We wrap up with providing simple hands-on examples to help users employ libNLPBE library for their own applications. Our libNLPBE library is primarily designed to be fully integrated into PySCF SCF calculations. Specifically, the library computes the solvation correction term that is incorporated into the Fock matrix during each SCF cycle. To facilitate this integration, we provide pbe_for_scf function, which couples the solvent (cm) and the SCF (mf) objects by overriding the latter’s kernel function as shown in Listing 1.

from pyscf import gto
from libnlpbe.pbe import NLPBE, pbe_for_scf
mol = gto.M(atom=’H 0 0 0; H 0 0 1’)
mf = mol.RKS()
cm = NLPBE(mol, cb=1.0, length=10, ngrids=49)
cm.eps = 78.3553
solmf = pbe_for_scf(mf, cm)
solmf.kernel() # -1.0847550711994
List of codes 1 Example of using libNLPBE for SCF calculations with PySCF.

For other quantum chemistry packages, libNLPBE supports single-shot NLPBE calculations to obtain the solvation free energy and the solvation correction term to the Hamiltonian as shown in Listing 2. This requires a molden file containing information about molecular structure, orbital coefficients, and orbital occupancies, which are subsequently used to construct the solute density matrix (dm in Listing 2) for calculating ϕelecsol​(𝐫)\phi^{\text{sol}}_{\text{elec}}(\mathbf{r}). Users can specify an auxiliary basis set when building NLPBE object; otherwise libNLPBE uses def2-universal-JKFIT auxiliary basis set by default. The kernel function of NLPBE object returns the solvation free energy and the Hamiltonian correction term (epbe and vmat in Listing 2), which users can feed into their own code. Considering that most quantum chemistry codes support exporting SCF information into a molden file, we expect libNLPBE to be applicable to a broad range quantum chemical platforms.

from pyscf.tools.molden import load
from pyscf.scf.hf import make_rdm1
f = load(’test.molden’)
mol, mo_coeff, mo_occ = f[0], f[2], f[3]
dm = make_rdm1(mo_coeff, mo_occ)
from libnlpbe.pbe import NLPBE
from pyscf.df.addons import make_auxmol
cm = NLPBE(mol, cb=1.0, length=10, ngrids=49)
cm.eps = 78.3553
cm.build(auxbasis=’def2-universal-jkfit’)
epbe, vmat = cm.kernel(dm=dm)
List of codes 2 Example of using libNLPBE for single-shot NLPBE calculations.

VI Conclusion

We developed libNLPBE, an open-source Python library for solving the non-linear Poisson-Boltzmann equation (NLPBE) for molecular systems. Our library features the density fitting (DF) approximation for calculating solute electrostatic potential, the mDINMH algorithm for efficiently solving the NLPBE, an algebraic multigrid (AMG) method to support various number of grid points, and GPU acceleration.
Using vitamin C and 4-nitroaniline as representative examples, we demonstrated that, compared to the analytic approach, the DF approach accelerates solute electrostatic potential calculations by ∼\sim82 times on CPU and ∼\sim302 times with GPU acceleration.
To account for the asymmetric Jacobian operator appearing in the Newton equation, we introduced a symmetric preconditioner in the mDINMH, which enables the application of efficient multigrid methods developed for symmetric operators. Unlike the original DINMH that requires symmetrization of ∇ϵ(𝐫)⋅∇\nabla\epsilon(\mathbf{r})\cdot\nabla through discretization, our symmetric preconditioner allows the mDINMH to use of the analytic gradient of ϵ⁡(𝐫)\epsilon(\mathbf{r}), which is expected to reduce discretization errors. We showed that, compared to the self-consistent method for solving the NLPBE, the mDINMH algorithm achieves ∼\sim10 and ∼\sim74-fold speedups on CPU and GPU, respectively.
We examined the performance of the mDINMH across various numbers of grid points (NxN_{x}) to highlight AMG as a black-box method for solving the Newton equation. We showed that mDINMH calculations converged within 20 iterations for all NxN_{x} considered in this study, confirming the applicability of the mDINMH to a broad range of grid counts.
Based on the performance of the DF approach and the mDINMH method, we propose a DF+mDINMH combination as an efficient computational scheme for solving the NLPBE. Its qualitative accuracy was examined by inspecting the distributions of the polarization charge density (ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r})) and the ion charge density (ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r})) around 4-nitroaniline. We showed that these are consistent with the calculated atomic charges, where the negatively charged nitro-oxygen atoms develop a positive ρpol​(𝐫)\rho^{\text{pol}}(\mathbf{r}) and ρions​(𝐫)\rho^{\text{ions}}(\mathbf{r}) whereas the positively charged amino-hydrogen atoms do the opposite. We also compared Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} of 4-nitroaniline and vitamin C computed by the DF+mDINMH method at zero electrolyte concentration and popular solvent models such as C-PCM, IEF-PCM, COSMO, and SMD. The calculated results demonstrate that, after adjusting the scaling factor for atom-specific lengths, the DF+mDINMH method produces reasonable Δ​Gessolv\Delta G_{\text{es}}^{\text{solv}} compared to that from other solvent models.
We also examined the quantitative accuracy of the DF+mDINMH by calculating the electrostatic contribution to the solvation free energy (Δ​Gessolv\Delta G^{\text{solv}}_{\text{es}}) of 4-nitroaniline and vitamin C. The calculated Δ​Gessolv\Delta G^{\text{solv}}_{\text{es}} under the DF approach differs by 0.03 and 0.00 kcal/mol for 4-nitrianiline and vitamine C, respectively, from those under the analytic approach. Furthermore, the mDINMH-calculated Δ​Gessolv\Delta G^{\text{solv}}_{\text{es}} does not show a difference from the SC method up to two decimal points, both of which confirm the accuracy of the DF+mDINMH method.
To further ensure its accuracy, we investigated the effect of electrolyte concentration on the solvation free energy using the DF+mDINMH approach. We found that the calculated free energy vs. electrolyte concentration curve is in great agreement with that produced by the reference method, confirming the accuracy of the DF+mDINMH method.
Our libNLPBE library can be fully integrated with PySCF SCF calculations. For other quantum chemistry code, libNLPBE offers single-shot calculations to obtain the solvation free energy and the solvation correction to the Hamiltonian, provided a molden file that can be prepared by most quantum chemistry program. Therefore, we expect libNLPBE to be applicable to a broad range of quantum chemistry platforms.

Acknowledgements.
J.-H.K. and W.Y. were supported by the American Chemical Society Petroleum Petroleum Research Fund (PRF# 67056-ND6). We thank John M. Herbert (The Ohio State University) and Christopher J. Stein (TU Munich) for sharing their computational data and providing technical support for Q-Chem calculations.

Data Availability Statement

The source code of libNLPBE is available at https://github.com/Yang-Laboratory/libNLPBE.

Appendix A Free Energy of Solvation

The non-linear Poisson-Boltzmann equation (Equation (1)) can be rewritten as the following expression

∇⋅(ϵ(𝐫)∇ϕtot(𝐫))+4π(ρsol(𝐫)+ρions[ϕtot])=0,\nabla\cdot\big(\epsilon(\mathbf{r})\nabla\phi^{\text{tot}}(\mathbf{r})\big)+4\pi\big(\rho^{\text{sol}}(\mathbf{r})+\rho^{\text{ions}}[\phi^{\text{tot}}]\big)=0, (33)

which is a form of the Euler-Lagrange equation.[44] Thus, one can define the associated Lagrangian as below.

L=4​π​ρsol​(𝐫)​ϕtot​(𝐫)−12​ϵ​(𝐫)​|∇ϕtot|2−4​π​Δ​Π​[ϕtot],L=4\pi\rho^{\text{sol}}(\mathbf{r})\phi^{\text{tot}}(\mathbf{r})-\cfrac{1}{2}\epsilon(\mathbf{r})\big|\nabla\phi^{\text{tot}}\big|^{2}-4\pi\Delta\Pi[\phi^{\text{tot}}], (34)

where

δ​Δ​Π​[ϕtot]δ​ϕtot=−ρions​[ϕtot]\cfrac{\delta\Delta\Pi[\phi^{\text{tot}}]}{\delta\phi^{\text{tot}}}=-\rho^{\text{ions}}[\phi^{\text{tot}}] (35)

The Euler-Lagrange equation is also satisfied for a functional L′=C1​L+C2L^{\prime}=C_{1}L+C_{2}, where C1C_{1} and C2C_{2} are a constant with respect to the variation of ϕopt\phi^{\text{opt}}. We choose C1=1/4​πC_{1}=1/4\pi for unit convention and C2=0C_{2}=0, such that

L′=ρsol​(𝐫)​ϕtot​(𝐫)−18​π​ϵ​(𝐫)​|∇ϕtot|2−Δ​Π​[ϕtot]\begin{split}L^{\prime}=&\rho^{\text{sol}}(\mathbf{r})\phi^{\text{tot}}(\mathbf{r})-\cfrac{1}{8\pi}\epsilon(\mathbf{r})|\nabla\phi^{\text{tot}}|^{2}-\Delta\Pi[\phi^{\text{tot}}]\end{split} (36)

Thus, the electrostatic free energy is defined as

Ges=∫[ρsol​(𝐫)​ϕtot​(𝐫)−18​π​ϵ​(𝐫)​|∇ϕtot|2−Δ​Π​[ϕtot]]​𝑑𝐫G_{\text{es}}=\int\bigg[\rho^{\text{sol}}(\mathbf{r})\phi^{\text{tot}}(\mathbf{r})-\cfrac{1}{8\pi}\epsilon(\mathbf{r})|\nabla\phi^{\text{tot}}|^{2}-\Delta\Pi[\phi^{\text{tot}}]\bigg]d\mathbf{r} (37)

Now, we consider the electrostatic contribution to the solvation free energy.

Gessolv=Ges​[ϵ,cb,ρsol]−Ges​[1,0,ρsol]−Ges​[ϵ,cb,0]=∫ρsol​(𝐫)​(ϕtot​(𝐫)−ϕsol​(𝐫))​𝐝𝐫−18​π∫(ϵ(𝐫)|∇ϕtot|2−|∇ϕsol|2)d𝐫−∫ΔΠ[ϕtot]d𝐫\begin{split}G^{\text{solv}}_{\text{es}}&=G^{\text{es}}[\epsilon,c^{b},\rho^{\text{sol}}]-G^{\text{es}}[1,0,\rho^{\text{sol}}]-G^{\text{es}}[\epsilon,c^{b},0]\\ &=\int\rho^{\text{sol}}(\mathbf{r})\big(\phi^{\text{tot}}(\mathbf{r})-\phi^{\text{sol}}(\mathbf{r})\big)d\mathbf{r}\\ &-\cfrac{1}{8\pi}\int\big(\epsilon(\mathbf{r})|\nabla\phi^{\text{tot}}|^{2}-|\nabla\phi^{\text{sol}}|^{2}\big)d\mathbf{r}-\int\Delta\Pi[\phi^{\text{tot}}]d\mathbf{r}\end{split} (38)

Alternatively, the solvation free energy can be converted into the following form.

Gessolv=12​∫ρsol​(𝐫)​(ϕtot​(𝐫)−ϕsol​(𝐫))​𝐝𝐫−12∫ρions(𝐫)ϕtot(𝐫)d𝐫−∫ΔΠ[ϕtot]d𝐫\begin{split}G^{\text{solv}}_{\text{es}}&=\cfrac{1}{2}\int\rho^{\text{sol}}(\mathbf{r})\big(\phi^{\text{tot}}(\mathbf{r})-\phi^{\text{sol}}(\mathbf{r})\big)d\mathbf{r}\\ &-\cfrac{1}{2}\int\rho^{\text{ions}}(\mathbf{r})\phi^{\text{tot}}(\mathbf{r})d\mathbf{r}-\int\Delta\Pi[\phi^{\text{tot}}]d\mathbf{r}\end{split} (39)

For the size-modified ion charge density, Δ​Π\Delta\Pi is given as below.

Δ​Π​[ϕtot]=2​kB​T​c1+2​ln⁡[1+cbc1+2​(λ⁡(𝐫)​cosh⁡(β​e​ϕtot)−1)]\Delta\Pi[\phi^{\text{tot}}]=2k_{\text{B}}Tc_{1+2}\ln\bigg[1+\cfrac{c^{b}}{c_{1+2}}\bigg(\lambda(\mathbf{r})\cosh(\beta e\phi^{\text{tot}})-1\bigg)\bigg] (40)

References

  • [1] O. Andreussi, I. Dabo, and N. Marzari (2012) Revised self-consistent continuum solvation in electronic-structure calculations. The Journal of Chemical Physics 136 (6), pp. 064102. External Links: ISSN 0021-9606, Link, Document Cited by: §II.1.
  • [2] F. Andrietti, A. Peres, and R. Pezzotta (1976) Exact solution of the unidimensional Poisson-Boltzmann equation for a 1:2 (2:1) electrolyte. Biophys. J. 16 (9), pp. 1121–1124. External Links: ISSN 0006-3495, Link, Document Cited by: §II.1.
  • [3] V. Barone and M. Cossi (1998) Quantum Calculation of Molecular Energies and Energy Gradients in Solution by a Conductor Solvent Model. J. Phys. Chem. A 102 (11), pp. 1995–2001. External Links: ISSN 1089-5639, Link, Document Cited by: §IV.
  • [4] C. I. Bayly, P. Cieplak, W. Cornell, and P. A. Kollman (1993) A well-behaved electrostatic potential based method using charge restraints for deriving atomic charges: the RESP model. The Journal of Physical Chemistry 97 (40), pp. 10269–10280. External Links: ISSN 0022-3654, Link, Document Cited by: §IV.
  • [5] A. D. Becke (1988) Density-functional exchange-energy approximation with correct asymptotic behavior. Phys. Rev. A 38 (6), pp. 3098–3100. External Links: Link, Document Cited by: §III.
  • [6] A. D. Becke (1993) Density‐functional thermochemistry. III. The role of exact exchange. The Journal of Chemical Physics 98 (7), pp. 5648–5652. External Links: ISSN 0021-9606, Link, Document Cited by: §III.
  • [7] A. Bondi (1964) Van der Waals Volumes and Radii. The Journal of Physical Chemistry 68 (3), pp. 441–451. External Links: ISSN 0022-3654, Link, Document Cited by: §II.1.
  • [8] O. Bröker and M. J. Grote (2002) Sparse approximate inverse smoothers for geometric and algebraic multigrid. Appl. Numer. Math. 41 (1), pp. 61–80. External Links: ISSN 0168-9274, Link, Document Cited by: §III.
  • [9] M. P. Coons and J. M. Herbert (2018) Quantum chemistry in arbitrary dielectric environments: Theory and implementation of nonequilibrium Poisson boundary conditions and application to compute vertical ionization energies at the air/water interface. The Journal of Chemical Physics 148 (22), pp. 222834. External Links: ISSN 0021-9606, Link, Document Cited by: §II.1, §II.1, §II.2, §II.3.1, §II.3, §III, §IV, §IV.
  • [10] M. P. Coons, Z. You, and J. M. Herbert (2016) The Hydrated Electron at the Surface of Neat Liquid Water Appears To Be Indistinguishable from the Bulk Species. J. Am. Chem. Soc. 138 (34), pp. 10879–10886. External Links: ISSN 0002-7863, Link, Document Cited by: §II.3, §III, §IV.
  • [11] C. M. Cortis and R. A. Friesner (1997) Numerical solution of the Poisson–Boltzmann equation using tetrahedral finite-element meshes. J. Comput. Chem. 18 (13), pp. 1591–1608. Note: _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/%28SICI%291096-987X%28199710%2918%3A13%3C1591%3A%3AAID-JCC3%3E3.0.CO%3B2-M External Links: ISSN 1096-987X, Link, Document Cited by: §II.2.
  • [12] M. Cossi, N. Rega, G. Scalmani, and V. Barone (2003) Energies, structures, and electronic properties of molecules in solution with the C-PCM solvation model. J. Comput. Chem. 24 (6), pp. 669–681. Note: _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/jcc.10189 External Links: ISSN 1096-987X, Link, Document Cited by: §I.
  • [13] R. S. Dembo, S. C. Eisenstat, and T. Steihaug (1982) Inexact Newton Methods. SIAM J. Numer. Anal. 19 (2), pp. 400–408. External Links: ISSN 0036-1429, Link Cited by: §II.4.1.
  • [14] D. Demidov (2019) AMGCL: An Efficient, Flexible, and Extensible Algebraic Multigrid Implementation. Lobachevskii Journal of Mathematics 40 (5), pp. 535–546. External Links: ISSN 1818-9962, Link, Document Cited by: §II.5, §III.
  • [15] D. Demidov, L. Mu, and B. Wang (2021) Accelerating linear solvers for Stokes problems with C++ metaprogramming. Journal of Computational Science 49, pp. 101285. External Links: ISSN 1877-7503, Link, Document Cited by: §II.5, §III.
  • [16] D. Demidov (2020) AMGCL —A C++ library for efficient solution of large sparse linear systems. Software Impacts 6, pp. 100037. External Links: ISSN 2665-9638, Link, Document Cited by: §II.5, §III.
  • [17] K. Eichkorn, O. Treutler, H. Öhm, M. Häser, and R. Ahlrichs (1995) Auxiliary basis sets to approximate Coulomb potentials. Chem. Phys. Lett. 240 (4), pp. 283–290. External Links: ISSN 0009-2614, Link, Document Cited by: §II.3.2, §II.3.2.
  • [18] G. Fisicaro, L. Genovese, O. Andreussi, N. Marzari, and S. Goedecker (2016) A generalized Poisson and Poisson-Boltzmann solver for electrostatic environments. The Journal of Chemical Physics 144 (1), pp. 014103. External Links: ISSN 0021-9606, Link, Document Cited by: §I, §II.1, §II.1, §II.1, §II.1, §III, §IV.
  • [19] W. Geng and R. Krasny (2013) A treecode-accelerated boundary integral Poisson–Boltzmann solver for electrostatics of solvated biomolecules. J. Comput. Phys. 247, pp. 62–78. External Links: ISSN 0021-9991, Link, Document Cited by: §II.2.
  • [20] S. Grimme, J. Antony, S. Ehrlich, and H. Krieg (2010) A consistent and accurate ab initio parametrization of density functional dispersion correction (DFT-D) for the 94 elements H-Pu. The Journal of Chemical Physics 132 (15), pp. 154104. External Links: ISSN 0021-9606, Link, Document Cited by: §III.
  • [21] J. M. Herbert (2021) Dielectric continuum methods for quantum chemistry. WIREs Comput. Mol. Sci. 11 (4), pp. e1519. Note: _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/wcms.1519 External Links: ISSN 1759-0884, Link, Document Cited by: §I, §II.1.
  • [22] P. Hohenberg and W. Kohn (1964) Inhomogeneous Electron Gas. Phys. Rev. 136 (3B), pp. B864–B871. External Links: Link, Document Cited by: §III.
  • [23] M. Holst, N. Baker, and F. Wang (2000) Adaptive multilevel finite element solution of the Poisson–Boltzmann equation I. Algorithms and examples. J. Comput. Chem. 21 (15), pp. 1319–1342. Note: _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/1096-987X%2820001130%2921%3A15%3C1319%3A%3AAID-JCC1%3E3.0.CO%3B2-8 External Links: ISSN 1096-987X, Link, Document Cited by: §II.2.
  • [24] M. J. Holst and F. Saied (1995) Numerical solution of the nonlinear Poisson–Boltzmann equation: Developing more robust and efficient methods. J. Comput. Chem. 16 (3), pp. 337–364. Note: _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/jcc.540160308 External Links: ISSN 1096-987X, Link, Document Cited by: §II.4.1, §II.4.1, §II.4.1, §II.4.1, §II.4.1, §II.4.2, §II.4.3, §II.4.4, §II.4, §IV, §IV.
  • [25] E. Jurrus, D. Engel, K. Star, K. Monson, J. Brandi, L. E. Felberg, D. H. Brookes, L. Wilson, J. Chen, K. Liles, M. Chun, P. Li, D. W. Gohara, T. Dolinsky, R. Konecny, D. R. Koes, J. E. Nielsen, T. Head-Gordon, W. Geng, R. Krasny, G. Wei, M. J. Holst, J. A. McCammon, and N. A. Baker Improvements to the <fc>APBS</fc> biomolecular solvation software suite. External Links: Link, Document Cited by: §I.
  • [26] J. Kim and W. Yang (2026) Fractional charge density functional theory elucidates electro-inductive and electric field effects at electrochemical interfaces. Proceedings of the National Academy of Sciences 123 (25), pp. e2602964123. External Links: Link, Document Cited by: §III.
  • [27] I. Klapper, R. Hagstrom, R. Fine, K. Sharp, and B. Honig (1986) Focusing of electric fields in the active site of Cu-Zn superoxide dismutase: Effects of ionic strength and amino-acid modification. Proteins: Struct., Funct., Bioinf. 1 (1), pp. 47–59. Note: _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/prot.340010109 External Links: ISSN 1097-0134, Link, Document Cited by: §I.
  • [28] W. Kohn and L. J. Sham (1965) Self-Consistent Equations Including Exchange and Correlation Effects. Phys. Rev. 140 (4A), pp. A1133–A1138. External Links: Link, Document Cited by: §III.
  • [29] C. Lee, W. Yang, and R. G. Parr (1988) Development of the Colle-Salvetti correlation-energy formula into a functional of the electron density. Phys. Rev. B 37 (2), pp. 785–789. External Links: Link, Document Cited by: §III.
  • [30] K. Letchworth-Weaver and T. A. Arias (2012) Joint density functional theory of the electrode-electrolyte interface: Application to fixed electrode potentials, interfacial capacitances, and potentials of zero charge. Phys. Rev. B 86 (7), pp. 075140. External Links: Link, Document Cited by: §I.
  • [31] L. Li, C. Li, S. Sarkar, J. Zhang, S. Witham, Z. Zhang, L. Wang, N. Smith, M. Petukh, and E. Alexov (2012) DelPhi: a comprehensive suite for DelPhi software and associated resources. BMC Biophysics 5 (1), pp. 9. External Links: ISSN 2046-1682, Link, Document Cited by: §I.
  • [32] R. Li, Q. Sun, X. Zhang, and G. K. Chan (2025) Introducing GPU Acceleration into the Python-Based Simulations of Chemistry Framework. J. Phys. Chem. A 129 (5), pp. 1459–1468. External Links: ISSN 1089-5639, Link, Document Cited by: §II.5, §III.
  • [33] Y. Li, Q. Hu, and C. Zhong (2004) Topological Modeling of the Setschenow Constant. Industrial & Engineering Chemistry Research 43 (15), pp. 4465–4468. External Links: ISSN 0888-5885, Link, Document Cited by: §IV.
  • [34] N. Mardirossian and M. Head-Gordon (2014) ωB97X-V: A 10-parameter, range-separated hybrid, generalized gradient approximation density functional with nonlocal correlation, designed by a survival-of-the-fittest strategy. Phys. Chem. Chem. Phys. 16 (21), pp. 9904–9924. External Links: ISSN 1463-9076, Link, Document Cited by: Figure 7, Figure 8.
  • [35] A. V. Marenich, C. J. Cramer, and D. G. Truhlar (2009) Universal Solvation Model Based on Solute Electron Density and on a Continuum Model of the Solvent Defined by the Bulk Dielectric Constant and Atomic Surface Tensions. The Journal of Physical Chemistry B 113 (18), pp. 6378–6396. External Links: ISSN 1520-6106, Link, Document Cited by: §I, §IV.
  • [36] A. Nicholls and B. Honig (1991) A rapid finite difference algorithm, utilizing successive over-relaxation to solve the Poisson–Boltzmann equation. J. Comput. Chem. 12 (4), pp. 435–445. Note: _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/jcc.540120405 External Links: ISSN 1096-987X, Link, Document Cited by: §I, §II.1, §II.2.
  • [37] R. G. Parr and W. Yang (1995) Density-functional theory of atoms and molecules. Oxford University Press. External Links: ISBN 978-0-19-756070-9, Link, Document Cited by: §III.
  • [38] C. C. Pye and T. Ziegler (1999) An implementation of the conductor-like screening model of solvation within the Amsterdam density functional package. Theor. Chem. Acc. 101 (6), pp. 396–408. External Links: ISSN 1432-2234, Link, Document Cited by: §I, §IV.
  • [39] A. A. Rashin and B. Honig (1985) Reevaluation of the Born model of ion hydration. The Journal of Physical Chemistry 89 (26), pp. 5588–5593. External Links: ISSN 0022-3654, Link, Document Cited by: §I.
  • [40] S. Ringe, H. Oberhofer, C. Hille, S. Matera, and K. Reuter (2016) Function-Space-Based Solution Scheme for the Size-Modified Poisson–Boltzmann Equation in Full-Potential DFT. J. Chem. Theory Comput. 12 (8), pp. 4052–4066. External Links: ISSN 1549-9618, Link, Document Cited by: §I, §II.1, §II.1.
  • [41] R. S. Rowland and R. Taylor (1996) Intermolecular Nonbonded Contact Distances in Organic Crystal Structures: Comparison with Distances Expected from van der Waals Radii. The Journal of Physical Chemistry 100 (18), pp. 7384–7391. External Links: ISSN 0022-3654, Link, Document Cited by: §II.1.
  • [42] S. Sarkar, J. G. Patrow, M. J. Voegtle, A. K. Pennathur, and J. M. Dawlaty (2019) Electrodes as Polarizing Functional Groups: Correlation between Hammett Parameters and Electrochemical Polarization. The Journal of Physical Chemistry C 123 (8), pp. 4926–4937. External Links: ISSN 1932-7447, Link, Document Cited by: §I.
  • [43] Y. Shao, Z. Gan, E. Epifanovsky, A. T.B. Gilbert, M. Wormit, J. Kussmann, A. W. Lange, A. Behn, J. Deng, X. Feng, D. Ghosh, M. Goldey, P. R. Horn, L. D. Jacobson, I. Kaliman, R. Z. Khaliullin, T. Kuś, A. Landau, J. Liu, E. I. Proynov, Y. M. Rhee, R. M. Richard, M. A. Rohrdanz, R. P. Steele, E. J. Sundstrom, H. L. Woodcock III, P. M. Zimmerman, D. Zuev, B. Albrecht, E. Alguire, B. Austin, G. J. O. Beran, Y. A. Bernard, E. Berquist, K. Brandhorst, K. B. Bravaya, S. T. Brown, D. Casanova, C. Chang, Y. Chen, S. H. Chien, K. D. Closser, D. L. Crittenden, M. Diedenhofen, R. A. DiStasio Jr., H. Do, A. D. Dutoi, R. G. Edgar, S. Fatehi, L. Fusti-Molnar, A. Ghysels, A. Golubeva-Zadorozhnaya, J. Gomes, M. W.D. Hanson-Heine, P. H.P. Harbach, A. W. Hauser, E. G. Hohenstein, Z. C. Holden, Thomas-C. Jagau, H. Ji, B. Kaduk, K. Khistyaev, J. Kim, J. Kim, R. A. King, P. Klunzinger, D. Kosenkov, T. Kowalczyk, C. M. Krauter, K. U. Lao, A. D. Laurent, K. V. Lawler, S. V. Levchenko, C. Y. Lin, F. Liu, E. Livshits, R. C. Lochan, A. Luenser, P. Manohar, S. F. Manzer, S. Mao, N. Mardirossian, A. V. Marenich, S. A. Maurer, N. J. Mayhall, E. Neuscamman, C. M. Oana, R. Olivares-Amaya, D. P. O’Neill, J. A. Parkhill, T. M. Perrine, R. Peverati, A. Prociuk, D. R. Rehn, E. Rosta, N. J. Russ, S. M. Sharada, S. Sharma, D. W. Small, A. Sodt, T. Stein, D. Stück, Y. Su, A. J.W. Thom, T. Tsuchimochi, V. Vanovschi, L. Vogt, O. Vydrov, T. Wang, M. A. Watson, J. Wenzel, A. White, C. F. Williams, J. Yang, S. Yeganeh, S. R. Yost, Z. You, I. Y. Zhang, X. Zhang, Y. Zhao, B. R. Brooks, G. K.L. Chan, D. M. Chipman, C. J. Cramer, W. A. Goddard III, M. S. Gordon, W. J. Hehre, A. Klamt, H. F. Schaefer III, M. W. Schmidt, C. D. Sherrill, D. G. Truhlar, A. Warshel, X. Xu, A. Aspuru-Guzik, R. Baer, A. T. Bell, N. A. Besley, J. Chai, A. Dreuw, B. D. Dunietz, T. R. Furlani, S. R. Gwaltney, C. Hsu, Y. Jung, J. Kong, D. S. Lambrecht, W. Liang, C. Ochsenfeld, V. A. Rassolov, L. V. Slipchenko, J. E. Subotnik, T. Van Voorhis, J. M. Herbert, A. I. Krylov, P. M.W. Gill, and M. Head-Gordon (2015) Advances in molecular quantum chemistry contained in the Q-Chem 4 program package. Mol. Phys. 113 (2), pp. 184–215. Note: _eprint: https://doi.org/10.1080/00268976.2014.952696 External Links: ISSN 0026-8976, Link, Document Cited by: §I, §III, §IV.
  • [44] K. A. Sharp and Barry. Honig (1990) Calculating total electrostatic energies with the nonlinear Poisson-Boltzmann equation. The Journal of Physical Chemistry 94 (19), pp. 7684–7692. External Links: ISSN 0022-3654, Link, Document Cited by: Appendix A, §I, §II.1, §II.1, §II.2.
  • [45] C. J. Stein, J. M. Herbert, and M. Head-Gordon (2019) The Poisson–Boltzmann model for implicit solvation of electrolyte solutions: Quantum chemical implementation and assessment via Sechenov coefficients. The Journal of Chemical Physics 151 (22), pp. 224111. External Links: ISSN 0021-9606, Link, Document Cited by: §I, §II.1, §II.1, §II.1, §II.1, §II.1, §II.2, §II.3.1, §III, §III, §IV, §IV, §IV, §IV, §IV, §IV.
  • [46] Q. Sun, X. Zhang, S. Banerjee, P. Bao, M. Barbry, N. S. Blunt, N. A. Bogdanov, G. H. Booth, J. Chen, Z. Cui, J. J. Eriksen, Y. Gao, S. Guo, J. Hermann, M. R. Hermes, K. Koh, P. Koval, S. Lehtola, Z. Li, J. Liu, N. Mardirossian, J. D. McClain, M. Motta, B. Mussard, H. Q. Pham, A. Pulkin, W. Purwanto, P. J. Robinson, E. Ronca, E. R. Sayfutyarova, M. Scheurer, H. F. Schurkus, J. E. T. Smith, C. Sun, S. Sun, S. Upadhyay, L. K. Wagner, X. Wang, A. White, J. D. Whitfield, M. J. Williamson, S. Wouters, J. Yang, J. M. Yu, T. Zhu, T. C. Berkelbach, S. Sharma, A. Yu. Sokolov, and G. K. Chan (2020) Recent developments in the PySCF program package. The Journal of Chemical Physics 153 (2), pp. 024109. External Links: ISSN 0021-9606, Link, Document Cited by: §III.
  • [47] D. J. Tannor, B. Marten, R. Murphy, R. A. Friesner, D. Sitkoff, A. Nicholls, B. Honig, M. Ringnalda, and W. A. I. Goddard (1994) Accurate First Principles Calculation of Molecular Charge Distributions and Solvation Energies from Ab Initio Quantum Mechanics and Continuum Dielectric Theory. J. Am. Chem. Soc. 116 (26), pp. 11875–11882. External Links: ISSN 0002-7863, Link, Document Cited by: §I.
  • [48] J. Tomasi, B. Mennucci, and E. Cancès (1999) The IEF version of the PCM solvation method: an overview of a new method addressed to study molecular solutes at the QM ab initio level. J. Mol. Struct. THEOCHEM 464 (1), pp. 211–226. External Links: ISSN 0166-1280, Link, Document Cited by: §IV.
  • [49] J. Tomasi, B. Mennucci, and R. Cammi (2005) Quantum Mechanical Continuum Solvation Models. Chem. Rev. 105 (8), pp. 2999–3094. External Links: ISSN 0009-2665, Link, Document Cited by: §I, §II.1.
  • [50] S. H. Vosko, L. Wilk, and M. Nusair (1980) Accurate spin-dependent electron liquid correlation energies for local spin density calculations: a critical analysis. Can. J. Phys. 58, pp. 1200–1211. External Links: Link, Document Cited by: §III.
  • [51] F. Weigend and R. Ahlrichs (2005) Balanced basis sets of split valence, triple zeta valence and quadruple zeta valence quality for H to Rn: Design and assessment of accuracy. Phys. Chem. Chem. Phys. 7 (18), pp. 3297–3305. External Links: ISSN 1463-9076, Link, Document Cited by: §III.
  • [52] F. Weigend, M. Häser, H. Patzelt, and R. Ahlrichs (1998) RI-MP2: optimized auxiliary basis sets and demonstration of efficiency. Chem. Phys. Lett. 294 (1), pp. 143–152. External Links: ISSN 0009-2614, Link, Document Cited by: §III.
  • [53] K. S. Westendorff, M. J. Hülsey, T. S. Wesley, Y. Román-Leshkov, and Y. Surendranath (2024) Electrically driven proton transfer promotes Brønsted acid catalysis by orders of magnitude. Science. External Links: Link, Document Cited by: §I.
  • [54] J. C. Womack, L. Anton, J. Dziedzic, P. J. Hasnip, M. I. J. Probert, and C. Skylaris (2018) DL_mg: A Parallel Multigrid Poisson and Poisson–Boltzmann Solver for Electronic Structure Calculations in Vacuum and Solution. J. Chem. Theory Comput. 14 (3), pp. 1412–1432. External Links: ISSN 1549-9618, Link, Document Cited by: §I, §II.4.2, §II.4.3, §IV.
  • [55] Y. Zhang and J. Zhao (2023) A density fitting scheme for the fast evaluation of molecular electrostatic potential. J. Comput. Chem. 44 (7), pp. 806–813. Note: _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/jcc.27042 External Links: ISSN 1096-987X, Link, Document Cited by: §II.3.2.