Molecular grid settings#
This section provides a reference for the settings related to molecular grids in GauXC, including C++ class definitions, C bindings, and Fortran bindings for creating and managing molecular grids used in numerical integration schemes.
C++ definitions#
This section provides C++ class definitions provided by the gauxc/molgrid.hpp header.
-
class GauXC::MolGrid#
Molecular integration grid container.
MolGrid aggregates atom-centered quadrature grids for each atomic number and exposes access to per-element grids and batch sizing information for numerical integration.
-
inline MolGrid GauXC::MolGridFactory::create_default_molgrid(const Molecule &mol, PruningScheme scheme, BatchSize bsz, RadialQuad radial_quad, AtomicGridSizeDefault grid_size)#
Create a default MolGrid for the given molecule using the specified pruning scheme, batch size, radial quadrature, and atomic grid size. This constructor is available from the
gauxc/molgrid/defaults.hppheader.- Parameters:
mol – The molecule for which to create the MolGrid.
scheme – The pruning scheme to use for constructing the molecular grid weights from the atomic grids.
bsz – The batch size for processing grid points in parallel.
radial_quad – The radial quadrature scheme to use for the atomic grids.
grid_size – The default atomic grid size to use for the atomic grids.
- Returns:
A MolGrid object initialized with the specified parameters for the given molecule.
-
inline MolGrid GauXC::MolGridFactory::create_default_molgrid(const Molecule &mol, PruningScheme scheme, BatchSize bsz, RadialQuad radial_quad, RadialSize rad_size, AngularSize ang_size)#
Create a default MolGrid for the given molecule using the specified pruning scheme, batch size, radial quadrature, and explicit radial and angular sizes. This constructor is available from the
gauxc/molgrid/defaults.hppheader.- Parameters:
mol – The molecule for which to create the MolGrid.
scheme – The pruning scheme to use for constructing the molecular grid weights from the atomic grids.
bsz – The batch size for processing grid points in parallel.
radial_quad – The radial quadrature scheme to use for the atomic grids.
rad_size – The radial size to use for the atomic grids.
ang_size – The angular size to use for the atomic grids.
- Returns:
A MolGrid object initialized with the specified parameters for the given molecule.
-
inline MolGrid GauXC::MolGridFactory::create_default_molgrid(const Molecule &mol, PruningScheme scheme, BatchSize bsz, RadialQuad radial_quad, AtomicGridSizeDefault grid_size)#
The enumerator values are available from the gauxc/enums.hpp header.
-
enum class GauXC::AtomicGridSizeDefault#
Enumeration of default atomic grid sizes for molecular integration.
The following options are available:
-
enumerator FineGrid#
A default atomic grid size with 75 angular points and 302 radial points.
-
enumerator UltraFineGrid#
A default atomic grid size with 99 angular points and 590 radial points.
-
enumerator SuperFineGrid#
A default atomic grid size with 250 angular points and 974 radial points.
-
enumerator GM3#
A default atomic grid size with 35 angular points and 110 radial points.
-
enumerator GM5#
A default atomic grid size with 50 angular points and 302 radial points.
-
enumerator FineGrid#
-
enum class GauXC::RadialQuad#
Enumeration of radial quadrature schemes for atomic grids.
The following options are available:
-
enum class GauXC::PruningScheme#
Enumeration of pruning schemes for constructing molecular grid weights from atomic grids.
The following options are available:
-
enumerator Unpruned#
No pruning is applied to the atomic grids when constructing the molecular grid.
-
enumerator Robust#
Robust pruning scheme from Psi4.
-
enumerator Treutler#
The Treutler pruning scheme.
-
enumerator Unpruned#
-
using GauXCRadialSize = int64_t#
Type to represent the number of radial points in an atomic grid.
-
using GauXCAngularSize = int64_t#
Type to represent the number of angular points in an atomic grid.
-
using GauXC::BatchSize = int64_t#
Defines the batch size for processing grid points in parallel. Default is 512 points per batch, however larger values up around 10000 are recommended for better performance.
C bindings#
The following C bindings are available in the gauxc/molgrid.h header for creating and managing molecular grids in the GauXC C API.
-
struct GauXCMolGrid#
Opaque struct representing a molecular grid in the GauXC C API.
-
GauXCMolGrid gauxc_molgrid_new_default(GauXCStatus *status, const GauXCMolecule *molecule, enum GauXC_PruningScheme pruning_scheme, int64_t batch_size, enum GauXC_RadialQuad radial_quad, enum GauXC_AtomicGridSizeDefault grid_size)#
Create a new GauXCMolGrid object with default settings for the given molecule.
- Parameters:
status – Pointer to a GauXCStatus variable to store the status of the operation.
molecule – Pointer to a GauXCMolecule object representing the molecule for which to create the MolGrid.
pruning_scheme – The pruning scheme to use for constructing the molecular grid weights from the atomic grids.
batch_size – The batch size for processing grid points in parallel.
radial_quad – The radial quadrature scheme to use for the atomic grids.
grid_size – The default atomic grid size to use for the atomic grids.
- Returns:
A new GauXCMolGrid object initialized with the specified parameters for the given molecule.
-
void gauxc_molgrid_delete(GauXCStatus *status, GauXCMolGrid *molgrid)#
Delete a GauXCMolGrid object and free its resources.
- Parameters:
status – Pointer to a GauXCStatus variable to store the status of the operation.
molgrid – Pointer to the GauXCMolGrid object to delete.
-
GauXCMolGrid gauxc_molgrid_new_default(GauXCStatus *status, const GauXCMolecule *molecule, enum GauXC_PruningScheme pruning_scheme, int64_t batch_size, enum GauXC_RadialQuad radial_quad, enum GauXC_AtomicGridSizeDefault grid_size)#
-
enum GauXC_PruningScheme#
Enumeration of pruning schemes for constructing molecular grid weights from atomic grids in the GauXC C API.
The following options are available:
-
enumerator GauXC_PruningScheme_Unpruned#
No pruning is applied to the atomic grids when constructing the molecular grid.
-
enumerator GauXC_PruningScheme_Robust#
Robust pruning scheme from Psi4.
-
enumerator GauXC_PruningScheme_Treutler#
The Treutler pruning scheme.
-
enumerator GauXC_PruningScheme_Unpruned#
-
enum GauXC_RadialQuad#
Enumeration of radial quadrature schemes for atomic grids in the GauXC C API.
The following options are available:
-
enum GauXC_AtomicGridSizeDefault#
Enumeration of default atomic grid sizes for molecular integration in the GauXC C API.
The following options are available:
-
enumerator GauXC_AtomicGridSizeDefault_FineGrid#
A default atomic grid size with 75 angular points and 302 radial points.
-
enumerator GauXC_AtomicGridSizeDefault_UltraFineGrid#
A default atomic grid size with 99 angular points and 590 radial points.
-
enumerator GauXC_AtomicGridSizeDefault_SuperFineGrid#
A default atomic grid size with 250 angular points and 974 radial points.
-
enumerator GauXC_AtomicGridSizeDefault_GM3#
A default atomic grid size with 35 angular points and 110 radial points.
-
enumerator GauXC_AtomicGridSizeDefault_GM5#
A default atomic grid size with 50 angular points and 302 radial points.
-
enumerator GauXC_AtomicGridSizeDefault_FineGrid#
Fortran bindings#
- type gauxc_molgrid_type#
Opaque type representing a molecular grid in the GauXC Fortran API. Available in the module
gauxc_molgrid.- function gauxc_molgrid_new_default(status, molecule, pruning_scheme, batch_size, radial_quad, grid_size)#
- Parameters:
status [type(gauxc_status_type)] :: Output parameter to store the status of the operation.
molecule [type(gauxc_molecule_type)] :: The molecule for which to create the MolGrid.
pruning_scheme [integer(c_int)] :: The pruning scheme to use for constructing the molecular grid weights from the atomic grids.
batch_size [integer(c_int64_t)] :: The batch size for processing grid points in parallel.
radial_quad [integer(c_int)] :: The radial quadrature scheme to use for the atomic grids.
grid_size [integer(c_int)] :: The default atomic grid size to use for the atomic grids.
- Return:
type (gauxc_molgrid_type) :: A new gauxc_molgrid_type object initialized with the specified parameters for the given molecule.
- subroutine gauxc_molgrid_delete(status, molgrid)#
Delete a gauxc_molgrid_type object and free its resources. Part of the
gauxc_delete()interface.- Parameters:
status [type(gauxc_status_type)] :: Output parameter to store the status of the operation.
molgrid [type(gauxc_molgrid_type)] :: The gauxc_molgrid_type object to delete.
- type gauxc_radialquad#
Parameter instance of a derived type with the respective enumerator values for each member variable.
- Type fields:
% becke [integer(c_int)] :: The Becke radial quadrature scheme.[1]
% muraknowles [integer(c_int)] :: The Mura-Knowles radial quadrature scheme.[2]
% treutlerahlrichs [integer(c_int)] :: The Treutler-Ahlrichs radial quadrature scheme.[3]
% murrayhandylaming [integer(c_int)] :: The Murray-Handy-Laming radial quadrature scheme.[4]
- type gauxc_pruningscheme#
Parameter instance of a derived type with the respective enumerator values for each member variable.
- Type fields:
% unpruned [integer(c_int)] :: No pruning is applied to the atomic grids when constructing the molecular grid.
% robust [integer(c_int)] :: Robust pruning scheme from Psi4.
% treutler [integer(c_int)] :: The Treutler pruning scheme.
- type gauxc_atomicgridsizedefault#
Parameter instance of a derived type with the respective enumerator values for each member variable.
- Type fields:
% finegrid [integer(c_int)] :: A default atomic grid size with 75 angular points and 302 radial points.
% ultrafinegrid [integer(c_int)] :: A default atomic grid size with 99 angular points and 590 radial points.
% superfinegrid [integer(c_int)] :: A default atomic grid size with 250 angular points and 974 radial points.
% gm3 [integer(c_int)] :: A default atomic grid size with 35 angular points and 110 radial points.
% gm5 [integer(c_int)] :: A default atomic grid size with 50 angular points and 302 radial points.