# -------------------------------------------------------------------------------------------------------------------------------------# Following code curated for MULTICOM_ligand: (https://github.com/BioinfoMachineLearning/MULTICOM_ligand)# -------------------------------------------------------------------------------------------------------------------------------------frompathlibimportPathfrombeartype.typingimportList
[docs]deffind_protein_files(protein_file_dir:Path,extension:str="pdb")->List[Path]:"""Find all protein files in the specified directory. :param protein_file_dir: The directory containing the protein files. :param extension: The file extension of the protein files. :return: A list of `Path` objects representing the protein files. """returnlist(protein_file_dir.rglob(f"*.{extension}"))
[docs]deffind_ligand_files(ligand_file_dir:Path,extension:str="sdf")->List[Path]:"""Find all ligand files in the specified directory. :param ligand_file_dir: The directory containing the ligand files. :param extension: The file extension of the ligand files. :return: A list of `Path` objects representing the ligand files. """returnlist(ligand_file_dir.rglob(f"*.{extension}"))