Across‐the‐World Automated Optimization and Continuous‐Flow Synthesis of Pharmaceutical Agents Operating Through a Cloud‐Based Server

Abstract The power of the Cloud has been harnessed for pharmaceutical compound production with remote servers based in Tokyo, Japan being left to autonomously find optimal synthesis conditions for three active pharmaceutical ingredients (APIs) in laboratories in Cambridge, UK. A researcher located in Los Angeles, USA controlled the entire process via an internet connection. The constituent synthetic steps for Tramadol, Lidocaine, and Bupropion were thus optimized with minimal intervention from operators within hours, yielding conditions satisfying customizable evaluation functions for all examples.


Step 1 -Optimization performance
Data for each experiment trial are shown below. The value shown in the Eval. Function column corresponds to the value calculated by the control system using the evaluation function for this experiment ( Figure 2c in the main text).

Control strategy
There are three distinct phases to any multi-step process which must be considered when telescoping reaction sequences: process start up; continuous operation at steady state; and system shutdown. Each stage normally requires significant manual input from operators, for example to set equipment parameters following temporal or detector triggers during process start up and shutdown.
The structure of our control script was broken into three components ( Figure S1), to reflect each of the control phases. An expanded equipment view is shown in Figure S2. Figure S1. The automation strategy for the telescoped process was divided into three segments: the first handled process start up (items prior to dotted connection line); the second monitored conditions at steady state; and the third managed system shutdown (items after dotted connection line). System shutdown was initiated by the operator using the control system interface. Figure S2. Schematic of the telescoped synthesis of bupropion (12).

Start up
Our scripts first began by defining experiment variables and initializing equipment connected to our control system. The temperature of R1 was set and P1 and P2 were configured to pump solvent while coils were heated to maintain back pressure. When reactor temperature had stabilized, V1 and V2 were switched to reagent lines.
The initiation of our workup sequence began seven minutes later with the heating of D1. After three minutes the script turned on P3, P5 and P6, changed the position of V3 to direct material leaving R1 into the workup segment, and began the process of warming R2 coils for the amine alkylation reaction. P7 was set to pump solvent through R2 during this time, again to maintain back pressure. Simultaneously a new listener was created to monitor IR for the presence of intermediate 10 in the solution stream leaving C2.
This listener was triggered when the absorbance of the target wavelength rose above a 0.07 AU threshold for 60 seconds. At this time the position of V4 was switched to direct solution to M5, the solvent feed of P7 was replaced with tert-butylamine (11) solution and a listener created to monitor the value of the experiment variable startshutdownsequence. After a period of 30 minutes, the control system directed V6 to begin collecting bupropion (12); our system had now reached steady state.

Shutdown
Process shutdown was initiated when the value of the experiment variable startshutdownsequence changed from 0 to 1 by the Los Angeles-based operator. When this occurred, V1 and V2 were switched to solvent positions and the system waited for the signal from IR to fall below a 0.05 AU threshold for 60 consecutive seconds.
When compound 10 was no longer present in the stream leaving C2, our control system halted the workup sequence by switching V3 to waste, turning off P3, P5 and P6, and cooling C2. The system also began cooling R1 and directed its effluent to waste. As soon as the temperature of R1 fell below 30 °C, P1 and P2 were turned off.
At this time the system also initiated the shutdown of the second reaction, by switching the feed to P7 to solvent and raising its flow rate to 1.0 mL min -1 to maintain the 20 minute residence time for reaction mixture still held in the coil. After a 25 minute period, material leaving B4 was sent to waste, the flow rate of P7 was lowered to 0.5 mL min -1 and R2 was cooled. As soon as the temperatures of both R2 reactor coils had fallen below 40 °C, all remaining equipment was turned off and the experiment terminated.

Control system security considerations
A number of measures were taken to protect the system given its international arrangement, including the creation of specific firewall rules to allow connections only from authorized machines, the encryption of data in transit between the server, equipment and users, and the encryption of all data stored at rest on the server.
Precautions were not focused solely on security of our system, however. Any internet-facing computer can provide an attack vector for malicious actors to compromise other devices connected to the same network, such as departmental servers storing research data. Thus a virtual local area network (VLAN) was created for this project, into which was placed all equipment which restricted their communication to other VLAN devices only. If a breach of our network were to occur, this set up provided sufficient isolation that no other department devices could be affected.
In order to facilitate communication between the VLAN and our remote-control system, a server (LeyVM) was set up that was connected to both the VLAN and the Internet. LeyVM was unable to communicate with other devices on the University network and was shielded from inbound connections, ensuring that it could not act as a single point of failure in our security configuration.
Before an experiment was commenced on the control system, LeyVM initiated a reverse Secure Socket Shell (SSH) tunnel to the remote server, acting effectively as a bridge connecting the server in Tokyo to the VLAN and the equipment within. While this SSH tunnel was operational our control system could send commands to VLAN-connected reaction equipment as required. The SSH tunnel was closed when experiments were not active, isolating our Cambridge VLAN from exposure to external devices. The security arrangements for our set up are summarized in Figure S3. Flash chromatography over silica gel was performed on a Biotage SP1 purification system with prepacked SiliCycle silica cartridges (4, 12, 25 or 40 g). Melting points were performed on a Stanford Research Systems MPA100 (OptiMelt) automated melting point system using a gradient of 1 °C min -1 , and are uncorrected.
High resolution mass spectrometry (HRMS) within ±5 ppm was carried out on a Waters Micromass LCT Premier spectrometer using time of flight with positive ESI, or by Mr Paul Skelton on a Bruker BioApex 47e FTICR spectrometer using positive ESI or EI at 70 eV, to within ±5 ppm of the theoretically calculated value.
LC-MS analysis was performed on an Agilent HP 1100 series chromatograph (Mercury Luma 3µ C18 column) attached to a Waters ZQ2000 mass spectrometer with ESCi ionisation source in ESI mode. Elution was carried out at a flow rate of 0.6 mL min -1 using a reverse phase gradient of acetonitrile and water containing 0.1 % formic acid. The gradient run is as described in the table below. Retention time (tR) is in minutes and the m/z value is reported. Elemental composition microanalysis was performed by the Microanalysis Laboratories at the Department of Chemistry, University of Cambridge and results are reported to two decimal places.
A solution of ketone 1 (0.776 g, 5.0 mmol) in anhydrous THF (0.5 M, 10 mL) was pumped at 0.703 mL min -1 to a tee junction (PTFE) where it mixed with a stream of (3-methoxyphenyl)magnesium bromide solution (1.691 g, 8.0 mmol, 1.6 eq.) in THF (0.5 M, 16 mL) pumped at 1.125 mL min -1 . The combined solution was directed through two 10 mL reactor coils heated to 41 °C. System pressure was maintained using a 40 psi back pressure regulator.
Crude reaction mixture was partitioned between a mixture of ice and saturated aqueous ammonium chloride solution (25 mL), and diethyl ether (25 mL). The layers were separated following vigorous mixing. Following extraction of the aqueous layer with diethyl ether (3 x 25 mL), the combined organic phase was dried over magnesium sulfate before being concentrated under reduced pressure. Residues were dissolved in toluene (25 mL) and mixed with distilled water (25 mL). An aqueous solution of hydrochloric acid (1.0 m) was added slowly until the pH of the aqueous layer lowered to 3 (by indicator paper). Following phase separation, the aqueous layer was washed with toluene (3 x 20 mL), and the organic layers discarded. The pH of the aqueous solution was adjusted to 9 (by indicator paper) by slow addition of aqueous sodium hydroxide solution (1.0 m) before ethyl acetate was added (20 mL). Following vigorous mixing, the organic layer was dried over magnesium sulfate and concentrated under reduced pressure to afford the title compound (1.133 g, 4.3 mmol, 86 % by 1 H NMR with internal standard, 4:1 syn/anti ratio) as a brown oil.
Crude reaction mixture collected from the system was mixed vigorously with a saturated aqueous solution of ammonium chloride (30 mL). The organic phase was dried over magnesium sulfate and solvent removed under reduced pressure. DCM was slowly added until residues had dissolved completely, after which time the mixture was left until solvent had evaporated. Crystals of title compound (1.720 g, 8.7 mmol, 87 %) were collected as colourless needles.

2-Bromo-1-(3-chlorophenyl)propan-1-one (10)
The equipment layout for this flow procedure is shown in the main text (Figure 4a).  All recorded data were consistent with those reported previously.

Single flow reaction
The equipment layout for this flow procedure is shown in the main text (Figure 5a).
A solution of compound 10 (0.619 g, 2.5 mmol) in N-methyl-2-pyrrolidone (NMP) (0.25 M, 10 mL) was pumped at 0.25 mL min -1 to a tee junction where it was mixed with a solution of tert-butylamine (0.788 mL, 7.5 mmol, 3.0 eq.) in NMP (0.25 M, 29.2 mL) pumped at 0.75 mL min -1. The resulting solution was heated to 90 °C in two 10 mL reactor coils. System pressure was maintained using a 100 psi back pressure regulator.
Water (25 mL) was added to crude reaction mixture and the resulting solution extracted with diethyl ether (3 x 25 mL). The combined organic phases were washed with water (5 x 25 mL) before being dried over magnesium sulfate. Removal of solvent under reduced pressure following purification over silica (DCM/MeOH gradient elution, 0 % for 1 CV, 0 -10 % over 5 CV, 10 % for 25 CV) afforded the title compound (0.479 g, 2.0 mmol, 80 %) as a yellow oil that solidified in the refrigerator.

Telescoped flow procedure
The equipment layout for this flow procedure is shown in the main text (Figure 6a). The parameters described herein are for steady state operation.
A solution of 1-(3-chlorophenyl)propan-1-one in DCM (0.5 M) was pumped at 0.5 mL min -1 to a tee junction where it mixed with a solution of bromine in DCM (0.5 M) pumped at 0.5 mL min -1 via peristaltic pump. The combined solution was directed through a 10 mL reactor coil held at 44 °C. System pressure was maintained using a 100 psi back pressure regulator.
Eluting crude reaction mixture was mixed with 2.0 mL min -1 (HPLC pump) of sodium metabisulfite solution in water (2.0 M) and passed through an Omnifit column (100 mm length, ⌀ 10 mm) filled with eight magnetic stirrer bars which was placed on top of a stirrer plate. Phases were separated in a vertical Omnifit column (100 mm length, ⌀ 10 mm) from which the organic layer was removed at an average rate of 0.500 mL min -1 via peristaltic pump and mixed with a stream of NMP at 0.500 mL min -1 (HPLC pump) at a tee junction.
The combined solution was passed into a distillation column held at 110 °C from which solution was drawn at 0.610 mL min -1 via peristaltic pump and mixed with 0.390 mL min -1 of tert-butylamine solution in NMP (1.928 M). The resulting mixture was directed through two 10 mL reactor coils heated to 90 °C. System pressure was maintained using a 100 psi back pressure regulator.
Solvent was removed from a 10 mL sample of crude reaction mixture under reduced pressure and residues were purified using the process described above for the single flow reaction to afford the title compound (0.479 g, 2.0 mmol, 80 %) as a yellow oil that solidified in the refrigerator.