# Hit Picking

This integrated tool utilizes PLIP Analysis, PLIP Filter, Internal Strain, HydroBond Checker, and Novelty Filter to provide a comprehensive assessment of small molecules in relation to proteins. It evaluates not only their interactions but also their internal stability, hydrogen bond compatibility, and structural novelty, offering a holistic approach for optimizing and selecting promising small molecules.Interface 1: Upload a complex file that includes both the protein and small molecule data.Interface 2: Upload separate files for the protein and small molecules. The small molecule file can contain multiple entries.

## 基础信息

| 项目 | 值 |
|------|-----|
| 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. Upload a complex file that already contains both the protein and ligand structures. The system will directly evaluate the interaction using the provided binding pose, focusing on hydrogen bond satisfaction, internal energy, interaction type, and novelty. Suitable for scoring pre-docked complexes.

**Tool Name:** `Structure_Evaluation_files_Structure_Evaluation_files_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `unsatisfied_acc_cutoff` | `number` | ✗ | The threshold for the number of hydrogen bond acceptors in a small molecule that are not involved in hydrogen bonding. Used by the HydroBond Checker tool. |  |
| `unsatisfied_don_cutoff` | `number` | ✗ | The threshold for the number of hydrogen bond donors in a small molecule that are not involved in hydrogen bonding. Used by the HydroBond Checker tool. |  |
| `reference_smiles` | `string` | ✗ | The smiles of a reference molecule used to calculate the similarity between it and a small molecule. Part of the Novelty Filter tool. |  |
| `similarity_cutoff` | `number` | ✗ | The threshold for similarity between a small molecule and a reference molecule; if the similarity exceeds this value, they are considered similar. Part of the Novelty Filter tool. |  |
| `resid` | `string` | ✗ | The identifier for a key residue. Used by the PLIP Filter tool. |  |
| `reschain` | `string` | ✗ | The chain identifier where the key residue is located. Used by the PLIP Filter tool. |  |
| `interaction_type` | `select` | ✗ | The type of interaction allowed with the key residue; None means any type of interaction is allowed. Part of the PLIP Filter tool. | `Hydrophobic Interactions`, `Hydrogen Bonds`, `Water Bridges`, `Salt Bridges`, `pi-Stacking`, `pi-Cation Interactions`, `Halogen Bonds`, `Metal Complexes`, `None` |
| `internal_energy_label` | `boolean` | ✗ | A flag indicating whether to calculate the internal stress of the small molecule; False means not to calculate it. |  |
| `complex_file` | `file` | ✓ | file suffix: `pdb`, `cif` |  |

### 示例代码

#### 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": "Hit Picking",
    "tool_name": "Structure_Evaluation_files_Structure_Evaluation_files_post",
    "parameters": {
    "unsatisfied_acc_cutoff": "",
    "unsatisfied_don_cutoff": "",
    "reference_smiles": "<REFERENCE_SMILES>",
    "similarity_cutoff": "",
    "resid": "<RESID>",
    "reschain": "<RESCHAIN>",
    "interaction_type": "None",
    "internal_energy_label": false,
    "complex_file": "<COMPLEX_FILE_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.")
```


---

## 2. Upload the protein structure and a file containing multiple ligands (e.g., SDF). The system will automatically generate protein–ligand complexes and evaluate each one. Ideal for virtual screening of multiple candidates.

**Tool Name:** `Structure_Evaluation_multi_Structure_Evaluation_multi_get`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `unsatisfied_acceptor_cutoff` | `number` | ✗ | The threshold for the number of hydrogen bond acceptors in a small molecule that are not involved in hydrogen bonding. Used by the HydroBond Checker tool. |  |
| `unsatisfied_donor_cutoff` | `number` | ✗ | The threshold for the number of hydrogen bond donors in a small molecule that are not involved in hydrogen bonding. Used by the HydroBond Checker tool. |  |
| `similar_cutoff` | `number` | ✗ | The threshold for similarity between a small molecule and a reference molecule; if the similarity exceeds this value, they are considered similar. Part of the Novelty Filter tool. |  |
| `target_smiles` | `string` | ✗ | The smiles of a reference molecule used to calculate the similarity between it and a small molecule. Part of the Novelty Filter tool. |  |
| `res_id` | `string` | ✗ | The identifier for a key residue. Used by the PLIP Filter tool. |  |
| `res_chain` | `string` | ✗ | The chain identifier where the key residue is located. Used by the PLIP Filter tool. |  |
| `plip_interaction_type` | `select` | ✗ | The type of interaction allowed with the key residue; None means any type of interaction is allowed. Part of the PLIP Filter tool. | `Hydrophobic Interactions`, `Hydrogen Bonds`, `Water Bridges`, `Salt Bridges`, `pi-Stacking`, `pi-Cation Interactions`, `Halogen Bonds`, `Metal Complexes`, `None` |
| `internal_strain_label` | `boolean` | ✗ | A flag indicating whether to calculate the internal stress of the small molecule; False means not to calculate it. |  |
| `protein_file` | `file` | ✓ | file suffix: `pdb` |  |
| `lig_file` | `file` | ✓ | file suffix: `sdf` |  |

### 示例代码

#### 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": "Hit Picking",
    "tool_name": "Structure_Evaluation_multi_Structure_Evaluation_multi_get",
    "parameters": {
    "unsatisfied_acceptor_cutoff": "",
    "unsatisfied_donor_cutoff": "",
    "similar_cutoff": "",
    "target_smiles": "<TARGET_SMILES>",
    "res_id": "<RES_ID>",
    "res_chain": "<RES_CHAIN>",
    "plip_interaction_type": "None",
    "internal_strain_label": false,
    "protein_file": "<PROTEIN_FILE_FILE_ID>",
    "lig_file": "<LIG_FILE_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.")
```


---

## User Interface URL

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

**URL:** <https://sciminer.tech/utility/tool/Hit-Picking>
