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,
)

Load protein and register on the platform¶

We use the example BRD protein built into the python client.

In [4]:
protein = Protein.from_file(BRD_DATA_DIR / "brd.pdb")
protein.remove_water()
protein.sync()
protein.id
/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]:
'brd'

Estimate cost¶

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

Find pockets¶

We now confirm that we want to run this using:

In [6]:
pf.confirm()

We note that the cost is now assigned:

In [7]:
pf.cost

Get results¶

We can fetch results from this run using:

In [8]:
pockets = pf.get_results()
protein.show(pockets=pockets)
In [ ]: