PR1 : implement analytical Coulomb potential for Gaussian densities#304
PR1 : implement analytical Coulomb potential for Gaussian densities#304Ao-chuba wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new standalone coulomb module providing exact analytical Coulomb potential evaluations for s-type and p-type radial Gaussian charge densities, together with a higher-level coulomb_potential aggregator that sums contributions from a set of centered Gaussians. This is the first building block towards a more robust Poisson solver (issue #288).
Changes:
- New
src/grid/coulomb.pywithcoulomb_gaussian_s,coulomb_gaussian_p, andcoulomb_potential, including correct handling of ther → 0limit for both normalized and unnormalized conventions. - New
src/grid/tests/test_coulomb.pyexercising the analytical formulas atr=0and at non-zero radii for both normalizations, plus an aggregate s-type-only consistency test against a hand-rolled reference.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/grid/coulomb.py | New module implementing analytical Coulomb potentials of s- and p-type Gaussian densities and a multi-Gaussian aggregator. |
| src/grid/tests/test_coulomb.py | New unit tests validating the s/p formulas at the origin and at non-zero radii, and an aggregate s-only check. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
as per copilot suggestions i took into consideration for some of its inputs:
|
marco-2023
left a comment
There was a problem hiding this comment.
Nice work! I think this is a good progress.
Please simplify the functions.
Homogenize the tests
I think this module should not be in the root of the package, but we can leave that for another moment.
|
Thanks for the input sir, i updated my code as per the suggestions. please do check and let me know if any other things can be improved too. |
First inital PR for Improvement of the robustness of poisson equation .$s$ -type and $p$ -type radial Gaussian charge densities. The math is derived from the exact formulations and $r \to 0$ limits outlined in the course project reference (https://qchem.qc-edu.org/problems/HF_dft.html). This PR contains the standalone
This PR implements the core mathematical engine for evaluating the exact analytical electrostatic (Coulomb) potential of
coulomb.pymodule and an isolated unit test suite validating math correctness across various distances and normalization schemes, establishing the foundation for the subsequent robust Poisson solver scaffolding.related to issue -> #288