# RFD4-Proteina


RFD4-Proteina designs proteins and biomolecular complexes with sequence–structure co-design, motif and binding-site conditioning, partial diffusion, and reward-guided search.


## 基础信息

| 项目 | 值 |
|------|-----|
| Base URL | `https://sciminer.tech/console/api` |
| API Endpoint | `/v1/internal/tools/invoke` |
| Content-Type | `application/json` |
| Authentication | `X-Auth-Token: <YOUR_API_KEY>` |

## 1. De-novo binder design against a protein target (PPI).

**Tool Name:** `predict_binder_predict_gpu_binder_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `extra_metrics` | `select_array` | ✗ | Optional extra inline metric groups (multi-select; options: None, centroid_conditioning, interchain_interactions, rasa_conditioning, secondary_structure_conditioning, hotspot_conditioning, 3d_coordinate_conditioning, internal_coordinate_conditioning, unindexed, sequence_probability, na_ss_conditioning; default: None = no extra group). The base design metrics are always computed; refolding/oracle evaluation is selected by the separate refolding_oracle parameter. | `None`, `centroid_conditioning`, `interchain_interactions`, `rasa_conditioning`, `secondary_structure_conditioning`, `hotspot_conditioning`, `3d_coordinate_conditioning`, `internal_coordinate_conditioning`, `unindexed`, `sequence_probability`, `na_ss_conditioning` |
| `budget` | `select` | ✗ | Compute budget: low/medium/high trunk-recycling levels over the same 60 sampling steps. Totals are 120/180/300 passes for front_loaded and flat tasks, and 120/150/180 for midpeak tasks; the task endpoint picks the schedule shape. Default follows the task's recommended preset. | `low`, `medium`, `high` |
| `refolding_oracle` | `select` | ✗ | Post-generation refolding evaluation with rfd4-evaluate: 'af3' (default), 'af2', 'of3', or 'none'. Every generated design is refolded and the result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and pass/fail columns. AF2 is protein-only (no DNA, small-molecule, or ligand-bound enzyme tasks). Evaluation is best-effort: a failure or an unavailable oracle runtime returns the generation results with a note; generation is not refunded. RNA is not evaluated. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✓ | Target structure to design a binder against, e.g. a cropped PDB chain. Plain structures work — conditioning is assembled from your parameters.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `target_chain` | `string` | ✓ | Chain ID of the target in the uploaded CIF (e.g. 'A') |  |
| `binder_len` | `string` | ✗ | Designed binder length range 'min-max' (a single value means fixed length); em/full-width dash variants ('50–120', '50—120', '50－120') accepted. Range 5-500. |  |
| `hotspots` | `string` | ✗ | Comma-separated binding-site hotspots on the target: '<resid>' for the whole residue or '<resid>:[ATOMS]' for specific atoms, e.g. '56:[CG,OH], 115:[CG,SD], 123'. Raw select strings (sel('...') or queries like is_ligand) also pass through. |  |
| `annotated_passthrough` | `boolean` | ✗ | Treat the upload as a fully prepared annotated CIF and use its conditioning verbatim instead of assembling one from the parameters (default: false) |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_binder_predict_gpu_binder_post",
    "parameters": {
    "extra_metrics": [
        "OPTION VALUE1",
        "OPTION VALUE2"
    ],
    "budget": "medium",
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "target_chain": "<TARGET_CHAIN>",
    "binder_len": "50-120",
    "hotspots": "<HOTSPOTS>",
    "annotated_passthrough": false,
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 2. Nanobody / VHH design on a pre-annotated antibody-antigen complex.

**Tool Name:** `predict_antibody_predict_gpu_antibody_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `extra_metrics` | `select_array` | ✗ | Optional extra inline metric groups (multi-select; options: None, centroid_conditioning, interchain_interactions, rasa_conditioning, secondary_structure_conditioning, hotspot_conditioning, 3d_coordinate_conditioning, internal_coordinate_conditioning, unindexed, sequence_probability, na_ss_conditioning; default: None = no extra group). The base design metrics are always computed; refolding/oracle evaluation is selected by the separate refolding_oracle parameter. | `None`, `centroid_conditioning`, `interchain_interactions`, `rasa_conditioning`, `secondary_structure_conditioning`, `hotspot_conditioning`, `3d_coordinate_conditioning`, `internal_coordinate_conditioning`, `unindexed`, `sequence_probability`, `na_ss_conditioning` |
| `budget` | `select` | ✗ | Compute budget: low/medium/high trunk-recycling levels over the same 60 sampling steps. Totals are 120/180/300 passes for front_loaded and flat tasks, and 120/150/180 for midpeak tasks; the task endpoint picks the schedule shape. Default follows the task's recommended preset. | `low`, `medium`, `high` |
| `refolding_oracle` | `select` | ✗ | Post-generation refolding evaluation with rfd4-evaluate: 'af3' (default), 'af2', 'of3', or 'none'. Every generated design is refolded and the result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and pass/fail columns. AF2 is protein-only (no DNA, small-molecule, or ligand-bound enzyme tasks). Evaluation is best-effort: a failure or an unavailable oracle runtime returns the generation results with a note; generation is not refunded. RNA is not evaluated. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✓ | Pre-annotated cropped VHH/antibody complex (framework internal-geometry + CATH fold + fixed antigen conditioning), e.g. from examples/antibody_design/structures/vhh or the annotated-CIF tooling. A plain complex will not work here.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `num_hotspots` | `string` | ✗ | Comma-separated hotspot-count choices sampled per replicate, e.g. '2,3' |  |
| `min_distance` | `number` | ✗ | SampleNearbyHotspots min_distance (A) |  |
| `patch_diameter` | `number` | ✗ | SampleNearbyHotspots patch_diameter (A) |  |
| `min_atom_sasa` | `number` | ✗ | SampleNearbyHotspots min_atom_sasa |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_antibody_predict_gpu_antibody_post",
    "parameters": {
    "extra_metrics": [
        "OPTION VALUE1",
        "OPTION VALUE2"
    ],
    "budget": "high",
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "num_hotspots": "2,3",
    "min_distance": 5,
    "patch_diameter": 15,
    "min_atom_sasa": 1,
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 3. De-novo binder design around a small-molecule ligand.

**Tool Name:** `predict_sm_binder_predict_gpu_sm_binder_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `extra_metrics` | `select_array` | ✗ | Optional extra inline metric groups (multi-select; options: None, centroid_conditioning, interchain_interactions, rasa_conditioning, secondary_structure_conditioning, hotspot_conditioning, 3d_coordinate_conditioning, internal_coordinate_conditioning, unindexed, sequence_probability, na_ss_conditioning; default: None = no extra group). The base design metrics are always computed; refolding/oracle evaluation is selected by the separate refolding_oracle parameter. | `None`, `centroid_conditioning`, `interchain_interactions`, `rasa_conditioning`, `secondary_structure_conditioning`, `hotspot_conditioning`, `3d_coordinate_conditioning`, `internal_coordinate_conditioning`, `unindexed`, `sequence_probability`, `na_ss_conditioning` |
| `budget` | `select` | ✗ | Compute budget: low/medium/high trunk-recycling levels over the same 60 sampling steps. Totals are 120/180/300 passes for front_loaded and flat tasks, and 120/150/180 for midpeak tasks; the task endpoint picks the schedule shape. Default follows the task's recommended preset. | `low`, `medium`, `high` |
| `refolding_oracle` | `select` | ✗ | Post-generation refolding evaluation with rfd4-evaluate: 'af3' (default), 'af2', 'of3', or 'none'. Every generated design is refolded and the result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and pass/fail columns. AF2 is protein-only (no DNA, small-molecule, or ligand-bound enzyme tasks). Evaluation is best-effort: a failure or an unavailable oracle runtime returns the generation results with a note; generation is not refunded. RNA is not evaluated. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✓ | Structure containing the ligand / small molecule. The ligand must keep its bonds and charges; an annotated CIF is best for nonstandard chemistry. Packaged benchmark inputs (SAM/FAD/...): use annotated_passthrough=true.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `binder_len` | `string` | ✗ | Designed binder length range 'min-max' (single value = fixed); dash variants accepted. Range 5-500. |  |
| `ligand` | `string` | ✗ | Ligand selector: '<chain>/<resid>' (e.g. 'B/386') or '<chain>'. Default: the largest non-standard residue in the file. |  |
| `hbond_atoms` | `string` | ✗ | Optional hydrogen-bond constraints on ligand atoms (C_HB=BOTH), hotspot syntax e.g. '386:[N6,O4]' |  |
| `annotated_passthrough` | `boolean` | ✗ | Treat the upload as a fully prepared annotated CIF and use its conditioning verbatim instead of assembling one from the parameters (default: false) |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_sm_binder_predict_gpu_sm_binder_post",
    "parameters": {
    "extra_metrics": [
        "OPTION VALUE1",
        "OPTION VALUE2"
    ],
    "budget": "medium",
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "binder_len": "100-180",
    "ligand": "<LIGAND>",
    "hbond_atoms": "<HBOND_ATOMS>",
    "annotated_passthrough": false,
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 4. De-novo binder design against a DNA duplex.

**Tool Name:** `predict_dna_binder_predict_gpu_dna_binder_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `extra_metrics` | `select_array` | ✗ | Optional extra inline metric groups (multi-select; options: None, centroid_conditioning, interchain_interactions, rasa_conditioning, secondary_structure_conditioning, hotspot_conditioning, 3d_coordinate_conditioning, internal_coordinate_conditioning, unindexed, sequence_probability, na_ss_conditioning; default: None = no extra group). The base design metrics are always computed; refolding/oracle evaluation is selected by the separate refolding_oracle parameter. | `None`, `centroid_conditioning`, `interchain_interactions`, `rasa_conditioning`, `secondary_structure_conditioning`, `hotspot_conditioning`, `3d_coordinate_conditioning`, `internal_coordinate_conditioning`, `unindexed`, `sequence_probability`, `na_ss_conditioning` |
| `budget` | `select` | ✗ | Compute budget: low/medium/high trunk-recycling levels over the same 60 sampling steps. Totals are 120/180/300 passes for front_loaded and flat tasks, and 120/150/180 for midpeak tasks; the task endpoint picks the schedule shape. Default follows the task's recommended preset. | `low`, `medium`, `high` |
| `refolding_oracle` | `select` | ✗ | Post-generation refolding evaluation with rfd4-evaluate: 'af3' (default), 'af2', 'of3', or 'none'. Every generated design is refolded and the result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and pass/fail columns. AF2 is protein-only (no DNA, small-molecule, or ligand-bound enzyme tasks). Evaluation is best-effort: a failure or an unavailable oracle runtime returns the generation results with a note; generation is not refunded. RNA is not evaluated. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✓ | DNA target structure — typically the duplex to bind. Plain structures work; alternatively upload a curated benchmark annotated CIF and set annotated_passthrough=true.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `dna_chains` | `string` | ✗ | Comma-separated nucleic-acid chain IDs (e.g. 'A,B'). Default: auto-detect all nucleic-acid chains. |  |
| `binder_len` | `string` | ✗ | Designed binder length range 'min-max' (single value = fixed); dash variants accepted. Range 5-500. |  |
| `hotspots` | `string` | ✗ | Optional hotspots on the first DNA chain, same syntax as the binder endpoint |  |
| `annotated_passthrough` | `boolean` | ✗ | Treat the upload as a fully prepared annotated CIF and use its conditioning verbatim instead of assembling one from the parameters (default: false) |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_dna_binder_predict_gpu_dna_binder_post",
    "parameters": {
    "extra_metrics": [
        "OPTION VALUE1",
        "OPTION VALUE2"
    ],
    "budget": "medium",
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "dna_chains": "<DNA_CHAINS>",
    "binder_len": "50-150",
    "hotspots": "<HOTSPOTS>",
    "annotated_passthrough": false,
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 5. Rebuild a scaffold around a fixed structural motif / binding epitope.

**Tool Name:** `predict_motif_scaffold_predict_gpu_motif_scaffold_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `extra_metrics` | `select_array` | ✗ | Optional extra inline metric groups (multi-select; options: None, centroid_conditioning, interchain_interactions, rasa_conditioning, secondary_structure_conditioning, hotspot_conditioning, 3d_coordinate_conditioning, internal_coordinate_conditioning, unindexed, sequence_probability, na_ss_conditioning; default: None = no extra group). The base design metrics are always computed; refolding/oracle evaluation is selected by the separate refolding_oracle parameter. | `None`, `centroid_conditioning`, `interchain_interactions`, `rasa_conditioning`, `secondary_structure_conditioning`, `hotspot_conditioning`, `3d_coordinate_conditioning`, `internal_coordinate_conditioning`, `unindexed`, `sequence_probability`, `na_ss_conditioning` |
| `budget` | `select` | ✗ | Compute budget: low/medium/high trunk-recycling levels over the same 60 sampling steps. Totals are 120/180/300 passes for front_loaded and flat tasks, and 120/150/180 for midpeak tasks; the task endpoint picks the schedule shape. Default follows the task's recommended preset. | `low`, `medium`, `high` |
| `refolding_oracle` | `select` | ✗ | Post-generation refolding evaluation with rfd4-evaluate: 'af3' (default), 'af2', 'of3', or 'none'. Every generated design is refolded and the result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and pass/fail columns. AF2 is protein-only (no DNA, small-molecule, or ligand-bound enzyme tasks). Evaluation is best-effort: a failure or an unavailable oracle runtime returns the generation results with a note; generation is not refunded. RNA is not evaluated. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✓ | Structure containing the motif: e.g. a binding epitope or structural motif, with or without its ligand. Pre-annotated benchmark inputs (motif_scaffolding set): use annotated_passthrough=true. Enzyme active-site (M-CSA) inputs: use the /predict_gpu/enzyme_design endpoint.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `motif_chain` | `string` | ✓ | Chain ID carrying the motif |  |
| `motif_residues` | `string` | ✓ | Contiguous motif residue range on that chain, e.g. '5-25' (or '42'). Disjoint motifs: use scaffold_contig. |  |
| `scaffold_len` | `string` | ✗ | Scaffold length range 'min-max' around the motif (single value = fixed); dash variants accepted. Range 5-400. |  |
| `scaffold_contig` | `string` | ✗ | Full contig override for expert use, e.g. '10-40, /0, A5-25, /0, 10-40' (the motif segment must match motif_residues) |  |
| `fix_motif_sequence` | `boolean` | ✗ | Fix motif residue identities (C_SEQ); false = backbone-only motif conditioning, sidechains redesigned (default: true) |  |
| `annotated_passthrough` | `boolean` | ✗ | Treat the upload as a fully prepared annotated CIF and use its conditioning verbatim instead of assembling one from the parameters (default: false) |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_motif_scaffold_predict_gpu_motif_scaffold_post",
    "parameters": {
    "extra_metrics": [
        "OPTION VALUE1",
        "OPTION VALUE2"
    ],
    "budget": "medium",
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "motif_chain": "<MOTIF_CHAIN>",
    "motif_residues": "<MOTIF_RESIDUES>",
    "scaffold_len": "40-200",
    "scaffold_contig": "<SCAFFOLD_CONTIG>",
    "fix_motif_sequence": false,
    "annotated_passthrough": false,
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 6. M-CSA style active-site design: catalytic motif plus substrate ligand.

**Tool Name:** `predict_enzyme_design_predict_gpu_enzyme_design_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `extra_metrics` | `select_array` | ✗ | Optional extra inline metric groups (multi-select; options: None, centroid_conditioning, interchain_interactions, rasa_conditioning, secondary_structure_conditioning, hotspot_conditioning, 3d_coordinate_conditioning, internal_coordinate_conditioning, unindexed, sequence_probability, na_ss_conditioning; default: None = no extra group). The base design metrics are always computed; refolding/oracle evaluation is selected by the separate refolding_oracle parameter. | `None`, `centroid_conditioning`, `interchain_interactions`, `rasa_conditioning`, `secondary_structure_conditioning`, `hotspot_conditioning`, `3d_coordinate_conditioning`, `internal_coordinate_conditioning`, `unindexed`, `sequence_probability`, `na_ss_conditioning` |
| `budget` | `select` | ✗ | Compute budget: low/medium/high trunk-recycling levels over the same 60 sampling steps. Totals are 120/180/300 passes for front_loaded and flat tasks, and 120/150/180 for midpeak tasks; the task endpoint picks the schedule shape. Default follows the task's recommended preset. | `low`, `medium`, `high` |
| `refolding_oracle` | `select` | ✗ | Post-generation refolding evaluation with rfd4-evaluate: 'af3' (default), 'af2', 'of3', or 'none'. Every generated design is refolded and the result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and pass/fail columns. AF2 is protein-only (no DNA, small-molecule, or ligand-bound enzyme tasks). Evaluation is best-effort: a failure or an unavailable oracle runtime returns the generation results with a note; generation is not refunded. RNA is not evaluated. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✓ | Structure with the catalytic motif and its substrate ligand; the ligand must keep its bonds and charges. Pre-annotated M-CSA benchmark inputs (data/benchmarks/mcsa/{mcsa_37,mcsa_37_fixed_ligand,mcsa_37_no_ligand}): use annotated_passthrough=true — they carry the authored covalent chemistry and index groups.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `motif_chain` | `string` | ✓ | Chain ID carrying the catalytic motif |  |
| `motif_residues` | `string` | ✓ | Catalytic residue range on that chain, e.g. '5-25' (or '42'). Disjoint motifs: use scaffold_contig. |  |
| `scaffold_len` | `string` | ✗ | Scaffold length range 'min-max' around the motif (single value = fixed); dash variants accepted. Range 5-400. |  |
| `ligand` | `string` | ✗ | Substrate ligand selector: '<chain>/<resid>' (e.g. 'B/386') or '<chain>'. Default: the largest non-standard residue in the file.  Ligand-free enzyme design (mcsa_37_no_ligand style): use annotated_passthrough=true with the no-ligand benchmark input. |  |
| `hbond_atoms` | `string` | ✗ | Optional hydrogen-bond constraints on ligand atoms (C_HB=BOTH), hotspot syntax e.g. '386:[N6,O4]' |  |
| `fix_motif_sequence` | `boolean` | ✗ | Fix catalytic residue identities (C_SEQ); false = backbone-only motif conditioning, sidechains redesigned (default: true) |  |
| `scaffold_contig` | `string` | ✗ | Full contig override for expert use; the motif and ligand segments must match your selections |  |
| `annotated_passthrough` | `boolean` | ✗ | Treat the upload as a fully prepared annotated CIF and use its conditioning verbatim instead of assembling one from the parameters (default: false) |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_enzyme_design_predict_gpu_enzyme_design_post",
    "parameters": {
    "extra_metrics": [
        "OPTION VALUE1",
        "OPTION VALUE2"
    ],
    "budget": "medium",
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "motif_chain": "<MOTIF_CHAIN>",
    "motif_residues": "<MOTIF_RESIDUES>",
    "scaffold_len": "40-200",
    "ligand": "<LIGAND>",
    "hbond_atoms": "<HBOND_ATOMS>",
    "fix_motif_sequence": false,
    "scaffold_contig": "<SCAFFOLD_CONTIG>",
    "annotated_passthrough": false,
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 7. Redesign the sequence of a fixed backbone.

**Tool Name:** `predict_inverse_folding_predict_gpu_inverse_folding_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `budget` | `select` | ✗ | Compute budget: low/medium/high trunk-recycling levels over the same 60 sampling steps. Totals are 120/180/300 passes for front_loaded and flat tasks, and 120/150/180 for midpeak tasks; the task endpoint picks the schedule shape. Default follows the task's recommended preset. | `low`, `medium`, `high` |
| `refolding_oracle` | `select` | ✗ | Post-generation refolding evaluation with rfd4-evaluate: 'af3' (default), 'af2', 'of3', or 'none'. Every generated design is refolded and the result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and pass/fail columns. AF2 is protein-only (no DNA, small-molecule, or ligand-bound enzyme tasks). Evaluation is best-effort: a failure or an unavailable oracle runtime returns the generation results with a note; generation is not refunded. RNA is not evaluated. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✓ | Backbone structure to redesign the sequence of; the backbone is held fixed and sequence/sidechains are resampled.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `seq_temperature` | `number` | ✗ | Sequence sampler temperature (tsr_k; default 4). Lower = hotter / more aggressive sequences. |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_inverse_folding_predict_gpu_inverse_folding_post",
    "parameters": {
    "budget": "medium",
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "seq_temperature": "",
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 8. Refine / diversify a previous design by re-running part of its trajectory.

**Tool Name:** `predict_partial_diffusion_predict_gpu_partial_diffusion_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `refolding_oracle` | `select` | ✗ | Post-generation refolding evaluation with rfd4-evaluate: 'af3' (default), 'af2', 'of3', or 'none'. Every generated design is refolded and the result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and pass/fail columns. AF2 is protein-only (no DNA, small-molecule, or ligand-bound enzyme tasks). Evaluation is best-effort: a failure or an unavailable oracle runtime returns the generation results with a note; generation is not refunded. RNA is not evaluated. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✓ | A previous RFD4-Proteina design (*_generated.cif) that still carries its conditioning annotations — not an oracle refold.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `trajectory_fraction` | `number` | ✗ | Simple knob: rerun this fraction of the trajectory (empty = 0.3, the last 30%, stays close to the input). Mutually exclusive with t_backbone/t_latent. |  |
| `t_backbone` | `number` | ✗ | Advanced: backbone noise level in (0,1], near 1 = close to input. Mutually exclusive with trajectory_fraction. |  |
| `t_latent` | `number` | ✗ | Advanced: latent noise level in (0,1] |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_partial_diffusion_predict_gpu_partial_diffusion_post",
    "parameters": {
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "trajectory_fraction": "",
    "t_backbone": "",
    "t_latent": "",
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 9. Run the refold check and the authors' pass limits on structures you
already have, from this model or another tool.

**Tool Name:** `predict_refold_check_predict_gpu_refold_check_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `task` | `select` | ✓ | Design-task family of the uploaded structure: selects the official refolding recipe and the authors' pass criteria (e.g. binder -> ppi criteria, monomer -> self-consistency RMSD). | `monomer`, `binder`, `antibody`, `dna_binder`, `motif_scaffold`, `internal_coordinate_motif`, `sm_binder`, `enzyme`, `enzyme_no_ligand` |
| `refolding_oracle` | `select` | ✗ | Independent structure-prediction oracle used to re-predict the uploaded design: 'af3' (default), 'of3', or 'af2' (protein tasks only). The result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and the authors' pass/fail criteria. If the oracle runtime is unavailable the task fails before any GPU time is spent and the frozen points are rolled back. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✓ | Structure to refold-check: a design you already have, from this model or another tool. Upload the full complex the task expects (e.g. design + target for binders, design + ligand for enzymes); no conditioning annotations are required.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_refold_check_predict_gpu_refold_check_post",
    "parameters": {
    "task": "monomer",
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>"
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 10. Experimental RNA secondary-structure design; base-pair topology must be specified through condition columns in an annotated CIF.

**Tool Name:** `predict_rna_predict_gpu_rna_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `input_structure` | `file` | ✓ | Pre-annotated RNA CIF carrying the base-pair topology as condition_basepair_* / condition_na-ss-state_* columns — e.g. data/benchmarks/rna/pseudoknot (W05: 90 nt / 37 pairs, Q20: 240 nt / 61 pairs), including pseudoknots. A plain RNA structure cannot be used here: condition specs cannot express base pairing.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_rna_predict_gpu_rna_post",
    "parameters": {
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 11. Unconditional monomer design using packaged short/medium/long benchmark presets, or a custom annotated CIF with expandable-segment annotations.

**Tool Name:** `predict_monomer_predict_gpu_monomer_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `preset` | `select` | ✗ | Packaged unconditional-monomer benchmark length. Ignored when input_structure is uploaded. | `short`, `medium`, `long` |
| `extra_metrics` | `select_array` | ✗ | Optional extra inline metric groups (multi-select; options: None, centroid_conditioning, interchain_interactions, rasa_conditioning, secondary_structure_conditioning, hotspot_conditioning, 3d_coordinate_conditioning, internal_coordinate_conditioning, unindexed, sequence_probability, na_ss_conditioning; default: None = no extra group). The base design metrics are always computed; refolding/oracle evaluation is selected by the separate refolding_oracle parameter. | `None`, `centroid_conditioning`, `interchain_interactions`, `rasa_conditioning`, `secondary_structure_conditioning`, `hotspot_conditioning`, `3d_coordinate_conditioning`, `internal_coordinate_conditioning`, `unindexed`, `sequence_probability`, `na_ss_conditioning` |
| `refolding_oracle` | `select` | ✗ | Post-generation refolding evaluation with rfd4-evaluate: 'af3' (default), 'af2', 'of3', or 'none'. Every generated design is refolded and the result adds oracle confidence (pLDDT/pTM/ipAE), design-vs-refold RMSD and pass/fail columns. AF2 is protein-only (no DNA, small-molecule, or ligand-bound enzyme tasks). Evaluation is best-effort: a failure or an unavailable oracle runtime returns the generation results with a note; generation is not refunded. RNA is not evaluated. | `af3`, `af2`, `of3`, `none` |
| `input_structure` | `file` | ✗ | Optional custom annotated monomer CIF (with expandable-segment annotations). Omit to use the packaged benchmark input selected by `preset`.<br/>file suffix: `cif`, `bcif`, `cif.zst`, `bcif.zst`, `cif.gz`, `bcif.gz` |  |
| `num_replicates` | `number` | ✗ | Number of independent designs sampled (the rfd4-generate `num_replicates` knob) |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFD4-Proteina",
    "tool_name": "predict_monomer_predict_gpu_monomer_post",
    "parameters": {
    "preset": "short",
    "extra_metrics": [
        "OPTION VALUE1",
        "OPTION VALUE2"
    ],
    "refolding_oracle": "af3",
    "input_structure": "<INPUT_STRUCTURE_FILE_ID>",
    "num_replicates": 8
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## User Interface URL

> When the user needs a tool recommendation, output the URL.

**URL:** <https://sciminer.tech/utility/tool/RFD4-Proteina>
