Hello , @tovrstra @FarnazH
While exploring src/denspart/adapters/horton3.py, I noticed a TODO comment on line 122 suggesting the removal of grid points with zero weight.
Analysis: I ran an analysis using the examples/horton3 test case (water molecule) to quantify the number of negligible points.
- Total Grid Points: 87,300
- Negligible Points (< 1e-10): ~4,961
- Impact: Approximately 5.7% of the generated grid points effectively contribute nothing to the integration but consume computational resources during density and property evaluations. For larger systems or different grid settings, this percentage could be higher.
Solution: I propose implementing a filter in _setup_grid to remove points with weights below a threshold (e.g., 1e-15) immediately after grid generation. This will reduce the workload for all subsequent tensor operations.
Hello , @tovrstra @FarnazH
While exploring
src/denspart/adapters/horton3.py, I noticed a TODO comment on line 122 suggesting the removal of grid points with zero weight.Analysis: I ran an analysis using the examples/horton3 test case (water molecule) to quantify the number of negligible points.
Solution: I propose implementing a filter in
_setup_gridto remove points with weights below a threshold (e.g., 1e-15) immediately after grid generation. This will reduce the workload for all subsequent tensor operations.