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 https://www.rdkit.org/docs/source/rdkit.Chem.rdDepictor.html.
Here is a today’s code.
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.