occ
Loading...
Searching...
No Matches
occ::dft::MolecularGridPoints Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MolecularGridPoints() [1/3]

occ::dft::MolecularGridPoints::MolecularGridPoints ( )
default

Default constructor.

◆ 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
pointsMatrix of grid points (3 x N)
weightsVector of weights (N)
atom_blocksVector 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_gridsVector of atom-centered grids

Member Function Documentation

◆ 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_idxIndex of the atom
atomic_numberAtomic number to assign to the grid
Returns
AtomGrid A new AtomGrid object for the specified atom
Exceptions
std::out_of_rangeif 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_gridsVector 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_idxIndex of the atom
Returns
Eigen::Ref<const Mat3N> Reference to the atom's grid points
Exceptions
std::out_of_rangeif 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_idxIndex of the atom
Returns
Eigen::Ref<const Vec> Reference to the atom's weights
Exceptions
std::out_of_rangeif the atom index is invalid

The documentation for this class was generated from the following file: