qrunch.tools.minimizers.reminimization_stopping_criteria.reminimization_stopping_criteria

Interface for criteria that decide when to stop periodic re-minimization.

Classes

AdaptiveIterationObservation

Outcome of the minimization in a single adaptive iteration.

ReminimizationStoppingCriterion

Stateless criterion deciding whether further periodic re-minimizations should be disabled.

class AdaptiveIterationObservation

Bases: object

Outcome of the minimization in a single adaptive iteration.

Parameters:
  • adaptive_iteration – The adaptive iteration.

  • energy – Energy found by the standard minimizer.

  • reminimized_energy – Energy after the re-minimizer was run, starting from the standard minimizer’s result. None if no re-minimization was done in this iteration.

__init__(*, adaptive_iteration: int, energy: float, reminimized_energy: float | None = None) → None
Parameters:
  • adaptive_iteration (int)

  • energy (float)

  • reminimized_energy (float | None)

Return type:

None

adaptive_iteration: int
energy: float
property reminimized: bool

Whether the re-minimizer was run in this iteration.

reminimized_energy: float | None = None
class ReminimizationStoppingCriterion

Bases: Protocol

Stateless criterion deciding whether further periodic re-minimizations should be disabled.

__init__(*args, **kwargs)
should_stop(history: Sequence[AdaptiveIterationObservation]) → bool

Return True if further periodic re-minimizations should be disabled.

Parameters:

history (Sequence[AdaptiveIterationObservation]) – Observed adaptive iterations of the current adaptive run, oldest first.

Return type:

bool