qrunch.chemistry.molecular_orbital_calculators.custom_molecular_orbital_calculator
Adapter making a user-supplied molecular orbital solver usable everywhere in qrunch.
Classes
Wrap a user-supplied molecular orbital solver so that it fulfills the internal calculator interface. |
- class CustomMolecularOrbitalCalculator
Bases:
objectWrap a user-supplied molecular orbital solver so that it fulfills the internal calculator interface.
A user only has to implement
MolecularOrbitalSolver, i.e.solve_restrictedandsolve_unrestricted. The metadata hash needed by the data persisters is derived from the type of the wrapped solver, unless the solver provides a metadata hash itself.- __init__(molecular_orbital_solver: MolecularOrbitalSolver) None
Initialize the custom molecular orbital calculator.
- Parameters:
molecular_orbital_solver (MolecularOrbitalSolver) – The user-supplied solver to delegate the calculations to.
- Return type:
None
- solve_restricted(molecular_configuration: MolecularConfiguration, initial_guess: RestrictedDensityOperator | None = None, additional_potential: RestrictedElectronPotential | None = None) RestrictedMolecularOrbitalCalculatorResult
Solve the restricted problem with the user-supplied solver.
- Parameters:
molecular_configuration (MolecularConfiguration) – Input molecule configuration.
initial_guess (RestrictedDensityOperator | None) – Initial guess for the density matrix. The number of electrons is inferred from this guess.
additional_potential (RestrictedElectronPotential | None) – Additional potential which will be added to the single electron hamiltonian.
- Return type:
- solve_unrestricted(molecular_configuration: MolecularConfiguration, initial_guess: UnrestrictedDensityOperator | None = None, additional_potential: UnrestrictedElectronPotential | None = None) UnrestrictedMolecularOrbitalCalculatorResult
Solve the unrestricted problem with the user-supplied solver.
- 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.
- Return type: