qrunch.chemistry.qrackle.scf.scf_accelerator_protocol
Protocols for accelerators that find a better starting state for the physical SCF solve.
Classes
Physical starting state found by an SCF accelerator. |
|
Build SCF accelerators. |
|
Improve the initial density of a fresh SCF solve before the physical SCF loop starts. |
- class SCFAcceleration
Bases:
Generic[TSCFMatrix]Physical starting state found by an SCF accelerator.
The caller owns both matrices.
fockis the physical Fock matrix atdensity.- Parameters:
density – Accepted AO density.
fock – Physical Fock matrix at
density.energy_per_iteration – Physical total energies evaluated while accelerating, counted as SCF iterations.
- __init__(*, density: TSCFMatrix, fock: TSCFMatrix, energy_per_iteration: list[float]) None
- Parameters:
density (TSCFMatrix)
fock (TSCFMatrix)
energy_per_iteration (list[float])
- Return type:
None
- density: TSCFMatrix
- energy_per_iteration: list[float]
- fock: TSCFMatrix
- class SCFAcceleratorBuilderProtocol
Bases:
Protocol[TMatrix,TVector]Build SCF accelerators.
The spin-wrapper type variables are bound at the method level so one builder can serve both restricted and unrestricted matrix modules.
- __init__(*args, **kwargs)
- create_accelerator(scf_matrix_module: SCFMatrixModuleProtocol[TSCFMatrix, TSCFVector, TMatrix, TVector], fock_builder: FockBuilderProtocol[TSCFMatrix, TSCFVector, TMatrix, TVector], solver_builder: SelfConsistentFieldSolverBuilderProtocol[TMatrix, TVector]) SCFAcceleratorProtocol[TSCFMatrix]
Create an SCF accelerator for the supplied matrix module.
- Parameters:
scf_matrix_module (SCFMatrixModuleProtocol[TSCFMatrix, TSCFVector, TMatrix, TVector]) – SCF matrix module (restricted or unrestricted).
fock_builder (FockBuilderProtocol[TSCFMatrix, TSCFVector, TMatrix, TVector]) – Physical Fock builder used to check accelerated states.
solver_builder (SelfConsistentFieldSolverBuilderProtocol[TMatrix, TVector]) – Builder for the SCF solvers the accelerator runs. The accelerator may update their options.
- Return type:
SCFAcceleratorProtocol[TSCFMatrix]
- class SCFAcceleratorProtocol
Bases:
HasMetadataDictMethod,Protocol[TSCFMatrix]Improve the initial density of a fresh SCF solve before the physical SCF loop starts.
The SCF solver still determines the final energy, convergence and orbital stability. Accelerator metadata identifies the settings used to produce persisted SCF states.
- __init__(*args, **kwargs)
- prepare(*, density: TSCFMatrix, core_hamiltonian: TSCFMatrix, overlap_matrix: TSCFMatrix, lowdin_orthogonalizer: TSCFMatrix, molecular_configuration: MolecularConfiguration, additional_potential_matrix: TSCFMatrix | None, gradient_scale: float, convergence_tolerance: float, max_physical_iterations: int) SCFAcceleration[TSCFMatrix]
Return an improved physical state, consuming
density.- Parameters:
density (TSCFMatrix) – Initial density, consumed by this method.
core_hamiltonian (TSCFMatrix) – Physical core Hamiltonian including the additional potential.
overlap_matrix (TSCFMatrix) – AO overlap matrix.
lowdin_orthogonalizer (TSCFMatrix) – Lowdin orthogonalizer.
molecular_configuration (MolecularConfiguration) – Molecular configuration.
additional_potential_matrix (TSCFMatrix | None) – Additional one-electron potential already included in
core_hamiltonian.gradient_scale (float) – Size-consistent gradient normalization of the SCF solver.
convergence_tolerance (float) – Gradient tolerance of the SCF solver.
max_physical_iterations (int) – Positive physical-evaluation budget, including the handed-off state. The returned energy history must leave one iteration for the caller to process that state.
- Return type:
SCFAcceleration[TSCFMatrix]