CLAUDE.md
Guides Claude Code on building, testing, and navigating a Python quantum chemistry package called pyquante2.
What this file does
Guides Claude Code on building, testing, and navigating a Python quantum chemistry package called pyquante2.
When to use it
- You want Claude to understand a Python quantum chemistry codebase
- You need to run tests or build a package with uv and make
- You want to enforce project-specific naming conventions and ignore archived code
- You are publishing a PyPI package and need a version bump checklist reminder
Assumes this stack
CLAUDE.md
This file provides guidance for Claude Code when working with the pyquante2 codebase.
Project Overview
PyQuante2 is a Python quantum chemistry suite for developing and testing quantum chemistry methods. It includes implementations of Hartree-Fock (RHF, UHF), DFT, and MP2, with optional Cython extensions for performance-critical routines.
Status: Published on PyPI as pyquante2 (current version: 0.2.0)
Project Structure
pyquante2/
├── src/pyquante2/ # Main source code
│ ├── basis/ # Gaussian basis sets (PGBF, CGBF)
│ ├── cints/ # Cython/C integral routines
│ ├── dft/ # Density functional theory
│ ├── geo/ # Molecular geometry (atoms, molecules)
│ ├── graphics/ # Visualization tools
│ ├── grid/ # Numerical grids for DFT
│ ├── hylleraas/ # Hylleraas variational methods
│ ├── ints/ # Integral evaluation (one/two-electron)
│ ├── pt/ # Perturbation theory (MP2)
│ ├── scf/ # SCF solvers and Hamiltonians
│ └── viewer/ # Molecular viewer
├── tests/ # Test suite
├── attic/ # Archived/deprecated code
├── docs/ # Documentation
├── CHANGELOG.md # Release history
├── VERSION_MANAGEMENT.md # Version bump checklist
├── FUTURE_TASKS.md # Planned improvements
├── CODE_REVIEW.md # Code quality findings
└── TODO.md # Original task list
Development Commands
# Install with dev dependencies
uv sync --extra dev
# Run tests (preferred)
make test
# Or directly with pytest
uv run pytest
# Run tests with doctests
uv run pytest --doctest-modules --ignore=attic
# Build package for PyPI
make clean # Clean old builds
make build # Build wheel + source distribution
uv run twine check dist/* # Verify package
# Publish to PyPI (see VERSION_MANAGEMENT.md first!)
make install_test # Upload to TestPyPI
make install # Upload to PyPI
Testing
- Tests are in
tests/directory using pytest - Many modules include doctests in docstrings
- Run
make testto run all tests including doctests - 3 DFT tests are skipped (conditional functionality)
Code Style
- Python 3.11+ required
- Uses numpy extensively for numerical operations
- Classes use lowercase names (e.g.,
molecule,atom,cgbf) - Doctests serve as both documentation and tests
- No type annotations currently used
Key Concepts
- PGBF: Primitive Gaussian Basis Function
- CGBF: Contracted Gaussian Basis Function
- HGP: Head-Gordon-Pople integral algorithm
- RHF/UHF: Restricted/Unrestricted Hartree-Fock
- DFT: Density Functional Theory (LDA, GGA functionals)
Dependencies
- Core: numpy, ipykernel
- Dev/Test: pytest, matplotlib, build, twine
- Build: setuptools, Cython (for C extensions)
Notes
- Cython extensions in
src/pyquante2/cints/are optional but improve performance - The
attic/directory contains archived code - ignore when searching - Uses
uvfor package management (uv.lock present) - Before version bumps: Review
VERSION_MANAGEMENT.mdchecklist - For future tasks: See
FUTURE_TASKS.md - PyPI package: Available at https://pypi.org/project/pyquante2/
What's inside
9 sections, 6 code blocks, 4 key concept definitions, 3 dependency groups, 3 cross-file references
Change this for your project
- Replace
pyquante2with your own package name throughout - Replace
rpmuller/pyquante2with your own repository path - Replace
https://pypi.org/project/pyquante2/with your PyPI URL
Where it goes
Save as CLAUDE.md in your repository root. Claude Code reads it automatically at the start of every session.
Worth borrowing
- Pointing Claude to companion files (VERSION_MANAGEMENT.md, FUTURE_TASKS.md) for context
- Listing skipped tests explicitly so Claude does not waste time debugging them
- Naming conventions section to avoid style arguments during code generation
Related Documents
Code indexing for AI agents: summarization strategies and evaluation systems
Synthesises 2024-2025 research on code indexing for AI agents, covering summarisation strategies, hybrid retrieval architectures, and evaluation benchmarks.
write-script
Guides an AI through writing a YouTube video script with strict structural, language, and quiz rules for a survival channel.
Claude AI Git Workflow Integration
Recommends using the git-ai-commit CLI tool for AI-generated commit messages instead of manual ones.
Missing Business Agents Research — FLUXION 2026
Identifies 12 missing business operations agents for an indie software company and ranks them by impact and effort with €0 implementation plans.