Skip to main content
Chemical Science logoLink to Chemical Science
. 2020 Mar 3;11(12):3355–3364. doi: 10.1039/c9sc03666k

Automatic retrosynthetic route planning using template-free models

Kangjie Lin 1,, Youjun Xu 1,, Jianfeng Pei 2,, Luhua Lai 1,2,
PMCID: PMC8152431  PMID: 34122843

Abstract

Retrosynthetic route planning can be considered a rule-based reasoning procedure. The possibilities for each transformation are generated based on collected reaction rules, and then potential reaction routes are recommended by various optimization algorithms. Although there has been much progress in computer-assisted retrosynthetic route planning and reaction prediction, fully data-driven automatic retrosynthetic route planning remains challenging. Here we present a template-free approach that is independent of reaction templates, rules, or atom mapping, to implement automatic retrosynthetic route planning. We treated each reaction prediction task as a data-driven sequence-to-sequence problem using the multi-head attention-based Transformer architecture, which has demonstrated power in machine translation tasks. Using reactions from the United States patent literature, our end-to-end models naturally incorporate the global chemical environments of molecules and achieve remarkable performance in top-1 predictive accuracy (63.0%, with the reaction class provided) and top-1 molecular validity (99.6%) in one-step retrosynthetic tasks. Inspired by the success rate of the one-step reaction prediction, we further carried out iterative, multi-step retrosynthetic route planning for four case products, which was successful. We then constructed an automatic data-driven end-to-end retrosynthetic route planning system (AutoSynRoute) using Monte Carlo tree search with a heuristic scoring function. AutoSynRoute successfully reproduced published synthesis routes for the four case products. The end-to-end model for reaction task prediction can be easily extended to larger or customer-requested reaction databases. Our study presents an important step in realizing automatic retrosynthetic route planning.


Retrosynthetic pathway planning using a template-free model coupled with heuristic Monte Carlo tree search.graphic file with name c9sc03666k-ga.jpg

Introduction

Organic synthesis has a history spanning over 190 years since the synthesis of urea by Friedrich Wöhler in 1828, but remains a rate-limiting step for the discovery of novel medicines and materials.1 One of the critical steps for efficient and environmentally friendly synthesis of valuable molecules lies in well-designed and feasible retrosynthetic routes. Retrosynthetic analysis, first used by Robert Robinson in tropinone synthesis2 and then formalized by E. J. Corey,3 is a fundamental technique that organic chemists use to design target molecules. However, the synthesis route of a molecule is usually diverse, especially for complex compounds like natural products. Historically, synthesis route planning has largely relied on the knowledge of experienced chemists.

Since the 1960s, computer-aided retrosynthetic analysis tools have attracted much attention, with the earliest retrosynthesis program likely being the early Logic and Heuristics Applied to Synthetic Analysis (LHASA) work of E. J. Corey.4 Computer-aided synthesis planning has been well-reviewed over the past years.5–11 According to a recent review,11 computer-aided retrosynthetic route planning strategies can be clustered into two main categories: template-based and template-free methods. Template-based methods, including the LHASA software,4,12 have been applied since the philosophy of retrosynthetic analysis was put forward by E. J. Corey. These methods can also be categorized as using either a manual encoding approach or an automated extraction approach. Synthia (formerly Chematica), one of the most well-known, expert-encoded, template-based retrosynthetic analysis tools, is a commercial program developed by Grzybowski and co-workers.9,13–18 This tool uses a manually collected knowledge database containing about 70 000 hand-encoded reaction transformation rules.18 Based on human knowledge of organic synthesis and the encoding of organic rules over a period of more than 15 years, Synthia has been validated experimentally as an efficient toolkit for complex products recently.16 However, it would not be practical to manually collect all the knowledge of organic synthesis considering the exponential growth rate of the number of published reactions.19 Another straightforward strategy for a template-based method, the ReactionPredictor from Baldi's group,20–22 is based on mechanistic views. This method considers the reactions between reactants as electron sinks and sources, and ranks the interactions using approximate molecular orbitals. Although these approaches are logical and interpretable for chemists, the manual encoding of mechanistic rules cannot be avoided and the mechanisms outside the knowledge database cannot be predicted.

In addition to manual rules, automated reaction templates have been extracted by several groups. Based on the algorithms described by Law et al.23 and Bogevig et al.,24 Segler and Waller employed a neural network to score templates and perform retrosynthesis and reaction prediction.25,26 Coupling this method with Monte Carlo Tree Search (MCTS), they built a novel method for synthetic pathway planning.19 Later, Coley et al.27 used automatically extracted templates to perform retrosynthesis analysis based on molecular similarity, where they considered the similarity of both products and reactants to score and rank the templates. Recently, Baylon and coworkers28 applied a multiscale approach based on deep highway networks (DHN) and reaction rule classification for retrosynthetic reaction prediction. Their approach achieved better performance than other previous methods based on automated extraction of reaction templates. However, there are two unavoidable limitations when using automatically extracted reaction templates. First, there is an inevitable trade-off between generalization and specificity in template-based methods. Second, current template extraction algorithms consider reaction centers and their neighboring atoms, but not the global chemical environment of molecules. Moreover, mapping the atoms between products and reactants remains a nontrivial problem for all template-based methods.29

Recently, template-free models have emerged as a promising strategy to predict reactions and retrosynthetic transformations. With the pioneering work using neural networks to generate SMILES30 by Aspuru-Guzik et al.31 and Segler et al.,32 sequence-to-sequence (seq2seq) models have been gradually applied as an important template-free model in reaction outcome prediction and retrosynthetic analysis. The first template-free model in retrosynthetic analysis was proposed by Liu and co-workers,29 who used a seq2seq model to predict SMILES30 strings for reactants of a single product. They used a neural network architecture that involves bidirectional long short-term memory (LSTM) cells with an additive attention mechanism. The seq2seq model performed comparably to its template-based baseline (37.4% versus 35.4% in top-1 accuracy). However, the invalidity rate of the top-10 predicted SMILES strings was greater than 20%, which restricts its potential in further synthetic pathway planning.

In 2017, Vaswani et al.33 proposed a multi-head attention-based Transformer model in machine translation tasks that achieves state-of-the-art performance. Later, two studies used this model to predict the reaction outcome and reactants for single-step retrosynthetic analysis.34,35 Herein, we present a novel template-free strategy for automatic retrosynthetic route planning. The workflow is depicted in Fig. 1. We first trained an end-to-end model for single-step retrosynthetic task prediction using the Transformer architecture on the reactions from the United States patent literature. Our best model achieved a top-1 prediction accuracy of 63.0% using USPTO_MIT (without chiral species) with reaction classification, which exceeds that of the previous similarity-based27 or LSTM-based seq2seq models.29 This model generated fewer invalidity errors of SMILES (99.6% validity rate) compared to the previously reported seq2seq model. When applied recursively, our model successfully performed multi-step retrosynthetic route planning for four case products. It should be noted that none of the products or intermediates appears in the training dataset. We further developed an automatic data-driven end-to-end retrosynthetic route planning system (AutoSynRoute) using MCTS with a heuristic scoring function. AutoSynRoute successfully reproduced the published pathways for the four case products, demonstrating its potential for retrosynthetic pathway planning.

Fig. 1. The workflow of AutoSynRoute. The Transformer architecture was used to develop our one-step model based on two datasets. A target molecule was transformed into simpler intermediate molecules using a one-step model. By repeating this operation, terminal molecules can be obtained. An automatic searching system was constructed for retrosynthesis route planning using MCTS with a heuristic score.

Fig. 1

Methods

Cadeddu et al.36 described retrosynthesis as natural language processing and termed this idea “chemical linguistics.” Similarly, retrosynthetic analysis can also be treated as a machine translation problem, where the SMILES strings are considered to be sentences and each token or character is treated as a word. In translation, each sentence has several different representations. Similarly, each product SMILES string can be “translated” to several different reactant SMILES strings, consistent with different disconnections in retrosynthetic analysis. Our seq2seq approach was based on the Transformer architecture, which represents one of the state-of-the-art techniques in neural machine translation. Unlike previous LSTM-based seq2seq models, this architecture was solely based on self-attention mechanisms, which have two main advantages: they can significantly improve the efficiency of the training time using parallelizable computation, and they allow the encoder and decoder to peek at different tokens simultaneously, thereby enabling effective computing of long-range dependent sequences and contributing to the production of high-validity SMILES strings. The Transformer architecture is depicted in Fig. 2 and the detailed description of the model can be found in the ESI.

Fig. 2. A schematic diagram of the Transformer architecture. Redrawn from ref. 33.

Fig. 2

Datasets and data preprocessing

We used two datasets to develop our single-step retrosynthetic prediction models. We first trained our model using a common benchmark dataset with ca. 50 000 reactions (USPTO_50K) extracted from the United States patent literature, which was previously used by Liu et al.29 and Coley et al.27 The reaction classes in the dataset were labeled by Schneider and co-workers37 as described in Table 1. Based on the study by Liu et al.,29 we used a 90%/10% training/testing split, and the validation set was randomly sampled from training sets (10%). To develop a more powerful model, we also used a much larger dataset called USPTO_MIT38 from the USPTO,39 with preprocessed training, validation, and testing sets of 424 573, 42 457 (randomly sampled from training sets), and 38 648 reactions, respectively.

Descriptions of ten reaction classes and the fraction of USPTO_50K and USPTO_MIT.

Reaction class Reaction name Fraction of USPTO_50k (%) Fraction of USPTO_MIT (%)
1 Heteroatom alkylation and arylation 30.3 29.9
2 Acylation and related processes 23.8 24.9
3 C–C bond formation 11.3 13.4
4 Heterocycle formation 1.8 0.7
5 Protections 1.3 0.3
6 Deprotections 16.5 14.1
7 Reductions 9.2 9.4
8 Oxidations 1.6 2.0
9 Functional group interconversion (FGI) 3.7 5.0
10 Functional group addition (FGA) 0.5 0.2

Inspired by Schneider et al.,37,40 the original USPTO_MIT dataset was preprocessed to extract the reactants and products of each reaction. We classified the reactions using a machine learning method based on reaction fingerprints and agent features. Moreover, we tried both token- and character-based methods to tokenize the SMILES strings as model inputs. The details of the reaction classification algorithm and results and the difference between token- and character-based preprocessing are described in the ESI.

Monte Carlo tree search

To implement automatic retrosynthetic route search, MCTS41 is used to create a search tree where each node corresponds to a set of molecules (shown in Fig. 3). Nodes with terminal molecules (starting materials) are called terminal nodes. Starting with the root node (a target molecule), the search tree grows gradually by iterating four steps, including selection, expansion, simulation, and backpropagation. Each intermediate node has a score of upper confidence bound (UCB)42 indicating how promising it is to explore this subtree. The selection step chooses a node with the maximum UCB, which is subsequently expanded into children nodes generated by our automatic retrosynthetic pathway planning model. For the rollout in the simulation step, paths from the expanded node to terminal nodes are built by a customized approach. The softmax value of a heuristic score (see eqn (1)) of each node offers the prior probability of sampling in one rollout step. The larger the value, the more likely it will be sampled. This approach is considered helpful for better and faster searching than uniformly random rollout. A node at t-1 has a partial retrosynthesis pathway (s1, …, st-1)corresponding to the path from the root to this node. Based on the node st-1, our approach can be used to compute the distribution of the next node st. Sampling from this distribution, the pathway is elongated by one step. Our method repeats elongation until the terminal node occurs. After finishing elongation, the defined reward (the detailed description of the reward can be found in the ESI) of the generated pathway is used to propagate backward and update the UCB scores of traversed nodes during the backpropagation process. Please see ref. 43 for details about MCTS.

Fig. 3. Monte Carlo tree search for retrosynthetic pathway search. (a) Selection step. The search tree is traversed from the root to a leaf by choosing the child with the largest UCB score. (b) Expansion step. Children nodes are created by sampling from the Transformer model. (c) Simulation step. Paths to terminal nodes are created by the rollout procedure using the model with the distribution of a heuristic score function. (d) Backpropagation step. Rewards of the terminal node are computed for updating UCB scores of the upstream nodes.

Fig. 3

The source code is available online at https://github.com/PKUMDL-AI/AutoSynRoute. All program scripts were written in Python (version 3.6), and the open source RDKit (version 2018.09.02)44 was used for reaction preprocessing and SMILES validation. Our seq2seq model was built with TensorFlow (version 1.12.0),45 and the details of key hyperparameter settings of our models are available in the ESI.

Results

Single-step evaluation

As summarized in Table 2, our Transformer-based model achieved the best top-1 accuracies of 54.6% and 63.0% for USPTO_50K and USPTO_MIT datasets with additional reaction classes, respectively. With prior reaction class information, the top-1 prediction accuracy of our model is much better than that of the LSTM-based seq2seq model proposed by Liu et al.29 and also higher than that of the similarity-based model by Coley et al.27 As shown in Table 3, when the reaction classes are not provided, the top-1 accuracy of our model is still higher than those of the other methods. The results of Liu et al.'s and Segler et al.'s models are implemented by us using Liu et al.‘s public code and Coley's reproduced code (https://github.com/connorcoley/retrotemp), respectively. The reproduction details of the two baseline experiments can be found in the ESI. The template-based methods proposed by Baylon et al.28 are also competitive, but currently we cannot make a direct comparison with their approaches because their model and test data are unavailable to us.

Model performance with additional reaction classesa.

top-n accuracy (%), n=
Model (dataset) 1 3 5 10
Liu et al. template +class (USPTO_50K)29,b 35.4 52.3 59.1 65.1
Liu et al. LSTM +class (USPTO_50K)29,b 37.4 52.4 57.0 61.7
Coley et al. similarity +class (USPTO_50K)27 52.9 73.8 81.2 88.1
Our Transformer +token +class (USPTO_50K) 54.3 74.1 79.2 84.4
Our Transformer +char +class (USPTO_50K) 54.6 74.8 80.2 84.9
Liu et al. LSTM +class (USPTO_MIT)29,b 56.1 69.9 73.6 77.3
Our Transformer +char +class (USPTO_MIT) 63.0 79.2 83.4 86.8
a

Key: “+class” means that reaction class information is added to the model; “+token” means that token-based preprocessing is applied; “+char” means that char-based preprocessing is applied.

b

The results are implemented by us using Liu et al.'s public code.

Model performance without additional reaction classesa.

top-n accuracy (%), n=
Model (dataset) 1 3 5 10
Liu et al. LSTM (USPTO_50K)29,b 28.3 42.8 47.3 52.8
Liu et al. LSTM (USPTO_MIT)29,b 46.9 61.6 66.3 70.8
Coley et al. Similarity (USPTO_50K)27 37.3 54.7 63.3 74.1
Segler–Coley-retrained (USPTO_50K)25,c 38.7 56.2 62.2 69.2
Segler–Coley-retrained (USPTO_MIT)25,c 47.8 67.6 74.1 80.2
Karpov et al. Transformer (USPTO_50K)35 42.7 63.9 69.8
Our Transformer +token (USPTO_50K) 42.0 64.0 71.3 77.6
Our Transformer +char (USPTO_50K) 43.1 64.6 71.8 78.7
Our Transformer +char (USPTO_MIT) 54.1 71.8 76.9 81.8
a

Key: “+token” means that token-based preprocessing is applied; “+char” means that char-based preprocessing is applied.

b

The results are implemented by us using Liu et al.'s public code.

c

The results are implemented by us using Coley's reproduced code (https://github.com/connorcoley/retrotemp).

The ratio of invalid SMILES strings produced by our model is much lower than that of the previous LSTM-based model, which means that our model has a powerful ability to capture the grammar of SMILES representations. As shown in Table 4, the top-10 invalidity error of our model is 12.6%, which is close to the top-1 invalidity error of Liu's model. When we trained our model on the large-volume USPTO_MIT dataset, the top-1 accuracy increased to 63.0%, which shows the generality ability of our model by increasing the chemical knowledge base. Meanwhile, the error rate of SMILES strings decreases to 0.4% in the top-1 prediction.

Breakdown of the grammatically invalid SMILES error for different beam sizesa.

Invalid SMILES rate (%)
Model (dataset) 1 3 5 10
Liu et al. LSTM +class (USPTO_50K)29 12.2 15.3 18.4 22
Our Transformer +token (USPTO_50K) 2.2 3.7 4.8 7.8
Our Transformer +token +class (USPTO_50K) 2.3 4.9 7.0 12.1
Our Transformer +char (USPTO_50K) 2.1 3.5 4.7 8.3
Our Transformer +char +class (USPTO_50K) 2.4 4.4 6.4 12.6
Our Transformer +char +class (USPTO_MIT) 0.4 1.5 2.9 8.6
a

Key: “+class” means that reaction class information is added to the model; “+token” means that token-based preprocessing is applied; “+char” means that char-based preprocessing is applied.

A comparison of the top-10 accuracies across all classes of our model with those of the previous studies on USPTO_50K and USPTO_MIT datasets is shown in Table S1. The performance of our model was much better than that of the seq2seq model of Liu et al.29 across all reaction categories. However, our model performed just slightly better or comparably to the similarity-based model in reaction categories 3, 7 and 9.

As shown in Fig. 4, we used the top-5 retrosynthetic disconnections of a compound in a test set as an example to analyze the specificity and generality of our model. We chose a compound in class 1 as an example, in which the ground truth prediction ranks first and the other predicted reactions are also chemically plausible. The results show that our model is able to give reasonably diverse disconnections and the top-5 disconnections comply with the reaction class of heteroatom alkylation. Additional results regarding single-step retrosynthetic disconnections within each reaction class can be found in the ESI (Fig. S1–S10).

Fig. 4. Top-5 retrosynthetic predictions of an example reaction with class 1. The model successfully proposes the recorded reactants with rank 1, corresponding to a heteroatom alkylation. Other suggestions among the top-5 predictions are also chemically reasonable.

Fig. 4

Iterative multi-step pathway generation

As the prediction accuracy of our model is quite high (even higher than that of similarity-based methods), we also examined the potential of our model in recursive generation of candidate reactants. We chose four target compounds as examples, including the antiseizure drug Rufinamide,46 a novel allosteric activator for glutathione peroxidase 4 (GPX4),47 and two representative compounds used by other retrosynthetic programs.16,19 By enumerating different reaction classes, we sought to confirm that our model could successfully reproduce the published reaction pathways of the four compounds. The input structures (products or intermediates) of the four examples do not appear in our training set of either the USPTO_50K or USPTO_MIT datasets.

For the first example of retrosynthesis pathway planning, Rufinamide (shown in Fig. 5a), the reported first step is the formation of an amide bond, ranking first in reaction class 9 (functional group interconversion). The subsequent step is also found to rank top-1 in class 4 (heterocycle formation), consistent with the mechanistic view. This is followed by another functional group interconversion (FGI) step, the final step, predicted precisely as top-1 in class 9. It is worth mentioning that different reaction classes may have the same disconnections and thus result in the same reactants. For example, the third step of the aforementioned route also ranks first in class 1 (heteroatom alkylation), which is also plausible.

Fig. 5. Iterative multi-step pathway generation. The routes are constructed by iteratively applying single-step retrosynthetic methodology to (a) Rufinamide, (b) an antagonist of the interaction between WDR5 and MLL1, from the example of Grzybowski et al.,16 (c) an allosteric activator for GPX4, and (d) an intermediate of a drug candidate from the example of Segler et al.19 The suggested disconnections are consistent with published pathways. The number before the “.” indicates the reaction class, and the number after the “.” indicates the ranking in the top-10 prediction.

Fig. 5

As shown in Fig. 5b, the second example comes from the previous work of Grzybowski et al.,16 which was the retrosynthesis pathway planning of an antagonist of the interaction between WD repeat-containing protein 5 (WDR5) and mixed-lineage leukemia 1 (MLL1).48 Our model could recover the route suggested by the commercial program Synthia. The first step is a FGI predicted as top-2 by our model. The next step is a common amide formation. The final step is a C–C bond formation, which was also predicted by our model as top-1 with the correct reaction class.

The aforementioned two routes are predicted by our model trained on the USPTO_50K dataset. However, another two more challenging routes cannot be completely predicted due to less coverage of chemical space. Remarkably, using the USPTO_MIT dataset (without stereochemistry information), our trained model could completely reproduce the following two routes in our top-10 predictions, suggesting the importance of training on enlarging coverage of the chemical knowledge space.

The third example is the retrosynthesis pathway planning of the GPX4 activator compound, as depicted in Fig. 5c. The published first step ranks first in class 6 (deprotection). The second step could be regarded as acylation and related processes and it is predicted correctly as top-8 by our model. The ground truth of the third step ranks top-1 in class 9, followed by a deprotection step in top-3, and a final acylation and related processes in top-1.

The fourth example, described in Fig. 5d, is the retrosynthesis pathway planning of an intermediate of a drug candidate from the example of Segler and co-workers.19 The first, second, and third steps can be easily reproduced by our model as top-1 or top-2 with the right class. The fourth step is a common functional group addition, followed by an uncommon reduction of a carbonyl group. After the final step of heteroatom alkylation, our model was shown to reproduce the steps predicted by the former template-based method.

Automatic retrosynthetic pathway planning

As shown above, when considering the top 10 prediction of each of the 10 reaction classes, 100 candidate reactants for a target will be predicted in one step. A recursive application in a four-step pathway will produce 100 000 000 candidate pathways assuming all of the output SMILES strings are valid. To make our model applicable for retrosynthetic pathway planning, we needed to achieve efficient automatic pathway searching and ranking. We used a MCTS algorithm combined with a heuristic scoring function to achieve this purpose. Our heuristic scoring function was inspired by Synthia's Chemical Scoring Function (CSF).9 We considered the Scoremodel produced by our model (representing the decoding log probability from the beam search), the changed SMILES length from the target to the reactants, and the changed number of rings from the target to the reactants. To scale the heuristic scoring function in a comparable range, we presented the scoring function in the formula

Scorestep = a × exp(Scoremodel) − (b × RINGSchanged + SMILESchanged) 1

We defined the parameters a and b as 100 and 6 in our four examples.

To make the model applicable, we also needed to define the terminal nodes or reactants, which means the commercially available molecules. We used a dataset containing 84 807 building blocks from a chemical supplier (Sigma Aldrich), obtained from the ZINC15 database (http://zinc15.docking.org/) and 17 182 molecules from the USPTO_MIT database. The data were used as reactants at least five times as terminal nodes (a building block database of 93 563 molecules after removing redundant ones) for searching. Users can also use any specific building block database as a terminal reactant database.

Using our automatic retrosynthetic pathway planning strategy, most of the aforementioned steps in the four examples can be found and ranked in top-10 except for the fourth step of example 3 (ranks top-12) and fifth step of example 4 (ranks top-25). The overall pathway ranking results of the four examples can be found in the ESI (Fig. S11–S14). Though our heuristic scoring function is simple, these results are impressive. We demonstrated the potential ability of our template-free model to plan the automatic retrosynthetic pathway in a new way other than by using current template-based methods.

Discussion

Advantages and disadvantages of our seq2seq models

As described previously, our models are template-free and free of atom mapping. In addition, our models can learn the global chemical environments of molecules naturally, unlike other template-based methods. However, our seq2seq models still have some problems related to dataset and SMILES representations. In addition to having less coverage of the chemical reaction space, the USPTO dataset does not contain reaction yield information for reactions, which is useful to discriminate whether the predicted pathways are efficient. Because our models were trained on USPTO datasets, their prediction accuracies are currently limited by these problems. A commonly known challenge of using the SMILES or reaction SMARTS format is the poor performance when dealing with stereochemistry and tautomers. Like other template-based methods, our models still have difficulty tackling reactions containing chirality. In fact, our models are able to handle reactants or products with simple chirality, as long as we include reactions containing chirality. However, language models operating on SMILES strings may have trouble learning to meaningfully interpret stereochemistry. Furthermore, because our models do not contain any information about reaction conditions, they are currently unable to deal with asymmetric synthesis, most of which relies on asymmetric catalysts. Meanwhile, tautomers, though chemically equivalent in different molecular structures, are regarded as different inputs and outputs in our model because current SMILES grammar is sequence sensitive. This problem is also common in template-based models, as described by Segler et al.19 Embedding stereochemistry and tautomerization into SMILES representation is a future direction to be explored.

Evaluation of different pathways

Retrosynthetic programs can predict thousands of different pathways. However, picking a suitable pathway from the predictions is not easy. Medicinal chemists may want a pathway expanding structure–activity relationship exploration. Organic chemists, especially those working on total synthesis of natural products, may have preferences for the more efficient and greener pathways. The choices of process chemists may be influenced by the cost of starting materials and avoidance of toxic and dangerous molecules. It is difficult to find a pathway that fulfills all these requirements. The heuristic metric proposed by Synthia seems to be a reasonable strategy. This metric has two scoring functions: the CSF and Reaction Scoring Function. Another potential strategy is to use the SCScore metric proposed by Coley and co-workers.49 In general, a comprehensive scoring function will be related to the cost of building blocks, the yield of each step, the avoidance of toxic compounds and functional group incompatibility, the length of the pathway, etc. The design of a perfect pathway scoring function is still an unsolved problem in the community.

Evaluation of different models

Evaluation of a retrosynthetic analysis approach is also difficult due to the lack of benchmark metrics. The strategy applied by Segler et al.19 is a reasonable one. They invited professional organic chemists to vote on the predicted and ground truth pathways. If the chemists do not show preference for the ground truth pathway, it means that the predicted one is also reasonable. However, this assessment is difficult to standardize. Certainly, validation in a wet lab is the most reliable way to validate a model. As most chemists are interested in the synthesis of novel complex compounds or finding efficient alternative pathways for valuable molecules, validation of these kinds of compounds with wet experiments should be considered. For example, the cooperation between MilliporeSigma and Grzybowski et al.16 resulted in the efficient syntheses of eight diverse and medicinally relevant targets, demonstrating the reliability of Synthia to the chemistry community.

Conclusions

We developed an automatic data-driven retrosynthetic route planning system (AutoSynRoute), which includes retrosynthesis task prediction using a Transformer-based seq2seq model and MCTS with heuristic scoring for route planning. AutoSynRoute can be applied step-by-step and iteratively with user inputs. To demonstrate its application, we predicted the top-10 disconnections for each of ten reaction classes and reproduced the published retrosynthetic pathways for four examples. To further demonstrate the power of AutoSynRoute, we successfully used it to perform automatic retrosynthetic route planning for the above four examples. Unlike other template-based methods, which either rely on experts' laborious work or simple, contextless rule-based systems, our approach is fully end-to-end and naturally incorporates the global molecular context of the reaction species. We demonstrated that a template-free approach can be used to perform automatic retrosynthetic route planning and reproduce the published synthesis routes of valuable compounds. As mentioned by Coley et al., a complete retrosynthetic program should be made up of five components:11 a library containing the disconnection rules, a recursive application engine that generates candidate reactants for target compounds, a building block database containing available compounds to act as terminal nodes, a strategy to guide the retrosynthetic search, and a scoring function for the single-step or pathway. Our approach includes all of these components as described herein.

Our approach can be further developed with larger and more diverse chemical knowledge bases for training. Currently, the information regarding reaction conditions like catalysts, solvents, and reagents is missing because of the database used. These conditions can be introduced in the future by using more comprehensive datasets, like the Reaxys database or in-house data. Future work will also tackle problems like SMILES′ poor representations of stereochemistry and tautomerization. Finally, we envision that automatic retrosynthetic route planning will play more important roles in real-world automated synthesis of molecules50 and in de novo molecular design.51

Conflicts of interest

There are no conflicts to declare.

Supplementary Material

SC-011-C9SC03666K-s001

Acknowledgments

This work was partly supported by the National Science and Technology Major Project “Key New Drug Creation and Manufacturing Program”, China (2018ZX09711002), the National Natural Science Foundation of China (21673010 and 21633001), and the Ministry of Science and Technology of China (2016YFA0502303). Computational analysis was performed on the High Performance Computing Platform of the Peking-Tsinghua Center for Life Sciences and the High-performance Computing Platform of Peking University. We thank Dr Weilin Zhang and Wenhao Gao for helpful discussions.

Electronic supplementary information (ESI) available. See DOI: 10.1039/c9sc03666k

References

  1. Blakemore D. C. Castro L. Churcher I. Rees D. C. Thomas A. W. Wilson D. M. Wood A. Nat. Chem. 2018;10:383–394. doi: 10.1038/s41557-018-0021-z. [DOI] [PubMed] [Google Scholar]
  2. Robinson R. J. Chem. Soc., Trans. 1917;111:762–768. doi: 10.1039/CT9171100762. [DOI] [Google Scholar]
  3. Corey E. J. Angew. Chem., Int. Ed. Engl. 1991;30:455–465. doi: 10.1002/anie.199104553. [DOI] [Google Scholar]
  4. Corey E. J. Wipke W. T. Science. 1969;166:178. doi: 10.1126/science.166.3902.178. [DOI] [PubMed] [Google Scholar]
  5. Ott M. A. Noordik J. H. Recl. Trav. Chim. Pays-Bas. 1992;111:239–246. doi: 10.1002/recl.19921110601. [DOI] [Google Scholar]
  6. Todd M. H. Chem. Soc. Rev. 2005;34:247–266. doi: 10.1039/B104620A. [DOI] [PubMed] [Google Scholar]
  7. Cook A. Johnson A. P. Law J. Mirzazadeh M. Ravitz O. Simon A. Wiley Interdiscip. Rev.: Comput. Mol. Sci. 2012;2:79–107. [Google Scholar]
  8. Warr W. A. Mol. Inf. 2014;33:469–476. doi: 10.1002/minf.201400052. [DOI] [PubMed] [Google Scholar]
  9. Szymkuć S. Gajewska E. P. Klucznik T. Molga K. Dittwald P. Startek M. Bajczyk M. Grzybowski B. A. Angew. Chem., Int. Ed. 2016;55:5904–5937. doi: 10.1002/anie.201506101. [DOI] [PubMed] [Google Scholar]
  10. Feng F. Lai L. Pei J. Front. Chem. 2018;6:199. doi: 10.3389/fchem.2018.00199. [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. Coley C. W. Green W. H. Jensen K. F. Acc. Chem. Res. 2018;51:1281–1289. doi: 10.1021/acs.accounts.8b00087. [DOI] [PubMed] [Google Scholar]
  12. Corey E. J. Long A. K. Rubenstein S. D. Science. 1985;228:408. doi: 10.1126/science.3838594. [DOI] [PubMed] [Google Scholar]
  13. Bishop K. J. M. Klajn R. Grzybowski B. A. Angew. Chem. 2006;118:5474–5480. doi: 10.1002/ange.200600881. [DOI] [PubMed] [Google Scholar]
  14. Grzybowski B. A. Bishop K. J. M. Kowalczyk B. Wilmer C. E. Nat. Chem. 2009;1:31. doi: 10.1038/nchem.136. [DOI] [PubMed] [Google Scholar]
  15. Kowalik M. Gothard C. M. Drews A. M. Gothard N. A. Weckiewicz A. Fuller P. E. Grzybowski B. A. Bishop K. J. M. Angew. Chem., Int. Ed. 2012;51:7928–7932. doi: 10.1002/anie.201202209. [DOI] [PubMed] [Google Scholar]
  16. Klucznik T. Mikulak-Klucznik B. McCormack M. P. Lima H. Szymkuć S. Bhowmick M. Molga K. Zhou Y. Rickershauser L. Gajewska E. P. Toutchkine A. Dittwald P. Startek M. P. Kirkovits G. J. Roszak R. Adamski A. Sieredzińska B. Mrksich M. Trice S. L. J. Grzybowski B. A. Chem. 2018;4:522–532. [Google Scholar]
  17. Badowski T. Molga K. Grzybowski B. A. Chem. Sci. 2019;10:4640–4651. doi: 10.1039/C8SC05611K. [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Molga K. Dittwald P. Grzybowski B. A. Chem. 2019;5:460–473. doi: 10.1039/c9sc02678a. [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Segler M. H. S. Preuss M. Waller M. P. Nature. 2018;555:604. doi: 10.1038/nature25978. [DOI] [PubMed] [Google Scholar]
  20. Kayala M. A. Azencott C.-A. Chen J. H. Baldi P. J. Chem. Inf. Model. 2011;51:2209–2222. doi: 10.1021/ci200207y. [DOI] [PMC free article] [PubMed] [Google Scholar]
  21. Kayala M. A. Baldi P. J. Chem. Inf. Model. 2012;52:2526–2540. doi: 10.1021/ci3003039. [DOI] [PubMed] [Google Scholar]
  22. Fooshee D. Mood A. Gutman E. Tavakoli M. Urban G. Liu F. Huynh N. Van Vranken D. Baldi P. Mol. Syst. Des. Eng. 2018;3:442–452. doi: 10.1039/C7ME00107J. [DOI] [Google Scholar]
  23. Law J. Zsoldos Z. Simon A. Reid D. Liu Y. Khew S. Y. Johnson A. P. Major S. Wade R. A. Ando H. Y. J. Chem. Inf. Model. 2009;49:593–602. doi: 10.1021/ci800228y. [DOI] [PubMed] [Google Scholar]
  24. Bøgevig A. Federsel H.-J. Huerta F. Hutchings M. G. Kraut H. Langer T. Löw P. Oppawsky C. Rein T. Saller H. Org. Process Res. Dev. 2015;19:357–368. doi: 10.1021/op500373e. [DOI] [Google Scholar]
  25. Segler M. H. S. Waller M. P. Chem.–Eur. J. 2017;23:5966–5971. doi: 10.1002/chem.201605499. [DOI] [PubMed] [Google Scholar]
  26. Segler M. H. S. Waller M. P. Chem.–Eur. J. 2017;23:6118–6128. doi: 10.1002/chem.201604556. [DOI] [PubMed] [Google Scholar]
  27. Coley C. W. Rogers L. Green W. H. Jensen K. F. ACS Cent. Sci. 2017;3:1237–1245. doi: 10.1021/acscentsci.7b00355. [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Baylon J. L. Cilfone N. A. Gulcher J. R. Chittenden T. W. J. Chem. Inf. Model. 2019;59:673–688. doi: 10.1021/acs.jcim.8b00801. [DOI] [PubMed] [Google Scholar]
  29. Liu B. Ramsundar B. Kawthekar P. Shi J. Gomes J. Luu Nguyen Q. Ho S. Sloane J. Wender P. Pande V. ACS Cent. Sci. 2017;3:1103–1113. doi: 10.1021/acscentsci.7b00303. [DOI] [PMC free article] [PubMed] [Google Scholar]
  30. Weininger D. J. Chem. Inf. Comput. Sci. 1988;28:31–36. doi: 10.1021/ci00057a005. [DOI] [PubMed] [Google Scholar]
  31. Gómez-Bombarelli R. Wei J. N. Duvenaud D. Hernández-Lobato J. M. Sánchez-Lengeling B. Sheberla D. Aguilera-Iparraguirre J. Hirzel T. D. Adams R. P. Aspuru-Guzik A. ACS Cent. Sci. 2018;4:268–276. doi: 10.1021/acscentsci.7b00572. [DOI] [PMC free article] [PubMed] [Google Scholar]
  32. Segler M. H. S. Kogej T. Tyrchan C. Waller M. P. ACS Cent. Sci. 2018;4:120–131. doi: 10.1021/acscentsci.7b00512. [DOI] [PMC free article] [PubMed] [Google Scholar]
  33. Vaswani A., Shazeer N., Parmar N., Uszkoreit J., Jones L., Gomez A. N., Kaiser Ł. and Polosukhin I., arXiv:1706.03762, 2016
  34. Schwaller P., Laino T., Gaudin T., Bolgar P., Bekas C. and Lee A. A., arXiv:1811.02633, 2018
  35. Pavel K. Guillaume G. Igor T. ChemRxiv. 2019:8058464. [Google Scholar]
  36. Cadeddu A. Wylie E. K. Jurczak J. Wampler-Doty M. Grzybowski B. A. Angew. Chem., Int. Ed. 2014;53:8108–8112. doi: 10.1002/anie.201403708. [DOI] [PubMed] [Google Scholar]
  37. Schneider N. Stiefl N. Landrum G. A. J. Chem. Inf. Model. 2016;56:2336–2346. doi: 10.1021/acs.jcim.6b00564. [DOI] [PubMed] [Google Scholar]
  38. Coley C. W. Jin W. Rogers L. Jamison T. F. Jaakkola T. S. Green W. H. Barzilay R. Jensen K. F. Chem. Sci. 2019;10:370–377. doi: 10.1039/C8SC04228D. [DOI] [PMC free article] [PubMed] [Google Scholar]
  39. Lowe D. M., PhD thesis, University of Cambridge, 2012 [Google Scholar]
  40. Schneider N. Lowe D. M. Sayle R. A. Landrum G. A. J. Chem. Inf. Model. 2015;55:39–53. doi: 10.1021/ci5006614. [DOI] [PubMed] [Google Scholar]
  41. Coulom R., in Computers and Games, Springer Berlin Heidelberg, 2007, pp. 72–83 [Google Scholar]
  42. Browne C. B. Powley E. Whitehouse D. Lucas S. M. Cowling P. I. Rohlfshagen P. Tavener S. Perez D. Samothrakis S. Colton S. IEEE Transactions on Computational Intelligence and AI in Games. 2012;4:1–43. [Google Scholar]
  43. Dieb T. M. Ju S. Yoshizoe K. Hou Z. Shiomi J. Tsuda K. Sci. Technol. Adv. Mater. 2017;18:498–503. doi: 10.1080/14686996.2017.1344083. [DOI] [PMC free article] [PubMed] [Google Scholar]
  44. Landrum G., RDKit: Open-source cheminformatics, 2006, http://www.rdkit.org
  45. Abadi M., Agarwal A., Barham P., Brevdo E., Chen Z., Citro C., Corrado G. S., Davis A., Dean J. and Devin M., arXiv:1603.04467, 2015
  46. Padmaja R. D. Chanda K. Org. Process Res. Dev. 2018;22:457–466. doi: 10.1021/acs.oprd.7b00373. [DOI] [Google Scholar]
  47. Li C. Deng X. Zhang W. Xie X. Conrad M. Liu Y. Angeli J. P. F. Lai L. J. Med. Chem. 2019;62:266–275. doi: 10.1021/acs.jmedchem.8b00315. [DOI] [PubMed] [Google Scholar]
  48. Getlik M. Smil D. Zepeda-Velázquez C. Bolshan Y. Poda G. Wu H. Dong A. Kuznetsova E. Marcellus R. Senisterra G. Dombrovski L. Hajian T. Kiyota T. Schapira M. Arrowsmith C. H. Brown P. J. Vedadi M. Al-awar R. J. Med. Chem. 2016;59:2478–2496. doi: 10.1021/acs.jmedchem.5b01630. [DOI] [PubMed] [Google Scholar]
  49. Coley C. W. Rogers L. Green W. H. Jensen K. F. J. Chem. Inf. Model. 2018;58:252–261. doi: 10.1021/acs.jcim.7b00622. [DOI] [PubMed] [Google Scholar]
  50. Bédard A.-C. Adamo A. Aroh K. C. Russell M. G. Bedermann A. A. Torosian J. Yue B. Jensen K. F. Jamison T. F. Science. 2018;361:1220. doi: 10.1126/science.aat0650. [DOI] [PubMed] [Google Scholar]
  51. Xu Y. Lin K. Wang S. Wang L. Cai C. Song C. Lai L. Pei J. Future Med. Chem. 2019;11:567–597. doi: 10.4155/fmc-2018-0358. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

SC-011-C9SC03666K-s001

Articles from Chemical Science are provided here courtesy of Royal Society of Chemistry

RESOURCES