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))
true

This 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_diagnosticsFunction
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_error
  • moment_centers
  • center_mismatches
  • D

For a first check, diag.overlap_error and diag.D are usually the most useful fields to inspect.

source
GaussletBases.radial_quadratureFunction
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.

source

One-body radial operators

GaussletBases.overlap_matrixFunction
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.

source
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.

source
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).

source
GaussletBases.kinetic_matrixFunction
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.

source
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.

source
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.

source
GaussletBases.nuclear_matrixFunction
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.

source
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.

source
GaussletBases.centrifugal_matrixFunction
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.

source
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.

source
GaussletBases.multipole_matrixFunction
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.

source

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.RadialAtomicOperatorsType
RadialAtomicOperators

Bundle 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.

source
GaussletBases.atomic_operatorsFunction
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.overlap
  • ops.kinetic
  • ops.nuclear
  • centrifugal(ops, l) for l = 0:lmax
  • multipole(ops, L) for L = 0:(2 * lmax)
source
GaussletBases.centrifugalFunction
centrifugal(ops::RadialAtomicOperators, l::Int)

Return the precomputed centrifugal matrix for angular momentum l.

source
GaussletBases.multipoleFunction
multipole(ops::RadialAtomicOperators, L::Int)

Return the precomputed radial two-index IDA multipole matrix for multipole order L.

source