claude-skills/

Anthropic公式スキル・プラグインの日本語ディレクトリ

last sync 22h ago
スキルOfficialdevelopment

🧪boltz-small-molecule-screen

プラグイン
boltz

説明

Boltzを使用して既存の低分子ライブラリをスクリーニングします。 次のような場合に使用: ターゲットに対してSMILESまたは化合物ライブラリのドッキング、スコアリング、またはランキングを行う場合。また、各分子の無料Tier-1 ADME/ADMET(溶解性、膜透過性、親油性/logD)も返します。 デノボ分子設計、単発のドッキング、またはターゲットなしの単純なSMILESに対するADME評価には使用しないでください(その場合はboltz-small-molecule-admeを使用)。

原文を表示

Screen existing small-molecule libraries with Boltz. Use when docking, scoring, or ranking a supplied SMILES or compound library against a target; also returns free Tier-1 ADME/ADMET (solubility, permeability, lipophilicity/logD) per molecule. Not for de novo molecule design, one-off docking, or ADME on bare SMILES with no target (use boltz-small-molecule-adme).

ユースケース

  • ライブラリのドッキングやスコアリングを行うとき
  • 化合物のランキングが必要なとき
  • 分子のADME特性を評価するとき

本文(日本語訳)

ワークフロー

boltz-apiPATH に存在しない場合は、再試行前に boltz-cli-setup を使用してインストール・更新の手順を確認してください。 コマンドが認証の欠如または期限切れを報告した場合は、再試行前に boltz-cli-setup を使用して boltz-api auth login --device-code を開始してください(事前に許可を求める必要はありません)。 エージェントホストのサンドボックスが boltz-api のインストール・認証・API 呼び出しをブロックする場合は、再試行前に boltz-cli-setup を使用して、ユーザー全体の CLI インストール・ブラウザログイン・認証情報の保存・一時ファイル・API アクセスに必要なホストサンドボックスのバイパス/権限昇格をリクエストしてください。

次のような場合に使用: ユーザーがすでに候補分子を持っている場合。

  1. ライブラリを生の SMILES、CSV(SMILES 列を自動検出)、.smi、または .txt から molecules リストに正規化します。各エントリは {smiles, id?} の形式で、オプションの id は各結果の external_id としてそのまま返されます。
  2. ターゲットを正規化します: 1 つ以上のタンパク質配列を target.entities に設定し、オプションで pocket_residues(0 始まりインデックス)および/または reference_ligands(ポケット位置の特定を補助するための既知結合分子の SMILES)を指定します。
  3. ユーザーがカスタムフィルターを要求しない限り、サーバー側のデフォルトフィルタリングを維持してください。molecule_filters は明示的なリクエストがある場合にのみ追加します。
  4. ペイロードの YAML または JSON を作成し、estimate-cost を実行してコスト(USD)を表示した後、明示的な確認を待ちます。
  5. start でジョブを送信します(同期処理)。ジョブ ID を取得します。
  6. エージェントランタイムのバックグラウンド/ノンブロッキングコマンド機能を使用して download-results を起動します。このコマンドはポーリングを行い、list-results をページネーションしながら全ヒット構造をダウンロードし、終端状態になると終了します。
    • Claude Code の場合: run_in_background: true を指定した Bash を使用します。
    • Codex の場合: yield_time_ms: 1000 を設定したフォアグラウンドシェルコマンドとして download-results を実行します。Codex が session_id を返した場合は同一スレッドでのオプションポーリング用に保持しますが、download-status と実行ディレクトリを信頼できる情報源として扱います。同一スレッドのハートビート自動化を公開している Codex app/デスクトップランタイムの場合は、download-results 起動後にハートビートを作成し、download-status を定期的に確認して、ダウンロードが終端状態に達したときに簡潔な完了または失敗の通知を投稿します。 ダウンローダーを起動したら、必ずジョブ ID・実行名・出力ディレクトリを報告してください。ハートビートを作成した場合は次の確認タイミングを、作成していない場合は download-status コマンドを含めてください。
  7. 完了後、<output-root>/<run-name>/results/index.jsonl からランキングを行います。ヒット探索には binding_confidence で、リード最適化には optimization_score でソートします(これらは並列の意図であり、フォールバック階層ではありません)。上位 5〜10 件のヒットについて smiles・選択したランキング指標・主要な信頼度メトリクス・構造ファイルのパスを報告します。各結果には adme ブロック(solubilitypermeabilitylipophilicity)も含まれています。ユーザーが ADME を重視する場合、または上位ヒットにリスクが見られる場合は、開発適性の評価のために含めてください。出力レイアウト・メトリクス・ADME・フィルタリング済み入力の説明については references/results.md を参照してください。

コマンドパターン

# 実行前にプレースホルダーを具体的な絶対パスに置き換えてください。
# 例のような短くわかりやすい実行名を使用してください: sm-screen-<target>-<library>-v1

boltz-api small-molecule:library-screen estimate-cost \
  --input @yaml:///absolute/path/payload.yaml

boltz-api small-molecule:library-screen start \
       --idempotency-key "<run-name>" \
       --input @yaml:///absolute/path/payload.yaml \
       --raw-output --transform id

# 表示されたジョブ 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 30
# -> /absolute/path/boltz-experiments/<run-name>/results/<pres_*>/...

ペイロードのキーは moleculestargetmolecule_filters であり、これらは API ボディのフィールド名です。CLI の直接フラグ名(--molecule / --target / --molecule-filters)ではありません。

必ず実施すること

  • ペイロードのフィールド名は、references/api.md に記載されている API ボディ名を正確に使用してください。
  • 出力ルート・ペイロードファイル・埋め込みターゲットファイルには絶対パスを使用してください。フォローアップコマンドの際に実行ディレクトリへ cd しないでください。同じ --root-dir を渡し、絶対パスを使用することで相対パスのずれを防ぎます。
  • estimate-coststart には --input @yaml:///absolute/path/payload.yaml または @json:///absolute/path/payload.json によるマージ済みトップレベルペイロードを優先してください。--idempotency-key--workspace-id はトップレベルに置いてください。--input 内にも同じキーが存在する場合、トップレベルのフラグが優先されます。
  • 直接オブジェクトフラグはオーバーライドとして引き続き使用できます(例: --target @yaml:///absolute/path/target.yaml--molecule-filters @json:///absolute/path/filters.json・繰り返し指定の --molecule @json:///absolute/path/mol-1.json など)。標準入力へのパイプによる YAML / JSON も使用できますが、API ボディのフィールド名を使用する必要があります。@file://@./ は使用しないでください。
  • ポケット残基インデックスは 0 始まりとして扱ってください。
  • 医薬化学フィルターを独自に追加しないでください。molecule_filters はユーザーが要求した場合にのみ追加し、カタログをオプションとして案内します。
  • 送信時の --idempotency-keydownload-results--name には同じスラグを使用し、.boltz-run.json による再実行の再開を可能にしてください。
  • Claude Code などの権限制御が必要な agent では、各 Boltz の呼び出しを boltz-api で始まるトップレベルコマンドとして保持してください。ユーザーがすでに許可済みのコマンド形式でない限り、boltz-api 呼び出しの周囲で sh -c・インライン環境変数の設定・エイリアス・ラッパースクリプト・ループ・パイプラインよりも具体的な引数を優先してください。--raw-output --transform id を使用し、表示された ID を読み取り、次の download-results コマンドにそのリテラル ID を貼り付けてください。
  • download-results にはエージェントランタイムのバックグラウンド/ノンブロッキングコマンドモードを優先して使用してください。Codex の場合は download-results をフォアグラウンドで実行し、シェルツールの yield を 1000 ms に設定してください。コマンドがまだ実行中の場合、Codex は session_id を返します。Codex では & を追加したり nohup を使用したりしないでください。ツールランナーがシェルのバックグラウンドプロセスを .boltz-run.json の書き込み完了前にクリーンアップする可能性があります。
  • バックグラウンド/セッション開始後は、手動での待機やアドホックなポーリングループを実行しないでください。download-results はデフォルトで stderr に JSONL 形式の進捗情報を出力します。人間が読みやすいログが必要な場合にのみ --progress-format text --verbose を追加してください。
  • 同一スレッドのハートビート自動化をサポートしている Codex app/デスクトップランタイムでは、download-results 起動後にハートビートをスケジュールしてください。ハートビートは boltz-api --format json download-status --name "<run-name>" --root-dir "/absolute/path/boltz-experiments" を実行し、終端状態になると停止します。分子数に応じた確認間隔の目安: 100 未満 → 1〜2 分ごと、100〜1,000 → 5 分ごと、1,000 超 → 15 分ごと。重要なステータス変化または終端の完了/失敗のみを通知してください。保存した session_id のポーリングは、ユーザーが対話的に進捗確認をリクエストした場合にのみ空の write_stdin で実行してください。現在のターンで手動のポーリングループは絶対に実行しないでください。
  • 現在のホストがハートビート自動化をサポートしていない場合は、自動的な次回確認を主張しないでください。ジョブ ID・実行名・出力ディレクトリ・download-status の確認に必要なコマンドを報告してください。
  • デタッチされたダウンロードを再起動する必要がある場合は、同じ --name "<run-name>"--root-dir を指定して boltz-api download-results を再実行してください。
  • コストは分子 1 件あたり一律 $0.025 です(サイズ非依存)。estimate-cost が正式な合計金額を返します。必ずこれを使用してください。
  • ポーリング間隔: --poll-interval-seconds 30 はダウンローダーの合理的なデフォルト値です。実際の所要時間は分子数に応じて変動します。100 未満は数分程度で完了することが多く、100〜1,000 は数分〜数十分、それ以上の大規模スクリーニングは入力内容やシステム負荷によってさらに長くなる場合があります。固定の所要時間を伝えないでください。また、10 候補のスクリーニングに 30 分や数時間かかるとユーザーに伝えないでください。

エスケープハッチ

moleculestargetmolecule_filters の構造(組み込み SMARTS フィルターや RDKit 記述子の範囲を含む)については references/api.md を参照してください。ダウンロード後にヒットのランキングやフィルタリング済み入力の説明が必要な場合は references/results.md を参照してください。

出力

download-results 完了後に results/index.jsonl からランキングを行います。ローカルファイルのレイアウト・メトリクスの意味・フィルタリング済み入力の説明については 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 when the user already has candidate molecules.

  1. Normalize the library from raw SMILES, a CSV (auto-detect the SMILES column), .smi, or .txt into the molecules list. Each entry is {smiles, id?}; the optional id is echoed back as external_id on each result.
  2. Normalize the target: one or more protein sequences into target.entities, plus optional pocket_residues (0-based) and/or reference_ligands (SMILES of known binders to help locate the pocket).
  3. Keep default server-side filtering unless the user asks for custom filters — only add molecule_filters on explicit request.
  4. Author the payload YAML or JSON, run estimate-cost, show the USD cost, wait for explicit confirmation.
  5. start to submit (synchronous). Capture the ID.
  6. Launch download-results with the agent runtime's background/non-blocking command facility — it polls, paginates list-results, downloads every per-hit structure, and exits when terminal. In Claude Code, use Bash with run_in_background: true. In Codex, run download-results as a foreground shell command with yield_time_ms: 1000; if Codex returns a session_id, keep it for optional same-thread polling, but treat download-status plus the run directory as the durable source of truth. In Codex app/desktop runtimes that expose same-thread heartbeat automations, create a heartbeat that checks download-status periodically 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 the download-status command.
  7. When done, rank from <output-root>/<run-name>/results/index.jsonl. Sort by binding_confidence for hit discovery or optimization_score for lead optimization; these are parallel intents, not a fallback hierarchy. Report the top 5-10 hits with smiles, the chosen ranking metric, key confidence metrics, and structure path. Each result also carries a free adme block (solubility, permeability, lipophilicity) — include it for developability triage when the user cares about ADME, or when a top hit looks risky. Read references/results.md for output layout, metrics, ADME, and filtered-input accounting.

Command Pattern

# Replace placeholders with concrete absolute paths before running.
# Use a short descriptive run name, for example: sm-screen-<target>-<library>-v1

boltz-api small-molecule:library-screen estimate-cost \
  --input @yaml:///absolute/path/payload.yaml

boltz-api small-molecule:library-screen start \
       --idempotency-key "<run-name>" \
       --input @yaml:///absolute/path/payload.yaml \
       --raw-output --transform id

# 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 30
# -> /absolute/path/boltz-experiments/<run-name>/results/<pres_*>/...

Payload keys are molecules, target, molecule_filters — the API body field names, not the direct CLI flag names --molecule / --target / --molecule-filters.

Always Do This

  • Keep payload field names exactly as the API body names shown in references/api.md.
  • Use absolute paths for the output root, payload files, and embedded target files. Do not cd into the run directory for follow-up commands; pass the same --root-dir and use absolute paths so later relative paths do not drift.
  • Prefer one merged top-level payload via --input @yaml:///absolute/path/payload.yaml or @json:///absolute/path/payload.json for estimate-cost and start. Keep --idempotency-key and --workspace-id top-level; if they also appear inside --input, the top-level flags win.
  • Direct object flags still work as overrides, such as --target @yaml:///absolute/path/target.yaml, --molecule-filters @json:///absolute/path/filters.json, or repeated --molecule @json:///absolute/path/mol-1.json entries. Piped YAML / JSON on stdin also works, but it must use API body field names. Never use @file:// or @./.
  • Treat pocket residue indices as 0-based.
  • Do not invent medicinal-chemistry filters. Only add molecule_filters if the user asks; mention the catalog as an option.
  • Use the same slug as both --idempotency-key at submit and --name on download-results so re-runs resume via .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 over sh -c, inline environment assignments, aliases, wrapper scripts, loops, or pipelines around the boltz-api invocation 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 next download-results command.
  • Prefer the agent runtime's background/non-blocking command mode for download-results. In Codex specifically, keep download-results in the foreground and set the shell tool yield to 1000 ms; Codex will return a session_id if the command is still running. Do not append & or use nohup in Codex because the tool runner may clean up shell-backgrounded descendants before .boltz-run.json is fully written.
  • After the background/session starts, do not manually wait on it or run ad hoc polling loops. download-results emits JSONL progress on stderr by default; add --progress-format text --verbose only 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 run boltz-api --format json download-status --name "<run-name>" --root-dir "/absolute/path/boltz-experiments" and stop once terminal. Choose cadence by molecule count: under 100 -> every 1-2 minutes; 100-1,000 -> every 5 minutes; over 1,000 -> every 15 minutes. Post only material status changes or terminal completion/failure. Poll the saved session_id with an empty write_stdin only for interactive, user-requested progress checks. Never run a manual poll loop in the current turn.
  • 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-results with the same --name "<run-name>" and the same --root-dir.
  • Cost is a flat $0.025 per molecule (size-independent). estimate-cost returns the authoritative total — always use it.
  • Poll interval: --poll-interval-seconds 30 is a reasonable downloader default. Wall-clock time scales roughly with the number of molecules: under 100 often finishes in a few minutes, 100-1,000 may take several minutes to tens of minutes, and larger screens can take longer or hours depending on inputs and system load. Don't quote a fixed duration, and never tell the user a 10-candidate screen will take 30 minutes or hours.

Escape Hatch

Read references/api.md for the molecules, target, and molecule_filters shapes, including the built-in SMARTS filters and RDKit descriptor ranges. Read references/results.md after download when ranking hits or explaining missing/filtered inputs.

Outputs

Rank from results/index.jsonl after download-results; use references/results.md for the local file layout, metric meanings, and filtered-input accounting.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。