deeporigin.drug_discovery.Pocket
¶
A simplified class representing a binding pocket in a protein structure.
This class focuses on coordinate-based operations and removes the complexity of maintaining full biotite structure objects. It provides essential methods for pocket analysis, visualization, and coordinate manipulation.
Attributes¶
props
class-attribute
instance-attribute
¶
props: Optional[Dict[str, Any]] = field(
default_factory=dict
)
Functions¶
from_ligand
classmethod
¶
from_ligand(
ligand: Ligand, name: Optional[str] = None
) -> Pocket
Create a Pocket instance from a Ligand instance.
from_pdb_file
classmethod
¶
from_pdb_file(
pdb_file_path: str | Path,
name: Optional[str] = None,
**kwargs: Any
) -> Pocket
Create a Pocket instance from a PDB file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pdb_file_path
|
str | Path
|
Path to the PDB file. |
required |
name
|
Optional[str]
|
Name for the pocket. |
None
|
**kwargs
|
Any
|
Additional arguments to pass to the Pocket constructor. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
Pocket |
Pocket
|
A new Pocket instance. |
from_pocket_finder_results
classmethod
¶
from_pocket_finder_results(
pocket_finder_results_dir: str | Path,
) -> List[Pocket]
Create a list of Pocket objects from pocket finder results directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pocket_finder_results_dir
|
str | Path
|
Directory containing pocket finder results with PDB files for each pocket and a CSV properties file. |
required |
Returns:
Type | Description |
---|---|
List[Pocket]
|
List of Pocket objects with properties from the CSV file. |
from_residue_number
classmethod
¶
from_residue_number(
protein,
residue_number: int,
chain_id: str | None = None,
cutoff: float = 5.0,
) -> Pocket
Creates a pocket centered on a given residue (by number)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
protein
|
Protein
|
A DeepOrigin Protein Object |
required |
residue_number
|
int
|
Residue number of the target residue |
required |
chain_id
|
str
|
Chain ID that the residue is in |
None
|
cutoff
|
float
|
Minimum distance cutoff (Angstroms) from target residue to be included in pocket |
5.0
|
Returns:
Type | Description |
---|---|
Pocket
|
A Pocket object matching the above design. |
get_center
¶
get_center() -> ndarray
Get the center of the pocket based on its coordinates.
Returns:
Type | Description |
---|---|
ndarray
|
np.ndarray: A numpy array containing the center of the pocket. |
get_directory
staticmethod
¶
get_directory() -> str
Get the pockets directory path.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The path to the pockets directory. |