Peter
Sagmeister
ab,
Lukas
Melnizky
ab,
Jason D.
Williams
*ab and
C. Oliver
Kappe
*ab
aInstitute of Chemistry, University of Graz, NAWI Graz, Heinrichstrasse 28, 8010 Graz, Austria. E-mail: jason.williams@rcpe.at; oliver.kappe@uni-graz.at
bCenter for Continuous Flow Synthesis and Processing (CC FLOW), Research Center Pharmaceutical Engineering GmbH (RCPE), Inffeldgasse 13, 8010 Graz, Austria
First published on 1st July 2024
In modern pharmaceutical research, the demand for expeditious development of synthetic routes to active pharmaceutical ingredients (APIs) has led to a paradigm shift towards data-rich process development. Conventional methodologies encompass prolonged timelines for the development of both a reaction model and analytical models. The development of both methods are often separated into different departments and can require an iterative optimization process. Addressing this issue, we introduce an innovative dual modeling approach, combining the development of a Process Analytical Technology (PAT) strategy with reaction optimization. This integrated approach is exemplified in diverse amidation reactions and the synthesis of the API benznidazole. The platform, characterized by a high degree of automation and minimal operator involvement, achieves PAT calibration through a “standard addition” approach. Dynamic experiments are executed to screen a broad process space and gather data for fitting kinetic parameters. Employing an open-source software program facilitates rapid kinetic parameter fitting and additional in silico optimization within minutes. This highly automated workflow not only expedites the understanding and optimization of chemical processes, but also holds significant promise for time and resource savings within the pharmaceutical industry.
Digital and data-rich methods are becoming omnipresent in process development workflows. During preliminary optimization efforts, synthetic route scouting is often augmented by computer-aided synthesis planning (CASP) tools, including machine learning (ML) algorithms.6 Reaction optimization within the chosen route can be performed using a myriad of data-driven approaches, including closed-loop optimization.7 Further detailed reaction optimization and modeling then provides additional understanding toward a robust procedure. Finally, by combining reaction models with reactor models, the entire process stream can be simulated, resulting in a digital twin that can be used to track the state of the product at any point in space and time.
Due to this wide variety of data-driven tools, process development is an interdisciplinary exercise, requiring expertise from synthetic chemists, analytical chemists, data scientists, chemical engineers and more (Fig. 1, top). The synthetic route, process models, and control strategy are typically developed individually, resulting in overlapping tasks and a significant extent of repetition. Although continuous processing (flow chemistry) offers many benefits, such as enhanced product quality, increased efficiency, and cost savings,8–12 developing such processes requires even more of a multidisciplinary team of scientists and engineers from various backgrounds. By unifying and automating the experimental and modeling steps in this workflow, we anticipate significant savings in time and materials, alongside enhanced control of the resulting processes.
Despite the range of advanced methods available, many reactions, particularly in flow, are still optimized by changing one variable at a time (OVAT) with offline analysis of the results.7 Automation, data-rich experiments and real-time process analytics can drastically accelerate development and collect process-relevant data quickly and efficiently.13–15 Self-optimization and automated Design of Experiments (DoE) have been proven to be excellent methodologies for screening a broad process space and finding optimal process conditions.16–21 The material consumption for these optimization methodologies can be drastically reduced by the use of droplet or slug flow platforms.22–25
Kinetic models, due to their physics-based nature, generally provide more useful information on the reaction than empirical models, such as response surfaces generated from DoE experiments. Therefore, their use is preferred for process modeling, particularly for flow processes, which benefit from knowledge of reaction progress in both space (along the reactor) and time. Numerous platforms have been developed to establish and parameterize kinetic models using data generated in flow, but these either focus on a specific reaction type (not applicable to general synthetic organic chemistry),26,27 use relatively simple data-processing methods (pre-developed chromatography methods or spectroscopy considering only a single peak),28–31 or require a high degree of manual data processing.32–36
The aforementioned kinetic model parameterization platforms generally rely on single data points, which are measured once the reactor has reached steady state. Utilizing dynamic experiments can drastically accelerate the collection of dense datasets.37 In these experiments, ramps over time are executed to explore the design space. This dynamic change is followed with process analytical technology (PAT) and the collected data must be time-adjusted to match the corresponding input setpoints. Several approaches have been described in the literature in recent years, including ramps for a single process variable (often residence time)29,38,39 or multiple process variables simultaneously.40–48 Of these examples using dynamic experiments for kinetic model generation, additional offline work was required to obtain accurate concentration values from complex reaction mixtures.
The implementation of PAT and data processing models is still a substantial hurdle for non-specialist chemists.49–51 This typically requires expert knowledge to develop and calibrate data processing (chemometric) models, in a time- and resource intensive procedure. Automating the workflow for collection, data processing and model generation from dynamic experiment data will drastically accelerate process development timeframes.
The use of data-rich workflows also plays an important role in advancing sustainability and green practices across the pharmaceutical industry. There exists a large number of sustainable synthesis procedures that do not receive their warranted attention, often due to a lack of data and understanding around their operation and broader applicability. An excellent example of such a methodology is the 1,5,7-triazabicyclo[4.4.0]dec-5-ene (TBD)-catalyzed amidation of esters,52–55 which obviates an ester hydrolysis step and the use of a stoichiometric coupling agent.56,57 To increase uptake of such sustainable synthesis methodologies, data-rich experimentation facilitates rapid scoping, allowing chemists to make informed, data-driven decisions. Real-time monitoring and advanced data analytics can then accelerate process optimization and the development of science-based control strategies, which secure medicine supplies and prevent waste in manufacturing.
To fulfill all of these requirements, we endeavored to establish a platform that calibrates process analytics, collects optimization data in a dynamic flow regime, and parameterizes a process model for scale-up in less than a working day (<8 h, Fig. 1, bottom). This optimization platform has a high degree of automation, but still includes the operator in the loop. The calibration of PAT is performed using a standard addition approach58 in continuous flow. The standard addition data trains a partial least squares (PLS) regression model for species quantification. This model is then applied to the collected dynamic flow experiment data in a broad process space. The processed analytical data is fed with all process inputs into a software program, which is coded in Julia. The program is capable of fitting kinetic parameters and creating a process model that can be used for in silico optimization and to guide scale-up. The developed workflow is showcased with a broad scope of amidation reactions between esters and amines and the two-step synthesis of the API benznidazole (alkylation followed by amidation).
The proposed “dual modeling approach”, detailed in this manuscript, combines the development of a PAT strategy and reaction optimization in one synergistic workflow. This highly digitalized workflow is separated into two parts, which are simultaneously executed on one platform (Fig. 1, bottom). The platform can be comprised of any flow chemistry equipment and different process analytics. A degree of automation is necessary to send new setpoints to the flow equipment over pre-determined time intervals. To follow this precise workflow, two valves should be present in the setup, allowing the reactor to be bypassed, dosing the product to the reaction stream before or after the reactor. This allows for maximum flexibility in terms of quick PAT calibration and investigation of the reaction design space.
A standard addition approach in continuous flow is utilized to calibrate the PAT. Similar to a batch standard addition,58–60 different concentration levels are measured by varying the pump flow rates accordingly. Bypassing the reactor enables steady-state conditions to be reached rapidly, facilitating fast acquisition of the concentration level data. Product calibration is achieved by continuously spiking a known concentration of product to the reactor outlet.
The standard addition is utilized to assign concentration values to each recorded spectrum. The labelled spectra with concentration values are then used to train and validate a PLS regression model. The PLS model is generated within this workflow through either automated means using a Python program or by an operator using chemometrics software (in our case PEAXACT software from S-PACT).
Dynamic experiments are automatically executed after the calibration stage to explore the reaction design space. Different reaction conditions are explored with single parameter- or multiple parameter ramps. Steady states between the dynamic ramps facilitate the data evaluation and act as points of validation in the results.
Process models from the acquired dynamic experiments are generated using software coded in the programming language Julia. Julia focuses on scientific computing, data analysis and statistical programming.61 It is an open-source programming language and utilizes precompiled code, which accelerates the execution of the code. The developed software fulfills the data handling, the definition of the chemical reactor, the identification of kinetic parameters, and performs in silico optimization with the generated process model within minutes.
The input parameters from the reactor and measured concentration values from the dynamic experiments are read by the software. The operator has only to define the reaction network and the reactor configuration in the software. The kinetic parameters are fitted by employing a cost function, which compares the measured results to the computed results from the kinetic parameters and inputs. A global optimization algorithm (NLopt-BOBYQA)62 is employed to find the global best fit for the kinetic parameters. The global optimum is then refined using a simplex algorithm (Nelder–Mead). The obtained kinetic parameters are combined into a process model, which can be used for in silico optimization, such as identifying the Pareto front of competing objectives or simulating any other point of interest.
The continuous flow setup was comprised of commercially available flow equipment, automated and controlled with an orchestrating software (Fig. 2B). In order to minimize the void volume of the transfer lines, polytetrafluoroethylene (PTFE) tubing with an inner diameter of 0.3 mm was utilized. The feed solutions of ester, amine, TBD, solvent, and the amide product were prepared in MeTHF/MeCN (9 + 1 v/v) and introduced by HPLC pumps. The ester, amine, TBD and solvent feeds were mixed in a 7-port mixing unit (with 2 blocked ports). An automatic 6-port valve (valve 1) was utilized to either (position A) direct the reaction mixture through a stainless steel reactor coil (5.67 mL, 0.8 mm i.d.) placed on a heating block or (position B) guide it directly to a Fourier transform infrared spectrometer (FTIR). Another automatic 6-port valve (valve 2) was used for calibration purposes, to dose the amide product either directly before the reactor (position A) or after the reactor (position B) via a T-piece. The system was pressurized with a membrane-based back-pressure regulator (set to 18 bar).
The experimental workflow for the calibration of the FTIR was automatically executed and a standard addition approach was used. First, 6 different levels of ester, amine, TBD and solvent were generated and directly analyzed by FTIR, without passing through the reactor (Fig. 3A). The product standard addition was performed by allowing a certain reaction composition to pass through the reactor, then dosing 6 different concentrations of product to the outcoming reaction mixture (Fig. 3B). The assignment of the concentration values with the standard addition is outlined in detail in the ESI.†
Each calibration level operated for a duration of 3 minutes and necessitated the consumption of the following quantities: 9.4 mL of 2.5 M ester solution (24 mmol), 16.3 mL of 2.5 M amine solution (41 mmol), 6.9 mL of 1.5 M product solution (10 mmol), 26.3 mL of 0.5 M base solution (13 mmol), and 30.8 mL of solvent. The operation of 3 minutes for each concentration level allowed 18–20 FTIR spectra to be measured (15 s acquisition time per spectrum). Further decreasing the material consumption could be achieved by shortening the run time for each concentration level, resulting in fewer spectra. A quantity of ≤5 spectra per concentration level should be sufficient to build a PLS model, thereby consuming only a quarter of the aforementioned amounts. If necessary, this quantity could be even further reduced by lowering flow rates, or even stopping the flow to allow additional time within the FTIR flow cell. However, it should be kept in mind that complete mixing of the input streams must be ensured by the time the mixture reaches the analysis point.
The amine pump was also turned off during the standard addition process to investigate if an intermediate species between the ester and the TBD could be observed, with or without passing through the heated reactor coil (Valve 1 in position A or B). In each case, no significant decrease in the ester concentration was observed, implying that the active intermediate does not form (in appreciable quantities) in the absence of an amine nucleophile. This is in agreement with previous reports, whereby the formation of an acylated TBD intermediate is reversible65 and has only been isolated in reaction with specific lactone substrates.66
In theory, low level impurities could also be calibrated using standard addition workflow. This is often used in analytical chemistry methodologies using quantification methods with ICPMS, UV/vis, etc. However, low-level impurities cannot be accurately detected/quantified with FTIR. This is due to the overlapping peaks and low sensitivity of the FTIR. The limit of detection for FTIR is generally in the range of 10–20 mM, depending on the other components and signal intensities.
Two methods of building a PLS model were investigated: (1) automated PLS model generation in Python and (2) manual PLS model generation in PEAXACT (by an operator). Typically, 12 different concentration levels from the standard addition were used as training data for the PLS model. Both approaches provide similar results, however the automated approach reduced the PLS model generation time from an hour (depending on experience of the user) to a few minutes. Applying a first derivative pretreatment to the raw spectra provided improved results compared to second derivative or no derivative. Multiple PLS models were generated for the different substrate combinations with both processing approaches. The obtained results (ranks for the PLS model, RMSEs and mass balances) from both approaches provided similar results and are explained in detail in the ESI.†
The root mean square error of cross validation (RMSECV) for the different esters 1, amines 2, TBD and the formed amide products 3 were between 18–68 mM, 30–214 mM, 9–50 mM, and 12–42 mM, respectively. In most dynamic flow experiments, the relative error for the mass balance of ester and amine was below 10%, which is within the uncertainty of the PLS model. In almost all experiments a higher error in mass balance was observed for TBD. Predictions for the amine typically had more noise compared to product and ester predictions. This might be explained by limited characteristic bands in the spectrum (only two bands observed in the fingerprint region below 800 cm−1) for the amine substrates.
The dynamic experiments were executed as a set of 6 different experimental points (Fig. 3C) to explore a broad chemical space. Three different temperature levels (180 °C, 190 °C, and 200 °C) were investigated, with two dynamic ramp sets for each. The ester concentration was varied between 0.3 M and 0.5 M. The equivalents of amine and TBD were varied between 1.0–2.0 and 0.25–0.50, respectively. Product inhibition was investigated in the last experiment by adding 0.15 M (0.3 equivalents) of product to the reaction mixture. At the beginning of the dynamic experiment the system was equilibrated to steady state (for 5 min) with a residence time of 1 min. Then, a residence time ramp over 15 min was executed, from the shortest residence time of 1 min to the longest of 10 min. At the end of this ramp, the system was allowed to reach steady state again for 10 min. Then, the change to the next set of reaction conditions was achieved by dynamically changing all reaction parameters (residence time, temperature, equiv. amine, equiv. TBD, and concentration of ester) over 15 min. The resulting experimental program consisted of 4.5 h, resulting in a total time of 6 h, when combined with the initial calibration/standard addition levels.
The input data and processed FTIR data from the dynamic runs were saved in a standard spreadsheet file format by the operator, then moved to the correct directory to be read by the developed software in Julia (Fig. 4). The timestamps of the process parameters and measurement points were automatically interpolated to a uniform time axis. The operator must simply define the reactor setup (volume) in the software. In our case the reactor setup was comprised of two different segments. The first segment was the heated reactor part and the second segment was the tubing to the measurement point. Another input for the software is the reaction network. The change of reaction component concentrations, as a function of the transport and the kinetics, can be simulated with differential equations. Different global optimizers have been tested and the NLopt-BOBYQA algorithm was found to be most favorable in terms of performance and speed (see ESI†). Additionally, the refinement of the optimized parameters is achieved using a Nelder–Mead algorithm. The boundaries for the refinement are within +5% to −5% of the obtained global optimum.
The reaction kinetic parameters were fitted with a single- and two-step reaction network (Fig. 5A). The developed Julia software is able to fit reaction orders, the Arrhenius pre-exponential factor (A) and activation energy (EA). For better comparison between each amidation reaction a two-step reaction network was used and the reaction orders were fixed to 1 for ester, amine, TBD and intermediate. In the first reaction the ester is activated by TBD to form an active N-acyl intermediate. This intermediate then reacts with the amine to the corresponding amide product, regenerating TBD.
It should be noted that the aim of this investigation was not to ensure a mechanistically-accurate model, but to build simple and highly useable predictive models for optimization purposes. Accordingly, this relatively simple mechanism made the assumption that no side products were formed, since no major unexpected species were observed during initial trial reactions. The first reaction step (activation of the ester to form the N-acyl TBD intermediate) was assumed to be rate limiting, since the initially-fitted EA parameters were significantly higher for this step than the second.
In general, a good fit of the kinetic model was achieved with all substrate combinations. However, for less reactive substrates (e.g., 1d + 2b) only a minor extent of product formation was observed. As a result, the product quantification using the PLS model had a large relative error, which had a knock-on effect to the kinetic model fitting for all concentration values. For other use cases, this should not be problematic, since the user will be most interested in reaction conditions that form a higher product concentration, while reactions will likely be abandoned if product formation is too low for accurate quantification. Details and parity plots for all kinetic model fits can be found in the ESI.†
In total 10 different amidation reactions were investigated, including a comparison of different benzoic esters: methyl vs. ethyl vs. isopropyl ester (Fig. 5B). The activation energy (EA1) and pre-exponential factor (A1) for the activation of ester (step 1) are displayed in Fig. 5C. The corresponding activation energy values fitted for the second step (EA2) were substantially lower in all cases, implying that the first step was rate limiting. Accordingly, the values fitted for step 1 were used to compare different reactivities. Although this cannot be confirmed, it does make mechanistic sense, since the N-acyl intermediate concentration was not observable for any of the tested substrates.
The activation energy for the reaction of pyridine-based ester 1a with the different amines 2a, 2b and 2c was 21.0 kJ mol−1, 29.1 kJ mol−1, and 24.6 kJ mol−1, respectively. This reactivity follows a trend for amine nucleophiles: primary > cyclic secondary > acyclic secondary (2a > 2c > 2b). The same order of reactivity was also observed for carbocyclic ester 1b. Activation energies of 26.7 kJ mol−1, 34.0 kJ mol−1, and 31.9 kJ mol−1 were fitted for its reaction with 2a, 2b and 2c, respectively. Although the reactivity order of cyclic vs. acyclic secondary amines follows known nucleophilicity scales, the primary amine would be expected to be less reactive.67 This implies that other factors, such as steric effects or hydrogen bonding capabilities, have an increased influence in this reaction.
The electron-deficient nature of heterocyclic ester 1a significantly enhanced the reaction rate compared to carbocyclic ester 1b. The increased reactivity was reflected in the lower activation energies for 1a in reactions with all three different amines. This is in agreement with the reported large positive Hammett substituent constant for a 3-pyridyl substituent (σ = +0.55).68
A slightly lower activation energy of 26.7 kJ mol−1 was obtained for 1b compared to 1e (29.6 kJ mol−1) in the reaction with 2a, quantifying the difference in reactivity between aromatic and aliphatic esters. By means of comparing the influence of the alkoxy group on ester reactivity, the methyl moiety (1b) had a lower activation energy than ethyl (1c), which was lower than the sterically bulky isopropyl group (1d). Although this trend would be expected (methyl > ethyl > isopropyl), we have quantified the relationship between these esters. Interestingly, this study has also demonstrated that the reactivity of both the amine and ester partners are of key importance to achieving successful reaction, which is not immediately intuitive when considering the mechanism proceeding via a TBD N-acyl intermediate.
Finally, we have also demonstrated that the kinetic parameter fitting is not restricted to a specific set of experimental setpoints. This was evidenced by the fact that similar kinetic parameters were obtained for the reaction of 1a with 2a in a dynamic experiment using different (less forcing) experimental setpoints (see ESI† Section 6.2 vs. Section 6.12). Although it would be assumed that the kinetic model would be less applicable to conditions outside of its initial boundaries, this implies that its predictive nature remains relevant over a broader range.
The alkylation step was carried out in a similar setup as described for the aforementioned amidation reactions. The feed solutions of 4, 5, triethylamine (TEA) and 6 were prepared in ethanol. The solubility of 4 was increased by adding 1.1 equiv. TEA to the stock solution. The reactor coil was switched to a 2.79 mL perfluoroalkoxy alkane (PFA) coil and the BPR was set to 18 bar. During the dynamic experiments for the alkylation step, the concentration of 4 was varied between 0.3 and 0.5 M and the temperature was varied between 60 and 120 °C. The loading of 5 and TEA were varied between 1.0–2.0 and 1.35–2.0 equivalents, respectively. The residence time ramps were between 1 and 10 minutes.
Using the same workflow described above, the FTIR calibration was performed by the standard addition approach, prior to performing dynamic experiments. The auto-generated PLS model had a RMSECV of 43 mM, 42 mM, 18 mM, and 46 mM for 4, 5, TEA, and 6, respectively. This PLS model was applied to the dynamic run, then the process parameters and FTIR results were fed into the Julia software. The kinetic parameters were fitted as a trimolecular single step reaction, with fixed reaction orders of 1 for 4, 5 and TEA. The fitted pre-exponential factor (A) was 1.986 × 105 L2 mol−2 with an activation energy (EA) of 49.5 kJ mol−1. The activation energy in this case was higher than that of all previously-examined amidation reactions, meaning that the rate of the alkylation has a comparatively higher temperature-dependence.
Another advantage of building a process model, such as this, is the opportunity to perform further in silico optimization. As an example, optimization was performed using the NSGA-II algorithm to find a Pareto front of the two opposing objectives: conversion and space-time yield (Fig. 6B). Points in red show the Pareto front, which is a series of optimal points showing the trade-off between the two objectives. A large number of random results (gray points) were also generated to demonstrate that none of these would surpass the Pareto front. Following this optimal front, a maximum space-time yield of 3.2 kg L−1 h−1 of 6 can be achieved when ensuring conversion >95%. Should a higher conversion of >99% be required, a maximum space-time yield of 1.9 kg L−1 h−1 of 6 would be attainable. It should be noted that this type of analysis can readily be carried out for any desired combination of objectives. The corresponding process setpoints can be obtained and utilized in future experiments.
In the amidation step the feed solutions of 6, 2a, TBD and 7, were prepared in DMSO, due to poor solubility in the previously-used MeTHF/MeCN solvent system. The same reactor setup was used as for the previous reaction step. The dynamic runs screened the following chemical space: 0.3–0.5 M of 6, 1.0–2.0 equiv. 2a, 0.0–0.5 equiv. TBD, temperature 50–120 °C, and residence time 1–8 min. In the last experimental point, the concentration of TBD was completely omitted to confirm that no reaction was observed.
The PLS model for the FTIR measurements to follow the dynamic runs was developed with the previously described methodology. The RMSECV for the compounds 6, 2a, TBD, and 7 were 24 mM, 33 mM, 11 mM, and 28 mM, respectively. The kinetics for the amidation step were fitted with the same reaction mechanism as described above (Fig. 5A). The following kinetic parameters for the first step (intermediate formation) were fitted: A1 = 7.524 L mol−1 and EA1 = 14.19 kJ mol−1. In the second step (formation of product), the best-fitting parameters were: A2 = 6.659 L mol−1 and EA2 = 11.5 kJ mol−1.
The optimal operating space (Pareto front) was identified using an in silico multi-objective optimization for residence time and conversion (Fig. 6D). It can be observed that residence times of 4.25 min can still provide conversion >99% with a space-time yield of 1.8 kg L−1 h−1. Increasing the space-time yield to 2.8 kg L−1 h−1 results in a decrease of residence time to 2.6 min, providing 95% conversion.
This dual modeling approach was applied to a rarely-used protocol for sustainable amidation reactions. By examining a range of different substrate combinations, insights into the different kinetics for each substrate were gained. Accordingly, a better understanding of the compatible reaction substrates can be inferred. We then expanded this approach to the two-step synthesis of the API benznidazole, where both the alkylation and amidation reactions proved to be amenable to this approach. The developed reaction models were also utilized for in silico optimization, whereby different objectives, and the trade-offs between them, can be rapidly explored without additional experimental effort. Such straightforward transferability different reaction systems, without prior work required, and general applicability to organic synthesis problems represents a significant advantage compared to previous workflows.
Following on from this initial dissemination, we expect the dual modeling approach to be utilized in a wide range of future studies. For example, the method can be used to rapidly determine the Hammett reaction constant, ρ, for new synthetic methodologies and sustainable alternatives, providing predictable applicability for different substrate classes. Furthermore, we anticipate exploration of additional PAT instruments, such as chromatographic analysis, to provide more insight into impurities and allow more precise quantification of reaction intermediates. Different and more complex reaction kinetics, such as catalytic cycles, can also be modeled using this approach, by simply adjusting the reaction networks written into the Julia software. Bespoke Julia packages (e.g., catalyst.jl) can be utilized for this purpose.
Footnote |
† Electronic supplementary information (ESI) available: Further details of reaction setups, experimental results and NMR data. See DOI: https://doi.org/10.1039/d4sc01703j |
This journal is © The Royal Society of Chemistry 2024 |