Try to subshape alignment

Molecular shape based alignment is useful for VS, scaffold hopping, etc.
ROCS is very popular tool to do it.
But there are some another tools.
I found nice reference on web, and tried to do subshape alignment using RDKit.
My try was failed because it took very long time ;-(.
This is snippet..
” I down load sdf from PubChem, all mols were similar to imatinib. ”

from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit import RDConfig
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem import Draw
from rdkit.Chem import PyMol
import os
mols = [ Chem.AddHs(m) for m in Chem.SDMolSupplier("sample.sdf")]

Them make viewer object. (Pymol must be run at server-mode.)
And generate conformers for each molecules.

v = PyMol.MolViewer()
for mol in mols:
    cids = AllChem.EmbedMultipleConfs(mol, pruneRmsThresh=1.0)

for idx in range(len(mols)):
    mol = mols[idx]
    for cid in cidslist[idx]:
        AllChem.UFFOptimizeMolecule(mol, confId=cid)

Now, I could get 3d grid image.

Draw.MolsToGridImage(mols[:5], molsPerRow=5)


Next, import Subshape module.

from rdkit.Chem.Subshape import SubshapeBuilder, SubshapeAligner, SubshapeObjects

Then, make ref and probe molecule and each mol’s shapes following command.

ref = Chem.Mol(mols[0].ToBinary())
probe = Chem.Mol(mols[1].ToBinary())
builder = SubshapeBuilder.SubshapeBuilder()
builder.gridDims = (20.,20.,10.)
builder.winRad = 4.

refShape = builder.GenerateSubshapeShape(ref)
probeShape = builder.GenerateSubshapeShape(probe)

Draw ref mol and ref_shape.

SubshapeObjects.DisplaySubshape(v,refShape,'ref_Shape')'set transparency=0.5')

It looks like good.

Align two molecules.

aligner = SubshapeAligner.SubshapeAligner()
algs = aligner.GetSubshapeAlignments(ref,refShape,probe,probeShape,builder)

In this step, my mac book air looks like freeze…. So, I canceled this step.
It was hard to me to do it using RDKit. Hmm…

If you want to know more details, please read following link.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.