Skip to content

Add spherical integration using maximum determinant points (#237)#296

Closed
alok-108 wants to merge 2 commits intotheochem:masterfrom
alok-108:feature/max-det-spherical-grid
Closed

Add spherical integration using maximum determinant points (#237)#296
alok-108 wants to merge 2 commits intotheochem:masterfrom
alok-108:feature/max-det-spherical-grid

Conversation

@alok-108
Copy link
Copy Markdown

Overview

This Pull Request introduces the MaxDeterminantGrid class to the grid library, enabling spherical integration using maximum determinant (Fekete/Extremal) points. This fulfills the requirements outlined in issue #237.

Problem

The library currently supports Lebedev quadrature and spherical $t$-designs. While effective, Lebedev weights can occasionally be negative, and $t$-designs use uniform weights. Maximum determinant points offer an alternative strategy with strictly positive weights and high numerical stability for integrating functions on the unit sphere.

Solution

Implemented a dedicated MaxDeterminantGrid class that inherits from the core Grid hierarchy. This implementation follows the library's existing architecture while providing a flexible interface for modern scientific computing.

Key Changes

  • New MaxDeterminantGrid Class: Implemented in src/grid/max_det.py. The class features an improved integrate method that supports both callable functions and raw value arrays.
  • Structured Data Pipeline: Added precomputed maximum determinant points and weights up to degree 200, stored in optimized .npz format within src/grid/data/max_det/.
  • ℓ = 325 Support: Verified and ensured full compatibility for the ℓ = 325 spherical design.
  • Package Integration:
    • Exported the new class in src/grid/__init__.py.
    • Updated MANIFEST.in to ensure the new data files are bundled during installation.

Testing & Validation

Added a comprehensive test suite in src/grid/tests/test_maxdet.py which includes:

  • Accuracy Check: Verified that constant functions integrate to exactly $4\pi$.
  • Orthonormality: Validated the orthonormality of spherical harmonics integrated on the grid.
  • Weight Integrity: Confirmed that all weights are strictly positive and correctly normalized.
  • Interface Consistency: Ensured the new integrate(callable) method is consistent with the base Grid.integrate(array) logic.

Documentation

  • Detailed docstrings added for code clarity.
  • Created examples/max_det_integration.ipynb to demonstrate usage results and precision.

Fixes #237

@alok-108 alok-108 closed this Mar 26, 2026
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.

Integration of the Sphere with Maximum Determinant Points

1 participant