convert rdkit mol object to schrodinger’s mol object #RDKit #Chemoinformatics

I posted a memo about how to read maestro file format from RDKit. It means that rdkitter can use “mae” format from RDKit. ;-)
BTW, schrodinger’s site provides API for python. I would like to know the way to communicate rdkit from schrodinger python API.

I read the API in lunch break and tested some methods. Fortunately it worked well.
Example is below.
“rdkit_adapter” method provides a tool to connect rdkit-schrodinger’s python.

At first read sample sdf from rdkit.

from schrodinger.thirdparty import rdkit_adapter
from rdkit import Chem
mols = [ mol for mol in Chem.SDMolSupplier("solubility.sdf") if mol != None]

Then sanitize mol and convert rdkit mol object to schrodinger mol object. It can do with rdkit_adapter.from_rdkit method like this.

for mol in mols:
schromols = []
for mol in mols:
        shmol = rdkit_adapter.from_rdkit(mol)

Now I could convert rdkit mol objects to schrodinger mol objects. Next I tried conversion from schrodinger mol objects to rdkit mol objects. I used rdkit_adapter.to_rdkit method.

rdmols = []
for mol in schromols:
        rdmol = rdkit_adapter.to_rdkit(mol)

I could not show output because I wrote this blog post from my personal computer. But above code worked.
And there are many methods are provided to schrodinger mol obj. Hmm it seems exciting for me. I check the API more deeply!


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 )

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: