Numerical basis calculations
Numerical basis calculations use tabulated radial functions together with atom positions and boundary conditions. Grid calculators integrate sampled functions against a basis or expand basis coefficients on a uniform grid. Overlap calculators evaluate the ordinary inner products of basis functions.
The calculators retain preparation that can be reused: grid calculations are bound to a geometry and grid, while overlap calculations share basis-dependent preparation across geometries. Both spline and uniform radial representations follow the atom-centered basis definitions.
Grid integration and expansion
Basis integrals from grid integration can be passed to the density projection solver.
SplineNumericalBasisGridCalculator
SplineNumericalBasisGridCalculator(
geometry: Geometry,
basis_set: SplineNumericalBasisSet,
grid: UniformGrid,
*,
cpu_threads: int = 1,
)
Bases: _NumericalBasisGridCalculatorBase
Reusable spline numerical basis calculator bound to one geometry and grid.
Construction prepares the complete cutoff-local traversal plan and one spherical-harmonic workspace per CPU thread. Reuse the calculator when both integration and expansion use the same geometry, basis, and grid. Calls on one calculator are serialized because its compiled workspaces own reusable scratch memory.
Parameters:
-
geometry(Geometry) –Atom positions and periodic cell used by the basis functions.
-
basis_set(SplineNumericalBasisSet) –Spline numerical basis evaluated on the grid.
-
grid(UniformGrid) –Uniform grid on which values are integrated or expanded.
-
cpu_threads(int, default:1) –Threads used inside the fused grid calculation.
integrate
integrate(volumetric: UniformVolumetric) -> OrbVector
Integrate values on the bound grid against the numerical basis.
expand
expand(coeffs: OrbVector) -> UniformVolumetric
Evaluate auxiliary coefficients on the bound grid.
UniformNumericalBasisGridCalculator
UniformNumericalBasisGridCalculator(
geometry: Geometry,
basis_set: UniformNumericalBasisSet,
grid: UniformGrid,
*,
cpu_threads: int = 1,
)
Bases: _NumericalBasisGridCalculatorBase
Numerical-basis grid calculator using uniform radial samples directly.
The native kernel derives the radial interval by integer indexing and uses precomputed local-Hermite tangents. It does not copy radial-grid arrays or global spline coefficients.
integrate
integrate(volumetric: UniformVolumetric) -> OrbVector
Integrate values on the bound grid against the numerical basis.
expand
expand(coeffs: OrbVector) -> UniformVolumetric
Evaluate auxiliary coefficients on the bound grid.
Overlap integrals
SplineNumericalOverlapParameters
dataclass
SplineNumericalOverlapParameters(
*,
k_cutoff: float = 120.0,
k_spacing: float = 0.04,
distance_spacing: float = 0.005,
radial_quadrature_order: int = 8,
)
Resolution parameters for spline numerical overlap preparation.
Lengths use Å and reciprocal lengths use Å\(^{-1}\).
SplineNumericalOverlapCalculator
SplineNumericalOverlapCalculator(
basis_set: SplineNumericalBasisSet,
parameters: SplineNumericalOverlapParameters | None = None,
*,
cpu_threads: int = 1,
)
Bases: _NumericalOverlapCalculatorBase
Calculate ordinary overlaps for geometries sharing one spline numerical basis.
Construction copies the spline numerical atomic bases into the native kernel.
Radial transforms and two-center distance tables are prepared lazily for
species and species pairs encountered by later calculations, then reused by
the calculator. cpu_threads controls native neighbor search and warm block
evaluation within one call; it defaults to one.
calculate
calculate(geometry: Geometry) -> HermBlockSparseOrbMatrix
Return the overlap matrix for one geometry.
calculate_gamma
calculate_gamma(geometry: Geometry) -> HermOrbMatrix
Return the real dense Γ-folded overlap for one geometry.
UniformNumericalOverlapCalculator
UniformNumericalOverlapCalculator(
basis_set: UniformNumericalBasisSet, *, cpu_threads: int = 1
)
Bases: _NumericalOverlapCalculatorBase
Calculate overlaps from uniform radial samples without source splines.
cpu_threads controls native neighbor search and warm block evaluation
within one call; it defaults to one.
calculate
calculate(geometry: Geometry) -> HermBlockSparseOrbMatrix
Return the overlap matrix for one geometry.
calculate_gamma
calculate_gamma(geometry: Geometry) -> HermOrbMatrix
Return the real dense Γ-folded overlap for one geometry.
calculate_basis_connection
calculate_basis_connection(geometry: Geometry) -> BlockSparseOrbMatrix
Return the ket-side basis connection in Å\(^{-1}\).
For ket-cell displacement \(\boldsymbol d=\boldsymbol\tau_j+\boldsymbol R-\boldsymbol\tau_i\), the Cartesian components are \(\langle\phi_{i\boldsymbol0}|\partial_{\tau_{j\alpha}} \phi_{j\boldsymbol R}\rangle=\partial_{d_\alpha}S_{ij}(\boldsymbol d)\). Every directed partner block is stored explicitly.