qrunch.tools.minimizers.reminimization_stopping_criteria.minimum_improvement_stopping_criterion

Stop re-minimization once its extra energy improvement falls below a threshold.

Classes

MinimumImprovementStoppingCriterion

Stop periodic re-minimization when its energy reduction falls below minimum_improvement.

class MinimumImprovementStoppingCriterion

Bases: object

Stop periodic re-minimization when its energy reduction falls below minimum_improvement.

The reduction of a re-minimization is the energy found by the standard minimizer minus the energy after the re-minimizer, both from the same adaptive iteration. Re-minimization is stopped once each of the latest patience re-minimizations reduced the energy by less than minimum_improvement.

__init__(minimum_improvement: float = 0.0001, patience: int = 1) → None

Stop periodic re-minimization when its energy reduction falls below minimum_improvement.

The reduction of a re-minimization is the energy found by the standard minimizer minus the energy after the re-minimizer, both from the same adaptive iteration. Re-minimization is stopped once each of the latest patience re-minimizations reduced the energy by less than minimum_improvement.

Parameters:
  • minimum_improvement (float) – Smallest energy decrease from a re-minimization for which re-minimization is still considered worthwhile. Must be non-negative. (default=1e-4)

  • patience (int) – Number of consecutive re-minimizations that must fall below minimum_improvement before re-minimization is stopped. Must be positive. (default=1)

Return type:

None

should_stop(history: Sequence[AdaptiveIterationObservation]) → bool

Return True if each of the latest patience re-minimizations lowered the energy by less than the threshold.

Parameters:

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

Return type:

bool