qrunch.chemistry.molecular_orbital_calculators.molecular_orbital_calculators_protocols

Contains the molecular orbital calculators.

Classes

ElectronPotential

Potential felt by electrons in a molecule.

MolecularOrbitalCalculator

Protocol class for a molecular orbital calculator.

RestrictedElectronPotential

Potential felt by electrons in a molecule in a restricted method.

RestrictedMolecularOrbitalCalculatorResult

Dataclass for the restricted mean-field result.

UnrestrictedElectronPotential

Potential felt by electrons in a molecule in an unrestricted method.

UnrestrictedMolecularOrbitalCalculatorResult

Dataclass for the unrestricted mean-field result.

class ElectronPotential

Bases: object

Potential felt by electrons in a molecule.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:

matrix – Matrix for the electron potential.

__init__(matrix: ndarray[Any, dtype[float64]]) None
Parameters:

matrix (ndarray[Any, dtype[float64]])

Return type:

None

matrix: ndarray[Any, dtype[float64]]
property number_of_orbitals: int

Number of atomic or molecular orbitals for basis of the potential.

class MolecularOrbitalCalculator

Bases: HasMetadataHashMethod, Protocol

Protocol class for a molecular orbital calculator.

A molecular orbital calculator returns a result dataclass which contains a ground state energy, molecular orbitals, and ground state molecular orbital occupations.

__init__(*args, **kwargs)
solve_restricted(molecular_configuration: MolecularConfiguration, initial_guess: RestrictedDensityOperator | None = None, additional_potential: RestrictedElectronPotential | None = None) RestrictedMolecularOrbitalCalculatorResult

Solve the restricted problem.

Parameters:
Return type:

RestrictedMolecularOrbitalCalculatorResult

solve_unrestricted(molecular_configuration: MolecularConfiguration, initial_guess: UnrestrictedDensityOperator | None = None, additional_potential: UnrestrictedElectronPotential | None = None) UnrestrictedMolecularOrbitalCalculatorResult

Solve the unrestricted problem.

Parameters:
  • molecular_configuration (MolecularConfiguration) – Input molecule configuration.

  • initial_guess (UnrestrictedDensityOperator | None) – Initial guess for the density matrix. The number of electrons is inferred from this guess.

  • additional_potential (UnrestrictedElectronPotential | None) – Additional potential which will be added to the single electron hamiltonian.

  • solvent_wrapper – A solvent wrapper that determines how the kernel is executed.

Return type:

UnrestrictedMolecularOrbitalCalculatorResult

class RestrictedElectronPotential

Bases: object

Potential felt by electrons in a molecule in a restricted method.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:

alpha – Matrix for the alpha electron potential.

__init__(alpha: ElectronPotential) None
Parameters:

alpha (ElectronPotential)

Return type:

None

alpha: ElectronPotential
property beta: ElectronPotential

Matrix for the beta electron potential.

property number_of_orbitals: int

Number of atomic or molecular orbitals for basis of the potential.

class RestrictedMolecularOrbitalCalculatorResult

Bases: object

Dataclass for the restricted mean-field result.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:
  • energy – Ground state energy.

  • molecular_orbitals – Restricted molecular orbitals.

  • occupations – Restricted molecular occupations.

  • mo_energies – Restricted molecular energies.

__init__(energy: float, molecular_orbitals: RestrictedMolecularOrbitals, occupations: RestrictedMolecularOrbitalOccupations, mo_energies: RestrictedMolecularOrbitalEnergies | None) None
Parameters:
Return type:

None

energy: float
mo_energies: RestrictedMolecularOrbitalEnergies | None
molecular_orbitals: RestrictedMolecularOrbitals
occupations: RestrictedMolecularOrbitalOccupations
class UnrestrictedElectronPotential

Bases: object

Potential felt by electrons in a molecule in an unrestricted method.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:
  • alpha – Matrix for the alpha electron potential.

  • beta – Matrix for the beta electron potential.

__init__(alpha: ElectronPotential, beta: ElectronPotential) None
Parameters:
Return type:

None

alpha: ElectronPotential
beta: ElectronPotential
property number_of_orbitals: int

Number of atomic or molecular orbitals for basis of the potential.

class UnrestrictedMolecularOrbitalCalculatorResult

Bases: object

Dataclass for the unrestricted mean-field result.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:
  • energy – Ground state energy.

  • molecular_orbitals – Unrestricted molecular orbitals.

  • occupations – Unrestricted molecular occupations.

  • mo_energies – Unrestricted molecular energies.

__init__(energy: float, molecular_orbitals: UnrestrictedMolecularOrbitals, occupations: UnrestrictedMolecularOrbitalOccupations, mo_energies: UnrestrictedMolecularOrbitalEnergies | None) None
Parameters:
Return type:

None

energy: float
mo_energies: UnrestrictedMolecularOrbitalEnergies | None
molecular_orbitals: UnrestrictedMolecularOrbitals
occupations: UnrestrictedMolecularOrbitalOccupations