Multidimensional diversification for hit-to-lead optimization for the selection of clinical candidates represents an integral part of pharmaceutical drug discovery. Exploring the diverse chemical space starting from a potential lead compound is a routine practice in medicinal chemistry to understand structure–activity relationships, optimize the on-target potency, and improve absorption, distribution, metabolism and excretion properties; however, experimental synthesis is a labour-intensive undertaking as chemists must invest substantial time and effort in repetitive reaction manipulation and downstream purification. In this regard, late-stage derivatization or functionalization is particularly appealing as it can quickly and directly access chemical entities based on a common intermediate without resorting to laborious de novo syntheses1 (Fig. 1a). Although late-stage functionalization has gathered substantial momentum in recent years1,2, only specific sites of the molecule can normally be functionalized, and selectivity and functional group tolerance can be problematic. By stark contrast, diversification through early stage functionalization or de novo modification could potentially modify any site of the molecule to allow molecular editing at will, but it has seldom been approached due to the cumbersome nature of the repetitive multistep synthesis for each modification (Fig. 1a).

Fig. 1: Derivatization for molecule optimization.
figure 1

a, Late-stage derivatization enables rapid change of the properties of molecules, but only limited sites of a molecule can be selectively functionalized. Early stage derivatization or de novo modification, on the other hand, could potentially modify any site of the molecule at will, but has to rely on cumbersome de novo multistep synthesis. b, A transition to automated synthesis can eliminate the tedious multistep procedures inherent to manual synthesis; however, despite recent advances, automated multistep synthesis still faces obstacles such as limited synthetic steps and narrow reaction scopes.

On the other hand, the transition from manual synthesis to the automated assembly of pharmaceutical molecules has allowed improvements in efficiency, scalability, safety and reproducibility, and is therefore of widespread academial, industrial and societal interest3,4 (Fig. 1b); however, other than the well-defined methods for automated peptide5 and oligonucleotide6 synthesis (and increasingly oligosaccharides7) in which the molecules are composed of repeating functional units, the synthesis of small-molecule-based active pharmaceutical ingredients (APIs) remains predominantly a manual process due to the structural diversity. In this context, recent emerging technologies such as iterative deprotection–coupling–purification sequences8,9,10, robotic systems driven by a chemical programming language11, end-to-end on-demand continuous-flow synthesis12 and radial synthesis13 have revolutionized the automated synthesis of APIs. Compared with conventional stirred-reactor vessels, continuous-flow reactors have several notable processing advantages, including improved mass and heat transfer, enhanced mixing efficiency, better reproducibility, improved safety, reduced footprint and facile scalability14,15. Multistep continuous-flow syntheses also enable the telescoping of several steps into a single and uninterrupted synthetic process, which circumvents the need to purify and isolate intermediates16,17,18. However, it is worth noting that fully continuous-flow syntheses rarely exceed two steps before offline purification19. To realize a fully multistep continuous-flow synthesis is enormously challenging, mainly due to issues originating from solvent and reagent incompatibility, the accumulation of side-products, risk of clogging and mismatch of timescales between steps in a processing chain20,21. Although in-line purification strategies such as phase separators12 have been applied (Supplementary Fig. 1), solvent and reagent incompatibilities between steps still limit the maximum number of steps in continuous-flow syntheses19. The Ley group has pioneered multistep flow syntheses enabled by flowing reactants through polymer-immobilized reagents and scavengers, thereby avoiding interference of leftover reagents in subsequent transformations22,23; however, the downside of this method is the requirement of the efficient preparation and regeneration of a number of reagent and scavenger columns (Supplementary Fig. 1).

Since its original development in the 1950s by Robert Bruce Merrifield24, solid-phase synthesis (SPS) has become an important branch of organic synthesis25. In this technique, unlike reactions conducted in a mobile phase, the starting substrates are bound to a solid support material and grow step-by-step under sequential treatment with various reagent solutions. The key advantage of SPS is that it circumvents tedious intermediate isolation and purification procedures, and instead uses simple filtration. In this manner, the Ley group has pioneered the application of the catch and release strategy for the synthesis of feedstock chemicals26, reagent preparation27 and purification28 in multistep continuous-flow synthesis. Although there have been numerous examples of SPS-based natural product syntheses in batch29,30,31, SPS-based flow methods have not been applied to multistep non-peptide API synthesis in an end-to-end fashion32. On close analysis of the top 200 small-molecule pharmaceuticals (by retail sales in 2018; ref. 33), we envision that 73% of the single pharmaceutical molecules among them could potentially be synthesized by SPS (Supplementary Table 11). We therefore aspired to develop a new prototype for the automated synthesis of non-peptide APIs through the merger of SPS and flow synthesis (Fig. 2a). This method is in stark contrast to reported continuous-flow multistep syntheses. The target molecule grows on a solid support while all reagents and catalysts stay in the mobile phase; the product is detached from the resin at the last step followed by a single purification to afford the pure product. This strategy avoids the problem of reagent/solvent/by-product incompatibility between synthetic steps and enables automation with a longer synthetic steps and a much wider range of reaction conditions and reaction types.

Fig. 2: Schematic of the development of automated SPS-flow synthesis of APIs and derivatives.
figure 2

a, Merging SPS with flow synthesis for automated API synthesis. b, The workflow for the development of a CRF for the automated synthesis of APIs (from solution-batch synthesis, via SPS-batch synthesis, to automated SPS-flow synthesis). The established CRF allows for digital storage of the preparation of the pharmaceutical molecule, and can be applied for derivatization of the lead compound through both early and late-stage diversification in a push-button fashion. BPR, back-pressure regulator.

Generation of a computer-based chemical recipe file (CRF) for a target molecule on a standardized platform enables pharmaceutical production in response to sudden changes in demand or need, such as in an epidemic or pandemic influenza outbreak11,12,34. We envisioned that establishing such a CRF using SPS-based flow technology requires three stages of development: (1) solution-batch synthesis; (2) SPS-batch synthesis; and (3) automated SPS-flow synthesis (Fig. 2b). Small molecules often possess inherent complexity associated with their molecular frameworks; as such, translating batch syntheses into automated liquid-phase continuous-flow syntheses can be challenging, often requiring new synthetic routes or new reagents and advanced purification techniques. Moreover, the number and sequence of units in a continuous processing cascade are tailored to match a specific synthetic route, and it is difficult to reconfigure a system constructed for a specific molecule to another target. This limits the widespread adoption of automated flow syntheses, as one may question whether the convenience afforded by automation of a specific target is worth the considerable effort required to develop such a protocol. By contrast, the translation from solution-batch synthesis to SPS-flow synthesis is much more straightforward for several reasons. First, each step is performed independently, thus avoiding reagent/solvent/by-product incompatibility issues. Next, unlike liquid-phase continuous-flow synthesis, there is no limitation on reaction time in SPS-flow synthesis, and mismatched timescales between subsequent steps do not affect performance. Third, the same system hardware can be reused for many targets without any physical reconfiguration35. Finally, clogging is less problematic as a column reactor with a large threshold filter can be applied. SPS-flow synthesis can substantially reduce the complexity, cost and footprint of the infrastructure needed, and dramatically simplify and accelerate the translation of solution-batch syntheses to automated SPS-flow CRFs. The established CRFs can be directly adopted or slightly modified for the automated synthesis of analogues from a lead compound, allowing both early and late-stage diversification for molecule editing at will (Fig. 2b).

To demonstrate the feasibility of this strategy, prexasertib, a small ATP-competitive selective inhibitor of checkpoint kinases 1 and 2 (CHK1 and CHK2) developed by Eli Lilly36,37, was synthesized via a streamlined, six-step synthesis using a compact SPS-flow platform. Twenty-three analogues were prepared through a push-button approach with or without slight adjustments of the established CRF as a proof-of-concept.

Results and discussion

SPS-flow platform assembly

SPS-flow synthesis addresses each synthetic step independently by simple washing and filtration between each step, and the physical hardware can be reused for different types of reactions. We thus assembled a modular platform, consisting of a high-pressure pump equipped with two channels, a peristaltic pump, four multiway selection valves, a stainless-steel column reactor (fitted with frits with 75 µm pores; Supplementary Fig. 6), a digital heating plate and three back-pressure regulators (Supplementary Fig. 2). Two of the multiway valves allow the routing of reagents and solvents through the column reactor. The third valve either loops the reactor outflow back into the column reactor or directs it to the end waste or product container. The gas line is controlled by the fourth valve to thoroughly purge any solvent residue. The whole system is controlled by a LabVIEW interface (Supplementary Fig. 11), which gives a complete description of the connectivity of all units, and facilitates the movement of reagents and solvents from specific stock locations to the column reactor in a circulative or one-way flow fashion. This platform represents one of the simplest and most compact systems for automated multistep synthesis, and it can fit within the area of half a standard fume hood (56 cm width × 88 cm length × 56 cm height; Supplementary Fig. 2).

Development of a computerized CRF for the automated synthesis of prexasertib

Prexasertib was chosen for proof-of-concept study. Its synthesis can be achieved in a linear fashion with a protection step at the outset. A solid matrix can be applied as a protecting group without introducing further synthetic steps to anchor the starting material onto the solid matrix. An elegant seven-step synthesis of prexasertib was recently accomplished by researchers at Eli Lilly36, employing a continuous-flow process for the last three steps to achieve a kilogram-scale synthesis. To establish a robust computerized CRF for the automated synthesis of prexasertib, our study was initiated with the development of an efficient solution-batch synthesis (Fig. 3a). The synthesis commenced with protecting 3-bromopropylamine using 2-chlorotrityl chloride (1), which was used to mimic 2-chlorotrityl chloride resin, an inexpensive and commonly utilized resin in SPS. A subsequent SN2 reaction between the substituted phenoxide and primary bromide 2 delivered product 3 bearing an aryl ester moiety. Keto-nitrile intermediate 4 was prepared by a Claisen condensation between aryl ester 3 and lithiated acetonitrile38, followed by a hydrazine condensation and an SNAr similar to Eli Lilly’s protocol. Final removal of the 2-chlorotrityl group by treatment with TFA produced prexasertib as TFA salt 7. The Claisen condensation using lithiated acetonitrile allowed a more straightforward route compared with previous syntheses. A six-step synthesis containing five purification-steps was therefore achieved to afford the TFA salt of prexasertib in 57% overall isolated yield.

Fig. 3: Development of automated SPS-flow synthesis of prexasertib.
figure 3

a, Development of a six-step solution-batch synthesis of prexasertib, which is ready to be transformed into SPS. The 2-chlorotrityl protecting group was used to mimic the solid resin. b, A schematic of the established CRF for prexasertib based on the SPS-flow technology; the CRF was implemented using LabVIEW to enable automated synthesis. SNAr, nucleophilic aromatic substitution; DMF, dimethylformamide; LDA, lithium diisopropylamide; THF, tetrahydrofuran; DMSO, dimethyl sulfoxide; TFA, trifluoroacetic acid; MW, microwave; r.t., room temperature; psi, pound per square inch; PS, polystyrene resin.

Vital to the practicality of this strategy is the facile translation of the optimized solution-batch synthesis to the SPS-flow synthesis. 2-Chlorotrityl chloride resin was selected as the solid matrix. We found that the translation to SPS-batch synthesis was straightforward and no modification was required for the protecting, SN2, hydrazine condensation and cleavage steps. The Claisen condensation in SPS was conducted at room temperature for the flow synthesis, which was different from the conditions used in the solution-batch synthesis (−78 °C); however, the Thorpe reaction occurred at elevated temperatures, which consumed the starting nitrile39, and excess MeCN and LDA reagents were required to ensure a full conversion. The optimal conditions for the SNAr in solution-phase synthesis gave less than 30% conversion in SPS. We suspected that the low reactivity may be caused by the limited swelling of the polymer resin in the DMSO solvent, which may limit substrate diffusion into the matrix. Using 1,4-dioxane as a co-solvent—which allowed more pronounced resin swelling—successfully promoted the SNAr to full conversion. The purification was performed by a simple filtration between each step and a final crystallization from methanol and ethyl acetate. This six-step SPS afforded pure prexasertib TFA salt in 53% overall yield (Supplementary Fig. 9).

As we intended to establish an SPS-flow-based CRF for prexasertib and apply it to derivative synthesis (see below), we attempted a straightforward translation from the SPS-batch synthesis to SPS-flow synthesis without optimizing each transformation again (for example, reaction time, the amount of reagents), even though it is well established that the biphasic solid–liquid interaction is substantially intensified in the flow mode14,40. The direct translation from SPS-batch to SPS-flow may offer more efficient reactions to ensure reasonable conversions for a broad range of different substrates. The established SPS conditions were successfully transferred to the SPS-flow synthesis by incorporating solvent washing steps. Circulating flow was applied for transformations requiring longer reaction time (≥1 h, including the protection, SN2, hydrazine condensation and SNAr steps). Direct one-way flow was employed for the Claisen condensation and the final cleavage step. Argon purging was used to improve the washing efficiency and to mitigate clogging risks associated with the Claisen condensation, which involves the use of LDA. A CRF was therefore established as illustrated in Fig. 3b. Notably, LDA, which is an extremely moisture-sensitive reagent, was successfully incorporated in the middle of this multistep synthesis, which is challenging in solution-phase continuous-flow multistep syntheses due to reagent and solvent incompatibility. An automated push-button synthesis based on the CRF was achieved with LabVIEW programming, which specifies the process modules, the fluid and argon paths, the location of stock solutions and solvents, the flow rates and the temperature (Supplementary Tables 3 and 4). A fully automated 32 h continuous synthesis with two grams of resin afforded 635 mg of prexasertib as the TFA salt (65% yield) after crystallization. High-performance liquid chromatography analysis showed that the purity of the product was >99.9% (Supplementary Fig. 16). An animation of the entire protocol is demonstrated in Supplementary Video 1. The digital defined CRF and the standardized reactor system allow the storage of this API synthesis digitally for implementation on demand.

Automated synthesis of a library of prexasertib analogues

The most prominent advantage of the SPS-flow-based CRF is the versatility, which can be adapted to different types of chemistry, and allows each synthetic step to be considered independently that can in principle be replaced without disturbing the other steps. This enables not only late- but also early stage diversification in an automated manner, which is particularly useful for de novo design and synthesis of drug molecules where structure–activity relationship studies based on initial core structures are instructive for targeted selectivity profiles41. To showcase this capability, we prepared a library of twenty-three prexasertib analogues by directly applying the CRF or changing only one step in the six-step CRF including both early and late-stage diversification (Table 1). A simple condition evaluation and optimization for just the altered step was performed at the SPS-batch stage when switching reaction patterns to establish a modified CRF, which was then applied to automated SPS-flow synthesis. The generated CRFs were directly applied to different substrates at the automated SPS-flow stage for derivative synthesis. By replacement of 2-chloro-5-cyanopyrazine with pentafluoropyridine in the SNAr reaction, but otherwise following the same CRF, prexasertib analogue 8 was prepared in 52% isolated yield. Amide derivatives (917) were then accomplished in generally good yields by simply replacing the SNAr reaction with an amide coupling in the CRF, without altering the other steps. A fast cleaning procedure taking less than two hours was established between the production of each derivative (Supplementary Fig. 22). By replacing the SNAr transformation with a two-step reductive amination or an N-triflation transformation, 18 and 19 were produced in 43% and 45% yield, respectively. By conducting a Mitsunobu reaction in the CRF rather than an SN2 transformation in the second step, while keeping the other steps the same, the TFA salt of prexasertib (7) could still be generated in 57% yield. Different aryl and heteroaryl moieties could be incorporated into the scaffold by changing the stock reagents in the Mitsunobu reaction to realize early stage diversification, furnishing products 2029 in 13–63% isolated yields, with some of the products being obtained in enantiopure form. The last analogue, 30, was specifically chosen to demonstrate the versatility and diversity of this CRF strategy. A click reaction was used instead of the original SN2 transformation to produce 30 in 49% isolated yield in a push-button approach followed by a simple off-line crystallization.

Table 1 Automated synthesis of prexasertib and derivatives by simple adjustments of the established CRF


By integrating SPS and flow synthesis, we have developed a simple and compact platform for the on-demand automated synthesis of a drug molecule and its derivatives. Prexasertib was prepared in a six-step protocol in good yield as a proof-of-concept, and the generated CRF was modified for the synthesis of another twenty-three analogues by simply switching the stock reagents or changing only one of the synthetic steps. When compared with existing automated multistep syntheses of non-peptide pharmaceutical molecules, the merits of this strategy include: first, automation of multistep syntheses with longer steps, which are compatible with a much wider range of reagents (for example the pyrophoric LDA reagent) and reaction patterns by alleviating the reagent and solvent incompatibility issues—to the best of our knowledge, our synthesis of prexasertib represents the longest linear end-to-end automated synthesis of non-peptide APIs. Second, an extremely simple and compact platform (fit within the area of half a standard fume hood) compared with other automated multistep syntheses—this platform is versatile and can be used for different targets without physical reconfiguration. Third, straightforward establishment of the CRF by translation from solution-batch to SPS-flow synthesis (approximately six months to establish the CRF of prexasertib with the joint efforts of a postdoctoral fellow and a graduate student). Fourth, the synthesis of the target molecule can be stored digitally as a CRF for implementation on demand. Finally, the generated CRF can be directly adopted or slightly modified for the automated synthesis of lead derivatives through both early and late-stage diversification, enabling a push-button access to much wider areas of chemical space.

Analysis of the top-selling 200 small-molecule pharmaceuticals indicates that automated SPS-flow synthesis could potentially be applied to a wide range of pharmaceutical molecules. For the small molecules that lack an obvious handle for covalent attachment to a solid support, simultaneous advances in linker strategies42 and traceless SPS43,44 can substantially expand the scope of molecules that are amenable to this strategy. The desire for process intensification (for example, to decrease overall reaction time); the need to tolerate solid reagents; the development of more economic solid-supports with diverse functional anchors; the combination of reagent preparation, synthesis and downstream purification and formulation into a single, compact unit; the realization of large-scale production45; and parallel assembly of two SPS-flow column reactors or a solution-based continuous-flow system with a SPS-flow column reactor for convergent synthesis can further enhance the value and extensively expand the scope of this strategy. We anticipate that the integration of the SPS-flow technology with computer-guided molecule design and optimization, automated biological testing and feedback analysis will dramatically accelerate the time frames for the lead optimization process46.


Generation of the CRF for prexasertib

The synthetic routes and reaction conditions were obtained from optimized solution- and solid-phase syntheses in batch conditions (Fig. 3a and Supplementary Fig. 9). The conditions of each step were independently defined, including reagents, the amount of reagents, temperature, solvents and the reaction time (Supplementary Sections 4 and 5). The established SPS conditions were transferred to the SPS-flow synthesis by incorporating solvent-washing steps (Supplementary Table 2). Argon purging was used to improve the washing efficiency and to mitigate clogging risks. The CRF for perxasertib was therefore generated as illustrated in Fig. 3b, which was programmed and edited in the form of a Microsoft Excel file (Supplementary Table 3). The Excel file was saved as a tab-delimited.txt file, which can be loaded to the control program to achieve the automated synthesis.

SPS-flow system assembly and execution for automated synthesis of prexasertib

The SPS-flow system was assembled based on the established CRF (Supplementary Figs. 2 and 14), consisting of one peristaltic pump, one continuous syringe pump, two ten-port selection valves, two 16-port selection valves, one column reactor loaded with solid resins (2 g), one remote-controllable stir heat plate equipped with an oil bath, and a computer acting as the control station. All units were logically connected using perfluoroalkoxy tubing and accessories. Vessels filled with the solvents or reagent solutions, and vessels for waste and product collection, were placed in proper locations and connected to the valves accordingly (Supplementary Table 4). The size of the column reactor was defined based on the swelling property of the 2-chlorotrityl chloride resin in various solvents (Supplementary Fig. 10). The automation control program was developed on LabVIEW and the operation code is available in Github (see the Code Availability). The operation instructions have been described in Supplementary Section 7. The synthesis was initiated by pushing the start button on the program interface, and the automated operation lasted for 32 h. After the process was finished, the crude product in the collection vessel was concentrated and subjected to crystallization to give 635 mg of prexasertib as the TFA salt (65% yield). After a fast cleaning procedure (Supplementary Fig. 22), the SPS-flow system was ready for the next implementation.

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Online content

Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at