qrunch.chemistry.integral_builders
Module with integral builders.
Classes
|
Two-body electron repulsion integral builder sub-creator. |
- class DoubleFactorizedIntegralBuilder
Bases:
TwoBodyElectronRepulsionIntegralBuilderProtocolBuild integrals using Double Factorized integrals.
- __init__(*, repulsion_integral_builder: TwoBodyElectronRepulsionIntegralBuilderProtocol | None = None, tolerance: float = 1e-10) None
Initialize the Double Factorized integral builder.
- Parameters:
repulsion_integral_builder (TwoBodyElectronRepulsionIntegralBuilderProtocol | None) – The object that can build the initial two electron repulsion integrals, that can be double factorized.
tolerance (float) – Minimum eigenvalue threshold for inclusion.
- Return type:
None
- calculate_integrals(molecular_orbitals: RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration) RestrictedDoubleFactorizedIntegrals | UnrestrictedTwoBodyElectronRepulsionIntegralsProtocol
Compute Double Factorized integrals for a given molecule.
The tensor is decomposed into lower-rank objects. In this process, we perform two eigenvalue decompositions. The first one provides a set of eigenvalues g_elements and eigenvectors in the form of v_matrices. The second eigenvalue decomposition return sets of eigenvalues and eigenvector matrices for each v_matrix, which we name l_elements and u_matrices. The z_matrices are also generated from the l_elements and g_elements and are useful when reconstructing the tensor or calling individual coefficients.
Not implemented for unrestricted orbitals.
- Parameters:
molecular_orbitals (RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals) – The Molecular Orbitals.
molecular_configuration (MolecularConfiguration) – The molecular configuration.
- Return type:
RestrictedDoubleFactorizedIntegrals | UnrestrictedTwoBodyElectronRepulsionIntegralsProtocol
- class GridLevel
Bases:
EnumDefines grid resolution levels for numerical integration in PySCF.
The value of the enum is used to select the number of radial grid shells and the number of angular (spherical) points per shell.
LEVEL0 through LEVEL9 goes from fast to accurate. LEVEL9 is the default.
- LEVEL0 = (2, 14)
2 radial shells and 14 angular points per shell.
- LEVEL1 = (4, 14)
4 radial shells and 14 angular points per shell.
- LEVEL2 = (4, 26)
4 radial shells and 26 angular points per shell.
- LEVEL3 = (6, 26)
6 radial shells and 26 angular points per shell.
- LEVEL4 = (6, 38)
6 radial shells and 38 angular points per shell.
- LEVEL5 = (8, 38)
8 radial shells and 38 angular points per shell.
- LEVEL6 = (8, 50)
8 radial shells and 50 angular points per shell.
- LEVEL7 = (10, 50)
10 radial shells and 50 angular points per shell.
- LEVEL8 = (10, 74)
10 radial shells and 74 angular points per shell.
- LEVEL9 = (12, 74)
12 radial shells and 74 angular points per shell.
- class ResolutionOfTheIdentityIntegralBuilder
Bases:
TwoBodyElectronRepulsionIntegralBuilderProtocolBuild integrals using Resolution of the Identity (RI) integrals.
- __init__(*, aux_basis: BasisSet | None = None) None
Initialize the Resolution of the Identity (RI) integral builder.
- Parameters:
aux_basis (BasisSet | None) – The auxiliary density-fitting RI basis set. Defaults to the Weigend-Coulomb-fit basis.
- Return type:
None
- calculate_integrals(molecular_orbitals: RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration) RestrictedResolutionOfTheIdentityIntegrals | UnrestrictedResolutionOfTheIdentityIntegrals
Calculate the Resolution of the Identity (RI) two-electron repulsion integrals (ERI) in the MO basis.
- Parameters:
molecular_orbitals (RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals) – The Molecular Orbitals.
molecular_configuration (MolecularConfiguration) – The molecular configuration.
- Return type:
RestrictedResolutionOfTheIdentityIntegrals | UnrestrictedResolutionOfTheIdentityIntegrals
- class TensorHyperContractionIntegralsBuilder
Bases:
TwoBodyElectronRepulsionIntegralBuilderProtocolBuild integrals using Tensor Hyper Contraction (THC) approximation.
- __init__(*, use_ri: bool = True, use_grid_point_pruning: bool = True, pseudoinverse_tolerance: float = 1e-08, grid_level: GridLevel = GridLevel.LEVEL9, maximum_memory_in_gb: float = 10.0, aux_basis: BasisSet | None = None) None
Initialize the Tensor Hyper Contraction (THC) integral builder.
- Parameters:
use_ri (bool) – If True, use the 3 index RI tensor (via Cholesky decomposition) to compute THC matrices. Otherwise, use the conventional 4 index integrals.
use_grid_point_pruning (bool) – Use grid point pruning.
pseudoinverse_tolerance (float) – The tolerance acts as a cutoff threshold constructing the pseudoinverse.
grid_level (GridLevel) – The numerical grid level.
maximum_memory_in_gb (float) – The maximum memory in GB.
aux_basis (BasisSet | None) – The auxiliary density-fitting RI basis set. Defaults to the Weigend-Coulomb-fit basis.
- Return type:
None
- calculate_integrals(molecular_orbitals: RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration) RestrictedTensorHyperContractionIntegrals | UnrestrictedTensorHyperContractionIntegrals
Compute tensor hyper-contraction (THC) integrals for a given molecule.
- Parameters:
molecular_orbitals (RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals) – The Molecular Orbitals.
molecular_configuration (MolecularConfiguration) – The molecular configuration.
- Return type:
RestrictedTensorHyperContractionIntegrals | UnrestrictedTensorHyperContractionIntegrals
- class TwoBodyElectronRepulsionIntegralBuilder
Bases:
TwoBodyElectronRepulsionIntegralBuilderProtocolBuild integrals by performing the full 4-index four-center AO to MO transformation.
- __init__() None
Initialize the two-body electron repulsion integral builder.
- Return type:
None
- calculate_integrals(molecular_orbitals: RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration) RestrictedTwoBodyElectronRepulsionIntegrals | UnrestrictedTwoBodyElectronRepulsionIntegrals
Calculate the 4-center two-electron repulsion integrals (ERI) in the MO basis.
- Parameters:
molecular_orbitals (RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals) – The Molecular Orbitals.
molecular_configuration (MolecularConfiguration) – The molecular configuration.
- Return type:
RestrictedTwoBodyElectronRepulsionIntegrals | UnrestrictedTwoBodyElectronRepulsionIntegrals
- class TwoBodyElectronRepulsionIntegralBuilderProtocol
Bases:
ProtocolProtocol for classes that build restricted two-body electron repulsion integrals.
- __init__(*args, **kwargs)
- calculate_integrals(molecular_orbitals: RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration) RestrictedTwoBodyElectronRepulsionIntegralsProtocol | UnrestrictedTwoBodyElectronRepulsionIntegralsProtocol
Calculate the two-body electron repulsion integrals for a given molecule.
- Parameters:
molecular_orbitals (RestrictedMolecularOrbitals | UnrestrictedMolecularOrbitals) – The Molecular Orbitals.
molecular_configuration (MolecularConfiguration) – The molecular configuration.
- Return type:
RestrictedTwoBodyElectronRepulsionIntegralsProtocol | UnrestrictedTwoBodyElectronRepulsionIntegralsProtocol
Modules
Module for Double Factorized Integral builders. |
|
Integral builder protocols. |
|
Resolution of the identity integral builders. |
|
Standard four center two-electron repulsion integral builders. |
|
Module for Tensor Hyper Contraction integral builders. |