Skip to content

Add pre-fitted atomic Gaussian parameter loader and data#306

Open
Ao-chuba wants to merge 3 commits into
theochem:masterfrom
Ao-chuba:feature/atomic-gaussian-params
Open

Add pre-fitted atomic Gaussian parameter loader and data#306
Ao-chuba wants to merge 3 commits into
theochem:masterfrom
Ao-chuba:feature/atomic-gaussian-params

Conversation

@Ao-chuba

Copy link
Copy Markdown
Member

2nd PR for Improvement of the robustness of poisson equation

This pull request implements a zero dependency loader load_atomic_gaussian_params(element) in src/grid/coulomb.py to retrieve pre-fitted $s$-type Gaussian parameters (coefficients and exponents) for elements H, C, N, O, and Cl from a package-safe JSON dataset (atomic_gauss_params.json). The loader supports case insensitive, space stripped element symbols (e.g. "cl", " C ") as well as atomic numbers (e.g. 17), utilizing a module-level lazy cache to avoid repeated disk reads. The packaging configuration in MANIFEST.in has been updated to bundle the dataset, the loader has been exported at the package root level, and unit tests have been added to verify type handling, lookup correctness, and parameter validity.

related to issue -> here

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a package-safe, zero-extra-dependency loader to fetch pre-fitted s-type atomic Gaussian parameters (coefficients/exponents) for a small set of elements (H, C, N, O, Cl), backed by a JSON dataset shipped with the package. This supports the Poisson-solver robustness effort by enabling “promolecular/fit-based” strategies without external fit libraries.

Changes:

  • Added load_atomic_gaussian_params(element) with symbol/atomic-number support and lazy JSON caching.
  • Added src/grid/data/atomic_gauss_params.json containing the fitted parameters.
  • Exported the loader and added unit tests validating basic lookup/shape/value constraints.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/grid/coulomb.py Implements the JSON-backed atomic parameter loader and exports it.
src/grid/data/atomic_gauss_params.json Adds the pre-fitted parameter dataset for supported elements.
src/grid/tests/test_coulomb.py Adds tests for the new loader.
src/grid/__init__.py Re-exports Coulomb module symbols at package root.
MANIFEST.in Attempts to include the new JSON dataset in packaged artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread MANIFEST.in
Comment thread src/grid/coulomb.py Outdated
Comment thread src/grid/tests/test_coulomb.py
Ao-chuba and others added 2 commits June 19, 2026 00:46
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants