nvalchemi-dynamics-hooks

Integrate hook-based callbacks into NVIDIA nvalchemi dynamics simulations.

127|32|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/NVIDIA/nvalchemi-toolkit --skill nvalchemi-dynamics-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nvalchemi-dynamics-hooks
Source: https://github.com/NVIDIA/nvalchemi-toolkit/tree/main/.claude/skills/nvalchemi-dynamics-hooks
Command: npx skills add https://github.com/NVIDIA/nvalchemi-toolkit --skill nvalchemi-dynamics-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hooks provide a safe, extensible way to observe and influence simulation steps in NVIDIA's nvalchemi toolkit, enabling reproducible instrumentation and dynamic behavior without altering core engines.

Core Features & Use Cases

  • Built-in hook protocol and stage-aware execution for dynamics and pipelines.
  • Prebuilt hooks including LoggingHook, NaNDetectorHook, EnergyDriftMonitorHook, ProfilerHook, SnapshotHook.
  • Simple registration and sequencing guidance for reliable instrumentation.
  • Use cases: monitor energy drift in long-running simulations, log metrics, enforce safety constraints, and snapshot batches for debugging; extend with custom hooks.

Quick Start

Create a custom hook class and attach it to a Dynamics workflow to start observing and shaping each simulation step.

Frequently Asked Questions about nvalchemi-dynamics-hooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I monitor energy drift in molecular dynamics simulations without altering the core engine?

You can monitor energy drift by registering the prebuilt EnergyDriftMonitorHook into your dynamics workflow. This callback safely observes simulation steps and logs deviations without modifying the core engine.

What is the best way to add logging and profiling to simulation pipelines?

The best way is attaching prebuilt LoggingHook and ProfilerHook classes to your dynamics stages. These hooks execute stage-aware callbacks to capture timing data and log metrics throughout the simulation pipeline.

Can I detect NaN values during molecular dynamics steps automatically?

Yes, you can detect NaN values automatically by registering the NaNDetectorHook. It operates as a stage-aware callback within the dynamics workflow to enforce safety constraints and identify invalid states during simulation steps.

How do I write a custom hook to adapt batch state across simulation steps?

Create a custom hook class implementing the compatible Hook protocol and attach it to your Dynamics workflow. The simple registration API allows you to observe, log, and adjust batch state across each simulation step.

When do I need to snapshot batches during a dynamics workflow?

You need to snapshot batches during dynamics workflows when debugging reproducible instrumentation or validating intermediate states. The prebuilt SnapshotHook captures batch states at specific stages without altering core simulation engines.

Does the hooks system work with long-running simulations to enforce safety constraints?

Yes, the hooks system works with long-running simulations by providing extensible stage-aware execution. You can register callbacks to monitor energy drift, log metrics, and enforce safety constraints across dynamic steps without changing core logic.