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.

ModuleRole
functionalsExchange-correlation functional implementations by rung (LDA, GGA, meta-GGA, hybrid, range-separated). Forward-mode autodiff (7-variable dual numbers) for exact analytic derivatives
gridMolecular quadrature grid: Becke partition, Mura–Knowles radial scheme, Lebedev–Laikov angular grids, Stratmann–Scuseria compact cell function
integrateAO evaluation on grid batches, XC energy/potential accumulation, shell-pair screening
dispersionEmpirical dispersion corrections: D2 (Grimme 2006), D3 zero-damping, D4 charge-scaled
typesFunctionalSpec, FunctionalValue, Rung, ExactExchangeModel, DensityPoint, GridLevel, DftError
Public SymbolDescription
FunctionalsEnum of all supported functionals
functional()Returns FunctionalSpec for a given functional name
MolecularGridAtom-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.

ModuleRole
surfaceCavity surface construction: SWIG (polynomial switching) and ISWIG (erf-based) discretizations; S and D matrix assembly
pcmPcmSolver: PCM-family models (C-PCM, COSMO, IEF-PCM, SS(V)PE); K·q = R·v linear system solve; caching for gradient/Hessian reuse
ddcosmoDdSolver: domain-decomposition COSMO/PCM with real spherical-harmonic expansion (l=0..6) on atomic spheres
ddcosmo_gradddcosmo_gradient(): analytic gradient for ddCOSMO/ddPCM via adjoint-Lagrangian formulation
gradientpcm_gradient(): three-term analytic PCM gradient (grad_nuc, grad_solver, grad_qv)
hessianpcm_hessian(): three-term analytic PCM Hessian (hess_nuc, hess_solver, hess_qv) with CPHF solvent response
smdSmdCds: SMD cavity-dispersion-solvent-structure term with geometry-dependent atomic surface tensions
smd_dataSmdDescriptor: Abraham-style solvent descriptors (ϕ, ψ, β, α, γ, ε, n) for 179 solvents
solventsstatic_dielectric(): dielectric constant lookup for named solvents
spherical_harmonicsReal spherical harmonic evaluation for ddCOSMO/ddPCM
Public SymbolDescription
PcmSolverMain PCM reaction-field operator; response()fock_contribution()
DdSolverDomain-decomposition reaction-field solver
SmdCdsSMD 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.