The quantity ϕ sol (r) is computed on a real-space Cartesian grid and eq. 2 is solved iteratively (because ϕ sol polarizes the solute's charge density), using a multigrid algorithm. Following previous work by others, implementation of Poisson boundary conditions for a smoothly varying (but otherwise arbitrary) permittivity function ε(r) is accomplished by reformulating eq. 2 as a vacuum-like Poisson equation, 21