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()
cidslist=[]
for mol in mols:
    mol.RemoveAllConformers()
    cids = AllChem.EmbedMultipleConfs(mol, pruneRmsThresh=1.0)
    cidslist.append(cids)

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

OK.
Now, I could get 3d grid image.

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

grid_image

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())
AllChem.CanonicalizeConformer(ref.GetConformer())
builder = SubshapeBuilder.SubshapeBuilder()
builder.gridDims = (20.,20.,10.)
builder.gridSpacing=0.5
builder.winRad = 4.

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

Draw ref mol and ref_shape.

v.ShowMol(ref,name="ref")
SubshapeObjects.DisplaySubshape(v,refShape,'ref_Shape')
v.server.do('set transparency=0.5')
v.GetPNG()

It looks like good.
shape

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.
http://nbviewer.ipython.org/gist/greglandrum/4316435

Advertisement

Published by iwatobipen

I'm medicinal chemist in mid size of pharmaceutical company. I love chemoinfo, cording, organic synthesis, my family.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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.

%d bloggers like this: