qrunch.chemistry.calculators.reaction_path_calculation
Utility for evaluating a ground state problem calculator for every geometry along a reaction path.
Functions
Calculate a ground state result for every geometry along a reaction path. |
Classes
Protocol for calculating the ground state of a single geometry. |
|
Protocol for calculating the ground state of a single geometry while reporting intermediate states. |
|
Protocol for a calculation taking both a callback and the result of an earlier calculation. |
|
Protocol for calculating the ground state of a single geometry from the result of an earlier calculation. |
- class GroundStateCalculation
Bases:
Protocol,GenericProtocol for calculating the ground state of a single geometry.
- __init__(*args, **kwargs)
- class GroundStateCalculationWithCallback
Bases:
Protocol,GenericProtocol for calculating the ground state of a single geometry while reporting intermediate states.
- __init__(*args, **kwargs)
- class GroundStateCalculationWithCallbackAndInitialResult
Bases:
Protocol,GenericProtocol for a calculation taking both a callback and the result of an earlier calculation.
- __init__(*args, **kwargs)
- class GroundStateCalculationWithInitialResult
Bases:
Protocol,GenericProtocol for calculating the ground state of a single geometry from the result of an earlier calculation.
- __init__(*args, **kwargs)
- calculate_along_reaction_path(reaction_path_problem: RestrictedReactionPathProblem | UnrestrictedReactionPathProblem, calculate_ground_state: GroundStateCalculation[ResultT]) list[ResultT]
- calculate_along_reaction_path(reaction_path_problem: RestrictedReactionPathProblem | UnrestrictedReactionPathProblem, calculate_ground_state: GroundStateCalculationWithCallback[ResultT], *, callback: AdaptiveIterationCallback | None) list[ResultT]
- calculate_along_reaction_path(reaction_path_problem: RestrictedReactionPathProblem | UnrestrictedReactionPathProblem, calculate_ground_state: GroundStateCalculationWithInitialResult[InitialResultT, ResultT], *, initial_vqe_results: Sequence[InitialResultT] | None) list[ResultT]
- calculate_along_reaction_path(reaction_path_problem: RestrictedReactionPathProblem | UnrestrictedReactionPathProblem, calculate_ground_state: GroundStateCalculationWithCallbackAndInitialResult[InitialResultT, ResultT], *, callback: AdaptiveIterationCallback | None, initial_vqe_results: Sequence[InitialResultT] | None) list[ResultT]
Calculate a ground state result for every geometry along a reaction path.
Lazy on-disk ground state problems (see
LazyRestrictedGroundStateProblemandLazyUnrestrictedGroundStateProblem) are materialized one at a time viamanifest()and released as soon as their result has been computed, keeping peak memory usage bounded by a single ground state problem.The overloads tie each optional argument to the shape of
calculate_ground_state, which accepts them as keyword arguments. An optional argument is only forwarded when it has a value, which gives the same result as forwardingNonebecause the matching parameter ofcalculate_ground_statedefaults toNone.- Parameters:
reaction_path_problem (RestrictedReactionPathProblem | UnrestrictedReactionPathProblem) – The reaction path problem holding the ground state problem of every geometry.
calculate_ground_state (GroundStateCalculation | GroundStateCalculationWithCallback | GroundStateCalculationWithInitialResult | GroundStateCalculationWithCallbackAndInitialResult) – Callable solving a single ground state problem of a geometry, and returns the result for that geometry.
callback (AdaptiveIterationCallback | None) – Optional callback registering intermediate states, passed unchanged to every geometry.
initial_vqe_results (Sequence | None) – Optional result of an earlier calculation of every geometry, used as the starting point. If set, must hold one entry per ground state problem of the reaction path.
- Return type:
list[ResultT]