|
occ
|
Class for storing and managing molecular grid points. More...
#include <molecular_grid_points.h>
Public Member Functions | |
| MolecularGridPoints ()=default | |
| Default constructor. | |
| MolecularGridPoints (const Mat3N &points, const Vec &weights, const std::vector< std::pair< size_t, size_t > > &atom_blocks) | |
| Construct from points, weights, and atom blocks. | |
| MolecularGridPoints (const std::vector< AtomGrid > &atom_grids) | |
| Construct from a vector of atom grids. | |
| void | initialize_from_atom_grids (const std::vector< AtomGrid > &atom_grids) |
| Initialize from a vector of atom grids. | |
| size_t | num_points () const |
| Get the total number of grid points. | |
| size_t | num_atoms () const |
| Get the number of atoms. | |
| const Mat3N & | points () const |
| Get all grid points. | |
| const Vec & | weights () const |
| Get all weights. | |
| const std::vector< std::pair< size_t, size_t > > & | atom_blocks () const |
| Get atom blocks info. | |
| Eigen::Ref< const Mat3N > | points_for_atom (size_t atom_idx) const |
| Get points for a specific atom. | |
| Eigen::Ref< const Vec > | weights_for_atom (size_t atom_idx) const |
| Get weights for a specific atom. | |
| AtomGrid | get_atom_grid (size_t atom_idx, uint_fast8_t atomic_number) const |
| Extract an atom grid for a specific atom. | |
| const occ::numint::SpatialGridHierarchy & | get_hierarchy (const occ::numint::SpatialHierarchySettings &settings={}) const |
| Get spatial hierarchy for efficient batch processing. | |
| bool | has_hierarchy () const |
| Check if hierarchy has been built. | |
| void | clear_hierarchy () |
| Clear cached hierarchy. | |
Class for storing and managing molecular grid points.
This class stores the combined grid points from multiple atom-centered grids, along with their weights and organization by atoms.
|
default |
Default constructor.
| occ::numint::MolecularGridPoints::MolecularGridPoints | ( | const Mat3N & | points, |
| const Vec & | weights, | ||
| const std::vector< std::pair< size_t, size_t > > & | atom_blocks ) |
Construct from points, weights, and atom blocks.
| points | Matrix of grid points (3 x N) |
| weights | Vector of weights (N) |
| atom_blocks | Vector of (offset, size) pairs for each atom |
| occ::numint::MolecularGridPoints::MolecularGridPoints | ( | const std::vector< AtomGrid > & | atom_grids | ) |
Construct from a vector of atom grids.
| atom_grids | Vector of atom-centered grids |
| const std::vector< std::pair< size_t, size_t > > & occ::numint::MolecularGridPoints::atom_blocks | ( | ) | const |
Get atom blocks info.
Each pair contains the offset and size of the grid points for each atom.
|
inline |
Clear cached hierarchy.
Call this if points are modified or you want to rebuild with different settings.
| AtomGrid occ::numint::MolecularGridPoints::get_atom_grid | ( | size_t | atom_idx, |
| uint_fast8_t | atomic_number ) const |
| const occ::numint::SpatialGridHierarchy & occ::numint::MolecularGridPoints::get_hierarchy | ( | const occ::numint::SpatialHierarchySettings & | settings = {} | ) | const |
Get spatial hierarchy for efficient batch processing.
Hierarchy is built lazily on first call and cached for subsequent calls. The hierarchy organizes grid points spatially using Morton ordering and provides batch access with precomputed bounding spheres.
| settings | Configuration for hierarchy construction |
|
inline |
Check if hierarchy has been built.
| void occ::numint::MolecularGridPoints::initialize_from_atom_grids | ( | const std::vector< AtomGrid > & | atom_grids | ) |
Initialize from a vector of atom grids.
| atom_grids | Vector of atom-centered grids |
| size_t occ::numint::MolecularGridPoints::num_atoms | ( | ) | const |
Get the number of atoms.
| size_t occ::numint::MolecularGridPoints::num_points | ( | ) | const |
Get the total number of grid points.
| const Mat3N & occ::numint::MolecularGridPoints::points | ( | ) | const |
Get all grid points.
| Eigen::Ref< const Mat3N > occ::numint::MolecularGridPoints::points_for_atom | ( | size_t | atom_idx | ) | const |
Get points for a specific atom.
| atom_idx | Index of the atom |
| std::out_of_range | if the atom index is invalid |
| const Vec & occ::numint::MolecularGridPoints::weights | ( | ) | const |
Get all weights.
| Eigen::Ref< const Vec > occ::numint::MolecularGridPoints::weights_for_atom | ( | size_t | atom_idx | ) | const |
Get weights for a specific atom.
| atom_idx | Index of the atom |
| std::out_of_range | if the atom index is invalid |