Depict molecules which are aligned by user defined scaffold #RDKit #Chemoinformatics #Basics

I’m happy that I could start running again after my knee’s surgery ;) Chemoinformatics & Running are nice combination for my life.

BTW if you are medicinal chemist, 2D coordinate of molecules in your SAR table is really important I think. For example molecules are not aligned to your favorite orientation of scaffold is not comfortable for you.

I often use RDKit’s depiction method because RDKit can generate good coordination of molecule automatically. However sometime it isn’t aligned to scaffold.

So depict molecules with scaffold alignment is useful for rendering molecules. Today I used rdDepictor.GenerateDepictionMatching2DStructure for an example. Details are described in original document

Here is a today’s code.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw depict.ipynb hosted with ❤ by GitHub

I got query scaffold with GetScaffoldForMol function. And compared molecules before and after calling GenerateDepictionMatching2DStructure.

Next, I rotated query scaffold with z axis and aligned molecule with the scaffold.

GenerateDepictionMatching2DStructure method works fine for alignment of molecules to user defined scaffold.

This is very basic and simple example for rendering molecule ;)

I uploaded the code not only gist but also my github repo.


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: Logo

You are commenting using your 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: