Operators and diagnostics
If you want the narrative workflow before the API details, start with:
Small doctest
julia> using GaussletBases
julia> rb = build_basis(RadialBasisSpec(:G10; rmax = 8.0, mapping = AsinhMapping(c = 0.1, s = 0.2), xgaussian_count = 0));
julia> grid = radial_quadrature(rb; accuracy = :medium);
julia> size(kinetic_matrix(rb, grid)) == (length(rb), length(rb))
trueThis tiny doctest uses xgaussian_count = 0 to keep the reference example lightweight. The recommended public atomic setup still uses the default xgaussian supplement unless you have a specific reason to turn it off.
Diagnostics and quadrature
GaussletBases.basis_diagnostics — Function
basis_diagnostics(basis)
basis_diagnostics(basis, grid)Return a small diagnostics summary for basis.
The one-argument form chooses its own integration grid. For radial bases, that grid is intentionally conservative and uses the same default accuracy = :high quadrature profile as radial_quadrature(basis), so the default diagnostics are less likely to be dominated by outer-tail truncation.
The returned named tuple currently includes:
overlap_errormoment_centerscenter_mismatchesD
For a first check, diag.overlap_error and diag.D are usually the most useful fields to inspect.
GaussletBases.radial_quadrature — Function
radial_quadrature(basis::RadialBasis; accuracy=:high, refine=nothing, quadrature_rmax=nothing)Build a fine physical-space quadrature grid matched to basis.
With no keywords, the routine chooses a conservative quadrature cutoff from the retained radial basis support itself and uses the :high accuracy profile. Construction/setup extents used while building the basis are separate internal objects and are not set by this API.
accuracy may be :medium, :high, or :veryhigh. :medium reproduces the older cheaper overlap-focused behavior. :high is the default and also checks that simple basis diagnostics have stabilized across refinement. :veryhigh pushes the same checks farther. refine is an optional expert starting resolution hint. quadrature_rmax is an optional explicit physical-space cutoff override kept for expert compatibility. If an explicit cutoff is too short to cover the retained basis support, the routine warns rather than silently reporting good overlap on a truncated grid. On the automatic default path, the routine returns quietly once it reaches the repo's public-quality overlap regime even if the stricter internal refinement-stability target has not been met yet.
GaussletBases.quadrature_points — Function
quadrature_points(grid)Return the physical-space quadrature points of grid.
GaussletBases.quadrature_weights — Function
quadrature_weights(grid)Return the physical-space quadrature weights of grid.
One-body radial operators
GaussletBases.overlap_matrix — Function
overlap_matrix(set::PrimitiveSet1D)Build the primitive overlap matrix for set.
The public call chooses the available backend automatically. Plain full-line Gaussian sets use analytic formulas. Distorted or otherwise unsupported primitive content falls back to numerical quadrature over the explicit primitive support.
overlap_matrix(basis::RadialBasis, grid::RadialQuadratureGrid)Build the radial overlap matrix of basis on the supplied quadrature grid.
The quadrature grid is used directly. No hidden grid is constructed inside this builder.
overlap_matrix(set::PrimitiveSet1D, grid::RadialQuadratureGrid)Build the primitive-space radial overlap matrix of set on the supplied quadrature grid.
This is intended for the primitive layer behind a RadialBasis, for example through primitive_set(rb).
GaussletBases.kinetic_matrix — Function
kinetic_matrix(set::PrimitiveSet1D)Build the primitive one-body kinetic matrix
<phi_mu | -0.5 d^2/dx^2 | phi_nu>for set.
As with overlap_matrix(set), the public call chooses the available backend automatically.
kinetic_matrix(basis::RadialBasis, grid::RadialQuadratureGrid)Build the reduced-radial kinetic-energy matrix
<chi_a | -0.5 d^2/dr^2 | chi_b>on the supplied quadrature grid.
kinetic_matrix(set::PrimitiveSet1D, grid::RadialQuadratureGrid)Build the primitive-space reduced-radial kinetic-energy matrix
<phi_mu | -0.5 d^2/dr^2 | phi_nu>on the supplied quadrature grid.
GaussletBases.nuclear_matrix — Function
nuclear_matrix(basis::RadialBasis, grid::RadialQuadratureGrid; Z)Build the reduced-radial nuclear attraction matrix
<chi_a | -Z / r | chi_b>on the supplied quadrature grid.
nuclear_matrix(set::PrimitiveSet1D, grid::RadialQuadratureGrid; Z)Build the primitive-space reduced-radial nuclear attraction matrix
<phi_mu | -Z / r | phi_nu>on the supplied quadrature grid.
GaussletBases.centrifugal_matrix — Function
centrifugal_matrix(basis::RadialBasis, grid::RadialQuadratureGrid; l)Build the reduced-radial centrifugal matrix
<chi_a | l(l + 1) / (2 r^2) | chi_b>on the supplied quadrature grid.
centrifugal_matrix(set::PrimitiveSet1D, grid::RadialQuadratureGrid; l)Build the primitive-space reduced-radial centrifugal matrix
<phi_mu | l(l + 1) / (2 r^2) | phi_nu>on the supplied quadrature grid.
GaussletBases.multipole_matrix — Function
multipole_matrix(basis::RadialBasis, grid::RadialQuadratureGrid;
L::Int,
approximation::AbstractDiagonalApproximation = IntegralDiagonal())Build the v0 supported two-index radial multipole matrix on the supplied quadrature grid.
In this release, multipole_matrix means the IDA-style two-index radial object used together with separate angular Gaunt/Ylm machinery. It does not represent an exact four-index electron-electron tensor.
centrifugal_matrix(rb, grid; l) is a single fixed-l radial block. It is not yet the full explicit atomic (l,m) Hamiltonian. The usual next step is:
radial_ops = atomic_operators(rb, grid; Z = Z, lmax = 2)
atom = atomic_one_body_operators(radial_ops; lmax = 2)which repeats the fixed-l radial blocks over the explicit YlmChannel list.
Radial atomic bundle
GaussletBases.RadialAtomicOperators — Type
RadialAtomicOperatorsBundle of radial one-body matrices and precomputed radial multipole tables built for a RadialBasis on an explicit RadialQuadratureGrid.
Use ops.overlap, ops.kinetic, and ops.nuclear for the fixed one-body matrices, and centrifugal(ops, l) / multipole(ops, L) for the indexed families.
GaussletBases.atomic_operators — Function
atomic_operators(basis::RadialBasis, grid::RadialQuadratureGrid;
Z,
lmax::Int = 0,
approximation::AbstractDiagonalApproximation = IntegralDiagonal())Build the high-level radial operator bundle for basis on the supplied quadrature grid.
The bundle stores:
ops.overlapops.kineticops.nuclearcentrifugal(ops, l)forl = 0:lmaxmultipole(ops, L)forL = 0:(2 * lmax)
GaussletBases.centrifugal — Function
centrifugal(ops::RadialAtomicOperators, l::Int)Return the precomputed centrifugal matrix for angular momentum l.
GaussletBases.multipole — Function
multipole(ops::RadialAtomicOperators, L::Int)Return the precomputed radial two-index IDA multipole matrix for multipole order L.