|
occ
|
Namespaces | |
| namespace | grid |
Classes | |
| struct | GridSettings |
| Extended settings for Becke grid generation. More... | |
| struct | PartitionMethod |
| struct | RadialGrid |
| Structure to hold radial grid data. More... | |
| struct | AtomGrid |
| Structure to hold atom-centered grid data. More... | |
| class | BeckeWeightDerivative |
| Per-point derivatives of Becke-partitioned weights. More... | |
| struct | OrcaCOSXAtomicGrid |
| One ORCA 6.1 COSX atomic grid: number of radial shells, the M3 scaling xi (bohr), and the angular grid as runs of (Lebedev order, shell count) from the nucleus outwards. More... | |
| class | MolecularGrid |
| Class for molecular integration grids in DFT. More... | |
| class | MolecularGridPoints |
| Class for storing and managing molecular grid points. More... | |
| struct | GridBoundingSphere |
| Bounding sphere for a group of grid points. More... | |
| struct | GridBatchLeaf |
| Leaf node containing grid point batch. More... | |
| struct | SpatialHierarchySettings |
| Configuration for hierarchy construction. More... | |
| class | SpatialGridHierarchy |
| Spatial hierarchy for molecular grid points using Morton ordering. More... | |
| class | AOBasis |
Enumerations | |
| enum class | PruningScheme { None , NWChem , NumGrid } |
| Enumeration of available angular pruning schemes. More... | |
| enum class | GridQuality { Coarse , Standard , Fine , VeryFine } |
| Standard grid quality levels (similar to Q-Chem's SG system). More... | |
| enum class | COSXGridLevel { Grid1 , Grid2 , Grid3 } |
| COSX/SGX grid levels matching ORCA's GRIDX scheme. More... | |
| enum class | PartitionFunction { Becke , StratmannScuseria } |
| Enumeration of available partition functions for atomic weight calculation. More... | |
| enum class | RadialGridMethod { LMG , TreutlerAlrichs , MuraKnowles , Becke , GaussChebyshev , EulerMaclaurin } |
| Enumeration of available radial grid generation methods. More... | |
Functions | |
| GridSettings | get_grid_settings (GridQuality quality) |
| Get grid settings for a specific quality level. | |
| std::string | grid_quality_to_string (GridQuality quality) |
| Convert GridQuality enum to string. | |
| GridQuality | grid_quality_from_string (const std::string &str) |
| Convert string to GridQuality enum. | |
| std::string | cosx_grid_level_to_string (COSXGridLevel level) |
| Convert COSXGridLevel enum to string. | |
| double | cosx_grid_int_acc (COSXGridLevel level) |
| Get IntAcc value for a COSX grid level. | |
| size_t | calculate_radial_points_orca (double int_acc, size_t atomic_number, double b=5.0) |
| Calculate number of radial points using ORCA's formula. | |
| void | print_cosx_grid_summary (const GridSettings &settings, COSXGridLevel level, size_t num_points, size_t num_batches, size_t num_atoms) |
| Print ORCA-style grid generation summary. | |
| uint_fast16_t | nearest_grid_level_at_or_above (uint_fast16_t n) |
| Find the nearest Lebedev grid level at or above the requested number of points. | |
| uint_fast16_t | nearest_grid_level_below (uint_fast16_t n) |
| Find the nearest Lebedev grid level below the requested number of points. | |
| size_t | angular_point_count (size_t level) |
| Get the number of points in a Lebedev grid. | |
| double | get_atomic_radius (size_t atomic_number) |
| Get the atomic radius for a given atomic number. | |
| Vec | becke_partition (const Vec &w) |
| Apply the Becke partition function. | |
| Vec | stratmann_scuseria_partition (const Vec &w) |
| Apply the Stratmann-Scuseria partition function. | |
| Mat | calculate_interatomic_distances (const Mat3N &positions) |
| Calculate interatomic distances. | |
| Mat3N | becke_weight_gradient (const Mat3N &points, const Vec &weights, const std::vector< std::pair< size_t, size_t > > &atom_blocks, const Vec &e, const Mat3N &positions, const Vec &radii, bool treutler_ahlrichs) |
| Grid-weight response: sum_g e_g dw_g/dR_B for every atom B. | |
| Mat | becke_weight_hessian (const Mat3N &points, const Vec &weights, const std::vector< std::pair< size_t, size_t > > &atom_blocks, const Vec &e, const Mat3N &positions, const Vec &radii, bool treutler_ahlrichs) |
| Second-order grid-weight response: sum_g e_g d2 w_g / dR_X dR_Y (3N x 3N), points moving with their parent atoms, e_g held fixed. | |
| Mat | calculate_atomic_grid_weights (PartitionMethod method, const Mat &grid_points, const Mat &atomic_positions, const Vec &radii, const Mat &interatomic_distances) |
| Calculate Becke atomic weights for grid points. | |
| IVec | prune_nwchem_scheme (size_t nuclear_charge, size_t max_angular, size_t num_radial, const Vec &radii) |
| Apply the NWChem pruning scheme to a radial grid. | |
| IVec | prune_numgrid_scheme (size_t atomic_number, size_t max_angular, size_t min_angular, const Vec &radii) |
| Apply the NumGrid pruning scheme to a radial grid. | |
| IVec | prune_orca_scheme (size_t atomic_number, const std::array< size_t, 5 > ®ion_grids, const Vec &radii) |
| Apply ORCA-style 5-region angular pruning. | |
| RadialGrid | generate_becke_radial_grid (size_t num_points, double rm=1.0) |
| Generate a Becke radial grid. | |
| RadialGrid | generate_mura_knowles_radial_grid (size_t num_points, size_t charge) |
| Generate a Mura-Knowles radial grid. | |
| RadialGrid | generate_treutler_alrichs_radial_grid (size_t num_points) |
| Generate a Treutler-Alrichs radial grid. | |
| RadialGrid | generate_perez_jorda_m3_radial_grid (size_t num_points, double xi) |
| Perez-Jorda Gauss-Chebyshev (second kind) quadrature with the Treutler-Ahlrichs M3 mapping r = xi / ln 2 * ln(2 / (1 - x)). | |
| OrcaCOSXAtomicGrid | orca_cosx_atomic_grid (int atomic_number, int level) |
| ORCA 6.1 COSX atomic grid for an element and GRIDX level (1-3). | |
| RadialGrid | generate_gauss_chebyshev_radial_grid (size_t num_points) |
| Generate a Gauss-Chebyshev radial grid. | |
| RadialGrid | generate_gauss_chebyshev_m3_radial_grid (size_t num_points, size_t atomic_number) |
| Generate a Gauss-Chebyshev radial grid with M3 mapping. | |
| RadialGrid | generate_euler_maclaurin_radial_grid (size_t num_points, double alpha) |
| Generate a Euler-Maclaurin radial grid. | |
| RadialGrid | generate_lmg_radial_grid (size_t atomic_number, double radial_precision, double alpha_max, int l_max, const occ::Vec &alpha_min) |
| Generate a Lindh-Malmqvist-Gagliardi (LMG) radial grid. | |
| double | lmg_inner (const double max_error, const double alpha_inner) |
| Helper function to calculate LMG inner radial boundary. | |
| double | lmg_outer (const double max_error, const double alpha_outer, const int l, const double guess) |
| Helper function to calculate LMG outer radial boundary. | |
| double | lmg_h (const double max_error, const int l, const double guess) |
| Helper function to calculate LMG grid spacing parameter. | |
| AtomGrid | generate_atom_grid (size_t atomic_number, const GridSettings &settings, RadialGridMethod method=RadialGridMethod::LMG, double alpha_max=0.0, int l_max=0, const Vec &alpha_min=Vec()) |
| Generate an atom-centered grid using the specified method. | |
Variables | |
| const std::array< uint_fast16_t, 33 > | lebedev_grid_levels |
| Array of available Lebedev grid levels. | |
|
strong |
COSX/SGX grid levels matching ORCA's GRIDX scheme.
ORCA uses 3 grid levels for COSX with specific IntAcc values and 5-region angular pruning. These correspond to GRIDX 1, 2, 3 in ORCA.
| Enumerator | |
|---|---|
| Grid1 | GRIDX 1: IntAcc=3.816, max 50 Lebedev points. |
| Grid2 | GRIDX 2: IntAcc=4.020, max 110 Lebedev points. |
| Grid3 | GRIDX 3: IntAcc=4.338, max 194 Lebedev points. |
|
strong |
Standard grid quality levels (similar to Q-Chem's SG system).
|
strong |
|
strong |
|
strong |
| size_t occ::numint::angular_point_count | ( | size_t | level | ) |
Get the number of points in a Lebedev grid.
| level | The Lebedev grid level |
Apply the Becke partition function.
| w | Input values to partition |
| Mat3N occ::numint::becke_weight_gradient | ( | const Mat3N & | points, |
| const Vec & | weights, | ||
| const std::vector< std::pair< size_t, size_t > > & | atom_blocks, | ||
| const Vec & | e, | ||
| const Mat3N & | positions, | ||
| const Vec & | radii, | ||
| bool | treutler_ahlrichs ) |
Grid-weight response: sum_g e_g dw_g/dR_B for every atom B.
w_g = w0_g P_A(r_g) / sum_C P_C(r_g) is the Becke-partitioned weight of a point attached to its parent atom A (the point moves with A). This returns the derivative of sum_g e_g w_g with e_g held fixed, 3 x natoms. Only the Becke partition (with Becke or Treutler-Ahlrichs size adjustment, exactly as calculate_atomic_grid_weights builds it) is supported.
| points | all grid points (3 x N), grouped by parent atom |
| weights | the partitioned weights w_g |
| atom_blocks | (offset, count) of each atom's points |
| e | per-point quantity e_g (e.g. the XC energy density) |
| positions | atomic positions (3 x natoms) |
| radii | atomic radii used by the size adjustment |
| treutler_ahlrichs | whether the Treutler-Ahlrichs adjustment was used |
| Mat occ::numint::becke_weight_hessian | ( | const Mat3N & | points, |
| const Vec & | weights, | ||
| const std::vector< std::pair< size_t, size_t > > & | atom_blocks, | ||
| const Vec & | e, | ||
| const Mat3N & | positions, | ||
| const Vec & | radii, | ||
| bool | treutler_ahlrichs ) |
Second-order grid-weight response: sum_g e_g d2 w_g / dR_X dR_Y (3N x 3N), points moving with their parent atoms, e_g held fixed.
Same partition as becke_weight_gradient.
| Mat occ::numint::calculate_atomic_grid_weights | ( | PartitionMethod | method, |
| const Mat & | grid_points, | ||
| const Mat & | atomic_positions, | ||
| const Vec & | radii, | ||
| const Mat & | interatomic_distances ) |
Calculate Becke atomic weights for grid points.
| grid_points | Grid points (3 x N) |
| atomic_positions | Atomic positions (3 x M) |
| radii | atomic radii (M) |
| interatomic_distances | Matrix of interatomic distances (M x M) |
Calculate interatomic distances.
| positions | Atomic positions (3 x N) |
| size_t occ::numint::calculate_radial_points_orca | ( | double | int_acc, |
| size_t | atomic_number, | ||
| double | b = 5.0 ) |
Calculate number of radial points using ORCA's formula.
Uses: nr = (15 * IntAcc - 40) + b * ROW where ROW is the periodic table row of the element
| int_acc | IntAcc parameter |
| atomic_number | Atomic number of the element |
| b | Row multiplier (default 5.0) |
| double occ::numint::cosx_grid_int_acc | ( | COSXGridLevel | level | ) |
Get IntAcc value for a COSX grid level.
Returns the ORCA IntAcc parameter for the given COSX grid level
| level | COSX grid level |
| std::string occ::numint::cosx_grid_level_to_string | ( | COSXGridLevel | level | ) |
Convert COSXGridLevel enum to string.
| level | COSX grid level |
| AtomGrid occ::numint::generate_atom_grid | ( | size_t | atomic_number, |
| const GridSettings & | settings, | ||
| RadialGridMethod | method = RadialGridMethod::LMG, | ||
| double | alpha_max = 0.0, | ||
| int | l_max = 0, | ||
| const Vec & | alpha_min = Vec() ) |
Generate an atom-centered grid using the specified method.
| atomic_number | Atomic number of the center atom |
| settings | Grid generation settings |
| method | The radial grid method to use |
| alpha_max | Maximum exponent from basis set (optional) |
| l_max | Maximum angular momentum from basis set (optional) |
| alpha_min | Minimum exponents for each angular momentum (optional) |
| RadialGrid occ::numint::generate_becke_radial_grid | ( | size_t | num_points, |
| double | rm = 1.0 ) |
Generate a Becke radial grid.
Reference: A. D. Becke, J. Chem. Phys. 88, 2547 (1988)
| num_points | Number of radial points |
| rm | Scaling parameter |
| RadialGrid occ::numint::generate_euler_maclaurin_radial_grid | ( | size_t | num_points, |
| double | alpha ) |
Generate a Euler-Maclaurin radial grid.
| num_points | Number of radial points |
| alpha |
| RadialGrid occ::numint::generate_gauss_chebyshev_m3_radial_grid | ( | size_t | num_points, |
| size_t | atomic_number ) |
Generate a Gauss-Chebyshev radial grid with M3 mapping.
Uses the Treutler-Alrichs M3 mapping for transforming the Gauss-Chebyshev quadrature to an infinite interval suitable for atomic integrals: r = (xi / ln2) * ln(2 / (1-x)) where xi is a scaling parameter based on the atomic radius.
Reference: O. Treutler and R. Ahlrichs, J. Chem. Phys. 102, 346 (1995)
| num_points | Number of radial points |
| atomic_number | Atomic number (used for xi scaling) |
| RadialGrid occ::numint::generate_gauss_chebyshev_radial_grid | ( | size_t | num_points | ) |
Generate a Gauss-Chebyshev radial grid.
| num_points | Number of radial points |
| RadialGrid occ::numint::generate_lmg_radial_grid | ( | size_t | atomic_number, |
| double | radial_precision, | ||
| double | alpha_max, | ||
| int | l_max, | ||
| const occ::Vec & | alpha_min ) |
Generate a Lindh-Malmqvist-Gagliardi (LMG) radial grid.
Reference: T. Helgaker, P. Jørgensen, J. Olsen, "Molecular Electronic Structure Theory", John Wiley & Sons, 2000
| atomic_number | Atomic number |
| radial_precision | Precision parameter for the radial grid |
| alpha_max | Maximum exponent |
| l_max | Maximum angular momentum |
| alpha_min | Minimum exponents for each angular momentum |
| RadialGrid occ::numint::generate_mura_knowles_radial_grid | ( | size_t | num_points, |
| size_t | charge ) |
Generate a Mura-Knowles radial grid.
Reference: M. E. Mura and P. J. Knowles, J. Chem. Phys. 104, 9848 (1996)
| num_points | Number of radial points |
| charge | Atomic number |
| RadialGrid occ::numint::generate_perez_jorda_m3_radial_grid | ( | size_t | num_points, |
| double | xi ) |
Perez-Jorda Gauss-Chebyshev (second kind) quadrature with the Treutler-Ahlrichs M3 mapping r = xi / ln 2 * ln(2 / (1 - x)).
Nodes x_i = (n+1-2i)/(n+1) + 2/pi (1 + 2/3 sin^2 t_i) cos t_i sin t_i, weights 16/(3(n+1)) sin^4 t_i, t_i = i pi / (n+1) [Perez-Jorda, San-Fabian, Moscardo, Comput. Phys. Commun. 70, 271 (1992)]. This is ORCA's "OptM3 with GC (2021)" radial grid. Weights include r^2 (not 4 pi); points ascending.
| RadialGrid occ::numint::generate_treutler_alrichs_radial_grid | ( | size_t | num_points | ) |
Generate a Treutler-Alrichs radial grid.
Reference: O. Treutler and R. Ahlrichs, J. Chem. Phys. 102, 346 (1995)
| num_points | Number of radial points |
| double occ::numint::get_atomic_radius | ( | size_t | atomic_number | ) |
Get the atomic radius for a given atomic number.
| atomic_number | The atomic number |
| GridSettings occ::numint::get_grid_settings | ( | GridQuality | quality | ) |
Get grid settings for a specific quality level.
| quality | Grid quality level |
| GridQuality occ::numint::grid_quality_from_string | ( | const std::string & | str | ) |
Convert string to GridQuality enum.
| str | String representation (case-insensitive) |
| std::invalid_argument | if string is not recognized |
| std::string occ::numint::grid_quality_to_string | ( | GridQuality | quality | ) |
Convert GridQuality enum to string.
| quality | Grid quality level |
| double occ::numint::lmg_h | ( | const double | max_error, |
| const int | l, | ||
| const double | guess ) |
Helper function to calculate LMG grid spacing parameter.
| max_error | Maximum error parameter |
| l | Angular momentum |
| guess | Initial guess for the spacing |
| double occ::numint::lmg_inner | ( | const double | max_error, |
| const double | alpha_inner ) |
Helper function to calculate LMG inner radial boundary.
| max_error | Maximum error parameter |
| alpha_inner | Inner alpha parameter |
| double occ::numint::lmg_outer | ( | const double | max_error, |
| const double | alpha_outer, | ||
| const int | l, | ||
| const double | guess ) |
Helper function to calculate LMG outer radial boundary.
| max_error | Maximum error parameter |
| alpha_outer | Outer alpha parameter |
| l | Angular momentum |
| guess | Initial guess for the boundary |
| uint_fast16_t occ::numint::nearest_grid_level_at_or_above | ( | uint_fast16_t | n | ) |
Find the nearest Lebedev grid level at or above the requested number of points.
| n | Requested number of angular points |
| uint_fast16_t occ::numint::nearest_grid_level_below | ( | uint_fast16_t | n | ) |
Find the nearest Lebedev grid level below the requested number of points.
| n | Requested number of angular points |
| OrcaCOSXAtomicGrid occ::numint::orca_cosx_atomic_grid | ( | int | atomic_number, |
| int | level ) |
ORCA 6.1 COSX atomic grid for an element and GRIDX level (1-3).
Measured from the grids ORCA 6.1.1 writes for single atoms (exact to 1e-9 in radii and weights). Returns num_radial == 0 for Z > 86.
| void occ::numint::print_cosx_grid_summary | ( | const GridSettings & | settings, |
| COSXGridLevel | level, | ||
| size_t | num_points, | ||
| size_t | num_batches, | ||
| size_t | num_atoms ) |
Print ORCA-style grid generation summary.
Prints a summary similar to ORCA's "COSX GRID GENERATION" output:
| settings | Grid settings used |
| level | COSX grid level (Grid1, Grid2, Grid3) |
| num_points | Total number of grid points |
| num_batches | Number of batches |
| num_atoms | Number of atoms |
| IVec occ::numint::prune_numgrid_scheme | ( | size_t | atomic_number, |
| size_t | max_angular, | ||
| size_t | min_angular, | ||
| const Vec & | radii ) |
Apply the NumGrid pruning scheme to a radial grid.
| atomic_number | Atomic number |
| max_angular | Maximum number of angular points |
| min_angular | Minimum number of angular points |
| radii | Radial grid points |
| IVec occ::numint::prune_nwchem_scheme | ( | size_t | nuclear_charge, |
| size_t | max_angular, | ||
| size_t | num_radial, | ||
| const Vec & | radii ) |
Apply the NWChem pruning scheme to a radial grid.
| nuclear_charge | Atomic number |
| max_angular | Maximum number of angular points |
| num_radial | Number of radial points |
| radii | Radial grid points |
| IVec occ::numint::prune_orca_scheme | ( | size_t | atomic_number, |
| const std::array< size_t, 5 > & | region_grids, | ||
| const Vec & | radii ) |
Apply ORCA-style 5-region angular pruning.
ORCA divides the radial grid into 5 regions, each with a different number of angular points. The region boundaries are scaled by the atomic radius and are optimized for each element.
| atomic_number | Atomic number |
| region_grids | Array of 5 Lebedev grid sizes for each region |
| radii | Radial grid points in Bohr |
Apply the Stratmann-Scuseria partition function.
| w | Input values to partition |
|
extern |
Array of available Lebedev grid levels.
Each element in the array represents a valid number of Lebedev grid points.