excgrid 0.1.0
Grid + XC-kernel + D3 library
Loading...
Searching...
No Matches
Molecular block-grid construction

Classes

class  excgrid::RadialGrid
class  excgrid::AngularGrid
struct  excgrid::GridParams
struct  excgrid::Block
class  excgrid::BlockGrid

Functions

static Result< RadialGrid > excgrid::RadialGrid::Create (std::size_t pointCount, double alpha, std::size_t exponent=2)
std::size_t excgrid::RadialGrid::Size () const noexcept
std::span< const double > excgrid::RadialGrid::Points () const noexcept
std::span< const double > excgrid::RadialGrid::Weights () const noexcept
static Result< AngularGrid > excgrid::AngularGrid::Create (std::size_t pointCount)
std::size_t excgrid::AngularGrid::Size () const noexcept
std::size_t excgrid::AngularGrid::Degree () const noexcept
std::array< double, 3 > excgrid::AngularGrid::Point (std::size_t index) const noexcept
double excgrid::AngularGrid::Weight (std::size_t index) const noexcept
static Result< BlockGrid > excgrid::BlockGrid::Create (const Geometry &geometry, const GridParams &params={})
std::size_t excgrid::BlockGrid::BlockCount () const noexcept
std::span< const Blockexcgrid::BlockGrid::Blocks () const noexcept
std::size_t excgrid::BlockGrid::TotalPointCount () const noexcept

Variables

static constexpr std::span< const std::size_t, internal::kLebedevSizeCount > excgrid::AngularGrid::kAvailableSizes
 The available point counts, smallest first.
std::size_t excgrid::GridParams::radialPoints = 75
 Radial points per atom.
std::size_t excgrid::GridParams::angularPoints = 302
 A Lebedev size (AngularGrid::kAvailableSizes).
double excgrid::GridParams::alpha = 0.5
 Radial mapping scale, Bohr.
std::size_t excgrid::GridParams::radialExponent = 2
 The MHL mapping exponent m.
double excgrid::GridParams::trimWeight = 1e-15
 Points with |weight| below this are dropped.
std::size_t excgrid::GridParams::blockTarget = 1024
 Spatial re-batching target (points per block).
std::size_t excgrid::Block::pointCount = 0
 Points in the block.
std::vector< std::array< double, 3 > > excgrid::Block::points
 pointCount positions, Bohr.
std::vector< double > excgrid::Block::weights
 pointCount quadrature weights.
std::vector< std::size_t > excgrid::Block::atomIndex
 pointCount owning atoms.

Detailed Description

The radial and angular quadratures, the Becke fuzzy-cell partition, and the trimmed, spatially re-batched molecular blocks the kernel consumers walk (docs/kernel-api.md section 5).

Function Documentation

◆ BlockCount()

std::size_t excgrid::BlockGrid::BlockCount ( ) const
inlinenodiscardnoexcept

The number of blocks.

Returns
The block count.

◆ Blocks()

std::span< const Block > excgrid::BlockGrid::Blocks ( ) const
inlinenodiscardnoexcept

The blocks, in iteration order.

Returns
The block span.

◆ Create() [1/3]

Result< AngularGrid > excgrid::AngularGrid::Create ( std::size_t pointCount)
static

Creates the quadrature with the given point count.

Parameters
pointCountA size from kAvailableSizes.
Returns
The grid, or kInvalidArgument for a non-Lebedev count.

◆ Create() [2/3]

Result< BlockGrid > excgrid::BlockGrid::Create ( const Geometry & geometry,
const GridParams & params = {} )
static

Builds the grid for the geometry.

Parameters
geometryThe molecule whose atoms center the sub-grids.
paramsThe build parameters.
Returns
The grid, or an Error from the underlying quadratures.

◆ Create() [3/3]

Result< RadialGrid > excgrid::RadialGrid::Create ( std::size_t pointCount,
double alpha,
std::size_t exponent = 2 )
static

Creates the quadrature.

Parameters
pointCountRadial points; the outermost lies at r_max.
alphaLength scale of the mapping (Bohr).
exponentThe mapping exponent m; 2 is the standard choice.
Returns
The grid, or kInvalidArgument for a zero point count or a zero exponent.

◆ Degree()

std::size_t excgrid::AngularGrid::Degree ( ) const
inlinenodiscardnoexcept

The algebraic degree of exactness of the quadrature.

Returns
The exactness degree.

◆ Point()

std::array< double, 3 > excgrid::AngularGrid::Point ( std::size_t index) const
nodiscardnoexcept

The unit-sphere node at index (Bohr-free unit vector).

Parameters
indexThe node index in [0, Size()).
Returns
The node triple.

◆ Points()

std::span< const double > excgrid::RadialGrid::Points ( ) const
inlinenodiscardnoexcept

The radial points, innermost first.

Returns
The point span (Bohr).

◆ Size() [1/2]

std::size_t excgrid::AngularGrid::Size ( ) const
inlinenodiscardnoexcept

The number of quadrature nodes.

Returns
The node count.

◆ Size() [2/2]

std::size_t excgrid::RadialGrid::Size ( ) const
inlinenodiscardnoexcept

The radial point count.

Returns
The point count.

◆ TotalPointCount()

std::size_t excgrid::BlockGrid::TotalPointCount ( ) const
inlinenodiscardnoexcept

The total point count across all blocks.

Returns
The total point count.

◆ Weight()

double excgrid::AngularGrid::Weight ( std::size_t index) const
nodiscardnoexcept

The node weight at index (weights sum to 4 pi).

Parameters
indexThe node index in [0, Size()).
Returns
The weight.

◆ Weights()

std::span< const double > excgrid::RadialGrid::Weights ( ) const
inlinenodiscardnoexcept

The radial weights (Jacobian included, no r^2 factor).

Returns
The weight span.

Variable Documentation

◆ kAvailableSizes

std::span<const std::size_t, internal::kLebedevSizeCount> excgrid::AngularGrid::kAvailableSizes
staticconstexpr
Initial value:
=
internal::kLebedevSizes

The available point counts, smallest first.