1 Introduction

Reactions of ions with molecules, such as SN2, E2 and SNAr, can take place via the solvated ion in polar solvents. Increasing the solvation power (usually related to polarity) of the medium leads to increase in the activation free energy barrier. This is a classical view on this kind of reaction [1, 2]. Nevertheless, the counter-ion is also present in solution and formation of ion pairs takes place even in aqueous solution [3, 4]. With the decrease in the solvent polarity, dimers, trimers, tetramers and even higher aggregates can be formed [5]. Ionic reactions can also occur via these aggregates, although it is usually thought that single ions are more reactive [6]. Based on this view, aggregates can work like a buffer on the reactivity [7]. Indeed, reaction kinetics of the solvated ion becomes higher with the decrease in the solvent polarity and reaches the maximum value in the gas phase. Nevertheless, less polar solvents lead to formation of ion pairs and higher aggregates, which are usually less reactive. Consequently, there is an ideal solvation that produces the highest reactivity and it is worth to know how the reaction kinetics changes with the solvent polarity. Figure 1 shows a possible profile of the activation free energy versus solvation of the medium. In this profile, there is an ideal solvation window that leads to the highest kinetics.

Fig. 1
figure 1

See Ref. [7]

General view of the solvent effect and formation of ion pairs and higher aggregates on the reactivity. Solvation refers to the sum of the solvation free energy of the pair of ions.

In some situations, the solubility can be an additional factor that decides the best solvent. An example is the SN2 reaction of cesium fluoride with alkyl halides or alkyl mesylates. Experimental data point out that while the reaction takes place in tert-butanol solvent, it is much less effective in methanol and acetonitrile solvents [8, 9]. Quantum chemistry and molecular dynamics calculations have pointed out that tert-butanol forms cyclic cluster in solution, which facilitates the solubility of CsF [10]. Furthermore, both the cesium counter-ion and tert-butanol molecules have a combined effect on the reactivity, participating of the transition state [10, 11]. The formation of ion pairs can also change the selectivity. As an example, the C- and O-alkylation of the phenoxide ion depends on the solvent and the formation of ion pairs [12,13,14,15].

Nucleophilic substitution reactions in aromatic rings, named SNAr reactions, are very important transformations useful in synthetic chemistry. For a long time, these reactions have been thought to take place via a two-step mechanism, involving the formation of a Meisenheimer intermediate [16, 17]. This idea has dominated the literature of organic chemistry even considering that theoretical studies have long pointed out that a single-step mechanism is also observed [7, 18, 19]. However, a recent study combining experimental and theoretical methods by Jacobsen and co-workers has changed this view, supporting the idea that the concerted mechanism is the usual, whereas two-step mechanism occurs for more activated substrate [20]. In addition, an excellent and up-to-date review by Murphy and co-workers on this class of reactions has further contributed to a better perception on the main role of the concerted mechanism, which has also been named as cSNAr reaction [21].

In recent years, the increased importance of organofluorine compounds has induced research toward the development of reagents and catalysts for more effective fluorination reactions [22,23,24,25,26,27,28,29,30,31,32,33,34,35]. An example is the tetramethylammonium fluoride. In 2008, theoretical calculations had shown that fluorination of 4-chlorobenzonitrile with (CH3)4N+F, via SNAr reaction with the ion pair, was feasible [7]. More recently, Sanford and co-workers have experimentally investigated this kind of reaction and they have confirmed the theoretical predictions that anhydrous tetramethylammonium fluoride is a viable reagent for aromatic ring fluorination [36]. Those authors have also observed that dimethylformamide is an adequate solvent for the reaction. Considering that dimers and tetramers could also be formed in solution phase, depending on the solvent polarity, it is worth to know the reactivity of these aggregates and the solvent effect considering several equilibria and reactivity. Thus, in this work we have investigated the reactivity of (CH3)4N+F ion pair with 2-bromobenzonitrile in different solvent polarities (Scheme 1), also including the formation of dimers and tetramers, via theoretical calculations.

Scheme 1
scheme 1

Reaction investigated in this work

2 Theoretical methods

2.1 Electronic structure calculations

The reaction shown in Scheme 1 involves ions, and the solvent effect on the geometry of minima and transition states is important. Thus, full geometry optimizations and harmonic frequency analysis were performed including the solvent effect. We have used the X3LYP functional [37] and the 6-31G(d) basis set for carbon and hydrogen, and 6-31 + G(d) basis set for fluorine, nitrogen and bromine. We have named this basis set as 6-31(+)G(d). The solvent effect was included through the SMD [38] method with N,N-dimethylformamide (DMF) solvent, using 240 tesserae for atom to obtain numerically more stable potential of mean force surface [39, 40].

Aimed to obtain reliable free energy in solution phase, we have used a composite method. Thus, for more accurate electronic energies, single point energy calculations were performed with the M08-HX functional [41] in conjunction with the TZVPP basis set, augmented with sp diffuse functions on the fluorine, bromine and nitrogen atoms [42, 43]. The JANS = 2 option in the GAMESS program was used in the M08-HX computations to obtain better converged energies. Additional single point energy calculations in the gas phase and using the SMD model with the X3LYP/6-31(+)G(d) level of theory were performed to obtain the solvation free energy. The final free energy for each species in solution phase was calculated through the equation given below:

$$ G_{\text{sol}} = E_{\text{el}} + G_{\text{vrt}} + \Delta G_{\text{solv}} + 1.89 \;{\text{kcal}} \;{\text{mol}}^{ - 1} $$

The first term in the right side is the electronic energy (M08-HX/TZVPP + diff), the second term is the vibrational, rotational and translational contributions to the free energy (SMD/X3LYP/6-31(+)G(d)), and the third term is the solvation free energy contribution calculated with the SMD model. The last term corresponds to the correction of the free energy from 1 atm standard state, adopted in the harmonic vibrational analysis, to 1 mol L−1 standard state, adequate for description of the solution phase processes. All the calculations were performed with the GAMESS program [44, 45].

2.2 Molecular dynamics calculations

The formation of a pair of ions in solution phase from single ions involves a substantial solvent effect, and usually cannot be described by a pure continuum solvation method. In this way, the use of molecular dynamic simulation can be useful for obtaining the structure of the solution. Thus, we have performed molecular dynamics simulation of the (CH3)4N+F species in solution of methanol and DMF solvents. For all the calculations, the OPLS-AA force-field was used [46]. Initially, the (CH3)4N+F species was placed in the center of a cubic simulation box with edge of 35 Å. In the following step, the solute in the box was solvated using a pre-equilibrated solvent box. The final number of solvent molecules included was 590 for methanol (edge of 34.3 Å after the simulation) and 265 for DMF (final edge of 32.4 Å).

The simulations were done with the velocity Verlet algorithm with a time step of 1 fs and constraining all of the bonds with the LINCS algorithm. A cutoff of 15 Å was applied for nonbonded interactions, and the PME method was used for the long-range electrostatic interactions. The NPT ensemble was adopted with the Berendsen thermostat, with a coupling time constant of 0.5 ps and temperature of 298 K. The Berendsen barostat was also utilized with a coupling time constant of 1.0 ps, compressibility of 5 × 10−5 and 1 atm of pressure. The simulations were performed with an equilibration run of 100 ps, followed by the production run of 1 ns. All the simulations were done with the GROMACS program [47], and the results were visualized with the VMD program [48].

3 Results and discussion

3.1 Structure of the solutions of tetramethyl ammonium fluoride

The structure of (CH3)4N+F ion pair in solution was probed by molecular dynamics simulation. Our goal was to determine whether the ion pair is stable for a long time in solution or rather the solvent is able to dissociate this species. We have used methanol and DMF as solvents because solvents with high dielectric constant are needed to separate ion pairs. Further, specific interactions such as hydrogen bonds are also very important. The results are presented in Fig. 2, which show the calculations of a long 1-ns simulation time. In the beginning of the simulation, the fluorine-to-nitrogen distance was 3.42 Å. After the 1 ns, this distance became 10.56 Å in methanol and only 3.56 Å in DMF. Thus, it is evident that methanol solvent is able to dissociate the ion pair, while the DMF solvent cannot. The fluoride ion exists as single solvated ion in methanol. In DMF, the fluoride ion remains in close contact with tetramethylammonium cation. It is worth to compare these results with the available experimental data. Thus, Sun and DiMagno have reported 1H-19F HOESY NMR spectroscopy studies of several trimethyl aryl ammonium fluoride salts and have concluded that these species exist as ion pairs in dimethyl sulfoxide solvent, which has very similar solvation properties of DMF [49]. This result is in agreement with our findings.

Fig. 2
figure 2

Results of molecular dynamics simulation of (CH3)4N+F ion pair dissolved in methanol and DMF solvents at 298 K, after 1-ns simulation time

3.2 Reaction of the solvated fluoride ion in DMF and methanol

The structure of transition state for the reaction of the single fluoride ion with 2-bromobenzonitrile is presented in Fig. 3 (TS-F). The reaction takes place through a single step without formation of the classical Meisenheimer intermediate, usually postulated for this kind of reaction. The compact nature of the transition state, with C–F distance of 1.71 Å, compared to C-F distance of 2.22 Å in aliphatic substrate [50], leads to a high solvent-induced barrier (ΔΔGsolv) of 49 kcal mol−1 in methanol (Table 1). The final solution phase free energy barrier becomes 33.1 kcal mol−1, which makes this reaction unfeasible in this solvent, in agreement with the experimental observations that this reaction was not reported in this solvent [36]. It is worth to say that the SMD model has a reasonable performance for ion-molecule reactions in methanol [51]. In addition, more reliable description of the solvation of the fluoride ion in methanol via hybrid discrete–continuum approach should make the barrier even higher [52].

Fig. 3
figure 3

Transition states and aggregates obtained at SMD/X3LYP/6-31(+)G(d) level of theory, DMF solvent

Table 1 Thermodynamics data for reaction and activation steps in DMF

The solvation free energy of the fluoride ion in methanol solution in the TATB compatible scale is − 109.2 kcal mol−1 [53], whereas in the solvents dimethyl sulfoxide and acetonitrile, which have similar solvation properties of DMF, the ΔGsolv values are in the range of − 88 to − 96 kcal mol−1 [54]. Thus, we could expect a meaningful difference in the activation free energy in methanol and DMF solvents. Nevertheless, this is not the case, because the calculated ΔG value in DMF is 33.3 kcal mol−1, close to the 33.1 kcal mol−1 found in methanol solution. This is a flaw of the SMD model for description of single ion solvation in different solvents, especially polar aprotic, a problem recently reported [55].

Other evident flaws of SMD for ions in DMF are the prediction of dissociation of the (CH3)4N+F ion pair in DMF. Indeed, the calculations in Table 1 point out a positive free energy of 14.7 kcal mol−1 for the formation of the (CH3)4N+F ion pair. On the other hand, our results of molecular dynamics simulations predict that this ion pair is stable in the DMF solution. Experimental studies of solutions of fluoride ion with several ammonium cations show that these species exist as ion pairs in DMSO solution [49], providing more support for our molecular dynamic calculations. This limitation of the SMD (and continuum solvation models) for processes involving the formation of pair of ions from neutral species has been recently emphasized [51].

3.3 Reaction of the ion pair, dimer and tetramer in DMF

The transition state for the reaction of (CH3)4N+F ion pair with 2-bromobenzonitrile in DMF solvent is presented in Fig. 3. We can notice the close contact between the fluoride ion and its counter-ion. Because the ion pair is much less solvated than the pair of free ions (− 32 kcal mol−1 vs. − 148 kcal mol−1), the solvent effect on the reaction is considerably smaller, only 12.2 kcal mol−1. Consequently, the error is also smaller. As a rough estimation, considering that the error is 10%, the solvent-induced barrier for the ion pair reaction would have an uncertain of 1.2 kcal mol−1, whereas in the case of the free fluoride ion reaction, the uncertain would reach 5 kcal mol−1. Thus, the resulting free energy of activation in liquid phase is calculated to be 27.3 kcal mol−1, indicating the feasibility of the reaction by this pathway. However, the formation of higher aggregates needs be evaluated.

The structure of the dimer is presented in Fig. 3. The gas phase contribution for its formation is − 19.1 kcal mol−1. However, the solvent effect increases the free energy by 22.4 kcal mol−1, leading to a positive free energy of 3.3 kcal mol−1. Thus, the calculations predict that this species is present in equilibrium with the ion pair, although present in smaller concentrations. In the activation step, the variation of the electronic energy is negative by 4.7 kcal mol−1, resulting in a gas phase free energy of 8.6 kcal mol−1. The solvent effect further increases the solution phase free energy barrier to a value 27.4 kcal mol−1. It is worth to notice that this dimer is as reactive as the ion pair and if the solvent effect is excluded, it is much more reactive. This unexpected result can be explained by an effective stabilization of the transition state by the two N(CH3)+4 ions through a bridge structure (see Fig. 1). In spite of this interesting finding, the total free energy for the reaction through the dimer is 30.7 kcal mol−1. Hence, this pathway does not compete with the ion pair reaction. The free energy profile in Fig. 4 gives a better view of these competing processes.

Fig. 4
figure 4

Free energy profile of the reaction in Scheme 1 investigated in this work using DMF solvent. Units in kcal mol−1, standard state at 1 mol L−1 and 298 K

The other equilibrium considered in this study is the formation of the tetramer. This species has a plane structure, and its formation from two dimers has a very negative electronic energy of − 52.8 kcal mol−1. The gas phase free energy is − 41.1 kcal mol−1, and including the solvent effect raises the free energy by 36.3 kcal mol−1, resulting in a liquid phase free energy of − 5.1 kcal mol−1. In the activation step, the electronic energy is 16.3 kcal mol−1, leading to the gas phase activation free energy of 29.5 kcal mol−1. The solvent effect is small, increasing the barrier by 3.3 kcal mol−1. The final free energy barrier becomes 32.8 kcal mol−1. Thus, the reactivity of the tetramer is substantially smaller than that of the monomer and dimer.

The overall free energy profile presented in Fig. 4 shows a general view of the reactivity of the different aggregates. Thus, analysis of this profile allows us to conclude that the reaction proceeds via ion pair (monomer) with a free energy barrier of 27.3 kcal mol−1, making this reaction viable in the DMF solvent.

3.4 Free energy profile in benzene

The diagram in Fig. 1 points out methanol (ε = 32.6, polar protic) as a solvent in the right side leading to a low reactivity, whereas DMF (ε = 37.2, polar aprotic) is in the middle, with a better reactivity. The other extremum would be an apolar aprotic solvent such as benzene (ε = 2.3). Thus, we have computed the free energy profile of the reaction in benzene through single point SMD calculations using benzene as solvent (Fig. 5 and Table S1 in the supporting information). As expected, the free energy barrier for the monomer reaction is lower than in DMF as solvent, only 21.8 kcal mol−1. In the case of the dimer reaction, the barrier is even smaller (19.1 kcal mol−1). Nevertheless, this apolar solvent leads to strong aggregation of the monomers and the tetramer is 35 kcal mol−1 lower in free energy than in the monomer. These results indicate that all the (CH3)4N+F ion pairs are forming tetramers or ever higher aggregates not considered in this study. The reaction via tetramer has a free energy barrier of 31.8 kcal mol−1, about 4.5 kcal mol−1 above the barrier in DMF via monomer. Further, this high barrier suggests that the reaction is inviable in this solvent. These findings are in qualitative agreement with Fig. 1.

Fig. 5
figure 5

Free energy profile of the reaction in Scheme 1 investigated in this work using benzene as solvent. Units in kcal mol−1, standard state at 1 mol L−1 and 298 K

3.5 Free energy profile in pyridine and THF: the role of concentration

Based on Fig. 1, DMF should be a good solvent for the reaction because the monomers (ion pairs) are the dominant species in solution and the reaction proceeds through this step. Further, higher aggregates would not be formed in large extension. In the same time, DMF does not lead to high solvation of the fluoride ion like methanol solvent does. However, it would be interesting to test other less polar and aprotic solvents that could be even superior to DMF. We have chosen pyridine (ε = 13.0) and tetrahydrofuran (THF, ε = 7.4). Thus, we have performed single point SMD calculations on the optimized structures to obtain the free energy profile of the reaction in pyridine and THF solvents, presented in Fig. 6.

Fig. 6
figure 6

Free energy profile of the reaction in Scheme 1 investigated in this work using pyridine and THF solvents. Units in kcal mol−1, standard state at 1 mol L−1 and 298 K

In pyridine solution, the formation of dimer should take place in a small extension, whereas the tetramer is more stable (− 3.1 kcal mol−1). However, these small values of the free energy variation indicate that a full calculation of the equilibrium must be performed to determine the predominant species. In the case of the free energy barrier for the monomer reaction, the value of 26.7 kcal mol−1 is more favorable than in DMF as solvent. A similar trend is observed for THF as solvent, with a barrier for monomer reaction of only 25.8 kcal mol−1. Nevertheless, in this case the tetramer is more stable, − 8.5 kcal mol−1. For both of these solvents, we need to evaluate the equilibrium in the solution to determine the real kinetics based on the theoretical data. The equilibria involved are:

$$ 2{\text{ TMAF}} \to \left( {\text{TMAF}} \right)_{2} \quad K_{1} $$
$$ 4{\text{ TMAF}} \to \left( {\text{TMAF}} \right)_{4} \quad K_{2} $$

To determine the concentration of each species in equilibrium, we need to solve the equations:

$$ K_{1} = \frac{{[\left( {{\text{TMAF)}}_{ 2} } \right]}}{{ [ {\text{TMAF]}}^{ 2} }} $$
$$ K_{2} = \frac{{[\left( {{\text{TMAF)}}_{ 4} } \right]}}{{ [ {\text{TMAF]}}^{ 4} }} $$
$$ \left[ {\text{TMAF}} \right] \, + \, 2\left[ {\left( {\text{TMAF}} \right)_{2} } \right] \, + \, 4\left[ {\left( {\text{TMAF}} \right)_{4} } \right] \, = \, C_{\text{TMAF}} $$

where CTMAF is the total or analytic concentration of the tetramethylammonium fluoride. The equilibrium constants K1 and K2 were obtained from the theoretical free energies. This set of equations was resolved for all the solvents investigated in this study, and the results are shown in Table 2, considering CTMAF = 0.40 mol L−1 and the concentration of 2-bromobenzonitrile of 0.20 mol L−1, a value close to the real synthetic conditions [36]. Once the concentrations were determined, we have used the activation barriers for each species to calculate the rate constants and the respective reaction rates at the beginning of the reaction at 298 K. Such analysis allows a more reliable evaluation on the true reaction kinetics and the role of each species.

Table 2 Reaction kinetics in the beginning of the reaction

The calculation of the reaction rate presented in Table 2 points out that for all the solvents investigated, including benzene, the reaction via the tetramer is less important. For this solvent, the reaction via dimer has the highest contribution. This unexpected finding for benzene solvent shows that in some systems a more detailed analysis of the kinetics, including concentration of the species, must be performed. In the case of THF, pyridine and DMF solvents, the monomer reaction is the most important contribution for the total kinetics. Further, we can notice that the reactivity in DMF and pyridine is close, and even in THF it is slightly less reactive. There is a predominance of the monomer form in pyridine, whereas the tetramer predominates in THF. The reactivity in benzene is predicted to be 50 smaller than in DMF.

3.6 Comparison with experimental data

Sanford and co-workers have reported that anhydrous TMAF reacts with 2-bromobenzonitrile in the DMF solvent at 25 °C leading to 48% yield in 24 h [36]. Considering that the concentration of the 2-bromobenzonitrile substrate is 0.20 mol L−1 and that of the TMAF is 0.40 mol L−1, a second-order kinetics leads to a rate constant of 2.2 × 10−5 L mol−1 s−1. This rate constant corresponds to a free energy barrier of 23.8 kcal mol−1. Sanford and co-workers have also reported the reaction at 80 °C, and in this case the same analysis leads to a free energy barrier of 25.6 kcal mol−1. The value at 25 °C can be compared with our calculated barrier of 27.3 kcal mol−1 in DMF. The theoretical value is 3.5 kcal mol−1, above the estimated experimental value. This is a reasonable agreement considering that the SMD model predicts too many positive barriers for anion–molecule reactions in polar aprotic solvents [55].

4 Conclusion

Theoretical calculations predict that tetramethylammonium fluoride forms ion pairs (monomers), dimers and tetramers in DMF, pyridine, THF and benzene. The monomer is the predominant species in DMF and pyridine solvents, whereas the tetramer is the main species in THF and benzene. In the polar and protic solvent methanol, TMAF exists as free ions. The SNAr reaction with 2-bromobenzonitrile takes place through the monomer species in DMF, pyridine and THF, and via dimer in benzene. In methanol, the reaction involves the solvated fluoride ion. The theoretical analysis of the reactivity in these five solvents with a wide polarity and solvation range points out that DMF is the best solvent, although pyridine is predicted to be as effective as DMF. Our results also emphasize the importance of considering the formation of multiple species in solution phase when investigating ionic reactions, as well as to go beyond the free energy profile, taking into account the concentration of each species.