Make pandas dataframe with r-group information #memo

I often forget many things …. So there are same topics will be posted in my blog. Sometime it’s updated due to change of package version or some reasons.

And I posted very similar code previously. But I posted again to remember the procedure for myself. It’s just memo…

PandasTools of RDKit makes easy to integrate rdkit and pandas. To use the module, user can render molecules on pandas dataframe, filter by substructure like postgres cartridge, calculate descriptors and do many things.

Also PandasTools can render rgroup decomposition data very easily. ‘PandasTools.RGroupDecompositionToFrame’ works well for the task. I tried to use the method in following test code. All code is uploaded my gist.

  • Load SDF to dataframe
  • Generate 2D code because original data has 3D code
  • get MCS from bi-cyclic compounds and pruned bonds which aren’t in ring. It’s defined as scaffold
  • Filter data which has scaffold as substructure
  • Then perform rgroup decomposition and load data to pandas dataframe
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

The function can automatically attach R-group number, it is useful for further analysis such as FW analysis etc.

I don’t have many examples which use rdRGroupDecomposition method in my code. I would like to think about new idea which uses the method.

Advertisement

Published by iwatobipen

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

One thought on “Make pandas dataframe with r-group information #memo

  1. Hi i’m new to rdkit.. i’m getting this error

    ArgumentError: Python argument types in
    rdkit.Chem.rdDepictor.Compute2DCoords(str)
    did not match C++ signature:
    Compute2DCoords(RDKit::ROMol {lvalue} mol, bool canonOrient=True, bool clearConfs=True, boost::python::dict {lvalue} coordMap={}, unsigned int nFlipsPerSample=0, unsigned int nSample=0, int sampleSeed=0, bool permuteDeg4Nodes=False, double bondLength=-1.0, bool forceRDKit=False)

    when m doing compute2dcoords..

    what may be the problem?

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 )

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.

%d bloggers like this: