pinder.eval.dockq package#
Submodules#
pinder.eval.dockq.biotite_dockq module#
- pinder.eval.dockq.biotite_dockq.get_irmsd_interface(native: Path, chain1: list[str], chain2: list[str], backbone_only: bool = False, heavy_only: bool = False, interface_cutoff: float = 10.0) dict[str, list[int]] [source][source]#
Get the residues part of the interface by chain, using a more permissive contact distance cutofff definition of 10A.
- class pinder.eval.dockq.biotite_dockq.DecoyDockQ(native: AtomArray, decoy: AtomArray | AtomArrayStack, chain_config: ChainConfig, backbone_definition: BackboneDefinition, native_contacts: set[tuple[str, str, int, int]], native_interface: dict[str, list[int]])[source][source]#
Bases:
object
- class pinder.eval.dockq.biotite_dockq.BiotiteDockQ(native: Path, decoys: list[Path] | Path, native_receptor_chain: list[str] | None = None, native_ligand_chain: list[str] | None = None, decoy_receptor_chain: list[str] | None = None, decoy_ligand_chain: list[str] | None = None, pdb_engine: str = 'fastpdb', backbone_definition: BackboneDefinition = 'dockq', parallel_io: bool = True, max_workers: int | None = None)[source][source]#
Bases:
object
Biotite interface for fast calculation of DockQ and CAPRI metrics.
Takes as input one native and all it’s decoys from arbitrary number of methods to compare.
- static read_decoys(decoys: list[Path], pdb_engine: str, parallel: bool = True, max_workers: int | None = None) tuple[list[AtomArray], list[Path]] [source]#
pinder.eval.dockq.method module#
- exception pinder.eval.dockq.method.InvalidChainsError(pdb_file: Path, chains: list[str])[source][source]#
Bases:
Exception
- exception pinder.eval.dockq.method.TooFewChainsError(pdb_file: Path, chains: list[str])[source][source]#
Bases:
InvalidChainsError
- exception pinder.eval.dockq.method.ExpectedChainsNotFoundError(pdb_file: Path, chains: list[str])[source][source]#
Bases:
InvalidChainsError
- pinder.eval.dockq.method.validate_system_id(system: Path, pinder_ids: set[str]) None [source][source]#
- pinder.eval.dockq.method.get_valid_eval_systems(eval_dir: Path) list[dict[str, Path | str]] [source][source]#
- class pinder.eval.dockq.method.SubsetIds[source][source]#
Bases:
TypedDict
- count: int#
- ids: set[str]#
- pinder.eval.dockq.method.get_expected_counts(pindex: DataFrame, subsets: list[str]) dict[tuple[str, str], SubsetIds] [source][source]#
- pinder.eval.dockq.method.summarize_valid_systems(eval_dir: Path, confirm: bool = True, custom_index: str = '') None [source][source]#
- pinder.eval.dockq.method.download_entry(entry: IndexEntry) None [source][source]#
- pinder.eval.dockq.method.get_eval_metrics(eval_system: dict[str, Path | str], parallel_io: bool = False, custom_index: str = '') DataFrame [source][source]#
- pinder.eval.dockq.method.safe_get_eval_metrics(system: dict[str, Path | str], parallel_io: bool = False, custom_index: str = '') DataFrame | None [source][source]#
- pinder.eval.dockq.method.get_eval_metrics_all_methods(eval_dir: Path, parallel: bool = True, custom_index: str = '', max_workers: int | None = None) DataFrame [source][source]#
- pinder.eval.dockq.method.get_method_eval_metrics(run_dirs: list[Path], dataset_name: DatasetName, monomer_name: MonomerName, method_name: str | None = None, parallel: bool = True, custom_index: str = '', max_workers: int | None = None) DataFrame [source][source]#
- pinder.eval.dockq.method.add_pinder_set(metrics: DataFrame, allow_missing: bool = False, custom_index: str = '') DataFrame | None [source][source]#
- pinder.eval.dockq.method.get_missing_system_penalty_metrics(id: str, monomer_name: str, method_name: str, pinder_set: str, penalty_rmsd: float = 100.0) DataFrame [source][source]#
- class pinder.eval.dockq.method.MethodMetrics(eval_dir: Path, parallel: bool = True, allow_missing_systems: bool = False, custom_index: str = '', max_workers: int | None = None)[source][source]#
Bases:
object
- property metrics: DataFrame#
The metrics table for the evaluation. If not yet computed, it is computed and cached.
- Type:
pd.Dataframe
pinder.eval.dockq.metrics module#
- pinder.eval.dockq.metrics.get_interface_mask(structure: AtomArray | AtomArrayStack, interface: dict[str, list[int]], chains: ChainConfig, subject: str) ndarray[Any, dtype[bool_]] [source][source]#
- pinder.eval.dockq.metrics.calc_irmsd(decoy_stack: AtomArrayStack, native: AtomArray, decoy_interface: dict[str, list[int]], native_interface: dict[str, list[int]], decoy2native_res: dict[str, dict[int, int]], chains: ChainConfig, backbone_only: bool = True, calpha_only: bool = False, backbone_definition: BackboneDefinition = 'default') ndarray[Any, dtype[float64]] | float [source][source]#
Get interface RMSD after superposition of interface backbone atoms.
- pinder.eval.dockq.metrics.get_receptor_masks(native: AtomArray, decoy_stack: AtomArrayStack, chains: ChainConfig) tuple[ndarray[Any, dtype[bool_]], ndarray[Any, dtype[bool_]]] [source][source]#
- pinder.eval.dockq.metrics.calc_lrmsd(decoy_stack: AtomArrayStack | AtomArray, native: AtomArray, decoy2native_res: dict[str, dict[int, int]], chains: ChainConfig, backbone_only: bool = True, calpha_only: bool = False, backbone_definition: BackboneDefinition = 'dockq') ndarray[Any, dtype[float64]] | float [source][source]#
Get ligand body Calpha or backbone RMSD.
- pinder.eval.dockq.metrics.calc_fnat(decoy_contacts: set[tuple[str, str, int, int]], native_contacts: set[tuple[str, str, int, int]], chains: ChainConfig) ndarray[Any, dtype[float64]] [source][source]#
Get fraction of native contacts.
- Parameters:
- decoy_stackAtomArrayStack
Stack of AtomArray containing decoys (models)
- native_contactsset[tuple[str, str, int, int]]
Residue contact pairs in native. See dockq.contacts.pairwise_contacts
- chainsChainConfig
Chain config object defining receptor and ligand chain pairings.
- Returns:
- ndarray
Numpy array of fnat values for each decoy in the stack.
- pinder.eval.dockq.metrics.get_dockq_score(i_rmsd: ndarray[Any, dtype[float64]] | float, l_rmsd: ndarray[Any, dtype[float64]] | float, fnat: ndarray[Any, dtype[float64]] | float) ndarray[Any, dtype[float64]] | float [source][source]#
Get DockQ scores.
- Parameters:
- i_rmsdndarray | float
interface rmsd
- l_rmsdndarray | float
ligand rmsd
- fnatndarray | float
fraction of native contact
- Returns:
- ndarray | float
DockQ score
pinder.eval.dockq.unbound module#
Assess difficulty of unbound monomer or dimer with respect to bound holo.
- pinder.eval.dockq.unbound.fnat_unbound_summary(bound_contacts: set[tuple[str, str, int, int]], unbound_contacts: set[tuple[str, str, int, int]]) dict[str, float | int | str] [source][source]#
- pinder.eval.dockq.unbound.get_corresponding_residues(res_list: list[int], chain: str, mapping: dict[str, dict[int, int]]) tuple[list[int], list[int]] [source][source]#
Get corresponding residues with default mapping.
- pinder.eval.dockq.unbound.filter_interface_intersect(holo_interface: AtomArray, apo_interface: AtomArray, holo2apo_seq: dict[str, dict[int, int]], apo2holo_seq: dict[str, dict[int, int]], R_chain: str = 'R', L_chain: str = 'L') tuple[AtomArray, AtomArray] [source][source]#
- pinder.eval.dockq.unbound.get_unbound_interface_metrics(holo_complex: Structure, apo_RL: Structure, R_chain: str, L_chain: str, holo2apo_seq: dict[str, dict[int, int]], apo2holo_seq: dict[str, dict[int, int]]) dict[str, float | int | str] [source][source]#