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
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.
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?