Introduction

Photochromic compounds have attracted much consideration in the past decades owing to their interesting features. They are able to take part in the light-induced reversible electro-cyclic transformations. Among the many types of photochromic compounds, the spiropyran derivatives have attracted much interest as the well-known photochromic compounds. The photochromism of spiropyrans has been broadly investigated since the 1950s [1]. During the last decade, the photochromic compounds have made active research areas owing to their ability for use in various technologies like optical switching, recording of data, storage, and non-linear optics, and their great importance in the biological phenomena [2,3,4]. Generally, the spiropyran derivatives exist in a closed-ring form that is colorless and is a less polar spiro form, while under the UV light irradiation, the closed-chain spiropyran (SP) form dynamically isomerizes into the open-ring, colored, and more polar merocyanine (MC) form [5,6,7,8,9,10,11,12] (Fig. 1).

Fig. 1
figure 1

SP-MC interconversion

In addition to being photochromic, the presence of an acid can trigger the reversible isomerization of SP to form protonated merocyanine (MCH), and the addition of a base converts this isomerization back to create the closed form (acidochromism) [13,14,15,16,17] (Fig. 2).

Fig. 2
figure 2

Acidochromism of spiropyran

The biological probes [10, 18,19,20], molecular switches [21,22,23,24,25,26,27], nano-porous conducting particles [28,29,30], and liquid crystals [31] have been performed according to the acid-induced SP-MC isomerization.

The phenolate anion moiety of the MC form is rich in electron density and can form complexes with different metal cations [32,33,34]. The reversible isomerization of SP is not only restricted to the UV light and acid but is also influenced by the presence of metal cations. The metal–organic complexes of SP have been used in photochromic lenses [35,36,37,38,39], recording of optical data, and increasing the storage time [40,41,42,43,44].

The development and use of the click chemistry in the material science and polymer have newly been broadly studied [45]. The click reactions have been widely utilized in the synthesis of organic compounds and polymers. The “click”-type reactions, often characterized by the azide-alkyne Huisgen cycloaddition, have attracted a huge deal of attention owing to their significant aspects such as high yields, functional group high tolerance, and selectivity. By catalysis with the Cu(I) ions, the reactions can be carried out under the mild experimental circumstances. In the recent decades, the click reaction has been broadly used in the production of the compounds having the triazole ring. The chemists interested in the photochromic compounds have also used the click reactions to develop some new derivatives of spiropyran derivatives containing the triazole ring. Hans-Achim Wagenknecht and his co-worker have used CuSO4.5H2O and (+)-sodium L-ascorbate in order to prepare some new spiropyran derivatives via the click reactions [46]. Also, Changsik Song and his co-workers have used a similar method to synthesize some new derivatives of spiropyran containing a terminal alkyne with compounds having an azide functional group such as benzyl azide by the click reactions in the presence of CuSO4.5H2O and sodium ascorbate [47].

In this work, two N-alkyne-functionalized spiropyran derivatives were synthesized. The regioselective linking of these alkyne-functionalized spiropyrans to the aryl and alkyl azide compounds was carried out in the presence of CuI and sodium ascorbate. The photochromic responses of the products upon exposure to the UV irradiation were studied by their UV–visible spectra.

Experimental

Materials

Salicylaldehyde, phenyl hydrazine, 3-methylbutan-2-one, 2-propyne-1-ol, 4-toluenesulfonyl chloride, CH3COOH (glacial), and HNO3 were provided from the Merck. 1-azido-4-nitrobenzene, as a light yellow solid, was prepared [48]. (Azidomethyl)benzene was prepared as a yellow oil by the reaction of (chloromethyl)benzene with NaN3 in CH3CN and DMF [49]. 2-propyn-1-ol and p-toluene sulfonyl chloride were used in the preparation of 1-tosyl-2-propyne [50]. 3-Methylbutan-2-one and phenyl hydrazine in CH3COOH (glacial) were used in the preparation of 2,3,3-trimethylindolenine as a yellow oil [51, 52]. 3,3-dimethyl-2-methylene-1-prop-2-ynyl-2,3-dihydro-1H-indole was prepared as a dark orange oil according to the literature [53, 54]. Salicylaldehyde was nitrated with HNO3 in the medium of CH3COOH (glacial) to prepare 3- and 5-nitrosalicylaldehydes according to the literature [55, 56].

Synthesis of 1'-(propargyl)-3',3'-dimethyl-6-nitrospiro[2H-1-benzopyran-2,2'-indoline] (compound 1) and 1'-(propargyl)-3',3'-dimethyl-8-nitrospiro[2H-1-benzopyran-2,2'-indoline] (compound 2)

1.97 g (10 mmol) of 3,3-dimethyl-2-methylene-1-prop-2-ynyl-2,3-dihydro-1H-indole was diluted in 7 mL of CH3CN, and slowly added to a solution of 3- or 5-nitrosalicylaldehyde (1.67 g, 10 mmol) in CH3CN (15 mL). These solutions were stirred for 3 h at 30 °C. The advance of the reaction was assessed by TLC (3:7 ethyl acetate and n-hexane). CH3CN was removed after completion of the reaction, and 15 mL of ethanol was added and stirred for 2 h at room temperature; a yellow solid was precipitated. The yellow solid obtained was washed with 20 mL of ethanol after isolation by filtration, and dried in the dark. Yellow solids (2.7 g for compound 1 and 2.85 g for compound 2) were obtained (Scheme 1). For further purification, compounds 1 and 2 were recrystallized from ethanol.

Scheme 1
scheme 1

Preparation of compounds 1 and 2

Synthesis of click products of N-alkyne-functionalized spiropyran derivatives with aryl and alkyl azide compounds (3, 4, 5, and 6)

These compounds were prepared via the click reaction of 1-azido-4-nitrobenzene (0.16 g, 1 mmol) or (azidomethyl) benzene (0.18 g, 1 mmol) with an appropriate amount of N-alkynyl spiropyran (0.35 g, 1 mmol) in the presence of CuI (0.01 g) and sodium ascorbate (0.02 g) in ethanol (8 mL). The reaction mixture was stirred at 25 °C for 36 h. The reaction progress was controlled by TLC (5:2 n-hexane/ethyl acetate). Over time, a yellow precipitate was formed, which was dried after isolation by filtration, and then stirred in 10 mL distilled water, filtered, and dried in vacuo (Scheme 2, Table 1). For further purification, compounds 3, 4, 5, and 6 were washed with cold ethanol.

Scheme 2
scheme 2

Click reactions of propargyl functionalized spiropyran with aryl and alkyl azides

Table 1 Synthesis of photochromic spiropyran compounds via click reaction of N-alkynyl spiropyran derivatives with aryl and alkyl azides

Results and discussion

In this work, we synthesized two spiropyrans bearing an alkyne group. In these compounds, 3,3-dimethyl-2-methylene-1-prop-2-ynyl-2,3-dihydro-1H-indole was the main fragment to prepare N-propargyl-spiropyrans. In this part, a compound was prepared by the reaction of propargyl tosylate with 2,3,3-trimethylindolenine. The nitration of salicylaldehyde produced a mixture of 3- and 5-nitraoslicyladehydes. They were separated by crystallization of their sodium salts. 3- and 5-nitrosalicyladehydes were the second parts of these photochromic compounds. Compounds (1) and (2) were synthesized via the condensation of 3,3-dimethyl-2-methylene-1-prop-2-ynyl-2,3-dihydro-1H-indole with 3- or 5-nitrosalicylaldehyde. The terminal alkyne group in N-propargyl-spiropyrans was verified by the characteristic bands of H–C≡ and –C≡C– appearing at 3294 cm−1 and 2116 cm−1 (compound 1) and at 3276 cm−1 and 2116 cm−1 (compound 2), respectively. The proton resonances related to these terminal alkynes were observed at 2.14 ppm (compound 1) and 2.07 ppm (compound 2) in the 1H-NMR spectra. The diastereotopic methylenic protons appeared at 3.9 ppm and 4.1 ppm (compound 1) and at 3.86 ppm and 4.05 ppm (compound 2).

The regioselective click reaction of the spiropyran compounds (1 and 2) with 1-azido-4-nitrobenzene and (azidomethyl)benzene catalyzed by CuI produced the photochromic derivatives (3, 4, 5, and 6). The appearance of the peak belonging to the –CH proton of the triazole ring at 8–9 ppm is a typical indication of the successful completion of the click reaction. The FT-IR spectra also confirmed that the reaction was quantitative, as the azide-stretching band at 2112 cm−1 and the H–C≡ stretching band at 3294 (compound 1) or 3274 (compound 2) cm−1 disappeared completely.

Also, X-ray diffraction confirmed the structure of SP (compound 2). The crystals of compound (2) were prepared in ethanol solution at 298 K (Fig. 3) [57].

Fig. 3
figure 3

ORTEP diagram of compound (2). Thermal ellipsoids are at 30% probability level

Photochromism of spiropyran derivatives

We know that the spiropyran derivatives have photochromic properties, and these compounds can be assumed as one of the two stable moods: the closed-ring mood, known as the spiro (SP) form and the opened-ring mood, known as the merocyanine (MC) form. The color of the crystals of compound 1 was changed after exposure to the UV irradiation (360–400 nm) for about 30 min, while the color of the crystals of compound 2 did not change (Fig. 4).

Fig. 4
figure 4

Compound 1 (right) and compound 2 (left) a before exposure to UV light, b immediately after exposure to UV light, and c 24 h after UV irradiation

The solutions of the spiropyran derivatives (1 and 2) showed a dramatic color change upon exposure to the UV irradiation, owing to the conversion of the SP form to the MC form through the breaking of the spiro C–O bond by the UV light. After exposure to the UV light (360–400 nm) for about 10 min, the color of the solutions (0.2 mM) of compounds 1 and 2 in methanol turned. The solutions were placed in the dark, and their discoloration was investigated. The color of the solution of compound 2 disappeared faster, while the color of the solution of compound 1 lasted for 1 h (Fig. 5).

Fig. 5
figure 5

Solutions of compound 1 (right) and compound 2 (left) in methanol a immediately after UV irradiation, and b 1 min, c 3 min, d 25 min, e 50 min, and f 1 h after exposure to UV light

After exposure to the UV light, a new absorbance band (450–620 nm) could be observed for the solutions (0.05 mM) of compounds 1 and 2, which is related to the SP conversion to the open-chain form (Fig. 6). In addition, the click reaction products of compounds 1 and 2 with aryl and alkyl azides (compounds 3, 4, 5, and 6) had photochromic properties (Fig. 7).

Fig. 6
figure 6

UV–visible absorbance spectra of compounds 1 and 2

Fig. 7
figure 7

UV–visible absorbance spectra of compounds 3, 4, 5, and 6 before and after exposure to UV light

The click products (compounds 3–6) also show a new absorption in the visible area after UV irradiation, and it seems that the binding of the bulky triazole-containing groups to the indole section of spiropyran molecules intensifies the steric hindrance in the closed-ring SP form. After UV irradiation, these photochromic compounds are released from this steric hindrance and are converted to the MC form, which experiences fewer steric hindrances than the SP form that has a more relative stability than the closed form. This relative stability can clearly be seen in the UV–visible spectra of the click products. These compounds have relatively better absorptions than the original photochromic compounds 1 and 2. Also compounds 36, especially compounds 4 and 6, were converted to the SP form with a longer delay time than compounds 1 and 2 due to intensifying the steric hindrance on them by closing the pyran ring.

The dilute solutions of compounds (1) and (2) in ethyl acetate were exposed to the sunlight irradiation. The solutions switched from the colorless SP form to the MC form (blue solution) upon irradiation with the sunlight (see the rapid response in the video in the Supporting Information).

Conclusion

The synthesis of some new spiropyran derivatives was reported. The darkening of the crystals of compound (1) under UV irradiation indicates that the spiro C–O bond in compound (1) is weaker than that in compound (2), which is due to the NO2 substitution in the para position relative to this bond, and the stabilization of the MC form. The MC form stability in compound (1) slows down the discoloration of the methanolic solution of compound (1) after UV irradiation, while the methanol solution of compound (2) decolorizes rapidly. We recommend compound (2) for the switch applications due to the faster decolorization of its methanolic solution. The click reaction products (3, 4, 5, and 6) have more stable MC forms than compounds (1) and (2) due to the binding of larger groups to the nitrogen of indole.

We believe that the gained understanding of the photochemistry of the described spiropyran derivatives will stimulate further experiments toward the application of such light-sensitive compounds in different sciences.