Download staplebridge/training/trajectory.py from ChatterjeeLab/StapleBridge: direct link, hf CLI and curl.
- Browser
- Download file 764 Bytes
-
https://huggingface.co/ChatterjeeLab/StapleBridge/resolve/main/staplebridge/training/trajectory.py
- Command line
-
hf download hf://ChatterjeeLab/StapleBridge/staplebridge/training/trajectory.py
-
curl -L -o trajectory.py https://huggingface.co/ChatterjeeLab/StapleBridge/resolve/main/staplebridge/training/trajectory.py
764 Bytes
| from __future__ import annotations | |
| from dataclasses import dataclass, field | |
| from typing import Any | |
| from staplebridge.chemistry.state import StapleState | |
| class TransitionStep: | |
| state: StapleState | |
| next_state: StapleState | |
| candidates: list[StapleState] | |
| chosen_idx: int | |
| t: int | |
| class WeightedTrajectory: | |
| steps: list[TransitionStep] | |
| terminal_state: StapleState | |
| terminal_energy: float | |
| weight: float = 0.0 | |
| context: dict[str, Any] = field(default_factory=dict) | |
| # Hydrocarbon Exact-SB uses these fields to keep plan-conditioned positive | |
| # paths separate from off-plan/unfinished failures. Defaults preserve all | |
| # legacy callers. | |
| is_positive: bool = True | |
| failure_reason: str | None = None | |