Comparison of rdChemReactions and EditableMol #RDKit #chemoinformatics

In this year I moved from MedChem team to CompChem team. And now I need to learn SBDD. Today I struggled mol object that has 3D information.

I would like to replace hydrogen which attached aromatic carbon to some atoms. I thought it is easy if I use rdChemReactions method. But I found that it was not good approach. Because RunReactants method generates products but the method can not keep 3D information of reacted atoms.

It is very interesting and good information for me. Let see example code.

Following code is very simple example.

code example

At first, I tried to replace atom with rdChemReactions method. It worked well but the position of fluorine atom was 0, 0, 0. It indicates that the method can not keep 3D information. I think it is reasonable because some chemical reaction dramatically changes molecular conformation.

The second example used Editable mol.

This approach could keep 3D information, it means that the method do just replace atom!

Of course bond length of C-H and C-F is different but the approach is more suitable for atom scanning I think.

I always surprised that RDKit has many useful function for drug design.

5 thoughts on “Comparison of rdChemReactions and EditableMol #RDKit #chemoinformatics

  1. I recommend using Chem.RWMol instead of EditableMol. EditableMol is the old way of doing things and RWMol is a lot more flexible and robust:

    In [6]: m = Chem.MolFromSmiles(‘c1ccccc1O’)

    In [7]: em = Chem.RWMol(m)

    In [8]: em.ReplaceAtom(6,Chem.Atom(9))

    In [9]: Chem.MolToSmiles(em)
    Out[9]: ‘Fc1ccccc1’

    • I really need to update the docs to make this clear…. sorry that I haven’t done that yet.

  2. Also: you can keep coordinates with a reaction if you actually match the H and replace it:

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 )

Google photo

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