qrunch.chemistry.integral_builders.standard_integral_builder

Standard four center two-electron repulsion integral builders.

Classes

RestrictedTwoBodyElectronRepulsionIntegralBuilder

Build restricted integrals by performing the full 4-index four-center AO to MO transformation.

TwoBodyElectronRepulsionIntegralBuilder

Build integrals by performing the full 4-index four-center AO to MO transformation.

UnrestrictedTwoBodyElectronRepulsionIntegralBuilder

Build unrestricted integrals by performing the full 4-index four-center AO to MO transformation.

class RestrictedTwoBodyElectronRepulsionIntegralBuilder

Bases: object

Build restricted integrals by performing the full 4-index four-center AO to MO transformation.

calculate_integrals(molecular_orbitals: RestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration) RestrictedTwoBodyElectronRepulsionIntegrals

Calculate the restricted 4-center two-electron repulsion integrals (ERI) in the MO basis.

Parameters:
Return type:

RestrictedTwoBodyElectronRepulsionIntegrals

internal_contracted_left(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: RestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, active_range: slice, inactive_range: slice) ndarray[tuple[Any, ...], dtype[float64]]

Contract over the two leftmost indices: \(g_{iipq} \to g_{pq}\).

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use (ignored for restricted; always alpha).

  • molecular_orbitals (RestrictedMolecularOrbitals) – The restricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • active_range (slice) – Slice selecting active MO columns for the free pair (p, q).

  • inactive_range (slice) – Slice selecting inactive MO columns for the contracted pair (i).

Return type:

ndarray[tuple[Any, …], dtype[float64]]

internal_contracted_middle(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: RestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, active_range: slice, inactive_range: slice) ndarray[tuple[Any, ...], dtype[float64]]

Contract over the two middle indices: \(g_{piiq} \to g_{pq}\).

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use (ignored for restricted; always alpha).

  • molecular_orbitals (RestrictedMolecularOrbitals) – The restricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • active_range (slice) – Slice selecting active MO columns for the free pair (p, q).

  • inactive_range (slice) – Slice selecting inactive MO columns for the contracted pair (i).

Return type:

ndarray[tuple[Any, …], dtype[float64]]

internal_contracted_right(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: RestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, active_range: slice, inactive_range: slice) ndarray[tuple[Any, ...], dtype[float64]]

Contract over the two rightmost indices: \(g_{pqii} \to g_{pq}\).

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use (ignored for restricted; always alpha).

  • molecular_orbitals (RestrictedMolecularOrbitals) – The restricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • active_range (slice) – Slice selecting active MO columns for the free pair (p, q).

  • inactive_range (slice) – Slice selecting inactive MO columns for the contracted pair (i).

Return type:

ndarray[tuple[Any, …], dtype[float64]]

internal_trace_contracted_middle(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: RestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, orbital_range: slice) float

Compute \(\sum_{p,i} g_{piip}\) for the given orbital range.

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use (ignored for restricted; always alpha).

  • molecular_orbitals (RestrictedMolecularOrbitals) – The restricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • orbital_range (slice) – Slice selecting orbital indices for both the free and contracted pairs.

Return type:

float

internal_trace_contracted_right(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: RestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, orbital_range: slice) float

Compute \(\sum_{p,i} g_{ppii}\) for the given orbital range.

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use (ignored for restricted; always alpha).

  • molecular_orbitals (RestrictedMolecularOrbitals) – The restricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • orbital_range (slice) – Slice selecting orbital indices for both the free and contracted pairs.

Return type:

float

class TwoBodyElectronRepulsionIntegralBuilder

Bases: TwoBodyElectronRepulsionIntegralBuilderProtocol

Build 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: UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration) UnrestrictedTwoBodyElectronRepulsionIntegrals
calculate_integrals(molecular_orbitals: RestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration) RestrictedTwoBodyElectronRepulsionIntegrals

Calculate the 4-center two-electron repulsion integrals (ERI) in the MO basis.

Parameters:
Return type:

RestrictedTwoBodyElectronRepulsionIntegrals | UnrestrictedTwoBodyElectronRepulsionIntegrals

short_name() str

Return a short name for the integral builder.

Return type:

str

class UnrestrictedTwoBodyElectronRepulsionIntegralBuilder

Bases: object

Build unrestricted integrals by performing the full 4-index four-center AO to MO transformation.

calculate_integrals(molecular_orbitals: UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration) UnrestrictedTwoBodyElectronRepulsionIntegrals

Calculate the unrestricted 4-center two-electron repulsion integrals (ERI) in the MO basis.

Parameters:
Return type:

UnrestrictedTwoBodyElectronRepulsionIntegrals

internal_contracted_left(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, active_range: slice, inactive_range: slice) ndarray[tuple[Any, ...], dtype[float64]]

Contract over the two leftmost indices: \(g_{iipq} \to g_{pq}\).

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use “aa”, “bb”, or “mixed”.

  • molecular_orbitals (UnrestrictedMolecularOrbitals) – The unrestricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • active_range (slice) – Slice selecting active MO columns for the free pair (p, q).

  • inactive_range (slice) – Slice selecting inactive MO columns for the contracted pair (i).

Return type:

ndarray[tuple[Any, …], dtype[float64]]

internal_contracted_middle(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, active_range: slice, inactive_range: slice) ndarray[tuple[Any, ...], dtype[float64]]

Contract over the two middle indices: \(g_{piiq} \to g_{pq}\).

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use “aa”, “bb”, or “mixed”.

  • molecular_orbitals (UnrestrictedMolecularOrbitals) – The unrestricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • active_range (slice) – Slice selecting active MO columns for the free pair (p, q).

  • inactive_range (slice) – Slice selecting inactive MO columns for the contracted pair (i).

Return type:

ndarray[tuple[Any, …], dtype[float64]]

internal_contracted_right(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, active_range: slice, inactive_range: slice) ndarray[tuple[Any, ...], dtype[float64]]

Contract over the two rightmost indices: \(g_{pqii} \to g_{pq}\).

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use “aa”, “bb”, or “mixed”.

  • molecular_orbitals (UnrestrictedMolecularOrbitals) – The unrestricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • active_range (slice) – Slice selecting active MO columns for the free pair (p, q).

  • inactive_range (slice) – Slice selecting inactive MO columns for the contracted pair (i).

Return type:

ndarray[tuple[Any, …], dtype[float64]]

internal_trace_contracted_middle(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, orbital_range: slice) float

Compute \(\sum_{p,i} g_{piip}\) for the given orbital range and component.

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use “aa”, “bb”, or “mixed”.

  • molecular_orbitals (UnrestrictedMolecularOrbitals) – The unrestricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • orbital_range (slice) – Slice selecting orbital indices for both the free and contracted pairs.

Return type:

float

internal_trace_contracted_right(component: Literal['aa', 'bb', 'mixed'], molecular_orbitals: UnrestrictedMolecularOrbitals, molecular_configuration: MolecularConfiguration, orbital_range: slice) float

Compute \(\sum_{p,i} g_{ppii}\) for the given orbital range and component.

Parameters:
  • component (Literal['aa', 'bb', 'mixed']) – Which integral component to use “aa”, “bb”, or “mixed”.

  • molecular_orbitals (UnrestrictedMolecularOrbitals) – The unrestricted Molecular Orbitals.

  • molecular_configuration (MolecularConfiguration) – The molecular configuration.

  • orbital_range (slice) – Slice selecting orbital indices for both the free and contracted pairs.

Return type:

float