kinoml.databases.pdb
¶
Module Contents¶
- kinoml.databases.pdb.logger¶
- kinoml.databases.pdb.smiles_from_pdb(ligand_ids: Iterable[str]) dict ¶
Retrieve SMILES of molecules defined by their PDB chemical identifier.
- Parameters
ligand_ids (iterable of str) – PDB chemical identifier.
- Returns
ligands – Dictionary with PDB chemical identifier as keys and SMILES as values.
- Return type
dict
- kinoml.databases.pdb.download_pdb_structure(pdb_id: str, directory: Union[str, pathlib.Path] = user_cache_dir()) Union[pathlib.Path, bool] ¶
Download a PDB structure. If the structure is not available in PDB format, it will be download in CIF format.
- Parameters
pdb_id (str) – The PDB ID of interest.
directory (str or Path, default=user_cache_dir) – The directory for saving the downloaded structure.
- Returns
The path to the the downloaded file if successful, else False.
- Return type
Path or False
- kinoml.databases.pdb.download_pdb_ligand(pdb_id: str, chain_id: str, expo_id: str, smiles: str = '', directory: Union[str, pathlib.Path] = user_cache_dir()) Union[pathlib.Path, bool] ¶
Download a ligand co-crystallized to a PDB structure and save in SDF format. If a SMILES is provided, the connectivity and protonation will be adjusted accordingly.
- Parameters
pdb_id (str) – The PDB ID of interest.
chain_id (str) – The chain ID of the ligand.
expo_id (str) – The residue name of the ligand.
smiles (str, default="") – The smiles of the small molecule describing the connectivity and protonation of the ligand.
directory (str or Path, default=user_cache_dir) – The directory for saving the downloaded structure.
- Returns
The path to the the processed ligand file in SDF format if successful, else False.
- Return type
Path or False