poli.core.util.proteins.mutations.find_closest_wildtype_pdb_file_to_mutant#
- poli.core.util.proteins.mutations.find_closest_wildtype_pdb_file_to_mutant(wildtype_pdb_files: List[Path], mutated_residue_string: str, return_hamming_distance: bool = False) Union[Path, Tuple[Path, int]] #
Find the closest wildtype PDB file to a given mutant residue string.
- Parameters
wildtype_pdb_files (List[Path]) – A list of paths to wildtype PDB files.
mutated_residue_string (str) – The mutated residue string.
return_hamming_distance (bool, optional) – If True, return the hamming distance along with the best candidate PDB file. Default is False.
- Returns
If return_hamming_distance is True, returns a tuple containing the best candidate PDB file and the hamming distance. Otherwise, returns the best candidate PDB file.
- Return type
Union[Path, Tuple[Path, int]]
- Raises
ValueError – If no PDB file of the same length as the mutated residue string is found.