Introduction

Over the last decades, flow chemistry has garnered much attention in the pharmaceutical industry as it facilitates the efficient synthesis of Active Pharmaceutical Ingredients (API)s. Running the chemical reactions via continuous flow stream through milli- or micro-sized channels has a plethora of advantages compared to batch chemistry [1, 2]. Most importantly, the narrow channels of a flow reactor provide a larger surface-to-volume ratio, which leads to the efficient transfer of energy, improved control over the reaction pressure and enhanced mixing efficiency [3,4,5]. These features of a flow reactor make it feasible to run reactions at high or low temperatures and promote sustainability by mitigating the risk of working with hazardous materials and reducing the costs and environmental footprints. Moreover, flow chemistry is considered as Green Analytical Chemistry (GAC) due to decreasing the use of energy and reagents and eliminating wastes [6, 7]. Meanwhile, precise control over the reaction conditions raises the consistency of manufacturing high-quality products and facilitates the upscaling process [8, 9].

Coupling of flow reactors with analytical detection technologies allows the real-time and on-line reaction monitoring, facilitating process control. However, application of process analytical techniques such as Liquid Chromatography (LC), UltraViolet-Visible (UV-Vis) spectroscopy and Nuclear Magnetic Resonance (NMR) poses many challenges. Techniques such as NMR and UV-Vis fall short to study complex reaction mixtures over a large concentration range. In addition, the selective detection of molecules lacking UV-Vis chromophores becomes a challenge. With regard to the separation techniques, such as LC, the whole analysis cycle is relatively long and the reaction mixture is at the risk of decomposing within the column [10]. More importantly, it is challenging and rather time consuming to separate isomers, in particular stereoisomers, without a chiral column on LC [11]. Therefore, for the on-line reaction monitoring, there is a need for universal analytical detectors being sensitive, selective, while requiring short (micro to millisecond) analysis time.

Mass Spectrometry (MS) coupled with tandem mass spectrometry (MS/MS) and Ion Mobility Spectrometry (IMS) outperform other technologies by meeting the majority of the requirements for high quality reaction monitoring [12]. Unlike NMR and UV-vis, MS simultaneously separates reagents, impurities, intermediates, and products of a complex reaction in microseconds based on their mass over charge ratio (m/z). The IMS can surpass the limitations of LC by rapid (millisecond timescale) separation of isomeric compounds with high selectivity and improved signal-to-noise ratio [13]. Moreover, the separation of molecular ions based on their Collision Cross Section (CCS), size, shape, and charge by IMS enables elucidating structural information [14, 15]. Combined with MS/MS, the fragmentation pathways add to the potential to unambiguously assign the molecular structure of unknowns. Collision Induced Dissociation (CID) is one of the commonly used approaches in tandem mass spectrometry for survival yield analysis [16]. Hence, connecting a continuous flow chemical reactor to the IMS-MS and MS/MS, as an analytical tool, provides the possibility to monitor a reaction in real-time without stalling the production to collect samples in different steps of a reaction. In addition, the real-time information improves the process control by reducing chemical waste, measurement time and most importantly, leads to a new dimension to quality by design [17,18,19].

The (hetero) Diels-Alder (DA) cycloaddition reactions are frequently applied for the synthesis of medicinal drugs due to their relatively high stereo selectivity and efficiency [20]. Despite numerous benefits and the increased interest in utilizing flow reactors to run a (hetero-) DA reaction, pharma and chemical industries have been very slow in the transition from batch to flow processing. As mentioned, this is also due to the scarcity of suitable Process Analytical Technologies (PAT)s [18]. To accelerate this transition, a model hetero-DA reaction carried out in a microflow reactor and connected to the IMS-MS and MS/MS for the on-line monitoring of the reaction. Using this analytical technique, the reaction mechanism and structural isomers formed in the hetero-DA reaction were assessed and the potential of combined IMS-MS and MS/MS experimentation were profoundly investigated.

Results and discussion

A model hetero-DA reaction was carried out in the Chemtrix Labtrix® microflow reactor directly connected to the IMS-MS and MS/MS for the on-line monitoring of the reaction (Fig. 1). The molecular identifications and separations were studied by Trapped Ion Mobility Spectrometry (TIMS) and Traveling Wave Ion Mobility Spectrometry (TWIMS) incorporated in Quadrupole Time-Of-Flight (Q-TOF) mass spectrometer. The reagents and synthesized molecules were ionized by an Electrospray Ionization (ESI) and Atmospheric Pressure Photo Ionization (APPI). The reaction was monitored at different temperatures and residence times.

Fig. 1
figure 1

Schematic of the reaction set up to visualize the microreactor, main inlets, dilution inlets and connection to the MS analyzer

Hetero-Diels alder reaction

In organic chemistry, a wide range of biologically active compounds are synthesised by (hetero-) DA reactions. In particular, the formation of 1,2-oxazine compounds is of special interest to synthesise bioactive products or stabilize them and selectively functionalize natural products [21,22,23]. The 1,2-oxazine compounds are formed as a result of nitroso dienophile reaction with conjugated diene. Considering the importance of nitroso hetero-DA reactions in pharma [23], in this study, nitrosobenzene 1, as a dienophile, was exposed to react with methyl 2, 4-pentadienoate 2, as a diene, through a hetero-DA mechanism to form product 3 (methyl 2-phenyl-3,6-dihydro-2H-1,2-oxazine-6-carboxylate) (Fig. 2a). The reaction was performed in 4-methyl-2-pentanone (4M2P) solvent with high boiling point (116 °C) to prevent over pressuring in the microflow reactor within the range of tested temperatures (25–120 °C). The reaction efficiency in the microflow reactor was compared with the batch chemistry reaction.

Fig. 2
figure 2

Hetero-DA reaction schematics. a Reaction schematic of reagent nitrosobenzene (1) with reagent Methyl 2,4-pentadienoate (2) in 4-methyl-2-pentanone (4M2P) or acetonitrile (ACN) solvent. b Ring opening of molecule (3) to form isomeric molecule (4) and its dehydrated molecular structure (5). c Two possible reaction mechanisms of α-oxyamination and α-aminoxyation for the reaction of nitrosobenzene (1) with the solvent molecules (4M2P)

The characterization of the reaction elements by ESI and APPI – MS and MS/MS

Connecting the microflow reactor to the IMS-MS and MS/MS enabled the tentative structural identification of the reaction products, including side-products. The mass spectrum of the reaction outcome generated after ionizing by ESI and APPI sources are depicted in online resource Fig. S1a, b. The ESI-MS contained the ions at m/z 220 and 242, being respectively assigned as the [M + H]+ and [M + Na]+ ions of the reaction product 3. Although the reaction outcome ionized under soft conditions (Table. S1), the reaction mass spectrum included several fragment ions caused by upfront CID processes [24]. According to the tandem mass spectrometry of product 3, ions with m/z 202, 190, 170,160, 132 and 94 were being directly originated from the parent ion m/z 220 (online resource Fig. S1c).

To ensure regioselectivity of the hetero-DA reaction to form product 3, the reagents were reacted in batch with acetonitrile solvent, similar to a previous study [25]. According to the 1H and 13C NMR spectra (online resource Fig. S1d and 1e) the outcome of this reaction was consistent with the outcome of the microflow reaction.

The (fragment) ion at m/z 202 was formed by the loss of H2O from product 3. The tandem mass spectrum of the precursor ion m/z 202 showed a base peak at m/z 170 (online resource Fig. S2a). This fragment ion was formed due to the loss of methanol. This fragmentation pathway indicated that the loss of H2O from the molecule 3 did not occur from the ester group. The only remaining source of oxygen for water loss was in the oxazine ring. The oxazine could go through the ring opening process in the microflow reactor to form the molecule 4, subsequently lose a water molecule through the cyclization reaction to form a compound 5 (Fig. 2b). To further confirm this mechanism, the reaction product in the liquid phase was isolated and purified using preparative Thin Layer Chromatography (TLC) and tested by NMR. The NMR spectrum of the peak at m/z 202 showed a methyl group at 3.7 ppm as well as three protons of the pyrrole ring with sp2 environment, unlike the molecule 3 that had only two sp2 protons (online resource Fig. S2b). In addition, the absence of a proton at 5 ppm close to the ester group indicated the pyrrole shape of the molecule (Fig. 2b). Hence, the peak at m/z 202 was annotated as the molecule 5, which could be formed in the liquid phase due to the condensation reaction and/or in the gas phase due to the water loss from the molecule 4. Consistent with this finding, the N-O bond energy of molecule 3 is 201 kJ/mol, which is a smaller value than other bonds in the ring (C-C 347 kJ/mol, C-N 305 kJ/mol, C-O 358 kJ/mol) [26]. The relatively weak bond energy of N-O explains the position of ring-opening reaction to form molecule 4 from molecule 3. These results indicated that the investigated hetero-DA reaction formed two structurally isomeric molecules (3 and 4).

The peak at m/z 225 was annotated as the protonated dimer ([2 M + H]+) of the reaction reagent 2. The identity of this peak was confirmed by fragmenting the precursor ion (m/z 225) in collision cell and annotating the fragment peaks (online resource Fig. S3a). This reaction outcome was formed by self-dimerization of methyl 2,4-pentadienoate (2) and could be regarded as an impurity. It is because the dimer was already present in the commercial reagent prior to running the reaction. This observation was also verified by the impurities on NMR (online resource Fig. S3b).

The peaks at m/z 199 and 230 were identified as the side-products of hetero-DA reaction. Unlike the protonated ion of the main product (3), m/z 230 required higher collision energy (20 eV) to yield 70% disassociation. This observation implies that this molecule is more stable compared to the main reaction product and likely having a different molecular structure. Merino et al., suggests that ketone groups tend to react with nitroso groups by either α-oxyamination or α-aminoxyation mechanism (Fig. 2c) [27]. Hence, the nitrosobenzene reagent (1) could also react with the solvent 4M2P and form the side-products 6 and/or 7. This reaction pathway was confirmed by running an additional batch reaction with reagent 1 and 4M2P (without reagent 2) at 60 °C overnight. The mass spectrum of this overnight reaction was comparative to the spectrum of the hetero-DA reaction (online resource Fig. S4); in a way that both spectra included peaks at m/z 208 and 190. Based on the MS/MS analysis, these peaks were respectively [M + H]+ and [M + H-H2O]+ ions of the side-products 6 and/or 7. Consequently, the peak at m/z 230 is the sodium adduct of the side-products. The tendency of the side-product molecules to lose water suggested that the reaction occurred only through the α-oxyamination pathway to form side-product 6 rather than 7. The sodium adduct formation of the side-product 6 in the gas phase explains the stability of the peak at m/z 230 owing to sharing the positive charge of Na+ with oxygen of ketone and hydroxyl groups.

The identity of the low abundant peak at m/z 199 was also determined by MS/MS and verified by NMR analysis (online resource Fig. S5). As reported earlier [28], nitrosobenzene molecules can react with each other to form a dimer, which explains the peak at m/z 199 as the side-product of the reaction.

The APPI-MS data were comparative to the ESI-MS. The APPI source resulted in the formation of both [M]˙+ and [M + H]+ ions of the reaction products at m/z 219 and 220 respectively (online resource Fig. S1b). The APPI forms radical cations after being excited to high energic states or by electron transfer. In the latter case a neutral species such as toluene, known as Dopant (D), absorbs photon energy from the light source in the ionization chamber. The internally excited dopant (D) ionizes a neutral target Molecule (M) that has lower ionization energy by electron transfer. Consequently, the radical cations are formed (Eq. 1).

$${D}^{\ast }+M\to D+{M}^{+\bullet }+{e}^{-}$$
(1)

Since the hetero-DA reaction was performed in the 4M2P solvent, the reaction products were mainly protonated ([M + H]+). This is due to the high proton affinity (≈832.7 kJ/mol at 300 K) of the 4M2P solvent, which imposes the protonation of molecules through the Eq. 2.

$${\displaystyle \begin{array}{c}{\left[{S}_n+H\right]}^{+}+M\to {\left[{S}_n+M+H\right]}^{+}\\ {}{\left[{S}_n+M+H\right]}^{+}\to nS+{\left[M+H\right]}^{+}\end{array}}$$
(2)

When the solvent of the reaction was exchanged with dichloromethane, having a lower proton affinity (628.0 kJ/mol at 300 K) compared to 4M2P, the reaction products formed radical cations. This process demonstrated the versatility of the APPI source to utilize in a diverse range of organic synthesis with no restrictions on the solvent choice. Regardless of the solvent type, molecules are ionized either by proton or electron transfer. The ESI and APPI -MS-MS/MS data of the isolated batch reaction product were consistent with the acquired data from microflow reactor (online resource Fig. S6).

ESI and APPI-IMS-MS/MS

The ion mobility spectrometry of the reaction products was studied by TWIMS and TIMS instruments. Each technique has different separation mechanism as explained before [29]. Annotating the IMS of isomeric compounds becomes a challenge when there are no standard molecules for IMS comparison. This challenge is even more pronounced for the reactions leading to unknown isomeric forms of the main product. In such instances, even if each isomer is fragmented by MS/MS through a distinctive pathway, the tandem mass spectrum contains the fragment ions of all isomers, withholding the separation of isomers based on one/multiple unique product ion(s). The combination of ion mobility with tandem mass spectrometry brings another dimension to molecular ion identifications. By applying IMS-MS/MS approach, the generated fragment ions of each isomer will have the same arrival time as their parent isomer. Isomers could be separated and identified based on a unique daughter ion under different mobility peaks or unique Collision Energy (CE) that results in 50% survival yield (CE50). Ion mobility spectrometry also provides additional information regarding the 3D structure of each ion. This is possible by experimentally measuring the ion-neutral gas CCS and comparing it to the theoretically calculated CCS values.

The extracted ion mobility (EIM) of the ion at m/z 220 was reconstructed to plot its ion mobility spectrum. The plotted IMS showed a bimodal peak (Fig. 3a). The bimodal peak indicated the presence of at least two compounds with the same mass but different 3D structures. Therefore, the hetero-DA reaction produced two isomeric compounds (molecules 3 and 4) with the same m/z value but different mobility. This observation is in line with the represented mechanism for the reaction (Fig. 2b). The IMS of the radical cation at m/z 219, which was formed by APPI source, demonstrated better resolution than the protonated ion at m/z 220 (Fig. 3b). This could be due to the formation of intramolecular H bridges in protonated molecules, which increases structural similarity of 3 and 4. The IMS of the reaction elements were consistent regardless of the type of ionization source (APPI or ESI) and the ion mobility instrument (TWIMS or TIMS), even though TIMS resulted in better resolution data.

Fig. 3
figure 3

IMS and IMS-MS/MS analysis of the reaction products. a EIM of the protonated reaction products at m/z 220 analysed by ESI-TWIMS and ESI-TIMS. b EIM of the radical cation of reaction products at m/z 219 analysed by APPI-TIMS. c) Experimental survival yield of isomers upon ion mobility separation and CID at CE of 5, 10, 15, 20, 25, 30 eV. Filled blue circle corresponds to the isomer with short drift time (td 4-4.5ms) and filled orange triangle corresponds to the isomer with longer drift time (td 4.5-5ms). d Linear survival yield of the isomer at td 4-4.5 ms in filled blue circle and the isomer at td 4.5-5 ms in filled orange triangle. e Comparing the theoretically calculated CCS of the protonated molecules (3) and (4) on Nitrogen and ester groups with the experimentally derived TWIMSCCSN2 for the detected ion mobility peaks (dashed red lines)

Apart from the isomeric separation, it is also essential to annotate each ion mobility peak to a correct molecular structure. To this end, different methods were employed. One of the unique features of TWIMS-TOF is that a mass analyser quadrupole is placed before the ion mobility cell, which enables performing MS/MS on the isolated precursor ions after IMS (IMS-MS/MS). Since the internal energy of an ion and its decomposition reaction rate are structural dependent features, it is known that even isomeric chemical structures show unique stability and survival yield under CID [30]. Hence, for the first time, we employed IMS-MS/MS method to define the CE50 of the isomeric reaction products. The m/z 220 was first isolated in the quadrupole and then separated in the ion mobility cell followed by CID. When the precursor ions exposed to the increasing CE after IMS separation, isomeric ions’ survival decreased in a sigmoidal form (Fig. 3c). This graph transformed to a linear survival yield (Fig. 3d) to find the CE50 as reported earlier [30]. The results identified unique CE50 of 14.89 and 15.82 eV for the isomer with the short drift time (td 4–4.5 ms) and long drift time (td 4.5-5 ms) respectively. The molecule 4 could have higher stability due to its lower Gibbs free energy after opening the ring, caused by the formation of stronger bond (smaller ΔH) and increased flexibility (larger ΔS). To verify this assumption the minimum energy of both compounds was calculated by Density Functional Theory (DFT). Regardless of the protonation site, the molecular ion 4 always had lower global minimum energy than the protonated molecular ion 3 (Table. S2). These findings indicated the higher stability of the molecular ion 4 compared to 3. Therefore, based on CE50 and DFT calculations the drift time td 4–4.5 ms and 4.5–5 ms were respectively annotated to the molecular ions 3 and 4.

To further verify the identity of the annotated ion mobility peaks, the experimentally derived TWIMSCCSN2 was compared to the theoretically calculated CCS of the molecular ions 3 and 4. Table. S3 shows the calculated CCS values of the molecules 3 and 4 that were protonated on nitrogen or ester group. Based on the theoretically calculated data, the CCS of the protonated ion 4, regardless of the protonation site, was always higher than the protonated molecule 3, which was in line with the open structure of 4. Hence, the experimentally derived TWIMSCCSN2 value of 152.3177 ± 0.80 Å2 corresponds to the molecular ion 4 and the smaller TWIMSCCSN2 value of 147.044 ± 0.79 Å2 corresponds to the more compact molecular ion 3 (Fig. 3e). These molecules were more likely protonated on the ester group, as the theoretical and experimental CCS values are in less than 5% agreement upon protonation on the ester group. With these data, td 4–4.5 ms was again annotated to be the protonated molecule 3 and the td 4.5-5 ms was related the protonated molecule 4.

The drift time/mass-to-charge heatmap of the reaction outcome also gave a quick insight regarding the stability of the reaction. Online resource Fig. S7 presented the low stability of the reaction products in TWIMS-MS. The heatmap of the isolated m/z 220 in the quadrupole, demonstrated the presence of ions with the raising m/z and drift time values (white solid line ellipse- online resource Fig. S7). This trend showed the dissociation of the reaction products before the ion mobility cell, during the traverse from the quadrupole until the IMS cell. Ions with the identical drift time and increasing m/z value are related to fragment ions generated after the ion mobility cell, from the transfer cell till the detector (white dashed line ellipse- online resource Fig. S7).

All these findings highlighted the added value of IMS-MS and MS/MS experiments on providing in depth knowledge on the molecular structure (identity) of (un)known reaction products in the millisecond time scale. These process analytical technologies and reaction monitoring strategies not only enabled separation, but also enabled the tentative identification of isomeric compounds that are not distinguishable by MS or MS/MS. It also enabled annotation of IMS peaks without using a standard compound. Ionizing molecules with APPI combined with different IMS-MS/MS scanning strategies shed further light to characterize molecules. With the combination of ESI/APPI-IMS-MS/MS the reaction products and intermediates of the model hetero- DA reaction were characterised.

Monitoring the microflow reaction by ESI-IMS-MS/MS

The reaction of nitrosobenzene with methyl 2, 4-pentadienoate was studied by directly connecting the Chemtrix Labtrix® microflow reactor to ESI/APPI-IMS-MS/MS analytical technique and compared to the batch chemistry results. The model hetero-DA reaction was investigated under various temperatures (25, 40, 60, 80, 100, 120 °C) and residence times (5, 10, 20, 28, 40, 80 min) with constant pressure (2 × 106 Pa) and concentrations (50 mM methyl 2, 4-pentadienoate and nitrosobenzene (1:1)). The MS spectra were normalised to the intensity of the internal standard.

Figure 4a and b presented the impact of residence time on the formation of reaction products (3 and 4) performed in the microflow versus batch reactor. The formation of the product molecules in both reactors were increased by raising the residence time. However, the reaction efficiency in the microflow reactor was higher than the batch reactor. In the batch reactor the abundance of the product ions increased 7 times after 7.38 h of reaction, while in the microflow reactor this was done in only 40 min. The online monitoring of the reaction whilst raising the temperature indicated a systematic increase of the reaction products (Fig. 4c). These results demonstrated the potentials of microflow reactors and on-line measurements in increasing the reaction efficiency, improving reproducibility, reducing the number of experiments and lowering chemical consumptions compared to running multiple parallel experiments at different conditions required by batch chemistry.

Fig. 4
figure 4

a Residence time effect on the formation of the reaction products after a) microflow reaction, b batch reaction. c Temperature effect on the formation of reaction products carried out in the microflow reactor

Conclusion

The ion mobility-mass spectrometry and tandem mass spectrometry technique was used for the on-line monitoring the model hetero-DA reaction carried out in the microflow reactor and compared to batch reaction. When utilizing IMS-MS and MS/MS strategies, the elements of the reaction, including the isomeric reaction products, impurities and side-products were identified, characterized and separated. By systematically increasing the collision energy after the ion mobility separation, the survival yield of each isomer was calculated. The acquired survival yield was compared to the global minimum energy of ions calculated by DFT, which enabled annotating the ion mobility spectrum of isomers in the absence of standard molecules. The efficiency of the reaction was higher when it was carried out in the microflow reactor compared to the batch reaction. The introduced strategies of hyphenating IMS-MS and MS/MS to a microflow reactor showed possible potentials to simultaneously detect different reaction products and above all their molecular structure (identity). The potential of APPI to act as a universal ionization technique, allowing the application of a wide variety of organic solvents, was introduced. The generation of radical ions through APPI and their specific fragment ions add another dimension to the structural identification process. It is anticipated that this approach be a valuable technology platform for the development of efficient and green chemical synthesis routes, readily linking reaction conditions to the presence of different reaction pathways.

Experimental

Materials and sample preparations

Methyl-2,4-pentadienoate, 4-methyl-2-pentanone, nitrosobenzene, 4-chloropiperidine hydrochloride, Dichloromethane (DCM), Acetonitrile (ACN), toluene, chloroform-d, Methanol (MeOH), acetic acid and water (H2O) with >98% purity, ESI-L low concentrations tuning mix, APPI/APCI tuning mix and polyalanine purchased from Sigma-Aldrich (Zwijndrecht, The Netherlands).

The reaction condition in batch and isolation process

To perform the hetero-DA reaction in 4-methyl-2-pentanone solvent, a solution of nitrosobenzene (53.2 mg, 0.497 mmol) and methyl 2,4-pentadienoate (58.1 μL, 0.499 mmol) in 20 ml of 4M2P was stirred at 60 °C for 25 h. To study the impact of residence time on the production efficiency, 50 μl of the reaction mixture was collected after 0.39, 1.63, 4.65, 7.38, and 25.1 h. Samples were diluted with 150 μl of a dilution solvent mixture, including 1 mM of internal standard and 0.1% acetic acid to make it comparable to the flow reaction. When acetonitrile was used as the reaction solvent instead of 4-methyl-2-pentanone, a solution of nitrosobenzene (80.1 mg, 0.748 mmol) and methyl 2,4-pentadienoate (87.0 μL, 0.749 mmol) in acetonitrile (10 ml) was stirred at 60 °C for 8 h. The same method was applied for the reaction of nitrosobenzene (53.2 mg, 0.497 mmol) with 20 mL 4-methyl-2-pentanone for the specificity experiment. The outcome of each batch reaction either analysed as a complex sample or purified by TLC preparative plate (Sigma-Aldrich, Zwijndrecht, the Netherlands) prior to analysing. For the reaction in 4M2P, the reaction mixture diluted with water (20 ml) and extracted with ethyl acetate (3 × 15 ml). For the reaction in acetonitrile, 15 ml of water and 3 × 10 ml of ethyl acetate was used for dilution and extraction. Subsequently, the combined organic layer was washed with brine (10 ml) and dried with anhydrous Na2SO4. After filtration, the solution was concentrated under vacuum and purified using TLC (eluted with 1:1 dichloromethane/ n-hexane) to afford the product as a white solid (32.9 mg, 30% for the reaction in 4M2P and 74 mg, 45% for the reaction in acetonitrile).

The microflow reactor platform and the reaction condition

The reaction was carried out in the Chemtrix Labtrix® microflow reactor set up (Fig.1 and online resource Fig. S8) consisted of 4 gas tight glass syringes with luer lock fitting (1 ml- Hamilton, Amsterdam, The Netherlands), flow rate controllers (Chemyx Fusion 200 syringe pump- Stafford, TX, USA), temperature controller, Back Pressure Regulator (BPR), outer dilution inlet and a start unit, which accommodated the glass microreactor (Chemtrix R3227 type). The Chemtrix R3227 microflow reactor consisted of two main inlets, static mixer, residence time loop, a third inlet port to introduce a dilution solvent (inner dilution inlet), a second static mixer and an outlet port. This microreactor has the effective reaction volume of 19.5 μl and it provides the residence times from 0.78 to 97.5 min (for A + B reaction) with the (total) flow rate ranging between 0.2 and 25 μl/min. The outlet port directly connected to a BPR to keep the pressure at constant value of 2 × 106 Pa. Right after the BPR, a T-connector was placed to mix the reaction outcome with the dilution solvent mixture (Fig. 1 and online resource Fig. S8). The line coming out of the T-connector was directly connected to ESI or APPI ionization source, placed in front of the MS orifice.

The reaction was conducted by continuous injection of nitrosobenzene (50 mM) and methyl-2,4-pentadienoate (50 mM) solutions dissolved in 4M2P through main inlets. Dilution solvent mixture consisted of MeOH/ H2O/ACN (2:1:1) and 0.1% acetic acid introduced to the reaction outcome through inner and outer dilution inlets. As an internal standard 1 mM of 4-chloropiperidine hydrochloride added to the reaction outcome through the inner dilution inlet. To monitor the impact of residence time on hetero-DA reaction the temperature was set to the constant optimised value of 60 °C. The flow rate of each starting materials set to 2, 1, 0.5, 0.35, 0.25 and 0.12 μl/min to reach the residence times of approximately 5, 10, 20, 28, 40 and 80 min (respectively). The flow rate of the dilution solvent on inner dilution inlet always set as the sum flow rate of each starting material. The outer dilution inlet was used to further dilute the reaction outcome. Its flow rate was set to 8, 4, 2, 1.4, 1 and 0.5 μl/min respectively for shortest to longest residence time. To monitor the effect of temperature, the reaction residence time was set to the constant optimised value of 20 min. The reaction was monitored under increasing temperatures of 25, 40, 60, 80, 100 and 120 °C. For APPI experiments, DCM was used instead of 4M2P as the reaction solvent. For this set of experiments, dopants including pure toluene and DCM/toluene (1:1) were respectively injected through the inner and outer dilution inlets.

ESI/APPI-IMS-MS/MS parameters

Synapt HDMS G2Si (Waters, Milford, MA, USA) equipped with a TWIMS, as well as a Trapped-Ion Mobility Spectrometry-Q-TOF (Bruker Daltonics Inc., Billerica, MA, USA) were used for the ion mobility and tandem mass spectrometry analysis. Table. S1 presents the set parameters for IMS measurements on each instrument. Nitrogen gas was used in the ion mobility cell and helium gas was used before the ion mobility cell for collisional cooling. Argon was used as the collision gas in the trap and transfer cells. The ESI and APPI experiments performed in positive ion mode under the optimized ionization conditions listed in Table. S1. The mass spectra acquisition range was set between m/z 50 and 300 Da. ESI-L low concentrations tuning mix and APPI/APCI tuning mix were used for the mass calibration and polyalanine was used to the IMS calibration. On the TIMS instrument, the massive ions with lower mobility (k) elute first compared to the lighter and compact ions, however the IMS graph is constructed based on 1/k (V.s/cm2) values, making it comparable to the IMS generated by the TWIMS instrument.

For IMS-MS/MS experiments, the precursor ion was isolated in the quadrupole and fragmented via CID after the ion mobility cell in the transfer cell. The collision energy was increased from 5 to 30 eV in 5 eV increments (total of 6 collision energies). The MS/MS results were the average of 2 min acquisition time per collision energy. To extract the CID spectrum of each isomer from its ion mobility, first the ion mobility of the precursor ion at m/z 220 was extracted. Next, the mobility range of interest were selected (e.g. from 4 until 4.5 ms). The peak picking then performed in the non-chromatic mode using the following parameters: min drift time peak width of 0.2 ms, MS resolution of 35,000 and minimum intensity threshold of 1000 counts. The CID spectra were copied to excel for further analysis. Previously explained methods [30] were employed to plot the experimental and linear survival yield graphs. The experimental survival yield was plotted based on the ratio of the intensity of the Precursor ion (P) to the sum of the intensities of the precursor and Fragment ions (F) (Eq. 3). This graph was transformed to linear form by Eq. 4 and 5.

$$\mathrm{Experimental}\ \mathrm{survival}\ \mathrm{yield}=\frac{IntensityP}{IntensityP+\varSigma (IntensityF)\ }$$
(3)
$$\mathrm{Sigmoidal}\ \mathrm{survival}\ \mathrm{yield}=\frac{1}{1+c\ast {e}^{-b. CE}}$$
(4)

where b is the slope of the linear segment, and the intercept of the linear portion is the natural logarithm of c.

$$\ln \left(\frac{1- Survival\ yeild}{Survival\ yeild}\right)=\ln (c)-\mathrm{b}\left(\mathrm{CE}\right)$$
(5)

NMR

The Bruker (Rheinstetten, Germany) Avance III HD NMR spectrometer operated at the 1H frequency of 700 MHz and equipped with a cryogenically cooled triple channel [1H,13C,15N] TCI probe. The 1H and 13C spectra were recorded as 250 mM in CDCl3 solutions with 0.03% TMS as internal chemical shift reference standard. Spectra were processed using Topspin 3.2 softwareand analyzed by the program Sparky 3.114 (Goddard & Kneller) and MestReNova.

Data evaluations

The acquired data by Synapt G2Si analysed by MassLynx v4.1. and DriftScope v2.8 software. The measured data by TIMS-TOF analysed by Compass DataAnalysis v5.0 software (Bruker). The extracted ion mobility spectra extracted and plotted in excel for further analysis. To correct for the ion suppression effects, the intensity of the reaction product ions normalised with the intensity of 4-chloropiperidin (the internal standard). For CCS calculations, the molecules structurally optimized by DFT on Spartan software (Wavefunction, Inc. & Q-Chem, Irvine, CA, USA). Conformer distribution calculations were performed to obtain the global energy minimum with Density Functional ωB97X-D and basis set 6-31G* using Molecular Force Field (MMFF) geometry. The software considered 100 conformers, while keeping the E ≤ 40 kJ/mol and the energy of maximum 10 conformers calculated while keeping the E ≤ 15 kJ/mol. The IMoS software used for theoretical CCS calculations with Trajectory Method (TM) with 300.000 N2 gas molecules per orientation. Mulliken charges were used for partial atomic charges, they were automatically calculated by Spartan. Calculations performed for each conformer with Boltzmann weight above 1%.