QPromaQ's picture
Reset repository and upload final project (part 30)
504d922 verified
Raw
History Blame Contribute Delete
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