🧬boltz-structure-and-binding
- プラグイン
- boltz
- ソース
- GitHub で見る ↗
説明
Boltzを使用して、定義された1つの複合体の構造および結合を予測します。 次のような場合に使用: タンパク質・RNA・DNA・リガンドの複合体をフォールディングする、1つのリガンドをドッキングする、インターフェースを予測する、または結合をスコアリングする場合。 ライブラリのスクリーニングや分子設計には使用しないでください。
原文を表示
Predict structures and binding for one defined complex with Boltz. Use when folding a protein, RNA, DNA, or ligand complex, docking one ligand, predicting an interface, or scoring binding. Not for screening libraries or design.
ユースケース
- ✓タンパク質・RNA・DNA・リガンドの複合体をフォールディングするとき
- ✓1つのリガンドをドッキングするとき
- ✓インターフェースを予測するとき
- ✓結合をスコアリングするとき
本文(日本語訳)
ワークフロー
boltz-api が PATH に存在しない場合は、再試行前に boltz-cli-setup を使用してインストール/更新の案内を受けてください。
コマンドが認証の欠落または期限切れを報告した場合は、再試行前に boltz-cli-setup を使用して boltz-api auth login --device-code を開始してください。事前に許可を求める必要はありません。
エージェントホストのサンドボックスが boltz-api のインストール/認証/API呼び出しをブロックしている場合は、再試行前に boltz-cli-setup を使用して、ユーザー全体のCLIインストール・ブラウザログイン・認証情報の保存・一時ファイル・APIアクセスに必要なホストサンドボックスのバイパス/エスカレーションをリクエストしてください。
このスキルは、ライブラリ全体のワークフローではなく、単一の定義済み複合体に対して使用してください。
-
入力を
entitiesに正規化します。各エンティティは{type, chain_ids, value}の形式です。chain_idsは複数形(チェーンが1つでも配列)であり、フィールド名はvalue(sequenceではありません)である点に注意してください:{"entities": [{"type": "protein", "chain_ids": ["A"], "value": "MKTAYIAKQRQISFVKSHFSRQ"}]}typeはprotein | rna | dna | ligand_smiles | ligand_ccdのいずれかです。チェーンIDは、ユーザーが特に指定しない限り、エンティティの順序に従って割り当てます(A、B、C、…)。最初のペイロードを作成する前にreferences/api.mdを読んで、タイプごとのフィールド仕様(cyclic、modifications、リガンドCCDコードなど)を確認してください。sequence:やchain_id: "A"(単数形)のようなエージェントの推測は、不明瞭な400エラーを引き起こします。 -
ユーザーが結合メトリクスを必要とする場合は、
typeフィールドを明示した フラットなbindingブロックを追加します。リガンド-タンパク質結合の場合:binding: type: ligand_protein_binding binder_chain_id: Bタンパク質-タンパク質結合の場合:
binding: type: protein_protein_binding binder_chain_ids: [B]バリアント名を
bindingの下にネストしないでください(例:binding.ligand_protein_bindingオブジェクトは不可)。 -
サポートされているオプション機能には
constraints、bonds、modifications、model_options、結合メトリクスがあります。ユーザーから要求があった場合のみ追加してください。正確な構造と例については references/api.md を参照してください。 -
ペイロードのYAMLまたはJSONを作成し、
estimate-costを実行してUSDコストを表示し、明示的な確認を待ちます。 -
startでジョブを送信(同期実行)します。IDを保存してください。 -
エージェントランタイムのバックグラウンド/ノンブロッキングコマンド機能を使用して
download-resultsを起動し、ポーリングとダウンロードをエージェントセッションをブロックせずに継続します。- Claude Code の場合:
run_in_background: trueを指定したBashを使用してください。 - Codex の場合:
yield_time_ms: 1000を指定したフォアグラウンドシェルコマンドとしてdownload-resultsを実行してください。Codexがsession_idを返した場合は同一スレッドのオプションポーリング用に保持しますが、download-statusとrunディレクトリを信頼できる情報源として扱ってください。同一スレッドのハートビート自動化を提供するCodexアプリ/デスクトップランタイムでは、download-statusを定期的に確認するハートビートを作成し、ダウンロードが終了状態に達したときに簡潔な完了または失敗の通知を投稿してください。
ダウンローダーを起動した後は、必ずジョブID・run名・出力ディレクトリを報告してください。ハートビートを作成した場合は次回チェックのタイミングを、作成しなかった場合は
download-statusコマンドを含めてください。 - Claude Code の場合:
コマンドパターン
# 実行前に、プレースホルダーを具体的な絶対パスに置き換えてください。
# run名は短く説明的なものを使用してください(例: sab-<target>-<ligand>-v1)
# 1. コスト見積もり
boltz-api predictions:structure-and-binding estimate-cost \
--model boltz-2.1 \
--input @yaml:///absolute/path/payload.yaml
# 2. ユーザーに確認後、送信
boltz-api predictions:structure-and-binding start \
--model boltz-2.1 \
--idempotency-key "<run-name>" \
--input @yaml:///absolute/path/payload.yaml \
--raw-output --transform id
# 3. 表示されたジョブIDをこのコマンドにコピーし、
# エージェントランタイムのバックグラウンド/ノンブロッキングモードで起動してください。
# Claude Code: run_in_background=true を指定したBash。
# Codex: yield_time_ms=1000 を指定したフォアグラウンドシェルコマンド。
# 返却された session_id があれば保持すること。
# Codex では "&" の付加や nohup の使用は禁止。
boltz-api download-results \
--id "<job-id-from-start>" --name "<run-name>" \
--root-dir "/absolute/path/boltz-experiments" \
--poll-interval-seconds 10
# -> /absolute/path/boltz-experiments/<run-name>/outputs/archive.tar.gz, .boltz-run.json
必ず守ること
- ペイロードのフィールド名は
references/api.mdに記載されたAPIボディ名と完全に一致させてください。マージ済みペイロードは--input @yaml:///absolute/path/payload.yamlまたは@json:///absolute/path/payload.jsonで渡してください。オブジェクト型ペイロードに@./payload.yamlや@file://は使用しないでください。 - 出力ルート・ペイロードファイル・埋め込み構造ファイルには絶対パスを使用してください。フォローアップコマンドのためにrunディレクトリへ
cdしないでください。同一の--root-dirを渡し、絶対パスを使用することで、後続の相対パスのズレを防いでください。 - 残基インデックスは、ペイロードが残基位置を要求する箇所(constraints、modifications、contact tokens)では0始まりです。
--target/structure.dataに埋め込むCIF/PDBバイトには@data:///absolute/path/file.cifを使用してください。バイナリを検出してbase64エンコードします。バイナリデータに裸の@pathを使用しないでください。- 送信時の
--idempotency-keyとダウンロード時の--nameには同じスラグを使用することで、再実行が冪等になり.boltz-run.jsonから再開できます。 - Claude Codeなどの権限ゲート付きエージェントでは、各Boltz呼び出しを
boltz-apiで始まるトップレベルコマンドとして実行してください。ユーザーがすでに許可している場合を除き、boltz-api呼び出しの周囲でsh -c・インライン環境変数代入・エイリアス・ラッパースクリプト・ループ・パイプラインより具体的な引数を優先してください。--raw-output --transform idを使用し、表示されたIDを読み取り、そのリテラルIDを次のdownload-resultsコマンドに貼り付けてください。 download-resultsにはエージェントランタイムのバックグラウンド/ノンブロッキングコマンドモードを優先して使用してください。Codex では特にdownload-resultsをフォアグラウンドで実行し、シェルツールのyieldを1000msに設定してください。コマンドがまだ実行中の場合、Codexはsession_idを返します。Codexでは&を付加したりnohupを使用したりしないでください。ツールランナーがシェルバックグラウンドの子プロセスを.boltz-run.jsonの書き込み完了前にクリーンアップする可能性があります。- バックグラウンド/セッション開始後は、手動での待機やアドホックなポーリングループを実行しないでください。
download-resultsはデフォルトでstderrにJSONL形式の進捗を出力します。人間が読めるログが明示的に必要な場合のみ--progress-format text --verboseを追加してください。 - 同一スレッドのハートビート自動化をサポートするCodexアプリ/デスクトップランタイムでは、
download-results起動後にハートビートをスケジュールしてください。ハートビートは適切なタイミングでboltz-api --format json download-status --name "<run-name>" --root-dir "/absolute/path/boltz-experiments"を実行し、重要なステータス変化または終了完了/失敗のみを投稿し、終了状態に達したら停止してください。保存したsession_idへのポーリングは、ユーザーが対話的に進捗確認を要求した場合のみ、空のwrite_stdinで行ってください。自分でretrieveをループしないでください。 - 現在のホストがハートビート自動化をサポートしていない場合、自動的な次回チェックを予告しないでください。ジョブID・run名・出力ディレクトリ・
download-statusの確認に必要なコマンドを報告してください。 - デタッチされたダウンロードを再起動する必要がある場合は、同じ
--name "<run-name>"と同じ--root-dirを指定してboltz-api download-resultsを再実行してください。 - ポーリング間隔: SABでは
--poll-interval-seconds 10を維持してください。予測は通常数分以内に完了します。 - コスト: SABについて引用できる公開単価はありません。
estimate-costを実行し、返却された数値のみを報告してください。コストの推測やコメントは行わないでください。
エスケープハッチ
references/api.md に記載のない事項については:
- ペイロードリファレンス: https://api.boltz.bio/docs/api/python/resources/predictions/subresources/structure_and_binding/methods/start
- CLIフラグ名:
boltz-api predictions:structure-and-binding start --help(スキーマの詳細は含まれていません。フラグ名と型のみです)
エンティティの形状・bindingバリアント・bonds・constraints・モデルオプション・入力例については references/api.md を参照してください。ダウンロード済み出力・メトリクス・検証上の注意点を要約する際は references/results.md を参照してください。
出力
metrics.json を要約し、ダウンロードされたCIFファイルのパスをユーザーに案内してください。ローカルのディレクトリ構造・ネストされたメトリクス・bindingメトリクスのバリアント・SAB検証上の注意点については references/results.md を参照してください。
SAB 400バリデーションの注意点
サーバーが {"code":"VALIDATION_ERROR","message":"Request validation failed"} のみを返してペイロードを拒否した場合は、entities・binding・constraints を確認し、詳細については references/results.md を参照してください。
原文(English)を表示
Workflow
If boltz-api is missing from PATH, use boltz-cli-setup for install/update guidance before retrying.
If a command reports missing or expired authentication, use boltz-cli-setup to start boltz-api auth login --device-code before retrying; do not ask permission first.
If the agent host sandbox blocks boltz-api install/auth/API calls, use boltz-cli-setup to request the host sandbox bypass/escalation needed for user-wide CLI install, browser login, credential storage, temp files, or API access before retrying.
Use this skill for one defined complex, not a library workflow.
-
Normalize the inputs into
entities. Each entity is{type, chain_ids, value}— note pluralchain_ids(an array, even for one chain) and the field isvalue, notsequence:{"entities": [{"type": "protein", "chain_ids": ["A"], "value": "MKTAYIAKQRQISFVKSHFSRQ"}]}typeis one ofprotein | rna | dna | ligand_smiles | ligand_ccd. Chain IDs go in entity order (A,B,C, …) unless the user specifies otherwise. Readreferences/api.mdfor per-type field variants (cyclic,modifications, ligand CCD codes, etc.) before authoring your first payload — agent guesses likesequence:orchain_id: "A"(singular) fail with unclear 400 errors. -
If the user wants binding metrics, add a flat
bindingblock with an explicittypefield. For ligand-protein binding use:binding: type: ligand_protein_binding binder_chain_id: BFor protein-protein binding use:
binding: type: protein_protein_binding binder_chain_ids: [B]Do not nest the variant name under
binding(for example, nobinding.ligand_protein_bindingobject). -
Supported optional features include
constraints,bonds,modifications,model_options, and binding metrics; only add them if the user asks. Read references/api.md for exact shapes and examples. -
Author the payload YAML or JSON, run
estimate-cost, show the USD cost, wait for explicit confirmation. -
startto submit (synchronous). Capture the ID. -
Launch
download-resultswith the agent runtime's background/non-blocking command facility so polling + download continue without blocking the agent session. In Claude Code, use Bash withrun_in_background: true. In Codex, rundownload-resultsas a foreground shell command withyield_time_ms: 1000; if Codex returns asession_id, keep it for optional same-thread polling, but treatdownload-statusplus the run directory as the durable source of truth. In Codex app/desktop runtimes that expose same-thread heartbeat automations, create a heartbeat that checksdownload-statusperiodically and posts a concise completion or failure update when the download reaches a terminal state. After launching the downloader, always report the job ID, run name, and output directory. Include the next check cadence if the heartbeat was created; otherwise include thedownload-statuscommand.
Command Pattern
# Replace placeholders with concrete absolute paths before running.
# Use a short descriptive run name, for example: sab-<target>-<ligand>-v1
# 1. estimate
boltz-api predictions:structure-and-binding estimate-cost \
--model boltz-2.1 \
--input @yaml:///absolute/path/payload.yaml
# 2. confirm with user, then submit
boltz-api predictions:structure-and-binding start \
--model boltz-2.1 \
--idempotency-key "<run-name>" \
--input @yaml:///absolute/path/payload.yaml \
--raw-output --transform id
# 3. Copy the printed job ID into this command, then launch it in the agent
# runtime's background/non-blocking mode.
# Claude Code: Bash with run_in_background=true.
# Codex: foreground shell command with yield_time_ms=1000; keep the returned session_id if one is provided.
# Do not append "&" or use nohup in Codex.
boltz-api download-results \
--id "<job-id-from-start>" --name "<run-name>" \
--root-dir "/absolute/path/boltz-experiments" \
--poll-interval-seconds 10
# -> /absolute/path/boltz-experiments/<run-name>/outputs/archive.tar.gz, .boltz-run.json
Always Do This
- Keep payload field names exactly as the API body names shown in
references/api.md; then pass the merged payload with--input @yaml:///absolute/path/payload.yamlor@json:///absolute/path/payload.json. Never use@./payload.yamlor@file://for object-typed payloads. - Use absolute paths for the output root, payload files, and embedded structure files. Do not
cdinto the run directory for follow-up commands; pass the same--root-dirand use absolute paths so later relative paths do not drift. - Residue indices are 0-based wherever the payload asks for residue positions (constraints, modifications, contact tokens).
- For CIF/PDB bytes embedded in
--target/structure.data, use@data:///absolute/path/file.cif— it detects binary and base64-encodes. Don't use bare@pathfor binary data. - Use the same slug as both
--idempotency-keyat submit time and--nameat download time so re-runs are idempotent and resume from.boltz-run.json. - In permission-gated agents such as Claude Code, keep each Boltz call as a top-level command that starts with
boltz-api. Prefer concrete arguments oversh -c, inline environment assignments, aliases, wrapper scripts, loops, or pipelines around theboltz-apiinvocation unless the user already allowed that exact command form. Use--raw-output --transform id, read the printed ID, then paste that literal ID into the nextdownload-resultscommand. - Prefer the agent runtime's background/non-blocking command mode for
download-results. In Codex specifically, keepdownload-resultsin the foreground and set the shell tool yield to 1000 ms; Codex will return asession_idif the command is still running. Do not append&or usenohupin Codex because the tool runner may clean up shell-backgrounded descendants before.boltz-run.jsonis fully written. - After the background/session starts, do not manually wait on it or run ad hoc polling loops.
download-resultsemits JSONL progress on stderr by default; add--progress-format text --verboseonly when you explicitly want human-readable logs. - In Codex app/desktop runtimes with same-thread heartbeat automation support, schedule a heartbeat after launching
download-results. The heartbeat should runboltz-api --format json download-status --name "<run-name>" --root-dir "/absolute/path/boltz-experiments"on a sensible cadence, post only material status changes or terminal completion/failure, and stop once terminal. Poll the savedsession_idwith an emptywrite_stdinonly for interactive, user-requested progress checks. Do not loopretrieveyourself. - If the current host has no heartbeat automation support, do not claim an automatic next check. Report the job ID, run name, output directory, and the command needed to check
download-status. - If detached download needs to be restarted, re-run
boltz-api download-resultswith the same--name "<run-name>"and the same--root-dir. - Poll interval: keep
--poll-interval-seconds 10for SAB — predictions usually finish in under a few minutes. - Cost: there is no published per-unit rate to cite for SAB — run
estimate-costand state only the figure it returns. Don't estimate or comment on cost.
Escape Hatch
For anything not covered in references/api.md:
- Payload reference: https://api.boltz.bio/docs/api/python/resources/predictions/subresources/structure_and_binding/methods/start
- CLI flag names:
boltz-api predictions:structure-and-binding start --help(schema details aren't there — just flag names and types)
Read references/api.md for entity shapes, binding variants, bonds, constraints, model options, and input examples. Read references/results.md when summarizing downloaded outputs, metrics, or validation quirks.
Outputs
Summarize metrics.json and point the user at the downloaded CIF path. Read references/results.md for the local layout, nested metrics, binding metric variants, and SAB validation quirks.
SAB 400 validation quirk
If the server rejects a payload with only {"code":"VALIDATION_ERROR","message":"Request validation failed"}, inspect entities, binding, and constraints; read references/results.md for details.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。