Skip to content

PR[9] (combine PR-1-PR-8) feat: combine weeks 1-9 implementations into single branch#245

Draft
San1357 wants to merge 25 commits intotheochem:masterfrom
San1357:feat/woc-weeks1-9
Draft

PR[9] (combine PR-1-PR-8) feat: combine weeks 1-9 implementations into single branch#245
San1357 wants to merge 25 commits intotheochem:masterfrom
San1357:feat/woc-weeks1-9

Conversation

@San1357
Copy link

@San1357 San1357 commented Mar 11, 2026

Summary

  • Combines all week 1-9 implementations into a single branch for review
  • Includes Boys functions, OS+HGP algorithm (VRR+ETR+HRR), Schwarz screening, PySCF validation, and libcint tolerance fix

Changes

Week Branch Feature
1 feat/boys-functions Boys function APIs + attenuated potentials
2 feat/electron-repulsion-improved OS+HGP base rewrite
3 feat/VRR-two-electron-integral VRR recurrence (Eq. 65)
4 feat/ETR-contraction ETR + primitive contraction (Eq. 66)
5 feat/HRR-complete-pipeline HRR complete pipeline (Eq. 67) fix (#216)
6 feat/schwarz-screening Schwarz screening optimization
7 feat/pyscf-tests-tutorial PySCF comparison tests + Tutorial 3 notebook
8 feat/libcint-tolerance-fix libcint ERI tolerance fix (#208)

Test Results

Related PRs

This PR closes #221, #216, #208 and is ready for final review and merge.

Please let me know (@PaulWAyers , @marco-2023 , @msricher ) if any further changes or refinements are needed. Thank you!

@San1357
Copy link
Author

San1357 commented Mar 11, 2026

Summary (Final Completion Of WOC #221 )

  • This PR combines the complete implementation of the WoC project "Two-Electron Integrals via OS+HGP Algorithm" completed over Weeks 1–9 into a single branch, as requested.
  • Includes Boys functions, OS+HGP algorithm (VRR+ETR+HRR), Schwarz screening, PySCF validation, and libcint tolerance fix

Boys Functions (Week 1)

  • Implemented Boys function APIs for standard and attenuated potentials (erf, erfc, yukawa, etc.)
  • Added vectorized NumPy implementation with mpmath fallback for high accuracy

OS+HGP Two-Electron Integrals (Weeks 2–5)

  • Implemented complete Obara-Saika + Head-Gordon-Pople algorithm (VRR + ETR + HRR)
  • Supports s, p, d orbitals correctly (fixes [BUG] Electron repulsion energy #216)
  • Validated against PySCF for correctness

Schwarz Screening (Week 6)

  • Implemented Schwarz inequality-based screening to skip negligible shell quartets
  • Added shell-pair prescreening using Gaussian product theorem

PySCF Validation + Tutorial (Week 7)

  • Added comprehensive PySCF comparison tests
  • Added Tutorial 3 notebook demonstrating OS+HGP, Boys functions, and Schwarz screening

libcint Tolerance Fix (Week 8)

Request :

This PR closes #221, #216, #208 and is ready for final review and merge.
Please let me know (@PaulWAyers , @marco-2023 , @msricher ) if any further changes or refinements are needed. Thank you

@San1357 San1357 requested a review from msricher March 11, 2026 07:09
Copy link
Collaborator

@msricher msricher left a comment

Choose a reason for hiding this comment

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

Thanks for combining it all. Let's await a final review.

Comment on lines +19 to +24
try:
from pyscf import gto
HAS_PYSCF = True
except ImportError:
HAS_PYSCF = False

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this and the stuff at the bottom is necessary, it's not standard and I wouldn't expect it if I triggered it myself. I would simply dd PySCF to the [test] dependencies in the pyproject.toml file.

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.

WoC: 2-electron integrals: better performance and more flexibility

2 participants