plinder.core.scores.reconstruct#
Reconstruct bounded similarity subsets from mapped search alignments.
- plinder.core.scores.reconstruct.prefetch_similarity_alignments(query_system_ids: Iterable[str], *, search_db: str = 'holo', data_dir: Path | None = None, include_protein_scores: bool = False) dict[str, dict[str, Path]][source]#
Download or verify only the mapped alignments needed by query systems.
Calling this on an online node populates the normal PLINDER cache. Calling it later with offline mode enabled only checks those same local files. With
include_protein_scores, each backend also needs its matching protein-similarity export shard, which supplies the alignment scores that the CIGAR shards omit (needed for ligand similarity reconstruction).
- plinder.core.scores.reconstruct.calculate_interface_similarity_scores(alignments: DataFrame, *, query_interfaces: Mapping[str, InterfaceView], target_interfaces: Mapping[str, InterfaceView]) DataFrame[source]#
Calculate directional two-chain interface coverage from compact maps.
For each backend, the direct and swapped chain assignments are evaluated as the product of the two directed residue coverages. The better complete assignment is retained, followed by the better Foldseek/MMseqs backend.
- plinder.core.scores.reconstruct.reconstruct_similarity_scores(query_system_ids: Iterable[str], target_system_ids: Iterable[str], *, query_ligand_ids: Iterable[str] | None = None, target_ligand_ids: Iterable[str] | None = None, search_db: str = 'holo', include_shape: bool = True, data_dir: Path | None = None) DataFrame[source]#
Reconstruct directed ligand-level scores for a bounded system subset.
Only mapped Foldseek/MMseqs shards and annotation rows for the requested systems are loaded. Canonical ligand SDF archives are accessed lazily, and only after a ligand pair has positive pocket coverage.
- plinder.core.scores.reconstruct.reconstruct_interface_similarity_scores(query_interface_ids: Iterable[str], target_interface_ids: Iterable[str], *, search_db: str = 'holo', data_dir: Path | None = None) DataFrame[source]#
Reconstruct directed interface coverage for a bounded interface subset.
Only the mapped alignment shards for the requested query PDB entries and chain and interface rows are loaded. The result is therefore reconstructable from the compact public artifacts without the private all-vs-all score table used for release clustering.