haddock.modules.analysis.caprieval.capri module
CAPRI module.
- class haddock.modules.analysis.caprieval.capri.CAPRI(identificator: str, model: PDBFile | Path, path: Path, reference: PDBFile | Path, params: MutableMapping[str, Any])[source]
Bases:
object
CAPRI class.
- static add_chain_from_segid(pdb_path: PDBFile | Path) Path [source]
Replace the chainID with the segID.
- Parameters:
pdb_path (PosixPath or
haddock.libs.libontology.PDBFile
) – PDB file to be replaced
- calc_fnat(cutoff: float = 5.0) None [source]
Calculate the frequency of native contacts.
- Parameters:
cutoff (float) – The cutoff distance for the intermolecular contacts.
- calc_ilrmsd(cutoff: float = 10.0) None [source]
Calculate the Interface Ligand RMSD.
- Parameters:
cutoff (float) – The cutoff distance for the intermolecular contacts.
- calc_irmsd(cutoff: float = 5.0) None [source]
Calculate the I-RMSD.
- Parameters:
cutoff (float) – The cutoff distance for the intermolecular contacts.
- check_chains(obs_chains)[source]
Check observed chains against the expected ones.
- Logic: if chain B is among the observed chains and is not selected as
the receptor chain, then ligand_chains = [“B”] (default behaviour).
- Otherwise, ligand_chains becomes equal to all the other chains (once
receptor chain is removed).
- Parameters:
obs_chains (list) – List of observed chains.
- has_cluster_info() bool [source]
Check wether this object contains cluster information.
- Returns:
bool – True if this object contains cluster information.
- static identify_interface(pdb_f: PDBFile | Path, cutoff: float = 5.0) dict[str, list[int]] [source]
Identify the interface.
- Parameters:
pdb_f (PosixPath or
haddock.libs.libontology.PDBFile
) – PDB file of the model to have its atoms identifiedcutoff (float, optional) – Cutoff distance for the interface identification.
- Returns:
interface_resdic (dict[str, list[int]]) – Dictionary holding list of interface residues ids for each chains.
- exception haddock.modules.analysis.caprieval.capri.CAPRIError(msg: str = '')[source]
Bases:
Exception
Raised when something goes wrong with the CAPRI class.
- haddock.modules.analysis.caprieval.capri.calc_stats(data: list) tuple[float, float] [source]
Calculate the mean and stdev.
- Parameters:
data (list) – List of values.
- Returns:
mean (float) – Mean of the values.
stdev (float) – Standard deviation of the values.
- haddock.modules.analysis.caprieval.capri.capri_cluster_analysis(capri_list: Iterable[CAPRI], model_list: Iterable[PDBFile], output_fname: str | Path, clt_threshold: int, sort_key: str, sort_ascending: bool, path: str | Path) None [source]
Consider the cluster results for the CAPRI evaluation.
- haddock.modules.analysis.caprieval.capri.get_previous_cns_step(sel_steps: list) str | None [source]
Get the previous CNS step.
- Parameters:
run_path (Path) – Path to the run folder.
- Returns:
cns_step (str) – Name of the CNS step.
- haddock.modules.analysis.caprieval.capri.load_contacts(pdb_f: Path | PDBFile, cutoff: float = 5.0, numbering_dic: dict[str, dict[int, int]] | None = None, model2ref_chain_dict: dict[str, str] | None = None) set[tuple] [source]
Load residue-based contacts.
- Parameters:
pdb_f (PosixPath or
haddock.libs.libontology.PDBFile
) – PDB file of the model to have its atoms identifiedcutoff (float, optional) – Cutoff distance for the interface identification.
- Returns:
set(con_list) (set) – set of unique contacts
- haddock.modules.analysis.caprieval.capri.merge_data(capri_jobs: list[haddock.modules.analysis.caprieval.capri.CAPRI]) list[haddock.modules.analysis.caprieval.capri.CAPRI] [source]
Merge CAPRI data.
- haddock.modules.analysis.caprieval.capri.rearrange_ss_capri_output(output_name: str, output_count: int, sort_key: str, sort_ascending: bool, path: str | Path) None [source]
Combine different capri outputs in a single file.
- Parameters:
output_name (str) – Name of the output file.
output_count (int) – Number of output files to combine.
sort_key (str) – Key to sort the output files.
path (Path) – Path to the output directory.