Skip to main content

sci_form/gpu/
mod.rs

1//! GPU-accelerated compute infrastructure for quantum chemistry and visualization.
2//!
3//! This module provides a production-quality GPU pipeline for:
4//!
5//! - **Context** — wgpu device initialization with explicit CPU fallback
6//! - **Backend report** — Every execution reports which backend was used and why
7//! - **Orbital grid** — Evaluate ψ_i(r) on 3D grids (GPU or CPU)
8//! - **Marching cubes** — Isosurface extraction from scalar fields
9//! - **Isosurface** — High-level orbital mesh generation (dual-lobe, normal smoothing)
10//! - **Memory budget** — WebGPU/WASM memory limit enforcement and pre-flight checks
11//! - **Shader registry** — Centralized WGSL shader catalogue with tier classification
12//! - **Pipeline coordinator** — Multi-kernel dispatch coordination with memory-aware scheduling
13//! - **Two-electron GPU** — O(N⁴) ERI computation on GPU (Tier 1)
14//! - **Fock build GPU** — Fock matrix F = H + G(P) construction on GPU (Tier 1)
15//! - **One-electron GPU** — Overlap/kinetic/nuclear matrix build on GPU (Tier 2)
16//! - **Density grid GPU** — Electron density ρ(r) on 3D grids (Tier 1)
17//! - **ESP grid GPU** — Point-charge ESP evaluation on 3D grids (Tier 1)
18//! - **D4 GPU** — Pairwise two-body D4 dispersion accumulation (Tier 3)
19//! - **EEQ GPU** — Damped Coulomb matrix build for electronegativity equilibration (Tier 3)
20//! - **CPM GPU** — Coulomb matrix build for constant-potential charges (Tier 3)
21//!
22//! # Feature Gates
23//!
24//! - `experimental-gpu-rendering` — Enables `#[repr(C)]` aligned types (bytemuck)
25//! - `experimental-gpu` — Full wgpu runtime (Vulkan/Metal/DX12), includes rendering
26//!
27//! When `experimental-gpu` is disabled, all functions fall back to CPU
28//! and the backend report makes the fallback explicit.
29
30pub mod aligned_types;
31pub mod alpb_born_gpu;
32pub mod ani_aev_gpu;
33pub mod backend_report;
34pub mod buffer_manager;
35pub mod context;
36#[cfg(feature = "beta-cpm")]
37pub mod cpm_gpu;
38pub mod d4_dispersion_gpu;
39pub mod density_grid_gpu;
40pub mod eeq_gpu;
41pub mod esp_grid_gpu;
42pub mod fock_build_gpu;
43pub mod gamma_matrix_gpu;
44pub mod hct_born_gpu;
45pub mod isosurface;
46pub mod marching_cubes;
47pub mod memory_budget;
48pub mod mmff94_gpu;
49pub mod one_electron_gpu;
50pub mod orbital_grid;
51pub mod pipeline_coordinator;
52pub mod shader_registry;
53pub mod two_electron_gpu;