In [1]:
from dotenv import load_dotenv

load_dotenv()
Out[1]:
True
In [2]:
%load_ext autoreload
%autoreload 2

Pocket finder¶

This notebook shows you how to use the PocketFinder tool to find novel pockets in a Protein.

Setup¶

First, we'll import the necessary Deep Origin drug discovery modules.

In [3]:
from deeporigin.drug_discovery import (
    BRD_DATA_DIR,
    Pocket,
    Protein,
    PocketFinder,
)
from deeporigin.platform import DeepOriginClient
import deeporigin

deeporigin.__version__
Out[3]:
'0.0.0.dev0'

You don't have to explictitly initialize a client, but you can if you want:

In [4]:
client = DeepOriginClient()
client
/home/runner/work/do-dd-client/do-dd-client/.venv/lib/python3.11/site-packages/jwt/api_jwt.py:147: InsecureKeyLengthWarning: The HMAC key is 6 bytes long, which is below the minimum recommended length of 32 bytes for SHA256. See RFC 7518 Section 3.2.
  return self._jws.encode(
Out[4]:
DeepOrigin Platform Client for Local User (org_key=deeporigin, base_url=http://127.0.0.1:4931/)

Load protein and register on the platform¶

We use the same BRD protein as registered_protein in tests/test_functions_with_data_platform.py: load brd.pdb, remove waters, then sync so the structure exists on the platform for docking.

In [5]:
protein = Protein.from_file(BRD_DATA_DIR / "brd.pdb")
protein.remove_water()
protein.sync()
protein.id
Out[5]:
'brd'

Estimate cost¶

In [6]:
pf = PocketFinder(protein=protein)
pf.run(quote=True)
In [7]:
pf.estimate
Out[7]:
10.0

Find pockets¶

Display the protein structure in 3D. This helps you understand the protein's structure before proceeding with docking.

In [8]:
pf.confirm()
In [9]:
pf.cost

Show pocket¶

In [10]:
pockets = pf.get_results()
protein.show(pockets=pockets)
In [11]:
pf.id
Out[11]:
'e600cc94-6d7c-476f-b838-6411153b64f5'
In [ ]: