Hi Gautier,

An obligatory disclaimer: I assume you know this already, but for anyone
else who doesn't... neither BRICS nor RECAP are really intended for
retrosynthesis. They identify bond types that tend to be possible to make
synthetically, and they encode the transformations for forming the bonds,
but they don't directly tell you which real-world chemical reaction would
form that bond (or even if such a thing exists).

The RDKit doesn't have anything directly builtin that does what you want,
but you can use what is there to approximate it.

BRICS and RECAP are implemented differently for historical reasons, so you
need a slightly different approach for each. I'll demonstrate for BRICS,
because I prefer it to RECAP.

This gist shows has the complete code I used:
https://gist.github.com/greglandrum/45bc872f81f36f4ac0d378166708eb9e
Here I'll just explain the key steps

The BRICS module does have a list of the BRICS reactions and the SMARTS
that defines them. You can start by getting those into a flat list using
the function chain from Python's itertools module):
   all_rxns = list(chain.from_iterable(BRICS.reactions))

Now the key is to loop over the reactions and keep track of which ones can
apply to the molecule you're interested in. Rather than saving those, I
save the SMARTS that defines them:

    applicable = []

    for i,(rxn,rxnD) in enumerate(zip(rxns,rxnDefs)):
        if rxn.IsMoleculeReactant(mol):
            applicable.append((i,rxnD))


at that point you have the list of all BRICS reactions that apply to your
molecule which is, I think, what you're looking for.

Best,
-greg



On Mon, Mar 11, 2019 at 10:05 AM Peyrat Gautier <
gautier.pey...@univ-orleans.fr> wrote:

> Hello,
>
> recently I tried to find retrosynthetic routes for some molecules.
> I thought that using BRICS or RECAP fragmentation would give me fragments
> of the molecules and chemical reactions to build the molecule back.
> But it seems that the chemical reactions used to fragments the molecules
> aren't stored anywhere in both modules.
>
> I followed RECAP and BRICS implementations from
> https://www.rdkit.org/docs/GettingStartedInPython.html.
> I also checked in the documentation
> https://www.rdkit.org/docs/source/rdkit.Chem.Recap.html and
> https://www.rdkit.org/docs/source/rdkit.Chem.BRICS.html.
>
> Could you please tell me how can I get chemical reactions when I fragment
> a molecule with BRICS or RECAP ?
>
> Regards
>
> Gautier Peyrat,
> PhD student
> --
> *PEYRAT Gautier * <https://www.linkedin.com/in/gautier-peyrat/> 
> <http://www.icoa.fr/>
>
> *Chemoinformatics PhD Student *
>
> * Institute of Organic and Analytical Chemistry  ICOA UMR7311*
>  Université d'Orléans - Pôle de Chimie
>  Rue de Chartres - BP 6759
>  45067 Orléans Cedex 2 - France
>  <https://www.univ-orleans.fr/> <https://www.cnrs.fr/> +33 (0)2 38 49
> 45 77 <+33%202%2038%2049%2045%2077>
>  SBC Tool Platform <http://sbc.icoa.fr/> - SBC Team
> <http://www.icoa.fr/fr/bonnet>
>  <http://www.icoa.fr/fr/rss.xml>
>
> <https://www.facebook.com/pages/Institut-de-Chimie-Organique-et-Analytique-ICOA-umr7311/222060911297163>
>  <https://twitter.com/ICOA_UMR7311>
>
> <https://www.linkedin.com/company/institut-de-chimie-organique-et-analytique---icoa-umr7311/>
>
>
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to