WorksMathematics
A boundary integral method for computing electron repulsion integrals in heterogeneous dielectric environments
Abstract
We present a boundary integral method for evaluating electron repulsion integrals (ERIs) in dielectric environments of piecewise constant permittivity. This generalizes conventional bare-Coulomb ERIs by incorporating screening from structured dielectric surroundings, such as the substrates and/or encapsulating layers present in modern two-dimensional-material devices. We formulate the problem as a second-kind boundary integral equation for the induced surface charge on the dielectric interfaces, and discretize it with a Nyström method on adaptively refined panels. The incident potential generated by each smooth orbital source density is evaluated by a Fourier truncated-kernel method in or near to its source box, and by fast multipole method (FMM) accelerated quadrature farther away. The linear system is solved by a Krylov iteration also accelerated by the FMM. We focus on cuboidal device geometries, and retain efficiency at high aspect ratios via close-to-touching panel quadratures. We further develop a distributed pipeline that computes the full ERI tensor, comprising thousands of orbital pairs, embedded in a single dielectric geometry. We demonstrate the method on an effective three-layer graphene slab over a Si/SiO heterojunction, focusing on the central graphene layer represented by -like orbitals, retaining the non-negligible entries of the -sized ERI tensor. The model is resolved on million surface unknowns, achieving a relative error of , at a cost of node-hours.
Introduction
The four-index electron repulsion integral (ERI) tensor is a fundamental computational primitive of electronic structure theory [1, 2], describing electron-electron interactions between single-particle orbitals, i.e., the wavefunctions of individual electrons, which are spatially localized in our setting. Given a set of real-valued orbitals , the rank-four ERI tensor has entries
where is a two-body interaction kernel, is a set of pair densities, each defined as
and are the potentials generated by each pair density through the kernel , thus defined as
The ERI tensor appears in many-body electronic structure methods from Hartree–Fock [3] and hybrid density functional theory [4] to correlated wavefunction [5], quantum-embedding [6], and lattice model [7] approaches. When the orbitals are localized, the number of non-negligible pair densities is rather than , and the ERI tensor is correspondingly sparse, with non-negligible entries. It can be compressed further by low-rank factorizations such as Cholesky decomposition [8], density fitting [9, 10], tensor hypercontraction [11, 12, 13, 14, 15], or the use of structured/adaptive basis sets [16, 17, 18, 19, 20].
In standard settings, is the Coulomb kernel, corresponding to electrons interacting in vacuum or a homogeneous medium, and the evaluation of the resulting integrals is routine and highly optimized. For Gaussian basis sets, for example, they admit analytic recurrences [21, 2]. In this work, we consider the case in which is the Green’s function for the Poisson equation in a spatially varying dielectric environment, rather than the bare Coulomb kernel. Such a kernel is not usually available in closed form, and can be applied only by solving an electrostatic interface boundary-value problem (BVP).
Spatially varying dielectric environments arise in many experimental platforms of contemporary interest. For example, atomically thin crystals such as graphene [22] and transition metal dichalcogenide monolayers [23, 24] are regularly exposed to oxide substrates, encapsulated in hexagonal boron nitride [25], and gated by nearby conducting layers. Because a two-dimensional (2D) material screens the in-plane Coulomb interaction only weakly on its own [26, 27, 28], the effective interaction between its electrons is determined to a large degree by the screening properties of its polarizable dielectric surroundings. This environmental screening can change quasiparticle band gaps and exciton binding energies by hundreds of meV [29, 30], and can be patterned laterally to define junctions within a single homogeneous monolayer, an approach known as Coulomb engineering [31, 30]. In moiré superlattices such as magic-angle twisted bilayer graphene [32], tuning the screening environment alone can even suppress correlated insulating phases in favor of superconducting ones [33, 34].
Capturing such an environment fully from first principles is infeasible, since the surrounding device is far too large to treat quantum-mechanically alongside the active material. Practical descriptions therefore retain only a small set of localized orbitals within the “active” part of the system, namely the part treated quantum-mechanically, such as Wannier functions of its low-energy bands, giving an extended Hubbard-type model whose interaction coefficients are precisely the ERIs [35]. Downfolding schemes such as the constrained random phase approximation [36] and quantum embedding theories for correlated defect states [37, 38] account for the screening from the retained electronic degrees of freedom, while the surrounding device structure must instead be described approximately at the level of continuum electrostatics [39, 40].
We model the dielectric environment as a collection of (possibly-adjacent) dielectric cuboids , where has constant relative permittivity , embedded in a vacuum background with . Figure 1 shows an example with materials. This setup covers many device geometries of interest, and requires addressing aspect ratios and edge/corner singularities, while allowing certain other simplifications in the boundary integral equation (BIE) implementation. While the BIE method also applies to more general geometries with curved interfaces, for which various accurate quadratures could be used [41 §9.3] [42, 43, 44], the focus of the present paper is on several other challenges that arise in the ERI application. We assume that all retained pair densities are supported inside a single “active” region (for example, in Figure 1). In the intended application, the basis functions are localized orbitals of this active material, obtained from an outer electronic structure calculation such as a Wannier representation of the low-energy bands derived from density functional theory [45, 46, 47]. Thus each pair density is smooth and compactly supported inside the region. Dropping the indices, a given pair density function induces the potential function which solves the Poisson BVP

Figure 1. A typical model setup: a collection of cuboid slabs , , with different constant dielectric permittivities, embedded in a vacuum background . The red dots mark the lattice sites of the active material, on which the localized orbitals are centered; each orbital pair density is therefore supported in a single region (here ).
where is the interface between two adjacent dielectric regions and , and denotes its normal vector (oriented to point from into when ). The first two equations are the (nondimensionalized) Poisson equation. The third and fourth equations are continuity and flux-matching conditions. The last line imposes zero potential at infinity, ensuring uniqueness. Once has been obtained, the corresponding ERI entries can be evaluated by the inner product (3) with a “target” pair density.
Existing continuum treatments of dielectric screening often exploit analytically solvable models, such as effective dielectric constants, image-charge constructions for a single planar interface, or Rytova–Keldysh kernels for an infinite uniform slab [27, 39]. These descriptions are effective for idealized planar or otherwise separable geometries, but the finite, multi-region, laterally-structured configurations considered here demand a numerical solution of (6).
One standard approach is to discretize the Poisson equation throughout the volume, using, for example, interface-fitted finite differences or finite elements [48, 49], multigrid continuum-solvation solvers [50], or particle–mesh techniques [51, 52, 53]. For the present problem, however, such a volumetric solve faces three difficulties:
The localized orbital densities vary on a much finer length scale than the surrounding dielectric structure of the device: this ratio is often . Any volume mesh must therefore resolve this range in each of three dimensions.
The dielectric geometry contains edges and corners at which the electric field is singular. Resolving these local features would require additional 3D refinement.
The problem is posed in free space with a decay condition at infinity; volumetric discretization thus requires artificial truncation to a sufficiently large domain, or specialized boundary conditions or elements for its accurate handling.
These limitations motivate a BIE approach. BIE solvers are widely used in computational electrostatics for piecewise-homogeneous media [54, 55], with applications including Poisson–Boltzmann models of solvated biomolecules [56, 57], polarizable continuum models in quantum chemistry [58, 59], and dielectric inclusions with edges and corners [60]. Because the permittivity is piecewise constant, the BVP (6) can be reformulated via Green’s theorem as a BIE for an induced surface charge density defined only on interfaces. The reduction in dimensionality brings a large reduction in the number of unknowns—especially those induced by multi-scale refinement—and in the cost of meshing, compared to finite elements. The free-space condition at infinity is already built into the integral representation. Furthermore, the BIE may be arranged to be Fredholm equation of the second kind, so that the condition number of the resulting linear system is typically small and fixed as the discretization is refined. Thus iterative solution is effective and, although the system matrix is dense, it may be applied at each iteration in linear cost by the fast multipole method (FMM) [61].
Although a BIE approach removes many of the difficulties of volumetric discretization, some challenges remain, and motivate the techniques developed in this work. First, the induced surface charge is singular at dielectric edges and corners, while a localized source close to an interface produces rapidly-varying boundary data. We handle both issues with adaptive panel refinement. Second, evaluating layer potentials between nearby panels, such as parallel facing panels in high-aspect geometries, requires corrected near-singular quadratures. Third, each source pair density (supplied on a quadrature grid of millions of points) generates a free-space incident potential that must be evaluated accurately both near and far from its source box. For this, we combine an FFT-based truncated-kernel method (TKM) [62] for near targets with FMM-accelerated quadrature for far targets. Finally, computing the ERI tensor requires many thousands of interface solves and potential evaluations on the fixed geometry. We therefore batch the solves and reuse geometry-, source-, and target-dependent work throughout a distributed computation pipeline.
While most of these ingredients are established, a major methodological contribution is their integration into a scalable workflow for the automated, efficient evaluation of many dielectric-screened ERIs in a given geometrically complex environment, to a user-prescribed accuracy. In particular, the workflow combines adaptive interface discretization tailored to localized pair-density sources and edge singularities, FMM-compatible corrections for close-to-touching panels, hybrid near/far incident-field evaluation, reuse of fixed-geometry data across many right-hand sides, and batched distributed evaluation of the retained ERI tensor.
An outline of the paper is as follows. In § 2, we present the BIE formulation of the Poisson BVP (6), including the locally corrected Nyström discretization, the adaptive panel refinement strategy, and the near-panel quadrature correction of the discrete operator. § 3 presents the hybrid TKM and FMM quadrature methods for evaluating the incident potential and its normal gradient. § 4 explains how these tools are used in a scalable fashion: batched interface solves over a fixed geometry, repeated potential evaluation on many target densities, and distributed computation of the sparse four-index ERI tensor. § 5 presents numerical results: convergence and dielectric-contrast studies on a three-material benchmark with edges, corners, and a buried material junction, followed by computation of the full retained ERI tensor for graphene orbital-pair densities on a heterojunction substrate.
Boundary integral formulation and discretization
In this section, we reformulate the BVP (6) as a second-kind BIE posed on the dielectric interfaces, and describe its discretization. § 2.1 derives the integral equation. § 2.2 overviews the locally corrected Nyström discretization and the resulting linear system, assuming a given panel mesh. § 2.3 describes the adaptive construction of this panel mesh, which is guided by the orbital structure as well as the edge and corner singularities of the interface density. § 2.4 details the local quadrature corrections for nearby panel pairs.
Second-kind boundary integral formulation
We begin by splitting the physical potential in (4) into two parts (using language common in wave scattering theory):
The first term is called the incident potential, and is generated by the density in a homogeneous space with permittivity ,
so that it satisfies
Note that the first equation holds on all of , since vanishes outside . Moreover, since is smooth and compactly supported, is smooth throughout . Let be the set of all interfaces. (Note that interfaces between regions with equal permittivity are not dielectric interfaces and may be removed from .)
Subtracting the conditions (7) satisfied by from the BVP (4) for the total potential , and using the splitting (5), we see that the scattered potential solves a Laplace BVP with inhomogeneous transmission data:
Here and denote the one-sided limits from and , respectively, consistent with the normal orientation on .
We introduce a single layer potential representation of the scattered potential, a standard approach for solving the Laplace transmission problem with a continuous potential:
Here is an unknown single layer density defined on , and is surface area measure. Any such representation is harmonic off , continuous across , and decays at infinity, so it automatically satisfies the first, second, and fourth conditions of (8). For the flux-matching condition, the third line of (8), we note that the single layer potential satisfies the standard jump relation
where is the on-surface adjoint double layer operator, defined via the improper integral
For mathematical background in the Sobolev setting , sufficient for the integrable singularities arising with edges/corners of Lipschitz surfaces, we refer the reader to, e.g., [63 Ch. 3]. Following [55], substituting this jump relation into the flux-matching condition reduces it to a second-kind BIE,
where is an inverse contrast function defined on by
obeying for bounded real permittivities. Solving (14) yields the single layer density , from which is generated by (11), and finally the desired total potential via (7).
Locally corrected Nyström discretization
We discretize the integral equation (14) using a panelized Nyström method. We assume that has been partitioned into a disjoint collection of flat rectangular panels, each living on one of the interfaces . The adaptive construction of this panelization will be described in Section 2.3. Each panel uses a tensor product Gauss–Legendre quadrature rule, with nodes mapped onto the panel and weights scaled by its area. Let
denote the mapped quadrature nodes, surface weights, and unit normals at each node on . We denote the union of all such nodes, weights, and normals as , where . We abbreviate
for the nodal values of the single-layer density and right-hand side data on panel , and collect them into vectors . Stacking these vectors panel-by-panel gives
The Nyström discretization of the integral equation (14) takes the form of a block linear system
where is composed of square blocks , each indexed by a “target” panel (block row) and a “source” panel (block column). We make the decomposition
where the three terms are, respectively, the diagonal contrast term, the standard panelwise Gauss–Legendre discretization of the adjoint double layer operator, and the sparse local quadrature correction. These terms are defined blockwise as follows:
is block diagonal, and discretizes the first (scaled identity) term of (14). The th diagonal block is , with the contrast of the interface containing .
discretizes the second term of (14) using standard Gauss–Legendre quadrature:
Because all interfaces are flat in our geometry, whenever the source and target panels are coplanar; this includes panels on the same interface, and in particular diagonal blocks .
is a block-sparse local correction: its block is nonzero only when the panels and are near each other, or touching at an edge or corner, in which case it corrects the standard block using a target-specific quadrature
where contains the accurate local quadrature weights, whose construction is given in § 2.4.
The standard rule (21) is high-order accurate (with respect to panel refinement) whenever the integrand is smooth on the source panel, which holds when and are well-separated relative to the size of . This is true for all but a small fraction of panel pairs. However, for close and touching pairs, which occur at edges, and for the large faces of thin slabs (as in Figure 4), the fixed rule becomes inaccurate, and a new scheme is needed to preserve accuracy. This is the reason for introducing the correction term . This correction, and the classification of close and touching pairs, will be described in § 2.4.

Figure 4. The nearness criterion for one fixed source panel (orange). Target panels satisfying (40) are shown in blue. The cuboid has dimensions , the Gauss–Legendre order is , and , giving . The zoomed inset shows the dyadic edge refinement down to panel size .
With the system matrix defined, we solve the square linear system (19) iteratively with GMRES [64], using as a diagonal right preconditioner. The resulting preconditioned system is
so the matrix-vector multiplication at each iteration is with the matrix
is block-diagonal and can therefore be applied with cost. is dense but involves source (charge) weights that are independent of the target point, thus can be applied to a vector at cost using a single FMM call, with the target-normal derivative of the potential as the output. The correction term is block sparse and can therefore be applied by a direct sparse matrix–vector product, with cost proportional to the number of close and touching pairs. The latter cost is usually also linear in (since each panel has near neighbors), and much cheaper than an FMM call.
If were smooth, would be compact, so the eigenvalues of would cluster only at , and the GMRES convergence rate would be expected to be fixed under mesh refinement. Corners and edges add a non-compact contribution to . However, its norm is known to be less than one [65 §6.5], so we still only expect at most weak growth in iteration count. We verify this numerically in § 5.1.
Adaptive panel refinement
In this section, we describe the adaptive panelization of the set of interfaces , needed to discretize the integral equation (14). We fix the quadrature order and construct the panelization using an -adaptive refinement strategy, recursively subdividing each selected panel into four child panels. Refinement is driven by two independent considerations. First, the right-hand side of Eq. (14) can vary rapidly when the source density is close to the interface, and the layer density inherits this rapid variation. Second, develops integrable singularities near edges and corners of the dielectric interfaces. Our corresponding refinement criteria will be data-driven and geometry-driven, respectively.
Right-hand-side-driven refinement
The first component of the refinement criterion is based on the local interpolation error of . On each panel , let be the tensor-product polynomial interpolant of degree at most in each local coordinate, such that
We refine each panel until
given a prescribed local refinement threshold . We estimate the norm in Eq. (26) using an oversampled tensor-product Gauss–Legendre rule.
This adaptive refinement turns out to be crucial in our setting, as we now illustrate. We study the absolute global interpolation -error of the right-hand side,
for the test geometry of Figure 2 with data from a narrow Gaussian source (a simple pair density model) a typical distance above one face. The left picture shows that the refinement concentrates near the source, as expected. The right plot confirms that although both uniform and adaptive refinement exhibit the expected high-order convergence, the adaptive mesh needs about 20 times smaller than for the uniform mesh to reach the same error. This holds essentially independently of error level and .

Figure 2. RHS-driven adaptive refinement for a localized source density near a dielectric interface. The dielectric is a unit cube, and the source is the normalized Gaussian , with width and center , a height above one face. Panels have interpolation nodes. (a) An example panelization, colored by refinement level. (b) Global interpolation error (27) versus the number of unknowns for adaptive refinement (by varying ), compared to uniform dyadic refinement (by varying a global refinement level).
Edge-driven refinement
For a rectangular panel with side lengths and , we use
as a measure of its size. Our geometric refinement strategy is simply to recursively subdivide into four equal panels any panel adjacent to an edge, until every such panel has , where is a global convergence parameter. This results in a dyadic grading with respect to distance from the edge (see Figure 4 inset), giving panels in total.
To predict the resulting solution error convergence rate with respect to , we note that a dielectric edge generically induces a weak, integrable power-law singularity in the solution density , matching the electric field singularity. For simplicity, we consider the case of a single right-angle dielectric edge (noting that the case of multi-junctions is similar [66 (10)] [67 §5.3]). The following is derived in Appendix A by combining classical wedge analysis with the jump relation.
Proposition 2.1 (Right-angle dielectric edge singularity). Let be the distance of from a straight right-angle edge (of angle either or ) of the interface between materials with dielectric contrast defined in (13). Then the single-layer density obeys
where the singular power is
We now use this for a heuristic prediction of the far-field solution error induced by a finite . It is known that the discretized Nyström error is of the same order as the quadrature error applied to the true solution [65 p. 227]. Although panel-panel local corrections are used, the panels touching an edge cannot accurately resolve the edge singularity. Thus we expect the quadrature error to be dominated by the contribution from the unresolved innermost strip within distance from the edge. By the above Proposition, the -norm of this contribution is bounded by
for some unknown constant , giving our convergence rate prediction for the edge-related error. A rigorous analysis of this would be technical and is beyond the scope of this paper, but the power law (31) is useful in practice.
To verify this, we place a unit point charge inside a dielectric cube of relative permittivity , surrounded by vacuum, so that corresponding singularity exponents are . We fix the quadrature order and vary . By Gauss’s law, the integral of surface charge equals , so we choose
as an error indicator. Figure 3(a) shows that the density blows up with the predicted power-law over the resolved distance range, where is distance to the edge. The singularity is stronger for larger dielectric contrast. Figure 3(b) shows that the predicted error convergence order is remarkably accurate in practice. We have not attempted to analyze the corner singularities, but expect their error contribution to be of lower order than the edges, and the above results suggest this.

Figure 3. Edge singularity and refinement convergence test for a dielectric cube. (a) Surface density magnitude along one cube face versus distance to a right-angle edge; thin black lines show the power (31) and the vertical line marks . (b) Error in the total induced surface charge versus ; thin black lines show the predicted powers.
Locally corrected quadrature for near-panel pairs
The adaptive mesh of § 2.3 is designed to resolve the layer density on the nodes of each panel, but the plain quadrature rule (21) is inaccurate for close source and target panels. We correct the affected blocks as follows (note that this does not change the number of unknowns nor their node locations). For an ordered pair with source panel and target panel , the contribution of at a target collocation node is
To express this contribution directly in terms of the unknown nodal values , we interpolate
where are the product Lagrange polynomial basis functions [68 Ch. 5] for the panel nodes. Substituting this into the panel integral defines replacement matrix elements
These integrals must now be approximated, and touching and non-touching near ordered pairs require different constructions.
For a touching pair, sources on and targets on can approach each other closely. We therefore compute each integral in (34) by adaptive 2D quadrature over (a quad-panel version of the triangle-panel neighbor correction strategy in [44]). The source panel is recursively subdivided, and the same tensor-product Gauss–Legendre rules are applied on its sub-panels until the estimated local quadrature error falls below a preset parameter . We vectorize over the index for speed.
This adaptive scheme is accurate for any near pair, but expensive: each target point in each block requires its own recursive subdivision of the source panel. Thus, for near but non-touching pairs we apply a cheaper upsampling strategy exploiting the fact that the kernel is now analytic on . Let denote a Gauss–Legendre upsampled grid on the same panel, where , and let be the interpolation matrix from the original grid to this new grid. Using quadrature on the upsampled grid gives
where has entries as in (21) but instead using the upsampled nodes and weights. It remains to identify the non-touching ordered pairs that require correction, then to select for each. For this, we use convergence theory involving the complex plane singularities of the integrand (following [69] and other recent work), building on analytic 1D Gauss–Legendre error estimates. For a fixed target point and a parametrization of , with , define the squared-distance function . For fixed , the nearest complex roots in form a conjugate pair; denote the conjugate root in the upper half-plane by . Define analogously by fixing and solving in . For a complex singularity , its Bernstein parameter is [69 Eq. 64]
This gives the largest Bernstein ellipse with foci at within which the 1D integrand remains analytic. The associated -point Gauss–Legendre error has the exponential rate [68 Thm. 19.3]
For the tensor-product rule, the smaller radius in the two reference directions should control the asymptotic rate. This motivates a heuristic “2D Bernstein” convergence rate (noting that more elaborate variants exist [69]),
As the target approaches , then , making the convergence arbitrarily slow. Conversely, a larger corresponds to a larger analyticity neighborhood and faster Gauss–Legendre convergence. Taking the worse-case Bernstein parameter over the target points in panel leads to
with expected quadrature error for a rule. Equating this error with , ignoring the prefactor, motivates our classifying a non-touching ordered pair as near when
Note that since need not equal , nearness is not a symmetric relation. For each near ordered pair we then choose the upsampled order by inverting the asymptotic rate formula:
With chosen, is filled via (33), then is filled via (20). For an efficient implementation, a -d tree on panel centroids is used to generate spatially-nearby candidate pairs. For each ordered panel pair and each target node , we approximate the minimization in Eq. (38) over the Gauss–Legendre nodes in each direction on . We then apply Eq. (39) and the criterion in Eq. (40). Figure 4 highlights the resulting set of target panels that require near corrections for one large source panel in a thin cuboid geometry.
We now verify the above error estimates and the resulting near quadrature correction. Figure 5(a) provides evidence that the above 2D Bernstein radius gives a reasonable prediction of the error using the standard (not upsampled) rule. Their agreement over the plotted range shows that the Bernstein radius captures the observed spatial error landscape. Figure 5(b) validates the non-touching-panel upsampling strategy, for parallel panels separated by a range of gaps :

Figure 5. Test of the 2D Bernstein error prediction and non-touching quadrature correction in § 2.4. The source panel is with density and . (a) Colors show pointwise error of the standard Gauss–Legendre rule for the single-layer kernel on the plane slicing through ; black contours show, at the same levels, the prediction using (38). (b) Relative errors (43) in the adjoint double-layer block, for the standard rule (circles) and the upsampled rule (41) (triangles), as a function of panel separation (see text). Errors were computed using an adaptive cubature reference with 14-digit relative tolerance [70].
We plot the relative error
Here is either the standard block or the upsampled replacement, choosing . The uncorrected rule loses accuracy as shrinks, whereas the upsampled rule maintains accuracy throughout the tested non-touching regime. Over the same range, increases from 16 at to 139 at .
Evaluation of incident potential and its normal gradient
This section describes the evaluation of the incident potential Eq. (8) and its gradient, required respectively for the evaluation of the physical potential (5) and the right-hand side of the BIE (12). This is done most efficiently by separation into targets near to the pair density support, handled by the truncated-kernel method (TKM), and the remaining far targets, handled by particle-FMM accelerated quadrature.
Far-field quadrature evaluation and near/far splitting
We first describe a trapezoidal quadrature approximation for the incident potential Eq. (8) and its gradient at far-field targets. Let be a smooth source density whose support is contained in a finite cuboidal box . Choosing the center of as the origin, we write
We sample on a uniform Cartesian grid in with spacing in all three directions. The numbers of grid points in each direction are , , and , respectively. The grid nodes are
We enumerate these nodes as , where . Let denote the trigonometric interpolant [71 §9] constructed from the grid samples of with spacing (since decays smoothly to zero, it may be treated as periodic). Then we choose the grid spacing small enough so that
where is a prescribed tolerance. This is equivalent to insuring that the tails of the Fourier transform of are small beyond the Nyquist frequency magnitude .
For far-field targets, we simply apply the tensor-product trapezoidal rule, discretizing the volume integral (6) on . All weights are , giving
which together are evaluated efficiently at all targets with a single FMM call.
For targets far from the support of , the integrands are smooth, so this trapezoidal rule converges superalgebraically [72 §10]. However, this convergence is not uniform as the target approaches the support of , because the integrands are nearly singular and become underresolved on the fixed grid. To distinguish between far and near targets, we define a near-field region by padding by in each of the six directions. Motivated by the analogous trapezoidal-rule error analysis for layer potentials [73], which proves that the error decays to machine precision as the target moves several grid spacings from the source, we take as a practical choice. For the set of targets inside , we instead apply the TKM to evaluate the volume integral.
Truncated kernel method for near-field volume integral evaluation
We introduce a Fourier-based truncated kernel method, inspired by Vico et al. [62], to evaluate the volume integral in (8) for targets inside . By the convolution theorem, this volume integral has the Fourier representation
where is the Fourier transform of the Coulomb kernel, and the source Fourier transform is
This representation avoids direct integration against the singular real-space kernel at . Since is smooth and compactly supported, decays rapidly so that the Fourier integral can be truncated to a bounded frequency domain, which is a cube of side length centered at the origin. A uniform-grid trapezoidal discretization then permits FFT-based evaluation. Two issues need to be handled: (48) has a singularity at , and the aliasing error induced by Fourier-space sampling must be controlled.
To remove the Fourier-space singularity without changing the potential in , we truncate the Coulomb kernel in real space beyond the largest distance from a source to a target ,
The radially truncated Coulomb kernel is then defined by
We then define
Since for every and , , for all . The Fourier transform of is given by [62]
which is now smooth. We discretize the Fourier integral (52) using a truncated trapezoidal rule on a Cartesian grid with spacing in each direction (again here )
where for . We explain the optimal selection of the Fourier grid spacings in the next section. We enumerate this Fourier grid as , where . At each Fourier grid point, we approximate the Fourier transform of the source density using its existing grid (43):
which can be evaluated via a single padded 3D FFT. Using this discretized grid, the approximation to (52) gives the incident potential
Analytic differentiation of (56) gives the corresponding gradient approximation:
We use a 3D type-2 non-uniform fast Fourier transform (NUFFT) [74, 75, 76] to evaluate Eqs. (56) and (57) at a large, arbitrary set of target points simultaneously, at a cost that is quasi-linear in and number of target points. This is typically only one order of magnitude more expensive than an FFT. The inputs to the transform for the potential are the kernel-weighted Fourier coefficients , where
For the gradient components, the inputs are multiplied by the components of . The stack of four type-2 NUFFTs can be done more efficiently in a single call.
Remark 3.1. In practice, orbitals are often provided on regular but skew grids associated with the crystal lattice, so using a 3D FFT for (55) would need resampling to a compatible Cartesian grid. Since there are typically such points, this is cumbersome. Instead we work directly with the input set of skew grid points, and their quadrature weight, evaluating (55) using a single 3D type-1 NUFFT call. The speed difference vs an FFT is outweighed by the flexibility that comes from using NUFFTs for both input and target point sets.
Fourier-grid selection and error control
If are chosen to obey certain bounds, then the aliasing error introduced by the discreteness of the Fourier quadrature in (56) and (57) vanishes entirely, leaving only the high-frequency truncation error (due to the finite ).
Proposition 3.2 (Exactness of the infinite Fourier trapezoidal rule for the truncated kernel). Let have side lengths , suppose with , let , and let be given by Eq. (50). If
then the infinite-mode version of Eqs. (56) and (57) satisfies
and
respectively, where denotes in Eq. (54).
The proof relies on the finite spatial support of , adapting arguments of [62] to the padded cuboidal case. The 3D version of the Poisson summation formula [77 §7, Cor. 2.6] gives
where , and the second term on the right-hand side is the error. Since is supported in and is supported in the ball of radius , the support of lives within . Under condition (59), for all targets and , each lies outside ’s support. Thus the second term on the right-hand side of Eq. (62) vanishes, and so does the error. Recall that for all , so that Eq. (60) follows. Similar considerations apply to the gradient of , leading to Eq. (61). Figure 6 illustrates the geometric separation that excludes contributions from periodic source images.
In practice, for efficiency we take equality in Eq. (59), giving the largest permitted by Proposition 3.2, hence the coarsest Fourier lattice satisfying the sufficient condition for eliminating aliasing error on .
Efficient, parallel evaluation of the ERI tensor
In this section, we describe the overall procedure for evaluating the ERI tensor in Eq. (1) for a set of orbitals, which combines the BIE solver in Section 2 and the TKM/FMM solvers in Section 3.

Figure 6. Two-dimensional illustration of the condition (57). The source box (black), padded target box (dashed), and nearest periodic source image (purple) are shown at period , in which case the radius- kernel support (gray disk) centered at one of the closest image source point just touches the target box.
Batched BIE solves
Evaluating the ERI tensor requires computing the potential generated by the orbital pair densities defined in Eq. (4). For localized orbitals, many pair densities are small and can be neglected. For a given threshold , we define the set of active orbital pairs as
where is the norm of the pair density . Each defines an active density and a corresponding BIE to solve. We enumerate the active densities as , where .
All active densities lead to BIEs with the same continuous operator but different right-hand sides and interface discretizations. Instead of solving each of them separately, we group spatially nearby densities into batches so that their right-hand sides can be efficiently resolved on a common mesh. The discrete operator and FMM tree are shared across all source densities in a batch. In practice, is divided into batches with size , where is a prescribed maximum batch size.
The geometry-driven criterion of § 2.3.2 is source-independent, but the right-hand-side criterion of § 2.3.1 is not, since each right-hand-side requires refinement near its own source. We therefore build the common mesh for a batch using the following joint refinement criterion:
Here we recall from (25) that is the interpolant of . This plays the role of (26), i.e., we subdivide each panel until the criterion holds for all panels . Then the linear systems can be stacked as columns to give
with sampled at the interface nodes. The preconditioner (23) can then be applied.
Eq. (65) is solved using block GMRES [78, 79, 80], which constructs a common block Krylov subspace for all systems, and is stopped at the selected residual tolerance , as summarized in Algorithm 1. The FMM evaluates all strength vectors on the same source and target nodes, sharing the tree, interaction lists, and M2L matrix-vector multiplies, etc., across the batch. The vectorized FMM has given several-fold acceleration in BEM applications [81]. The user-selected controls the tradeoff between the FMM cost per right-hand side and the orthogonalization work and memory required by a wider block Krylov basis. We assess this tradeoff numerically in Section 5.2.
Algorithm 1 Interface Poisson BIE solve for one source batch.
Input: pair-density batch on uniform volume grids; interface ; permittivities ; order ; thresholds and ; Fourier/NUFFT/FMM tolerance; smallest panel size
Output: layer densities and the coefficient arrays of (58)
procedure SolveBatch
for all do
form of (58) from the input samples of , using a type-1 NUFFT ▷ Sec. 3
end for
partition into flat panels carrying Gauss–Legendre rules; refine until the batch criterion (64) holds, then recursively subdivide near edges and corners until those panels have size ▷ Sec. 2.3
construct of (20) ▷ Secs. 2.2, 2.4
form RHS and solve by block GMRES, applying via FMM plus the block-sparse correction
return
end procedure
Post-evaluation of the potential
For each active source density , once the corresponding BIE has been solved, we evaluate the physical potential on the volume grids (43) of all active target densities . For each target density , we then compute the corresponding ERI by the trapezoidal rule:
where are the volume grid nodes of .
More specifically, to compute for a given , we consider the union of all target grid points:
The incident potential defined in (8) is then evaluated on by the near/far procedure of Section 3. The scattered potential is evaluated from the discretization of the single-layer representation (9), using the density column vector from the block linear solve (63).
Since the target set can be close to the interface, special quadrature for near interactions is also needed. For a panel and a target point , the same criterion as (40) is used to determine whether is near to or far from . Far-field contributions are evaluated by FMM-accelerated quadrature using the existing interface nodes and weights. Integrals over near panels are evaluated by adaptive quadrature using the known density to the desired accuracy, as a correction to the far-field contributions. Unlike the on-surface correction, these near-field contributions are computed on-the-fly without forming or storing a correction matrix. The resulting evaluation procedure is summarized in Algorithm 2.
Algorithm 2 Evaluation of one source batch on the merged target set.
Input: batch with global pair-index set and its solve panels and volume-lattice samples; layer densities and coefficient arrays from Algorithm 1; merged set of all targets .
Output: ,
1: procedure EvalBatch 2: for all do 3: evaluate on from and the samples of by the near–far split of Section 3 4: evaluate on from the discretized Eq. (11), with near panels selected by Eq. (40) 5: on 6: for do 7: gather at and form by Eq. (66) 8: end for 9: end for 10: return , 11: end procedure
Distributed pipeline and computational cost
The overall procedure for evaluating the ERI tensor is summarized as a three-stage pipeline:
Prepare. Sample and batch the pair densities, and construct target grids.
Solve. Construct the common discretization for each batch and solve Eq. (65).
Evaluate. Evaluate each source potential to form the entries with .
The independent solve and evaluation stages are distributed across workers; the full procedure is summarized in Algorithm 3.
Algorithm 3 Distributed computation of the four-index tensor .
Input: orbitals ; dielectric regions ; pair-retention tolerance ; numerical controls , and the Fourier/NUFFT/FMM tolerance; maximum batch size ; smallest panel size ; quadrature order
Output: non-negligible elements of the four-index tensor in sparse form
1: set ; sample the pair densities on volume grids Eq. (45); select the pair densities using Eq. (63); form the localized batches of size at most ; set by Eq. (67) ▷ serial 2: for all batches in parallel do ▷ distributed across workers 3: SolveBatch ▷ Alg. 1 4: end for 5: for all batches in parallel do ▷ distributed across workers 6: EvalBatch ▷ Alg. 2 7: end for 8: return
We estimate the main computational costs of Algorithm 3. Let denote the number of active pair densities, a typical number of surface Nyström nodes, a typical number of volume-grid points per pair density, and the number of distinct target points. For localized orbitals, . The estimates below describe total computational work at fixed and tolerances, assuming that the Fourier mode count and that local quadrature corrections only require linear work. The solve and evaluation stages account for most of the measured runtime.
For the solve stage, evaluating the right-hand sides at the interface nodes costs
where the first term accounts for the FMM-accelerated far-field in Eq. (47), and the second term accounts for the NUFFT-based near-field evaluation in Eq. (57). This is quasilinear in the total number of grid points . The cost of BIE solves is dominated by applying in GMRES iterations, given by
where is a representative number of block GMRES iterations, which is studied in § 5.1. For the evaluation stage, the scattered potentials are evaluated on , while the incident potentials are evaluated by the near/far procedure in § 3, giving the cost
The first term is , quadratic in the number of active pair densities (but still quasilinear with respect to number of grid points per pair). This contrasts the previous stages, which were all .
Numerical Results
In this section, we demonstrate the convergence, accuracy, timing and memory usage of the scheme. We also show the method’s performance on a large-scale, realistic system with complex dielectric geometry. Our implementation is in Julia [82], and is available at [83].
Convergence and effect of dielectric contrast
We first study the convergence with respect to the quadrature order and the minimum panel size for edge refinement at fixed dielectric contrast. We then hold and fixed and study the effect of increasing dielectric contrast on accuracy and GMRES iteration count, also showcasing the effect of the diagonal right preconditioner of Eq. (23).
A simple three-material geometry is used, as shown in Figure 7(a): a dielectric slab () rests on two cubes sharing a vertical face ( and ), all embedded in vacuum. A Gaussian density of width 0.05 at the center of the slab is used as the source density , which is represented by the red dot in Figure 7(a), We compute ’s self-interaction as the quantity of interest for convergence studies, given by

Figure 7. Three-dielectric benchmark with a single Gaussian source. (a) Geometry, showing adaptive interface panelization. (b) Relative error in the source self-interaction versus the number of Nyström unknowns . The label edge corr. denotes the touching-panel correction described in § 2.4. (c) GMRES iteration count versus .
where is the bounding box of , and is the Green’s function of the three-material system. For the convergence study, we set , , and , and decrease from to for each of . Other numerical tolerances are all set to , including the RHS-refinement, near-quadrature, GMRES, and volume-solver tolerances. The relative error
is reported against the number of unknowns . Here is from a reference calculation with , and other tolerances set to . The corresponding errors and GMRES iteration counts are shown as solid curves in Figure 7(b) and (c), respectively. At comparable , the error curves for different are almost identical, with convergence rate approximately , suggesting that the error is dominated by resolving edge singularities. Indeed, the analysis of § 2.3.2 predicts , where using the dominant 12:1 dielectric ratio. Meanwhile, remains between 9 and 13, growing only mildly under mesh refinement. Dashed curves show results obtained without the touching-panel correction for and . At , the error and are similar to the corrected case, but at , the error is about an order of magnitude larger, and is larger. Although yields comparable accuracy without the touching-panel correction, a small requires more extensive near-quadrature corrections, substantially increasing the computational cost. This motivates using a larger together with touching-panel corrections to reduce errors associated with edge singularities.
We next isolate the effect of dielectric contrast, fixing , , , and , and varying . As shown in Table 1, the relative error increases mildly with , from about at to at . The preconditioned GMRES iteration count also increases, from 11 to 19. Thus increasing dielectric contrast increases the error and iteration count mildly at this fixed resolution. We also see that the diagonal right preconditioner in Eq. (23) reduces the iteration count by 39%–56%, with the largest reduction at the highest contrast.
| \multicolumn{2}{c}{N_{\mathrm{iter}}} | |||||
| unpreconditioned | preconditioned | ||||
| 4 | 6 | 10 | 18 | 11 | |
| 4 | 20 | 10 | 28 | 13 | |
| 4 | 60 | 10 | 36 | 17 | |
| 4 | 200 | 10 | 43 | 19 |
Table 1. GMRES iteration counts and relative error for different dielectric contrasts, with and without the diagonal right preconditioner of Eq. (23). Number of unknowns is about for all cases.
Performance of the batched interface solve
We benchmark the batched interface solve described in § 4.1, focusing on strong scaling across CPU cores and the reduction in cost per source density obtained by solving right-hand sides simultaneously. We report single-node timings for the surface discretization, BIE solve, and evaluate steps of Algorithms 1 and 2. The discretization step includes the mesh discretization and the construction of the discrete operator , and the BIE solve refers to the block GMRES solve of Eq. (65). Timings for the full distributed pipeline are presented in § 5.3.
We consider a three-material system modeling a trilayer of graphene placed above a Si/SiO heterojunction, as shown in Figure 8. The heterojunction consists of two Å cubes with relative permittivities of 11.9 for Si and 3.9 for SiO. The graphene has thickness corresponding to three graphene layers, and is represented by a Å slab with effective relative permittivity , the r\mathrm{P}A value for graphene [35].

Figure 8. The triple-layer graphene above heterojunction system (left); top-down view of the graphene slab, with the 198 carbon atoms colored by sublattice (right). The red circle marks the selected site associated with .
We focus orbitals in the central graphene layer, which contains Wannier orbitals (see Appendix § 8) centered on carbon atoms, as shown in the right panel of Figure 8. Each orbital density is supplied on a Wannier90 [84] real-space skew grid covering a graphene supercell with dimensions Å. The grid contains points, with spacings of about Å. From those orbitals, we form the pair densities that are non-negligible according to the criterion of Eq. (63), with . This threshold corresponds approximately to only keep the pairs whose centers lie within Å of one another. Unless otherwise stated, all numerical tolerances are set to . We use quadrature order and refine the interface mesh, and the edge panels are refined to a minimum size of Å. All benchmarks are performed on a single compute node equipped with two 48-core AMD EPYC 9474F processors and 1.5 TB of RAM.
We first examine the strong scaling of the method for a single source density (). We select the orbital closest to the center of the slab (see Figure 8), denoted by , and use as the source density. We solve the corresponding BIE, whose discretization requires interface unknowns. We then evaluate the resulting potential on the merged target set , which contains points, and compute the 2613 tensor elements , where (Eq. (63)). Keeping all other parameters fixed, we vary the number of threads from 1 to 96.
The results are shown in Table 2. The total wall-clock time decreases from 1020 s with 1 thread to 62 s with 96 threads, corresponding to a speedup of and a parallel efficiency of 17%. The decrease in parallel efficiency is consistent with memory-bandwidth saturation during the FMM-dominated iterative solve and potential evaluation.
| discretization (s) | BIE solve (s) | eval (s) | total (s) | speedup | parallel efficiency | |
| 1 | 133.6 | 759 | 127 | 1020 | 100% | |
| 4 | 40.2 | 381 | 47 | 469 | 54% | |
| 16 | 14.4 | 146 | 22 | 183 | 35% | |
| 64 | 8.7 | 50 | 15 | 74 | 22% | |
| 96 | 8.9 | 39 | 14 | 62 | 17% |
Table 2. Strong scaling of Algorithm 3 at batch size (one source density). The speedup and parallel efficiency are calculated relative to that of a single thread.
We then measure the benefit of batching multiple right-hand sides in the BIE solve and potential evaluation. We fix the number of threads at 96 and vary the batch size from 1 to 79, by including more neighboring pair densities. The results are shown in Table 3. The discretization time only increases slightly with , from 10 s to 16 s. Both the BIE solve and evaluation phases benefit from the batched FMM calls. The end-to-end time per right-hand side decreases from 76 s at to approximately 25 s at , and remains nearly constant through , corresponding to a 2.5× increase in throughput. Larger batches provide no further improvement, with the speedup declining slightly to 2.8× at . Meanwhile, peak memory usage grows approximately linearly with from 24 GB to about 1 TB. Thus, intermediate batch sizes, in this case specifically from 37 to 58, achieve nearly the highest measured throughput, with substantially lower memory usage than larger batches.
| discretization (s) | BIE solve (s) | eval (s) | total (s) | peak RAM (GB) | speedup | ||
| 1 | 11 | 8.9 | 39 | 14 | 62 | 24 | – |
| 4 | 10 | 11.0 | 88 | 40 | 140 | 62 | 1.8× |
| 19 | 10 | 10.8 | 317 | 180 | 507 | 263 | 2.3× |
| 37 | 9 | 12.0 | 552 | 371 | 934 | 512 | 2.5× |
| 58 | 9 | 13.5 | 846 | 593 | 1453 | 783 | 2.5× |
| 79 | 9 | 15.8 | 1258 | 829 | 2104 | 1064 | 2.3× |
Table 3. Wall-clock time and memory usage for the batched interface solve and evaluation at with different batch sizes . The speedup is calculated relative to the total time per RHS at .
Large-scale ERI tensor computation
We apply the complete ERI computation pipeline, Algorithm 3, to the model introduced in § 5.2. We first show the wall-clock time for the distributed computation of the four-index tensor , and then show some representative entries of and their convergence properties. We use the same numerical parameters: , Å and the RHS-refinement, near-quadrature, and GMRES tolerances all set to . The orbitals in the active graphene layer yield pair densities. From Table 3, we select the batch size to be for the distributed computation, which gives batches in total. Those batches are distributed across ten 96-core nodes of the Rusty cluster at the Flatiron Institute, and processed in parallel.
Table 4 shows the per-stage wall-clock time for the distributed computation of . The calculation takes 2 h 10 m, or approximately 22 node-hours (about 2100 core-hours) in total. The solve and evaluation stages account for 50% and 33% of the wall-clock time, respectively. We see that even with pairs, the evaluation stage is not yet dominant over the other -scaling stages despite its scaling.
| stage | wall-clock |
| prepare | 18 m |
| solve | 65 m |
| eval | 47 m |
| total | 130 m |
Table 4. Per-stage wall-clock time for the distributed computation of .
Figure 9(a) shows the computed ERI tensor element magnitudes , where and enumerate the orbital pairs. Because the retained pairs are ordered according to spatial locality, the matrix shows broad concentrations of relatively large entries together with repeated horizontal and vertical structure. To estimate the effect of discretization error at the production resolution, we perform a self-convergence study of . Holding all other parameters fixed, we decrease to refine the interface mesh near edges and corners, increasing the number of interface unknowns from to . Figure 9(b) shows that the relative self-convergence error decays nearly as over this range. For Å and , the estimated relative error is approximately and the absolute error is about 0.3 meV.

Figure 9. Results of the ERI tensor calculation. (a) in the locality-aware ordering, on a logarithmic scale in eV. (b) Self-convergence error of versus the number of interface unknowns . The dashed line is a least-squares power-law fit.
We next examine how the dielectric environment modifies the on-site interactions and inter-site density–density interactions . Figure 10 plots , where is the bare Coulomb integral for the same orbitals. In panel (a), the on-site and first- to third-nearest-neighbor interactions lie approximately 0.19–0.20 eV below this reference on the Si side and increase by approximately 0.22–0.25 eV across the junction, becoming slightly positive on the SiO side. Panel (b) compares as function of orbital distance for source orbitals located in the Si region, near the junction, and in the SiO region. At short range, screening is strongest on the Si side, intermediate near the junction, and weakest on the SiO side. The results show that the Coulomb interactions are modified by the dielectric environment in a position-dependent manner, which explains the need for a full ERI tensor calculation in realistic device simulations.

Figure 10. Effect of dielectric environment on the Coulomb interactions between orbitals. (a) On-site and first- to third-nearest-neighbor interaction shifts versus the signed distance from the junction (vertical dashed line), with Si on the left and SiO on the right. (b) Inter-site interaction shifts versus orbital separation for source sites at , , and Å. Points show individual matrix elements; curves show averages.
Conclusion
We have presented a boundary integral method and a scalable HPC implementation for computing the four-index electron repulsion integral tensor in piecewise-constant dielectric environments composed of cuboidal regions. The method reformulates the governing Poisson interface problem as a second-kind boundary integral equation, discretized by a quad-panel-based Nyström scheme, with -adaptivity driven by both the incident data and the edge singularities. To handle high aspect ratio cuboids efficiently, a Bernstein-radius criterion is used to engage special quadrature corrections between relatively close or touching panels. The incident fields of the smooth orbital-pair densities are evaluated by a truncated-kernel NUFFT method inside or near source supports, and quadrature farther away. All far-field interactions are accelerated by a vectorized FMM, with block GMRES as the iterative solver, showing significant amortization of costs over multiple right-hand sides.
Our extensive numerical studies included: i) convergence studies, showing rates matching an analytic density edge-singularity analysis, ii) validation that GMRES iteration counts remain moderate under refinement or large dielectric contrasts, iii) a strong scaling study with respect to thread count, and iv) parallel timings for the full ERI tensor (6.9 million outputs) on cluster cores, given 198 orbitals embedded in a realistic three-dielectric structure. In this final set-up, the ratio of system length to orbital grid-spacing is about .
Much of our focus was on the scalable many-right-hand-side workflow required for ERI construction. While experiments confirmed that edge singularities induce a quite low convergence order with respect to (lower than the expected for uniform panels on a smooth surface), an important conclusion is that 3–4 digit accuracy is achieved with , reasonable solution times, and Å. This value of has reached the atomic scale at which a sharp-edge model becomes physically unimportant. However, we plan to develop edge-singularity-capturing panel quadratures, which will allow us to increase the convergence order, and reduce . We also plan to extend the scheme to more general polyhedral or curved interfaces using existing BIE surface discretization tools.
For more general physics, possible future directions include periodic boundary conditions for extended multilayered materials, and the integration of the solver into self-consistent many-body frameworks, for which the screened interaction tensor computed here enters as a fundamental building block.
Density singularity exponent for a right-angle dielectric wedge
Here we derive the result on the density singularity in Proposition 2.1, by combining the jump relation with the right-angle special case of classical dielectric-wedge analysis [66, 85] (see also [67 §5.3]). The generic singularity results from assuming invariance along the edge, leaving a transverse 2D sectoral problem that is separable in polar coordinates , with the edge at the origin and the interfaces at . The physical potential satisfies the 2D Laplace equation in each material,
Substituting the separated-variable form with separation constant gives
For , the bounded, nonconstant radial branch is . Thus in each material sector for some coefficients that may differ between sectors. To find eigenvalues , we note that across either interface, and are continuous. Solutions fall into even and odd symmetry about . An even mode can be written
Setting , the two interface conditions at imply
After using addition formulae, nontrivial solutions demand that
The sin factor vanishing gives only regular modes, while the other factor vanishing gives
recalling (15), where the arccos is taken on the standard branch . Similarly, the smallest positive exponent for a odd mode is . The smallest (leading) positive wedge exponent is therefore the smaller of the two,
as in [66].
Since is smooth, (5) means that the scattered potential has the same singularity as . Since the normal derivative is , then the radial dependence of the jump in is . By the jump relation for the single-layer representation (9), this jump determines , giving Proposition 2.1 with . The condition follows from .
If smooth potential variation along the edge is allowed, one still gets the same singularity as the above 2D analysis, since a Fourier transform along the edge direction gives a 2D modified Helmholtz equation in each material. Then , the regular modified Bessel function of real order , whose asymptotic power law is the same.
Wannier function generation
The Wannier functions were obtained from density functional theory (DFT) calculations performed with Quantum ESPRESSO (v7.4) [86, 87] using the PBE exchange–correlation functional [88] and Grimme’s DFT-D3 dispersion correction [89]. Carbon was described by an optimized norm-conserving Vanderbilt pseudopotential from the SG15 library (C_ONCV_PBE-1.2) [90, 91], with a plane-wave kinetic-energy cutoff of 100 Ry. We modeled monolayer graphene in a hexagonal unit cell with lattice constant Å, and periodic images were separated by 15 Å of vacuum. The self-consistent ground state was converged to Ry on a -centered Monkhorst–Pack -mesh, with 0.05 eV (3.7 mRy) Gaussian smearing. From these we built two maximally localized Wannier functions [46, 47] with C initial projections using Wannier90 (v3.1.0) [84]. The inner (frozen) energy window was set to eV. The Wannier functions were plotted on a real-space supercell for visualization.
References
- [1]C. J. Cramer, Essentials of Computational Chemistry: Theories and Models, 2nd Edition, Wiley, Chichester, 2004.
- [2]T. Helgaker, P. Jørgensen, J. Olsen, Molecular Electronic-Structure Theory, Wiley, Chichester, 2000. doi:10.1002/9781119019572.DOI
- [3]C. C. J. Roothaan, New developments in molecular orbital theory, Rev. Mod. Phys. 23 (2) (1951) 69–89. doi:10.1103/RevModPhys.23.69.DOI
- [4]A. D. Becke, Density-functional thermochemistry. III. The role of exact exchange, J. Chem. Phys. 98 (7) (1993) 5648–5652. doi:10.1063/1.464913.DOI
- [5]R. J. Bartlett, M. Musial, Coupled-cluster theory in quantum chemistry, Rev. Mod. Phys. 79 (1) (2007) 291–352. doi:10.1103/RevModPhys.79.291.DOI
- [6]Q. Sun, G. K.-L. Chan, Quantum embedding theories, Acc. Chem. Res. 49 (12) (2016) 2705–2712. doi:10.1021/acs.accounts.6b00356.DOI
- [7]J. Hubbard, Electron correlations in narrow energy bands, Proc. R. Soc. Lond. A 276 (1365) (1963) 238–257. doi:10.1098/rspa.1963.0204.DOI
- [8]N. H. F. Beebe, J. Linderberg, Simplifications in the generation and transformation of two-electron integrals in molecular calculations, Int. J. Quantum Chem. 12 (4) (1977) 683–705. doi:10.1002/qua.560120408.DOI
- [9]J. L. Whitten, Coulombic potential energy integrals and approximations, J. Chem. Phys. 58 (10) (1973) 4496–4501. doi:10.1063/1.1679012.DOI
- [10]O. Vahtras, J. Almӧf, M. W. Feyereisen, Integral approximations for LCAO-SCF calculations, Chem. Phys. Lett. 213 (5–6) (1993) 514–518. doi:10.1016/0009-2614(93)89151-7.DOI
- [11]E. G. Hohenstein, R. M. Parrish, T. J. Martínez, Tensor hypercontraction density fitting. I. Quartic scaling second- and third-order Møller–Plesset perturbation theory, J. Chem. Phys. 137 (4) (2012) 044103. doi:10.1063/1.4732310.
- [12]J. Lu, L. Ying, Compression of the electron repulsion integral tensor in tensor hypercontraction format with cubic scaling cost, J. Comput. Phys. 302 (2015) 329–335. doi:10.1016/j.jcp.2015.09.014.DOI
- [13]C.-N. Yeh, M. A. Morales, Low-scaling algorithm for the random phase approximation using tensor hypercontraction with k-point sampling, J. Chem. Theory Comput. 19 (18) (2023) 6197–6207. doi:10.1021/acs.jctc.3c00615.
- [14]C.-N. Yeh, M. A. Morales, Low-scaling algorithms for GW and constrained random phase approximation using symmetry-adapted interpolative separable density fitting, J. Chem. Theory Comput. 20 (8) (2024) 3184–3198. doi:10.1021/acs.jctc.4c00085.
- [15]H. Zhu, C.-N. Yeh, M. A. Morales, L. Greengard, S. Jiang, et al., Interpolative separable density fitting on adaptive real space grids, J. Chem. Theory Comput. 22 (6) (2026) 2904–2916. doi:10.1021/acs.jctc.5c02008.DOI
- [16]S. R. White, Hybrid grid/basis set discretizations of the Schrödinger equation, J. Chem. Phys. 147 (24) (2017) 244102. doi:10.1063/1.5007066.DOI
- [17]S. R. White, E. M. Stoudenmire, Multisliced gausslet basis sets for electronic structure, Phys. Rev. B 99 (8) (2019) 081110(R). doi:10.1103/PhysRevB.99.081110.DOI
- [18]S. R. White, M. J. Lindsey, Nested gausslet basis sets, J. Chem. Phys. 159 (23) (2023) 234112. doi:10.1063/5.0180092.DOI
- [19]M. Lindsey, S. Sharma, Fast and spectrally accurate construction of adaptive diagonal basis sets for electronic structure, J. Chem. Phys. 161 (21) (2024) 214111. doi:10.1063/5.0232181.
- [20]Y. Pan, M. Lindsey, Fast adaptive discontinuous basis sets for electronic structure (2026). arXiv:2510.21213, doi:10.48550/arXiv.2510.21213.DOI
- [21]S. F. Boys, Electronic wave functions. I. A general method of calculation for the stationary states of any molecular system, Proc. R. Soc. Lond. A 200 (1063) (1950) 542–554. doi:10.1098/rspa.1950.0036.DOI
- [22]K. S. Novoselov, A. K. Geim, S. V. Morozov, D. Jiang, Y. Zhang, et al., Electric field effect in atomically thin carbon films, Science 306 (5696) (2004) 666–669. doi:10.1126/science.1102896.DOI
- [23]A. Kumar, P. K. Ahluwalia, Tunable dielectric response of transition metals dichalcogenides MX₂ (M = Mo, W; X = S, Se, Te): Effect of quantum confinement, Physica B 407 (24) (2012) 4627–4634. doi:10.1016/j.physb.2012.08.034.DOI
- [24]L. Waldecker, A. Raja, M. Rösner, C. Steinke, A. Bostwick, et al., Rigid band shifts in two-dimensional semiconductors through external dielectric screening, Phys. Rev. Lett. 123 (20) (2019) 206403. doi:10.1103/PhysRevLett.123.206403.DOI
- [25]C. R. Dean, A. F. Young, I. Meric, C. Lee, L. Wang, et al., Boron nitride substrates for high-quality graphene electronics, Nat. Nanotechnol. 5 (10) (2010) 722–726. doi:10.1038/nnano.2010.172.DOI
- [26]N. S. Rytova, The screened potential of a point charge in a thin film, Mosc. Univ. Phys. Bull. 22 (3) (1967) 18–21. arXiv:1806.00976.
- [27]L. V. Keldysh, Coulomb interaction in thin semiconductor and semimetal films, JETP Lett. 29 (11) (1979) 658–661.
- [28]P. Cudazzo, I. V. Tokatly, A. Rubio, Dielectric screening in two-dimensional insulators: Implications for excitonic and impurity states in graphene, Phys. Rev. B 84 (8) (2011) 085406. doi:10.1103/PhysRevB.84.085406.DOI
- [29]M. M. Ugeda, A. J. Bradley, S.-F. Shi, F. H. da Jornada, Y. Zhang, et al., Giant bandgap renormalization and excitonic effects in a monolayer transition metal dichalcogenide semiconductor, Nat. Mater. 13 (12) (2014) 1091–1095. doi:10.1038/nmat4061.DOI
- [30]A. Raja, A. Chaves, J. Yu, G. Aréfe, H. M. Hill, et al., Coulomb engineering of the bandgap and excitons in two-dimensional materials, Nat. Commun. 8 (2017) 15251. doi:10.1038/ncomms15251.DOI
- [31]M. Rösner, C. Steinke, M. Lorke, C. Gies, F. Jahnke, et al., Two-dimensional heterojunctions from nonlocal manipulations of the interactions, Nano Lett. 16 (4) (2016) 2322–2327. doi:10.1021/acs.nanolett.5b05009.DOI
- [32]Y. Cao, V. Fatemi, S. Fang, K. Watanabe, T. Taniguchi, et al., Unconventional superconductivity in magic-angle graphene superlattices, Nature 556 (7699) (2018) 43–50. doi:10.1038/nature26160.DOI
- [33]P. Stepanov, I. Das, X. Lu, A. Fahimniya, K. Watanabe, et al., Untying the insulating and superconducting orders in magic-angle graphene, Nature 583 (7816) (2020) 375–378. doi:10.1038/s41586-020-2459-6.DOI
- [34]J. Barrier, L. Peng, S. Xu, C. De Beule, V. I. Fal’ko, et al., Coulomb screening of superconductivity in magic-angle graphene, Phys. Rev. X 16 (3) (2026) 031040. doi:10.1103/z9qg-287y.DOI
- [35]T. O. Wehling, E. Şaşıoğlu, C. Friedrich, A. I. Lichtenstein, M. I. Katsnelson, et al., Strength of effective Coulomb interactions in graphene and graphite, Phys. Rev. Lett. 106 (23) (2011) 236805. doi:10.1103/PhysRevLett.106.236805.DOI
- [36]F. Aryasetiawan, M. Imada, A. Georges, G. Kotliar, S. Biermann, et al., Frequency-dependent local interactions and low-energy effective models from electronic structure calculations, Phys. Rev. B 70 (19) (2004) 195104. doi:10.1103/PhysRevB.70.195104.DOI
- [37]N. Sheng, C. Vorwerk, M. Govoni, G. Galli, Green’s function formulation of quantum defect embedding theory, J. Chem. Theory Comput. 18 (6) (2022) 3512–3522. doi:10.1021/acs.jctc.2c00240.DOI
- [38]L. Muechler, D. I. Badrtdinov, A. Hampel, J. Cano, M. Rösner, et al., Quantum embedding methods for correlated excited states of point defects: Case studies and challenges, Phys. Rev. B 105 (23) (2022) 235104. doi:10.1103/PhysRevB.105.235104.DOI
- [39]M. Rösner, E. Şaşıoğlu, C. Friedrich, S. Blügel, T. O. Wehling, Wannier function approach to realistic Coulomb interactions in layered materials and heterostructures, Phys. Rev. B 92 (8) (2015) 085102. doi:10.1103/PhysRevB.92.085102.
- [40]K. Andersen, S. Latini, K. S. Thygesen, Dielectric genome of van der Waals heterostructures, Nano Lett. 15 (7) (2015) 4616–4621. doi:10.1021/acs.nanolett.5b01251.DOI
- [41]K. E. Atkinson, The Numerical Solution of Integral Equations of the Second Kind, Cambridge University Press, Cambridge, 1997. doi:10.1017/CBO9780511626340.DOI
- [42]O. P. Bruno, L. A. Kunyansky, A fast, high-order algorithm for the solution of surface scattering problems: Basic implementation, tests, and applications, J. Comput. Phys. 169 (1) (2001) 80–110. doi:10.1006/jcph.2001.6714.DOI
- [43]J. Bremer, Z. Gimbutas, A Nyström method for weakly singular integral operators on surfaces, J. Comput. Phys. 231 (14) (2012) 4885–4903. doi:10.1016/j.jcp.2012.04.003.DOI
- [44]L. Greengard, M. O’Neil, M. Racch, F. Vico, Fast multipole methods for the evaluation of layer potentials with locally-corrected quadratures, J. Comput. Phys. X 10 (2021) 100092. doi:10.1016/j.jcpx.2021.100092.DOI
- [45]G. H. Wannier, The structure of electronic excitation levels in insulating crystals, Phys. Rev. 52 (3) (1937) 191–197. doi:10.1103/PhysRev.52.191.DOI
- [46]N. Marzari, D. Vanderbilt, Maximally localized generalized Wannier functions for composite energy bands, Phys. Rev. B 56 (20) (1997) 12847–12865. doi:10.1103/PhysRevB.56.12847.DOI
- [47]N. Marzari, A. A. Mostofi, J. R. Yates, I. Souza, D. Vanderbilt, Maximally localized Wannier functions: Theory and applications, Rev. Mod. Phys. 84 (4) (2012) 1419–1475. doi:10.1103/RevModPhys.84.1419.DOI
- [48]R. J. LeVeque, Z. Li, The immersed interface method for elliptic equations with discontinuous coefficients and singular sources, SIAM J. Numer. Anal. 31 (4) (1994) 1019–1044. doi:10.1137/0731054.DOI
- [49]Y. C. Zhou, S. Zhao, M. Feig, G. W. Wei, High order matched interface and boundary method for elliptic equations with discontinuous coefficients and singular sources, J. Comput. Phys. 213 (1) (2006) 1–30. doi:10.1016/j.jcp.2005.07.022.DOI
- [50]O. Andreussi, I. Dabo, N. Marzari, Revised self-consistent continuum solvation in electronic-structure calculations, J. Chem. Phys. 136 (6) (2012) 064102. doi:10.1063/1.3676407.DOI
- [51]J. Yuan, H. S. Antila, E. Luijten, Particle–particle particle–mesh algorithm for electrolytes between charged dielectric interfaces, J. Chem. Phys. 154 (9) (2021) 094115. doi:10.1063/5.0035944.DOI
- [52]Z. Gan, X. Gao, J. Liang, Z. Xu, Random batch Ewald method for dielectrically confined Coulomb systems, SIAM J. Sci. Comput. 47 (4) (2025) B846–B874. doi:10.1137/24M1655809.DOI
- [53]X. Gao, Z. Gan, Broken symmetries in quasi-2D charged systems via negative dielectric confinement, J. Chem. Phys. 161 (1) (2024) 011102. doi:10.1063/5.0214523.DOI
- [54]V. Rokhlin, Rapid solution of integral equations of classical potential theory, J. Comput. Phys. 60 (2) (1985) 187–207. doi:10.1016/0021-9991(85)90002-6.DOI
- [55]L. Greengard, M. Moura, On the numerical evaluation of electrostatic fields in composite materials, Acta Numer. 3 (1994) 379–410. doi:10.1017/S0962492900002464.DOI
- [56]A. H. Juffer, E. F. F. Botta, B. A. M. van Keulen, A. van der Ploeg, H. J. C. Berendsen, The electric potential of a macromolecule in a solvent: A fundamental approach, J. Comput. Phys. 97 (1) (1991) 144–171. doi:10.1016/0021-9991(91)90043-K.DOI
- [57]W. Geng, R. Krasny, A treecode-accelerated boundary integral Poisson–Boltzmann solver for electrostatics of solvated biomolecules, J. Comput. Phys. 247 (2013) 62–78. doi:10.1016/j.jcp.2013.03.056.DOI
- [58]J. Tomasi, B. Mennucci, R. Cammi, Quantum mechanical continuum solvation models, Chem. Rev. 105 (8) (2005) 2999–3094. doi:10.1021/cr9904009.DOI
- [59]E. Cancès, Y. Maday, B. Stamm, Domain decomposition for implicit solvation models, J. Chem. Phys. 139 (5) (2013) 054111. doi:10.1063/1.4816767.DOI
- [60]J. Helsing, K.-M. Perfekt, On the polarizability and capacitance of the cube, Appl. Comput. Harmon. Anal. 34 (3) (2013) 445–468. doi:10.1016/j.acha.2012.07.006.DOI
- [61]L. Greengard, V. Rokhlin, A fast algorithm for particle simulations, J. Comput. Phys. 73 (2) (1987) 325–348. doi:10.1016/0021-9991(87)90140-9.DOI
- [62]F. Vico, L. Greengard, M. Ferrando, Fast convolution with free-space Green’s functions, J. Comput. Phys. 323 (2016) 191–203. doi:10.1016/j.jcp.2016.07.028.DOI
- [63]S. A. Sauter, C. Schwab, Boundary Element Methods, Vol. 39 of Springer Series in Computational Mathematics, Springer, Berlin, 2011. doi:10.1007/978-3-540-68093-2.
- [64]Y. Saad, M. H. Schultz, GMRES: A generalized minimal residual algorithm for solving nonsymmetric linear systems, SIAM J. Sci. Stat. Comput. 7 (3) (1986) 856–869. doi:10.1137/0907058.
- [65]R. Kress, Linear Integral Equations, 3rd Edition, Vol. 82 of Applied Mathematical Sciences, Springer, New York, 2014. doi:10.1007/978-1-4614-9593-2.
- [66]M. S. Bobrovnikov, V. P. Zamaraeva, On the singularity of the field near a dielectric wedge, Sov. Phys. J. 16 (9) (1973) 1230–1232. doi:10.1007/BF00890884.DOI
- [67]J. G. Van Bladel, Electromagnetic Fields, 2nd Edition, Wiley–IEEE Press, Hoboken, NJ, 2007. doi:10.1002/047012458X.
- [68]L. N. Trefethen, Approximation Theory and Approximation Practice, Extended Edition, SIAM, Philadelphia, 2019. doi:10.1137/1.9781611975949.DOI
- [69]L. af Klinteberg, C. Sorgentone, A.-K. Tornberg, Quadrature error estimates for layer potentials evaluated near curved surfaces in three dimensions, Comput. Math. Appl. 111 (2022) 1–19. doi:10.1016/j.camwa.2022.02.001.
- [70]S. G. Johnson, The HCubature.jl package for multi-dimensional adaptive integration in Julia (2017). URL https://github.com/JuliaMath/HCubature.jl
- [71]W. L. Briggs, V. E. Henson, The DFT: An Owner’s Manual for the Discrete Fourier Transform, SIAM, Philadelphia, 1995. doi:10.1137/1.9781611971514.DOI
- [72]L. N. Trefethen, J. A. C. Weideman, The exponentially convergent trapezoidal rule, SIAM Rev. 56 (3) (2014) 385–458. doi:10.1137/130932132.DOI
- [73]A. H. Barnett, Evaluation of layer potentials close to the boundary for Laplace and Helmholtz problems on analytic planar domains, SIAM J. Sci. Comput. 36 (2) (2014) A427–A451. doi:10.1137/120900253.DOI
- [74]A. Dutt, V. Rokhlin, Fast Fourier transforms for nonequispaced data, SIAM J. Sci. Comput. 14 (6) (1993) 1368–1393. doi:10.1137/0914081.DOI
- [75]L. Greengard, J.-Y. Lee, Accelerating the nonuniform fast Fourier transform, SIAM Rev. 46 (3) (2004) 443–454. doi:10.1137/S003614450343200X.DOI
- [76]A. H. Barnett, J. Magland, L. af Klinteberg, A parallel nonuniform fast Fourier transform library based on an “exponential of semicircle” kernel, SIAM J. Sci. Comput. 41 (5) (2019) C479–C504. doi:10.1137/18M120885X.DOI
- [77]E. M. Stein, G. Weiss, Introduction to Fourier Analysis on Euclidean Spaces, Vol. 32 of Princeton Mathematical Series, Princeton University Press, Princeton, 1971. doi:10.1515/9781400883899.
- [78]A. H. Baker, J. M. Dennis, E. R. Jessup, On improving linear solver performance: A block variant of GMRES, SIAM J. Sci. Comput. 27 (5) (2006) 1608–1626. doi:10.1137/040608088.DOI
- [79]M. L. Parks, K. M. Soodhalter, D. B. Szyld, A block recycled GMRES method with investigations into aspects of solver performance, Calcolo 63 (4) (2026) 31. doi:10.1007/s10092-026-00705-z.
- [80]L. Onisk, L. Reichel, H. Sadok, Numerical considerations of block GMRES methods when applied to linear discrete ill-posed problems, J. Comput. Appl. Math. 430 (2023) 115262. doi:10.1016/j.cam.2023.115262.DOI
- [81]S. N. Makarov, M. Hämäläinen, Y. Okada, G. M. Noetscher, J. Ahveninen, et al., Boundary element fast multipole method for enhanced modeling of neurophysiological recordings, IEEE Trans. Biomed. Eng. 68 (1) (2021) 308–318. doi:10.1109/TBME.2020.2999271.DOI
- [82]J. Bezanson, A. Edelman, S. Karpinski, V. B. Shah, Julia: A fresh approach to numerical computing, SIAM Rev. 59 (1) (2017) 65–98. doi:10.1137/141000671.DOI
- [83]X. Gao, J. Kaye, A. H. Barnett, DielectricBIE.jl: A Julia package for boundary integral equation solvers in dielectric electrostatics (2026). URL https://github.com/xuanzhaogao/DielectricBIE.jl
- [84]G. Pizzi, V. Vitale, R. Arita, S. Blügel, F. Freimuth, et al., Wannier90 as a community code: New features and applications, J. Phys.: Condens. Matter 32 (16) (2020) 165902. doi:10.1088/1361-648X/ab51ff.DOI
- [85]J. Bach Andersen, V. V. Solodukhov, Field behavior near a dielectric wedge, IEEE Trans. Antennas Propag. 26 (4) (1978) 598–602. doi:10.1109/TAP.1978.1141899.DOI
- [86]P. Giannozzi, S. Baroni, N. Bonini, M. Calandra, R. Car, et al., QUANTUM ESPRESSO: A modular and open-source software project for quantum simulations of materials, J. Phys.: Condens. Matter 21 (39) (2009) 395502. doi:10.1088/0953-8984/21/39/395502.DOI
- [87]P. Giannozzi, O. Andreussi, T. Brumme, O. Bunau, M. Buongiorno Nardelli, et al., Advanced capabilities for materials modelling with Quantum ESPRESSO, J. Phys.: Condens. Matter 29 (46) (2017) 465901. doi:10.1088/1361-648X/aa8f79.DOI
- [88]J. P. Perdew, K. Burke, M. Ernzerhof, Generalized gradient approximation made simple, Phys. Rev. Lett. 77 (18) (1996) 3865–3868. doi:10.1103/PhysRevLett.77.3865.DOI
- [89]S. Grimme, J. Antony, S. Ehrlich, H. Krieg, A consistent and accurate ab initio parametrization of density functional dispersion correction (DFT-D) for the 94 elements H–Pu, J. Chem. Phys. 132 (15) (2010) 154104. doi:10.1063/1.3382344.DOI
- [90]D. R. Hamann, Optimized norm-conserving Vanderbilt pseudopotentials, Phys. Rev. B 88 (8) (2013) 085117. doi:10.1103/PhysRevB.88.085117.DOI
- [91]M. Schlipf, F. Gygi, Optimization algorithm for the generation of ONCV pseudopotentials, Comput. Phys. Commun. 196 (2015) 36–44. doi:10.1016/j.cpc.2015.05.011.DOI