Class for storing and managing molecular grid points.
More...
#include <molecular_grid_points.h>
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.
◆ MolecularGridPoints() [1/3]
occ::dft::MolecularGridPoints::MolecularGridPoints |
( |
| ) |
|
|
default |
◆ MolecularGridPoints() [2/3]
occ::dft::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.
- Parameters
-
points | Matrix of grid points (3 x N) |
weights | Vector of weights (N) |
atom_blocks | Vector of (offset, size) pairs for each atom |
◆ MolecularGridPoints() [3/3]
occ::dft::MolecularGridPoints::MolecularGridPoints |
( |
const std::vector< AtomGrid > & |
atom_grids | ) |
|
Construct from a vector of atom grids.
- Parameters
-
atom_grids | Vector of atom-centered grids |
◆ atom_blocks()
const std::vector< std::pair< size_t, size_t > > & occ::dft::MolecularGridPoints::atom_blocks |
( |
| ) |
const |
Get atom blocks info.
Each pair contains the offset and size of the grid points for each atom.
- Returns
- const std::vector<std::pair<size_t, size_t>>& Vector of (offset, size) pairs
◆ get_atom_grid()
AtomGrid occ::dft::MolecularGridPoints::get_atom_grid |
( |
size_t |
atom_idx, |
|
|
uint_fast8_t |
atomic_number |
|
) |
| const |
Extract an atom grid for a specific atom.
- Parameters
-
atom_idx | Index of the atom |
atomic_number | Atomic number to assign to the grid |
- Returns
- AtomGrid A new AtomGrid object for the specified atom
- Exceptions
-
std::out_of_range | if the atom index is invalid |
◆ initialize_from_atom_grids()
void occ::dft::MolecularGridPoints::initialize_from_atom_grids |
( |
const std::vector< AtomGrid > & |
atom_grids | ) |
|
Initialize from a vector of atom grids.
- Parameters
-
atom_grids | Vector of atom-centered grids |
◆ num_atoms()
size_t occ::dft::MolecularGridPoints::num_atoms |
( |
| ) |
const |
Get the number of atoms.
- Returns
- size_t Number of atoms
◆ num_points()
size_t occ::dft::MolecularGridPoints::num_points |
( |
| ) |
const |
Get the total number of grid points.
- Returns
- size_t Total number of grid points
◆ points()
const Mat3N & occ::dft::MolecularGridPoints::points |
( |
| ) |
const |
Get all grid points.
- Returns
- const Mat3N& Matrix of all grid points (3 x N)
◆ points_for_atom()
Eigen::Ref< const Mat3N > occ::dft::MolecularGridPoints::points_for_atom |
( |
size_t |
atom_idx | ) |
const |
Get points for a specific atom.
- Parameters
-
atom_idx | Index of the atom |
- Returns
- Eigen::Ref<const Mat3N> Reference to the atom's grid points
- Exceptions
-
std::out_of_range | if the atom index is invalid |
◆ weights()
const Vec & occ::dft::MolecularGridPoints::weights |
( |
| ) |
const |
Get all weights.
- Returns
- const Vec& Vector of all weights (N)
◆ weights_for_atom()
Eigen::Ref< const Vec > occ::dft::MolecularGridPoints::weights_for_atom |
( |
size_t |
atom_idx | ) |
const |
Get weights for a specific atom.
- Parameters
-
atom_idx | Index of the atom |
- Returns
- Eigen::Ref<const Vec> Reference to the atom's weights
- Exceptions
-
std::out_of_range | if the atom index is invalid |
The documentation for this class was generated from the following file: