Skip to content
Go to Boltz API

Screen protein libraries

Score your own protein sequences against a target, fetch results as they arrive, and stop early if needed.

A protein library screen scores protein sequences you provide against a target. Each protein is evaluated for binding confidence, structure confidence, and secondary structure composition. Results stream in as proteins are scored — you can fetch them before the screen finishes and stop early.

Library screens generate protein results over time. As soon as a protein is scored, you can read and download the result without waiting for the full screen to finish.

Each screened protein result includes scoring metrics such as binding confidence, structure confidence, and interaction PAE. Each result also includes downloadable artifacts for the predicted bound structure and PAE.

There are two ways to define the target.

Structure template target

Provide a CIF file and select which chains and residues to include. The file can be provided as a URL or base64-encoded content. Each chain gets a crop_residues field (an array of 0-indexed residue indices, or "all" to keep the entire chain). You can optionally specify epitope_residues (residues the binder should contact) and flexible_residues (residues allowed to move during design).

{
"target": {
"type": "structure_template",
"structure": {
"type": "base64",
"media_type": "chemical/x-cif",
"data": "ZGF0YV90YXJnZXQK..."
},
"chain_selection": {
"A": {
"chain_type": "polymer",
"crop_residues": "all",
"epitope_residues": [45, 46, 47, 48, 49],
"flexible_residues": [44, 50]
},
"B": {
"chain_type": "polymer",
"crop_residues": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
}
}
}
}

No-template target

Define the target from an entity list when you don’t have a structure file. Optionally add epitope_residues (keyed by chain ID), constraints, and bonds.

{
"target": {
"type": "no_template",
"entities": [
{ "type": "protein", "value": "MKTIIALSYIFCLVFA", "chain_ids": ["A"] }
],
"epitope_residues": {
"A": [45, 46, 47, 48, 49]
}
}
}

Pass proteins inline as an array of objects. Each entry has an entities field (an array of entities forming the complex to screen) and an optional id:

{
"proteins": [
{
"entities": [
{ "type": "protein", "value": "MKTAYIVKSHFSRQ", "chain_ids": ["B"] }
],
"id": "binder-001"
},
{
"entities": [
{
"type": "protein",
"value": "ACDEFGHIKLMNPQRSTVWY",
"chain_ids": ["B"]
}
],
"id": "binder-002"
}
]
}

When you provide an id, it’s returned as external_id on the corresponding result — use this to correlate results back to your input library.

run_protein_library_screen() submits the screen, waits while proteins are scored, downloads result archives, and returns a local run directory.

import os
from boltz_api import Boltz
client = Boltz(api_key=os.environ["BOLTZ_API_KEY"])
run_dir = client.experiments.run_protein_library_screen(
target={
"type": "no_template",
"entities": [
{"type": "protein", "value": "MKTIIALSYIFCLVFA", "chain_ids": ["A"]},
],
"epitope_residues": {"A": [10, 11, 12]},
},
proteins=[
{
"entities": [
{"type": "protein", "value": "MKTAYIVKSHFSRQ", "chain_ids": ["B"]}
],
"id": "binder-001",
},
{
"entities": [
{"type": "protein", "value": "ACDEFGHIKLMNPQRSTVWY", "chain_ids": ["B"]}
],
"id": "binder-002",
},
],
name="protein-screen-hotspots",
)
print(run_dir)

The run directory contains the sanitized run record, resumable download state, a result manifest, and downloaded files for each screened protein:

boltz-experiments/protein-screen-hotspots/
.boltz-run.json
run.json
results/
index.jsonl
prot_scr_result_.../
metadata.json
archive.tar.gz
files/
result/
metrics.json
predicted_structure.cif
pae.npz

The main run_protein_library_screen() example already waits and downloads. To submit now and download later, use start_protein_library_screen() and resume with wait_and_download().

run_dir = client.experiments.start_protein_library_screen(
target={
"type": "no_template",
"entities": [
{"type": "protein", "value": "MKTIIALSYIFCLVFA", "chain_ids": ["A"]},
],
"epitope_residues": {"A": [10, 11, 12]},
},
proteins=[
{
"entities": [
{"type": "protein", "value": "MKTAYIVKSHFSRQ", "chain_ids": ["B"]}
],
"id": "binder-001",
},
],
name="submit-now-finish-later",
)
client.experiments.wait_and_download(run_dir=run_dir)

Result pages and artifact archives are already downloaded into the run directory.

print(run_dir)
for result_dir in (run_dir / "results").iterdir():
print(result_dir)
client.experiments.stop(run_dir=run_dir)
MetricRangeWhat it measures
binding_confidence0–1Confidence that binding occurs.
structure_confidence0–1Overall confidence in the predicted structure.
iptm0–1Interface predicted TM-score.
min_interaction_paeAngstromsMinimum predicted aligned error at the interface. Lower is better.
helix_fraction0–1Fraction of residues in helices.
sheet_fraction0–1Fraction of residues in sheets.
loop_fraction0–1Fraction of residues in loops.
StatusMeaning
pendingThe screen is queued and has not started yet.
runningThe screen is actively scoring proteins. Results may already be available.
succeededAll proteins have been screened.
failedThe screen encountered an error. Check the error field.
stoppedThe screen was stopped early. Partial results are available.