Module & Submodule Map
This page maps the internal module layout of the workspace crates, following the
modern Rust module convention (foo.rs declares the module, foo/ holds its
submodules).
dft Crate
The dft crate provides Kohn–Sham DFT ingredients. Functional definitions,
grid construction, and XC integration are kept separate so new rungs can be
added without touching the SCF driver.
| Module | Role |
|---|---|
functionals | Exchange-correlation functional implementations by rung (LDA, GGA, meta-GGA, hybrid, range-separated). Forward-mode autodiff (7-variable dual numbers) for exact analytic derivatives |
grid | Molecular quadrature grid: Becke partition, Mura–Knowles radial scheme, Lebedev–Laikov angular grids, Stratmann–Scuseria compact cell function |
integrate | AO evaluation on grid batches, XC energy/potential accumulation, shell-pair screening |
dispersion | Empirical dispersion corrections: D2 (Grimme 2006), D3 zero-damping, D4 charge-scaled |
types | FunctionalSpec, FunctionalValue, Rung, ExactExchangeModel, DensityPoint, GridLevel, DftError |
| Public Symbol | Description |
|---|---|
Functionals | Enum of all supported functionals |
functional() | Returns FunctionalSpec for a given functional name |
MolecularGrid | Atom-centered grid builder and storage |
integrate_xc() | Returns XC energy, grid electron count, and diagnostics |
build_xc_matrix() | Builds the AO XC potential matrix for RKS |
build_unrestricted_xc_matrices() | Builds spin-resolved XC matrices for UKS |
dispersion_energy() | Dispersion correction for a given functional |
solvent Crate
The solvent crate implements implicit continuum solvation models. It couples
into SCF via the ReactionField trait in common::types.
| Module | Role |
|---|---|
surface | Cavity surface construction: SWIG (polynomial switching) and ISWIG (erf-based) discretizations; S and D matrix assembly |
pcm | PcmSolver: PCM-family models (C-PCM, COSMO, IEF-PCM, SS(V)PE); K·q = R·v linear system solve; caching for gradient/Hessian reuse |
ddcosmo | DdSolver: domain-decomposition COSMO/PCM with real spherical-harmonic expansion (l=0..6) on atomic spheres |
ddcosmo_grad | ddcosmo_gradient(): analytic gradient for ddCOSMO/ddPCM via adjoint-Lagrangian formulation |
gradient | pcm_gradient(): three-term analytic PCM gradient (grad_nuc, grad_solver, grad_qv) |
hessian | pcm_hessian(): three-term analytic PCM Hessian (hess_nuc, hess_solver, hess_qv) with CPHF solvent response |
smd | SmdCds: SMD cavity-dispersion-solvent-structure term with geometry-dependent atomic surface tensions |
smd_data | SmdDescriptor: Abraham-style solvent descriptors (ϕ, ψ, β, α, γ, ε, n) for 179 solvents |
solvents | static_dielectric(): dielectric constant lookup for named solvents |
spherical_harmonics | Real spherical harmonic evaluation for ddCOSMO/ddPCM |
| Public Symbol | Description |
|---|---|
PcmSolver | Main PCM reaction-field operator; response() → fock_contribution() |
DdSolver | Domain-decomposition reaction-field solver |
SmdCds | SMD non-electrostatic CDS correction |
build_surface() | SWIG/ISWIG cavity surface construction |
pcm_matrices() | S (Coulomb) and D (dielectric response) matrix assembly |
pcm_gradient() | Full analytic PCM nuclear gradient |
pcm_hessian() | Full analytic PCM nuclear Hessian |
ddcosmo_gradient() | Analytic ddCOSMO/ddPCM gradient |
geometry Crate
The geometry crate hosts every optimization, transition-state, and frequency
backend. Key public symbols are re-exported from geometry::lib.