In [1]:
from base64 import b64encode
import numpy as np
import pandas as pd
from IPython.display import HTML
import oddt
import oddt.pandas as opd
from oddt.fingerprints import PLEC
This notebook provides a short guide on how to use Protein-Ligand Extended Connectivity (PLEC) Fingerprint for a series of docked ligands. The output is in CSV format which should be easy to use with other, external software packages.
More informatioFor more information about PLEC see publication.
In [2]:
receptor = next(oddt.toolkit.readfile('pdb', 'xiap/receptor_rdkit.pdb'))
In [3]:
data = opd.read_sdf('xiap/actives_docked.sdf')
size: the lenght of final fingerprint (default=16384)
depth_protein: the environment diameter on protein side in bond steps (default=4)
depth_ligand: the environment diameter on ligand side in bond steps (default=2)
distance_cutoff: the distance between two atoms to be considered interacting (derfault=4.5)
In [4]:
data['plec'] = data['mol'].map(lambda x: list(PLEC(x, protein=receptor,
size=4092,
depth_protein=5,
depth_ligand=1,
distance_cutoff=4.5,
sparse=False
)))
In [5]:
data[['mol', 'name', 'act', 'plec']].head()
Out[5]:
In [ ]:
In [6]:
HTML('<a href="data:application/binary;base64,%s" download="fingerprint.csv">Download CSV</a>' % b64encode(data.to_csv().encode()).decode())
Out[6]:
In [ ]: