Repository navigation
Replies: 2 comments
|
Looks great @Ao-chuba . Thanks for doing GSoC with QC-Devs! |
0 replies
|
Thank you @PaulWAyers! Working with the QC-Devs and theochem team has been an amazing experience. I really appreciate all the mentorship and support throughout the summer! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
GSoC 2026 Final Report
Contributor: Ao-chuba
Organization: theochem
Project: GRID — Improve Robustness of Poisson Solver
Mentors: @marco-2023, @PaulWAyers, @FarnazH
Project Discussion Thread: orgs/theochem/discussions/11
The Problem
GRID evaluates Coulomb (electrostatic) potentials of molecules by numerically solving Poisson's equation. The existing solvers -
solve_poisson_ivpandsolve_poisson_bvp- struggle with nuclear cusp singularities: the physical infinite-slope spike in the electron density at each atomic nucleus.This causes:
The benchmark study (#315) showed the full picture:
Even the better BVP solver has no mechanism to handle the nuclear cusp analytically, it simply gets harder as the density sharpens. The goal of this GSoC project was to fix this fundamentally, not just for a specific parameter range.
The Solution: Double-Split-Plus-Solve Architecture
Instead of forcing numerical solvers to handle the singularities, My mentor and I designed a "Double-Split-Plus-Solve" architecture that analytically eliminates the nuclear cusps before any numerical integration happens.
The key insight: Gaussians have exact analytical Coulomb potentials. If we can express the sharp parts of the density as Gaussians, their potentials can be computed with zero numerical error, leaving only a smooth, well-behaved residual for the BVP solver.
Work Delivered
PR 1 — Analytical Coulomb Potential Engine
#304 ·
Implemented the core mathematical engine:
coulomb_potential()insrc/grid/coulomb.py.coulomb_gaussian_s: exact potential of s-type Gaussianscoulomb_gaussian_p: exact potential of normalized p-type Gaussianscoulomb_potential: multi-center evaluator accumulating contributions from multiple fitted Gaussians at arbitrary 3D points.This gives zero numerical error for the analytical core subtraction step.
PR 2 — Pre-fitted Atomic Gaussian Parameters
#306 ·
Added
load_atomic_gaussian_params(element)and the data filesrc/grid/data/atomic_gauss_params.json.Key design decision: The initial plan was to use BFit's
GreedyKLSCF. However, BFit's output coefficients were in an internal unnormalized convention incompatible withcoulomb_potential. The approach was switched to Non-Negative Least Squares (NNLS) fitting against a fixed UGBS exponent grid, which directly produces coefficients in the correct normalized Gaussian convention. Pre-fitted parameters for H, C, N, O, and Cl are included.This keeps GRID completely free of BFit and AtomDB at runtime, the fitting is done offline, and only the output JSON is shipped with GRID.
PR 3 — Split 1: Analytical Core Subtraction
#319 ·
Implemented
solve_poisson_robust()insrc/grid/robust_poisson.pywith the first split stage.For each atomic center, the pre-fitted Gaussian parameters are loaded, the analytical core density is subtracted from the input, and its exact Coulomb potential is computed and added directly to the final result. The smooth residual is then passed to
solve_poisson_bvp.PR 4 — Split 2: NNLS Bonding Density Fitting
#320 ·
Extended
solve_poisson_robust()with thesplit2=Trueflag. After the analytical core subtraction (Split 1), the post-Split-1 residual is additionally fitted with a geometric Gaussian basis (np.geomspace(0.05, 5000, 20)) usingscipy.optimize.nnls.This step introduces a sequential greedy fitting strategy:
This captures the remaining bonding and polarization density analytically, leaving an incredibly flat and smooth final residual for the BVP solver to handle with maximum accuracy.
PR 5 — Tutorial Notebook
#327 ·
Added
examples/Robust_Poisson_Solver.ipynb— a complete, executable tutorial demonstrating the full pipeline:grid/data/proatoms/.Accuracy results from the notebook (α = 50.0):
solve_poisson_bvpsolve_poisson_robust(Split 1)solve_poisson_robust(Split 1+2)Split 1+2 achieves a ~9× improvement over the plain BVP solver on a sharp Gaussian density. More importantly, the Hydrogen pro-atom test in step 5 proves that the Double-Split architecture successfully handles true Slater-type physical cusps without divergence, producing a stable, finite, and non-negative potential everywhere.
Study — Screened Coulomb vs. Double-Split
#328
An independent mathematical study benchmarking the Screened Coulomb (Yukawa) potential$V_\mu(r) = e^{-\mu r}/r$ as an alternative approach. The conclusion is definitive:
Screening exponentially suppresses outer tails but does not resolve the$r \to 0$ nuclear cusp singularity and introduces massive physical distortion across the entire grid. The Double-Split architecture is the only approach that preserves exact $1/r$ physics while analytically eliminating the cusp.
Links
All reactions