There is a renewed interest in computer-aided synthesis planning, where the vast majority of approaches require the application of retrosynthetic reaction templates. Here, we introduce an open source Python wrapper for RDKit designed to provide consistent handling of stereochemical information in applying retrosynthetic transformations encoded as SMARTS strings. RDChiral is designed to enforce the introduction, destruction, retention, and inversion of tetrahedral centers as well as the cis/trans chirality of double bonds. We also introduce an open source implementation of a retrosynthetic template extraction algorithm to generate SMARTS patterns from atom-mapped reaction SMILES strings. In this manuscript, we describe the implementation of these two pieces of code and illustrate their use through many examples.
The two .json.gz files can be generated from the open source USPTO data available at https://figshare.com/articles/Chemical_reactions_from_US_patents_1976-Sep2016_/5104873 using the code contained in the rdchiral GitHub repository. They are placed here for convenience if you would prefer to copy them into the templates/data subfolder instead of creating them from the source .rsmi file.