File size: 669 Bytes
c289d87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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