Skip to content

[PR-7] feat: add PySCF validation tests and interactive tutorial notebook#241

Draft
San1357 wants to merge 13 commits intotheochem:masterfrom
San1357:feat/pyscf-tests-tutorial
Draft

[PR-7] feat: add PySCF validation tests and interactive tutorial notebook#241
San1357 wants to merge 13 commits intotheochem:masterfrom
San1357:feat/pyscf-tests-tutorial

Conversation

@San1357
Copy link

@San1357 San1357 commented Mar 9, 2026

Summary

What Changed

File Lines What
tests/test_pyscf_comparison.py +353 15 tests: TestPySCFOriginal (6), TestPySCFImproved (6), TestPySCFPhysicalProperties (3) — H2/STO-3G, chemist/physicist notation, symmetries, physical properties
notebooks/tutorial/Tutorial 3 - Two-Electron Integral Optimizations.ipynb +546 8-section tutorial: Setup, OS+HGP algorithm, Boys functions (Coulomb/erf/erfc), Schwarz screening, high angular momentum (s/p/d/f), PySCF comparison, summary

How To Test

# PySCF comparison tests (requires pyscf)
pip install pyscf
python3 -m pytest tests/test_pyscf_comparison.py -v

# Run tutorial notebook
jupyter notebook "notebooks/tutorial/Tutorial 3 - Two-Electron Integral Optimizations.ipynb"

Proof That It Works

- All 15 PySCF tests pass when pyscf is installed (pip install pyscf)

image

First Checklist

  • Tests added for PySCF comparison
  • All tests pass (or skip if pyscf not installed)
  • Tutorial notebook covers all Week 1-8 deliverables
  • Docstrings in numpydoc format
  • No new dependencies added (pyscf is optional)

Scope Of this PR

  • Validates both electron_repulsion_integral and electron_repulsion_integral_improved against PySCF
  • Tutorial covers complete OS+HGP pipeline from Boys function to Schwarz screening
  • Week 8 deliverable — final validation and documentation
  • PySCF is optional dependency — tests skip gracefully if not installed

Second Checklist

  • Write a good description of what the PR does.
  • Add tests for each unit of code added (e.g. function, class)
  • Update documentation (Tutorial 3 notebook added)
  • Squash commits that can be grouped together
  • Rebase onto master

Type of Changes

Type Checked
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

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.

1 participant