Skip to content

Getting started with the Drug Discovery toolbox

This document describes how to use the Drug Discovery toolbox to perform docking and run ABFE and RBFE runs on Deep Origin. Functionality for this is built around the Complex class, that can be imported using:

from deeporigin.drug_discovery import Complex

For the rest of this tutorial, we will assume that this module is imported as dd.

Prerequisites

Make sure you have installed, configured, and authenticated with the Deep Origin python client.

Recommended installation method

We recommend using these instructions to install the Deep Origin python client.

Following these instructions will install the deeporigin client in an isolated environment using uv, and will start a Jupyter instance that you will need for the rest of this tutorial.

Input data

Docking, ABFE, and RBFE require a protein to be in a PDB file as input.

Ligands can be imported from SDF files or SMILES strings. To run ABFE and RBFE, the ligand must be in a SDF file.

Example data

If you want to explore these tools using some example data, we provide the BRD protein and a few ligands. This is built into the deeporigin package and can be accessed using:

from deeporigin.drug_discovery import EXAMPLE_DATA_DIR

Creating a Complex object

The core of the Drug Discovery toolbox is the Complex class, that acts as a container for a protein and a set of ligand.

The Complex object can be created using:

# here, we're using the example data directory
sim = Complex.from_dir(EXAMPLE_DATA_DIR)

Inspecting the Complex object

Inspecting the object shows that it contains a protein and 8 ligands:

sim

Expected output

Complex(protein=brd.pdb with 8 ligands)

Viewing the protein

The 3D structure of the protein can be viewed using the built-in show method in the Protein class:

sim.protein.show()

This generates a 3D visualization of the protein, similar to:

Listing Ligands

We can further inspect the ligands by inspecting the ligands attribute:

sim.ligands

Expected output

[Ligand(
  file: '/Users/deeporigin/brd-2.sdf'
   smiles_string: '[H]C1=C([H])C(...'
   _do_id: 'Ligands-1'
   properties: {'r_exp_dg': '-9.59'}
),...]

Jupyter notebooks

It is assumed that you are working in a Jupyter notebook (or similar IPython environment). This makes it easier to run the workflow, and some functions assume that you are in a Jupyter notebook.

Viewing Ligands (2D in table)

We can also view a table of 2D structures of the ligands, together with user-defined properties using the show_ligands method:

sim.show_ligands()

Expected output

Viewing Ligands (3D structures)

We can also view a table of 3D structures as follows:

sim.show_ligands("3D")

Initialization

Notice that the ID column in the Ligands table shows None for every ligand. This means that we haven't uploaded Ligand SDF files to Deep Origin yet. We can do using the connect method:

sim.connect()

Using sim.show_ligands(), we see that the ID column is now assigned:

Expected output

That's it! We are now ready to perform docking, ABFE, and RBFE.