nvalchemi.dynamics.mep.hooks.ClimbingImageSelectionHook#

class nvalchemi.dynamics.mep.hooks.ClimbingImageSelectionHook(*, energy_stats_hook, selection='fixed', status_code=None, frequency=1)[source]#

Select the highest-energy interior image in each NEB path.

Register this hook after its shared PathEnergyStatsHook and before NEBForceHook. Fixed selection chooses a climber when each path first becomes active and retains it, while dynamic selection refreshes climbing images after every model evaluation.

Parameters:
  • energy_stats_hook (PathEnergyStatsHook) – Shared path-energy statistics hook registered before this hook.

  • selection ({"fixed", "dynamic"}, optional) – Whether to retain the initial selection or refresh it after every model evaluation. Default is "fixed".

  • status_code (int or None, optional) – When registered on a FusedStage, restrict selection or reselection to paths whose graph status equals this value. Existing climbing modes persist after a status change. None relies only on the context’s active mask. Default is None.

  • frequency (int, optional) – Apply the hook every frequency dynamics steps. Default is 1.

stage#

Hook stage, DynamicsStage.AFTER_COMPUTE.

Type:

DynamicsStage

Notes

This hook requires dynamics configured with by_group=True. Group-aware status transitions keep both active_graph_mask and status uniform within each NEB path, so their graph-level masks can be applied directly.

on_register(workflow)[source]#

Require group-aware dynamics for climbing-image selection.

Parameters:

workflow (object) – Workflow on which this hook is being registered.

Raises:

ValueError – If the workflow does not enable group-aware dynamics.

Return type:

None