# SolubleMPNN

An enhanced version of LigandMPNN that optimizes protein solubility and reduces aggregation, particularly for membrane proteins and hydrophobic designs.

## 基础信息

| 项目 | 值 |
|------|-----|
| 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. TYPE 2 + GPU. Estimate (X-SCIMINER-ACTION=estimate) returns code 20003;
real run freezes points, returns code 20002 (queued), pushes result via post_result().

**Tool Name:** `get_proteinmpnn_info_get_proteinmpnn_info_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `model_type` | `select` | ✗ | Select MPNN model variant: ProteinMPNN — default general-purpose model for sequence design on a fixed protein backbone; HyperMPNN(thermostability-focused) — ProteinMPNN retrained on hyperthermophilic organisms for thermostable designs (0.20A backbone-noise checkpoint); LigandMPNN(for protein-small molecule complexes) — conditions sequence design on ligand / atomic context, for protein-small molecule complexes; AntiBMPNN — trained on antibody-antigen complex structures for antibody design (e.g. CDR loops); SolubleMPNN(solubility-focused) — LigandMPNN-based model biased towards higher protein solubility and reduced aggregation. | `ProteinMPNN`, `HyperMPNN(thermostability-focused)`, `LigandMPNN(for protein-small molecule complexes)`, `AntiBMPNN`, `SolubleMPNN(solubility-focused)` |
| `homo_oligomer` | `select` | ✗ | Enable automatic symmetry setup for homo-oligomer design (only effective for LigandMPNN / SolubleMPNN; ignored by ProteinMPNN / HyperMPNN / AntiBMPNN).  | `True`, `False` |
| `use_side_chain_context` | `select` | ✗ | Flag to use side chain atoms as ligand context for the fixed residues (only effective for LigandMPNN / SolubleMPNN; ignored by ProteinMPNN / HyperMPNN / AntiBMPNN).  | `True`, `False` |
| `pack_side_chains` | `select` | ✗ | Enable or disable the side-chain packing module (only effective for LigandMPNN / SolubleMPNN; ignored by ProteinMPNN / HyperMPNN / AntiBMPNN).  | `True`, `False` |
| `pdb_file` | `file` | ✓ | Protein structure file in PDB format. <br/>file suffix: `pdb` |  |
| `sample_temperature` | `string` | ✗ | Sampling temperature (0–1).  |  |
| `design_chains` | `string` | ✗ | Whole chains to redesign, all others will be kept fixed (e.g. 'A,B,C'). Defaults to all chains if neither design_chains nor redesigned_residues is given. Do not pass both: ProteinMPNN / HyperMPNN / AntiBMPNN would use design_chains only, while LigandMPNN / SolubleMPNN would redesign only the residues listed in redesigned_residues that fall within these chains.  |  |
| `redesigned_residues` | `string` | ✗ | Residues to explicitly redesign, given as PDB residue numbers in the input file; one 'Chain: positions' entry per chain, entries separated by ';' (e.g, A: 2-10,14; B: 3-18; C: 5-13). All other residues are kept fixed. Do not pass together with design_chains (see the design_chains note).  |  |
| `bias_AA_info` | `string` | ✗ | Per-AA or per-residue probability bias (e.g, A,-1.024;P,2.34;C,-12.34 or A12: G,-0.3;C,-2.0;\nA13: G,-1.3).  |  |
| `omit_AA_info` | `string` | ✗ | Amino acids to globally or locally forbid (e.g, ACG or A12: APQ\nA13: QST). |  |
| `symmetry_residues` | `string` | ✗ | Symmetry groups for residue coupling: each group is a ','-separated list of chain+residue-number IDs whose designs are tied together, groups separated by ';' (e.g, A1,B1;A2,B2 ties A1 with B1 and A2 with B2). Only effective for LigandMPNN / SolubleMPNN; ignored by ProteinMPNN / HyperMPNN / AntiBMPNN.  |  |
| `symmetry_weights` | `string` | ✗ | Weights for each symmetry group (e.g, 0.33,0.33,0.33;0.5,0.5;0.5,0.5). Only effective for LigandMPNN / SolubleMPNN; ignored by ProteinMPNN / HyperMPNN / AntiBMPNN.  |  |
| `cutoff_for_score` | `string` | ✗ | Cutoff in angstroms between protein and context atoms to select residues for reporting score (e.g., 8.0). Only effective for LigandMPNN / SolubleMPNN; ignored by ProteinMPNN / HyperMPNN / AntiBMPNN.  |  |
| `number_of_packs_per_design` | `string` | ✗ | Number of independent side chain packing samples to return per design (1-10). Requires pack_side_chains=True, and only effective for LigandMPNN / SolubleMPNN; ignored by ProteinMPNN / HyperMPNN / AntiBMPNN.  |  |
| `design_sequence_num` | `string` | ✗ | Number of sequences to generate (1-5000).  |  |

### 示例代码

#### 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": "SolubleMPNN",
    "tool_name": "get_proteinmpnn_info_get_proteinmpnn_info_post",
    "parameters": {
    "model_type": "ProteinMPNN",
    "homo_oligomer": "False",
    "use_side_chain_context": "False",
    "pack_side_chains": "False",
    "pdb_file": "<PDB_FILE_FILE_ID>",
    "sample_temperature": "<SAMPLE_TEMPERATURE>",
    "design_chains": "<DESIGN_CHAINS>",
    "redesigned_residues": "<REDESIGNED_RESIDUES>",
    "bias_AA_info": "<BIAS_AA_INFO>",
    "omit_AA_info": "<OMIT_AA_INFO>",
    "symmetry_residues": "<SYMMETRY_RESIDUES>",
    "symmetry_weights": "<SYMMETRY_WEIGHTS>",
    "cutoff_for_score": "<CUTOFF_FOR_SCORE>",
    "number_of_packs_per_design": "<NUMBER_OF_PACKS_PER_DESIGN>",
    "design_sequence_num": "5"
},
    # 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/SolubleMPNN>
