Download portable_rdock_pipeline/libs/docking/interface_features.py from QPromaQ/Docking_project: direct link, hf CLI and curl.
- Browser
- Download file 669 Bytes
-
https://huggingface.co/datasets/QPromaQ/Docking_project/resolve/main/portable_rdock_pipeline/libs/docking/interface_features.py
- Command line
-
hf download hf://datasets/QPromaQ/Docking_project/portable_rdock_pipeline/libs/docking/interface_features.py
-
curl -L -o interface_features.py https://huggingface.co/datasets/QPromaQ/Docking_project/resolve/main/portable_rdock_pipeline/libs/docking/interface_features.py
669 Bytes
| from __future__ import annotations | |
| from typing import Dict, Sequence | |
| def extract_simple_interface_features(parsed_results: Sequence[Dict[str, float | str]]) -> list[dict[str, float]]: | |
| """Generate coarse interface-like descriptors from docking results.""" | |
| features: list[dict[str, float]] = [] | |
| for row in parsed_results: | |
| score = float(row.get("docking_score", row.get("score", 0.0))) | |
| features.append( | |
| { | |
| "interface_contact_proxy": max(0.0, -score / 10.0), | |
| "hbond_proxy": max(0.0, -score / 20.0), | |
| "shape_proxy": max(0.0, -score / 15.0), | |
| } | |
| ) | |
| return features | |