🧪boltz-small-molecule-screen
- プラグイン
- boltz
- ソース
- GitHub で見る ↗
説明
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-api が PATH に存在しない場合は、再試行前に boltz-cli-setup を使用してインストール・更新の手順を確認してください。
コマンドが認証の欠如または期限切れを報告した場合は、再試行前に boltz-cli-setup を使用して boltz-api auth login --device-code を開始してください(事前に許可を求める必要はありません)。
エージェントホストのサンドボックスが boltz-api のインストール・認証・API 呼び出しをブロックする場合は、再試行前に boltz-cli-setup を使用して、ユーザー全体の CLI インストール・ブラウザログイン・認証情報の保存・一時ファイル・API アクセスに必要なホストサンドボックスのバイパス/権限昇格をリクエストしてください。
次のような場合に使用: ユーザーがすでに候補分子を持っている場合。
- ライブラリを生の SMILES、CSV(SMILES 列を自動検出)、
.smi、または.txtからmoleculesリストに正規化します。各エントリは{smiles, id?}の形式で、オプションのidは各結果のexternal_idとしてそのまま返されます。 - ターゲットを正規化します: 1 つ以上のタンパク質配列を
target.entitiesに設定し、オプションでpocket_residues(0 始まりインデックス)および/またはreference_ligands(ポケット位置の特定を補助するための既知結合分子の SMILES)を指定します。 - ユーザーがカスタムフィルターを要求しない限り、サーバー側のデフォルトフィルタリングを維持してください。
molecule_filtersは明示的なリクエストがある場合にのみ追加します。 - ペイロードの YAML または JSON を作成し、
estimate-costを実行してコスト(USD)を表示した後、明示的な確認を待ちます。 startでジョブを送信します(同期処理)。ジョブ ID を取得します。- エージェントランタイムのバックグラウンド/ノンブロッキングコマンド機能を使用して
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コマンドを含めてください。
- Claude Code の場合:
- 完了後、
<output-root>/<run-name>/results/index.jsonlからランキングを行います。ヒット探索にはbinding_confidenceで、リード最適化にはoptimization_scoreでソートします(これらは並列の意図であり、フォールバック階層ではありません)。上位 5〜10 件のヒットについてsmiles・選択したランキング指標・主要な信頼度メトリクス・構造ファイルのパスを報告します。各結果にはadmeブロック(solubility・permeability・lipophilicity)も含まれています。ユーザーが 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_*>/...
ペイロードのキーは molecules・target・molecule_filters であり、これらは API ボディのフィールド名です。CLI の直接フラグ名(--molecule / --target / --molecule-filters)ではありません。
必ず実施すること
- ペイロードのフィールド名は、
references/api.mdに記載されている API ボディ名を正確に使用してください。 - 出力ルート・ペイロードファイル・埋め込みターゲットファイルには絶対パスを使用してください。フォローアップコマンドの際に実行ディレクトリへ
cdしないでください。同じ--root-dirを渡し、絶対パスを使用することで相対パスのずれを防ぎます。 estimate-costとstartには--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-keyとdownload-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 分や数時間かかるとユーザーに伝えないでください。
エスケープハッチ
- ペイロードリファレンス: https://api.boltz.bio/docs/api/python/resources/small_molecule/subresources/library_screen/methods/start
- CLI フラグ名:
boltz-api small-molecule:library-screen start --help
molecules・target・molecule_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.
- Normalize the library from raw SMILES, a CSV (auto-detect the SMILES column),
.smi, or.txtinto themoleculeslist. Each entry is{smiles, id?}; the optionalidis echoed back asexternal_idon each result. - Normalize the target: one or more protein sequences into
target.entities, plus optionalpocket_residues(0-based) and/orreference_ligands(SMILES of known binders to help locate the pocket). - Keep default server-side filtering unless the user asks for custom filters — only add
molecule_filterson explicit request. - 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 — it polls, paginateslist-results, downloads every per-hit structure, and exits when terminal. 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. - When done, rank from
<output-root>/<run-name>/results/index.jsonl. Sort bybinding_confidencefor hit discovery oroptimization_scorefor lead optimization; these are parallel intents, not a fallback hierarchy. Report the top 5-10 hits withsmiles, the chosen ranking metric, key confidence metrics, and structure path. Each result also carries a freeadmeblock (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
cdinto the run directory for follow-up commands; pass the same--root-dirand use absolute paths so later relative paths do not drift. - Prefer one merged top-level payload via
--input @yaml:///absolute/path/payload.yamlor@json:///absolute/path/payload.jsonforestimate-costandstart. Keep--idempotency-keyand--workspace-idtop-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.jsonentries. 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_filtersif the user asks; mention the catalog as an option. - Use the same slug as both
--idempotency-keyat submit and--nameondownload-resultsso 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 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"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 savedsession_idwith an emptywrite_stdinonly 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-resultswith the same--name "<run-name>"and the same--root-dir. - Cost is a flat $0.025 per molecule (size-independent).
estimate-costreturns the authoritative total — always use it. - Poll interval:
--poll-interval-seconds 30is 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
- Payload reference: https://api.boltz.bio/docs/api/python/resources/small_molecule/subresources/library_screen/methods/start
- CLI flag names:
boltz-api small-molecule:library-screen start --help
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 による自動翻訳です。