Introduction

Solid-state molecular motion is a critical but underexplored phenomenon in nature. However, it is becoming appreciated as a powerful tool in crystal engineering that can be exploited to produce inter alia highly efficient catalysts1,2,3,4, gas storage systems5,6,7,8, and molecular machines (e.g., molecular switches9,10,11,12,13,14, rotors15,16,17,18,19,20, and shuttles21). The discovery of unusual solid-state molecular motion phenomena is of interest; along with accompanying dynamic regulation strategies such findings could allow for further advances in this area and might lead to the preparation of functional materials22,23,24,25,26,27,28,29.

Molecular motion involving host-guest complexes30,31,32 (e.g., inclusion complexes, pseudo rotaxanes) and mechanically interlocked molecules (MIMs)33,34 (e.g., rotaxanes and catenanes) has been extensively explored to create molecular machines that operate under solution phase conditions35. In contrast to what is seen in solution, where molecular motion is typically facile, the close packing characteristic of most solid-state forms makes molecular movement and its controlled induction difficult. This has made it challenging to develop systems displaying motion in the solid state. Finding ways to regulate this motion has proved even more difficult. One approach could involve the use of liquid additives (e.g., solvents) that could serve as effective mobilizers to promote motion within the solid state. The viability of this strategy has been documented in the case of liquid crystals36,37,38, classic industrial plastic processes39,40,41, and several crystal-to-crystal transformations42,43,44,45. However, to our knowledge, solid-state molecular machines that rely on the solvent-based modification of host-guest complexes to achieve molecular motion have not been reported. Nor have time-dependent, motion-induced changes in the emissive features of solid materials been observed. To the extent such effects are demonstrated it could lead to an ostensibly new type of molecular machine where solvents provide the fuel to drive the system and motion is reflected in easy-to-discern changes in the solid-state properties. In the limit, such machines could provide dynamic constructs that allow information to be stored, manipulated, and read out in an input-specific, time-dependent manner.

Here we report a solid-state molecular machine based on an all-hydrocarbon host-guest construct derived from D4d-CDMB-8 and perylene (Py). As-prepared crystalline forms of D4d-CDMB-8 and Py react with a variety of solvent molecules (e.g., acetonitrile, THF, nitrobenzene, toluene, etc.) to produce several solid-state forms. These forms contain (1) a core host-guest complex stabilized by non-covalent π–π and CH–π interactions between the D4d-CDMB-8 host and the Py guest and (2) a liquid domain arising from solvent capture that promotes molecular movement in the solid state. As detailed below, different solid-state forms, including, (i) co-crystalline phase, (ii) mixed crystalline, and (iii) amorphous state materials are obtained in the presence or absence of different solvents. These forms are characterized by different emissive features. This allows the various solvents to be distinguished. Other stimuli, such as mechanical impact (e.g., grinding), also lead to changes in the structural and optical properties. Moreover, a time-dependent response is seen. Systems derived from D4d-CDMB-8 and Py thus act as rudimentary molecular machines where the inputs are solvents and the result of motion is a readily discernible structural and optical response (Fig. 1a). The time-dependent nature of the transformations, as well as its origins in the choice of solvent and solid-state forms, has allowed the D4d-CDMB-8 and Py system to be elaborated to produce a set of 4D codes wherein time-dependent changes provide one information coding dimension and colours and patterns the other three (Fig. 1b).

Fig. 1: Schematic representations of solvent promoted solid-state molecular motion involving host-guest complexes and the 4D information coding the accompanying changes permit.
figure 1

a An organic solvent, applied to the solid forms as either a liquid or vapour, promotes solid-state molecular motion and leads to transformation between co-crystalline phases, as well as production of mixed crystalline states and an amorphous form. Also shown by use of highlighting (light blue vs orange) is the time resolved colour response produced under both room light and UV illumination (365 nm). See text for further details. b 4D information coding via a solvent-induced time-dependent vapoluminescent response.

Results

Host-guest system solid-state molecular motion determinants

CDMB-8 is an all-hydrocarbon macrocycle that exists in the form of two isomers, which are not easily interconverted46. In our initial study, we found that one isomer, namely D4d-CDMB-8, could act as a good receptor for curved aromatic molecules (e.g., C60 and C70) both in solution and the solid state46. This finding led us to explore whether the isomeric species, Cs- and D4d-CDMB-8, would interact with planar aromatic molecules. Perylene (Py) was chosen for initial studies. It was found that little if any discernible change in either the UV–Vis absorption, fluorescence emission or 1H NMR spectra was seen when Py was mixed with either Cs- or D4d-CDMB (Supplementary Figs. 25). On the other hand allowing a mixture of D4d-CDMB-8 containing 1 molar equiv. of Py in THF/CH3CN (1/1, v/v) to undergo slow evaporation yielded green-yellow prismatic single crystals of [(D4d-CDMB-8)2(Py•6CH3CN)•Py•2THF] (a solid-state construct referred to as Cα, Fig. 2c). Evidence for the formation of a D4d-CDMB-8Py co-crystalline complex in Cα came from a single crystal X-ray diffraction analysis (Supplementary Figs. 68). Each periodic repeat unit contains two macrocycles and two perylenes, as well as six CH3CN and two THF molecules.

Fig. 2: Complexation and decomposition of host-guest complexes involving solid-state molecular motion.
figure 2

Structures of, and transformations between, the co-crystalline material Cα, mixed crystalline species (e.g., Mα and Mβ), co-crystalline materials (i.e., Iα, Iβ, and Cδ), and the amorphous form (Am) produced by exposure to organic solvents (vapour or liquid forms) or other treatments (e.g., grinding). a, b, d, e, g Suggested structures of Iα, Am, Iβ, Mα, and Mβ base on PXRD analysis, 1H NMR, and fluorescence spectroscopic studies. c, f Single crystal structure of co-crystals Cα and Cδ.

Two interaction modes were observed for the perylene guests. One guest is seen to reside outside of D4d-CDMB-8 being held there through presumed CH–π interactions. Another perylene molecule is located between two neighbouring macrocyclic cavities, being stabilized through possible CH-π and π-π interactions with D4d-CDMB-8. An extended 1D linear packing structure is seen. An unusual cluster of six CH3CN molecules serves as bridge between two inserted perylene moieties. Further study revealed that Cα could be easily prepared on a gram scale using the above approach (Supplementary Movie 1). A powder X-ray diffraction (PXRD) analysis of the resulting bulk sample proved in good agreement with the simulated PXRD pattern calculated using the single crystal data for Cα (Supplementary Fig. 9).

When Cα was allowed to stand in the air for six days or subject to vacuum for 5 h at ambient temperature, partial loss of solvent was seen. The resulting solid form, referred to as Iα, is characterized by lattice features that are similar to those seen in Cα (Fig. 2a and Supplementary Figs. 1619). In order to remove all the organic solvent molecules present in the complex between D4d-CDMB-8 and Py, Cα was subject to grinding using a mortar and pestle. This action produced an amorphous material (Am, Fig. 2b), as inferred from a PXRD analysis (Supplementary Fig. 16b). A 1H NMR spectral study revealed that Am contains only macrocycle and perylene and is free of residual organic species (Supplementary Fig. 20). The same Am product can also be generated easily by simply grinding a 1:1 molar ratio mixture of D4d-CDMB-8 and Py in the absence of a solvent. Treating Am with THF/CH3CN (1/1, v/v), either by mixing with the solvents directly or exposing the solid material to their vapours (assumed to be saturated in air at 298 K), served to regenerate Cα (Supplementary Fig. 16c).

The weak interactions within Cα as inferred from the initial single crystal X-ray diffraction studies led us to hypothesize that the above liquid and organic vapour-induced phenomenological changes were structural in origin. In an initial effort to test this hypothesis, studies were carried out using nitrobenzene (NB) vapour. In fact, a particularly complex response was seen. A combination of 1H NMR spectral, in situ single crystal X-ray diffraction, and PXRD analyses (Supplementary Figs. 23 and 26) leads us to suggest that a stable intermediate material (Iβ) is produced as the result of nitrobenzene vapour covering the surface of Cα in 20 min (Fig. 2d). In this case, little apparent nitrobenzene-induced molecular motion is observed, and the lattice parameters associated with D4d-CDMB-8 and Py are retained.

Over longer time scales (i.e., from 3 to 21 h post exposure), a crystalline transformation is seen. Structural analyses provided support for the notion that all the components within Iβ undergo nitrobenzene vapour-induced motion to produce Mα, a mixed crystalline solid material containing separate crystals of both dimeric perylene (DPy) and [D4d-CDMB-8(NB)2•2NB] (Cβ) (Fig. 2e, Supplementary Figs. 23 and 27). Based on this observation, we infer that nitrobenzene promotes molecular motion in the solid state by providing liquid domains within the crystals of Cα.

Support for the above suggestion came from the finding that when crystals of Cα were recrystallized from nitrobenzene, product Mα was also obtained. The mixed crystalline material, Mα, could be transformed back to Iβ and Cα, albeit with different dynamics (1 min vs. 24 h, respectively), via exposure to THF/CH3CN (1/1, v/v) vapour (Supplementary Fig. 25). Dissolution and recrystallization of Mα in THF/CH3CN (1/1, v/v) also allowed for recovery of Cα. To our knowledge, this solvent-induced transformation between a co-crystalline species containing a host-guest complex and a corresponding crystalline mixture containing separated host and guest species is without precedent in the literature. It represents what to our knowledge is a unique type of solid-state molecular motion. Thus, efforts were made to explore it further.

As a first step, we sought to explore the effect of different organic solvents. When Cα was exposed to THF vapour, a combination of 1H NMR spectral, PXRD, and X-ray diffraction analyses (Supplementary Figs. 3133) provided support for the conclusion that a new crystalline mixture, referred to as Mβ, containing crystals of both [D4d-CDMB-8THF•THF] (Cγ) and DPy, was produced (Fig. 2g). When Cα was dissolved in THF and subject to slow evaporation, only blocks of colourless Cγ and yellow DPy crystals were obtained as deduced from a single crystal diffraction analysis. On this basis, we propose that the co-crystalline species Cα undergoes disassembly upon exposure to THF, which then allows formation of the mixed crystalline material, Mβ. Under identical exposure conditions THF vapour promotes this conversion much faster (3 min) than nitrobenzene vapour (21 h). Again, apparent molecular motion underlies the observed solid-state structural switching (Supplementary Fig. 32).

Exposure of the co-crystalline form Cα to toluene (Tol), either in liquid or vapour form, led to the formation of another co-crystalline solid (referred to as Cδ; Fig. 2f). Based on a qualitative comparison of the structures involved, considerable molecular motion is associated with this transformation. The PXRD pattern of Cδ proved to be a good match with the simulated pattern for a new co-crystalline material [(D4d-CDMB-8)2(Py)2•3Tol] (Supplementary Fig. 36b). 1H NMR spectral studies of Cδ in CDCl3 exposed to toluene vapour provided support for the notion that 3 molar equiv. of toluene replace all the THF and CH3CN molecules originally present in Cα thus producing Cδ (Supplementary Fig. 36c). When Cα was dissolved in toluene and subject to slow evaporation, only green-yellow blocks of [(D4d-CDMB-8)2(Py)2•3Tol] crystals were obtained as deduced from single crystal diffraction analyses. A single crystal X-ray diffraction structure of this material (i.e., [(D4d-CDMB-8)2(Py)2•3Tol]) revealed that the perylene guest is inserted head on into the cavity of the D4d-CDMB-8 host and that one toluene molecule is located between two D4d-CDMB-8 macrocycles (Supplementary Figs. 12, 13). On this basis, we propose that the Cα co-crystalline material undergoes solid-state molecular motion upon exposure to toluene vapour and then forms a new co-crystalline material, Cδ. This process is reversible. Exposing Cδ to saturated THF/CH3CN (1/1, v/v) vapour served to regenerate Cα (Supplementary Fig. 37). Under conditions identical to those used in the case of nitrobenzene and THF, the toluene vapour-induced conversion between Cα and Cδ proved relatively fast (1–5 min).

Emission-based colour response

A change in the fluorescence colour from green to orange was seen when Cα was converted to a mixed crystalline form (e.g., Mα or Mβ) by exposure to various organic solvents (either as vapours or used as for recrystallization) (cf. Supplementary Movie 2, and Supplementary Figs. 28, 34, and 46). The corresponding emission band appears at around 590 nm under conditions of UV illumination (λex= 365 nm). This matches the emission produced by the presumably aggregated Py in crystalline DPy. This correspondence was taken as evidence that mixed crystalline solids, such as Mα or Mβ, contain DPy crystalline domains and that these are responsible for the observed emission features. Iα and amorphous material (Am) was characterized by a green-yellow emission around 500 nm (Fig. 3, Supplementary Fig. 22). Crystals Cα and Cδ gave rise to a green luminescence (λem = ca. 480 nm) when subject to excitation at 365 nm using a handheld ultraviolet lamp. This emission is similar to that produced by perylene in solution at high concentrations (e.g., 10 mM in THF/CH3CN (1/1, v/v)) (Supplementary Fig. 21). This similarity leads us to propose that in the co-crystalline solid states, D4d-CDMB-8 serves to disperse the perylene molecules thus maintaining them in monomeric form. The fluorescence emission peak (λem), quantum yields (Φf), and fluorescent lifetimes (τf) of Cα, Am, Mα, Mβ, DPy, and Cδ, are summarized (see Table 1, and Supplementary Figs. 44, 45).

Fig. 3: Normalized emission spectra of various solid forms considered in this study.
figure 3

The spectra of Cα, Am, Mα, Mβ, DPy, and Cδ are shown (λem = 365 nm).

Table 1 Photophysical properties of various solid materials.

Given the clear distinction in the luminescence features of the different solid forms, the emission colours and spectra could be used to follow the structural changes associated with the conversion between the co-crystalline and mixed crystalline forms. Thus, these spectral changes could be used to monitor exposure to organic solvents. For instance, in a reflection of the complex time-dependent structural changes produced when Cα was exposed to nitrobenzene vapour, the emission of Cα at 482 nm was found to be quenched initially (a finding correlated with the proposed initial formation of Iβ), followed by the production of an aggregation emission of Py ascribed to DPy as complete conversion from Cα to Mα occurs (Supplementary Figs. 28 and 30).

Dynamic control over molecular motion and associated colour tuning

As highlighted by the conversion from Cα to Mα induced by nitrobenzene, the organic vapour-induced changes in the luminescent features of the various solid forms generated from D4d-CDMB-8 and Py proved time-dependent. The temporal response was found to be a function of both the species in question and the organic solvent employed (Fig. 4). For instance, the conversion of Cα to Cδ, Mβ, or Iβ and then to Mα required 1, 3, and 20 min followed by 21 h upon exposure to toluene, THF, and nitrobenzene vapour, respectively (Fig. 4a). Likewise, the regeneration of Cα from Am, Cδ, Mβ, or Mα via treatment with an identical THF/CH3CN (1/1, v/v) vapour mixture, required 3 min, 5 min, 30 min, and 24 h, respectively (Fig. 4b). Further inter-species transformations are summarized in Supplementary Fig. 41.

Fig. 4: Time-dependent transformation between various solid materials induced by organic solvents.
figure 4

a Time-dependent conversion of Cα to Cδ, Mβ, or Iβ and then to Mα seen upon exposure to different organic vapours. b Time-dependence of the regeneration of Cα from different solid forms, namely Am, Cδ, Mβ, and Mα, triggered by exposure to the same THF/CH3CN (1/1, v/v) vapour mixture.

The solvent-based differentiation is ascribed to relative affinities for the D4d-CDMB-8 host, as compared to Py, in the solid state. When the interaction between D4d-CDMB-8 and the organic solvent is strong, as true in the case of, e.g., THF and nitrobenzene, decomposition of the co-crystalline species comprising Py and D4d-CDMB-8 occurs. The net result is formation of mixed crystalline materials containing D4d-CDMB-8solvent and DPy. Such solid forms are characterized by an orange DPy emission (λem = 590 nm). In contrast, treatment with an organic species (e.g., toluene) with weaker affinity for D4d-CDMB-8 (compared with Py) only gives rise to a modified co-crystalline D4d-CDMB-8Py•solvent species (solvent = toluene). Such forms maintain the monomeric Py blue emission (λem = 480 nm).

4D code system

The structural changes and associated diagnostic luminescent features produced via the various solid forms upon exposure to organic solvent vapours were found to proceed on different, but highly reproducible time scales (Supplementary Figs. 4146). These differences and the temporal fidelity associated with the organic vapour-induced interconversions between Cα, Am, Iβ, Mα, Mβ, and Cδ, led us to consider that solid forms generated from D4d-CDMB-8 and Py could be used to create a time-dependent dynamic 4D code system. As an initial test of this proposition, Am was loaded onto scraps of paper (0.5 × 0.5 cm) to provide a first fluorescent block. Independent treatment with nitrobenzene, THF, and toluene vapour was then used to generate another three fluorescent blocks, namely Mα, Mβ, and Cδ (Fig. 5a). A printed colour pattern A0 was then generated by means of a commercial colour printer (Fig. 5b). Fluorescent blocks containing Am, Mα, Mβ, and Cδ were then added into the printed pattern to obtain a 3D colour-based pattern (A1). Pattern A1 was found to produce fluorescent pattern A when exposed to UV light at 365 nm using an ultraviolet lamp under otherwise normal laboratory conditions (Supplementary Movie 3). Exposing pattern A to THF/CH3CN (1/1, v/v) vapour produces patterns B-D over different time scales, namely 3–10 min, 0.5–5 h, and greater than 24 h, respectively (cf., Supplementary Movie 4).

Fig. 5: Schematic representation of a 4D code information system based on a time-dependent organic vapour-based response.
figure 5

a Preparation of code blocks Am, Mα, Mβ, and Cδ. b Transformation and masking mad possible by using (i) an original printed colour pattern, (ii) room and/or UV light, and (iii) the time-dependent organic vapour-induced changes in the luminescent features of the constituent code blocks, Am, Mα, Mβ, and Cδ. Additional photographs of the various patterns are included in the Supporting Information.

To demonstrate the power of this time-dependent approach to coding, we programmed information sets I and II within the time-dependent patterns B and C, respectively. The information in question could be accessed directly by scanning these two codes by means of a smart phone. However, different delay times, namely 3–10 min and 0.5–5 h, were required to read out the information (Supplementary Movie 4). As the result of this time-dependent feature, a 3D code system (a planar coloured array) is transformed into a dynamic information coding system characterized by 4D complexity. The net result is a set of code systems with a high degree of inherent confidentiality. This reflects the fact that (i) the different code arrangements (placement of coloured building blocks), (ii) the light source (UV vs Vis), (iii) choice of organic vapour, and (iv) the exposure and monitoring time scales may be used to generate various codes that allow information to be read out in a temporally defined manner. Treating the original pattern A with other vapours or set in air was found to give rise to other patterns (EJ) characterized by different formation lifetimes (see Supplementary Figs. 4749).

Discussion

We have shown that molecular motion can be induced by exposure of solid-state host-guest complexes to appropriately chosen organic solvents and that the resulting changes in structure give rise to distinct luminescent features. In the case of the present materials, which are based on the all-hydrocarbon components D4d-CDMB-8 and Py, the underlying molecular scale motion and the associated changes in the solid-state structures was inferred from a combination of single crystal X-ray diffraction analyses and PXRD studies. A tuneable temporal response, which proved to be a function of both the solid form employed and the chosen organic solvent, was seen. This allowed a dynamic 4D code library to be developed wherein multiple independent keys, including time and a specific organic vapour, are needed in order to read out pre-programmed information.

Methods

General considerations

Deuterated solvents were purchased from Cambridge Isotope Laboratory (Andover, MA). All other solvents and reagents were purchased commercially (Aldrich, Acros, or Fisher) and used without further purification. NMR spectra were recorded on Bruker AVANCE III 500WB, AVANCE 400, or 400JNM-ECZ400S spectrometers. The 1H NMR chemical shifts are referenced to residual solvent signals (tetrachloroethane-d2 (TCE-d2): δH = 5.95 ppm, δC = 74.10 ppm. CDCl3: δH= 7.26 ppm. THF-d8: δH= 1.75, 3.60 ppm. CH3CN-d3: δH= 1.94 ppm). UV–vis spectra were collected on a Shimadzu UV-2450 instrument. Fluorescence emission spectra and lifetimes (τf) were collected on an Edinburgh Instruments FS5 spectrometer. Fluorescence quantum yields (Φf) were obtained using a HAMAMATSU Quantaurus-QY instrument. PXRD studies were carried out using a Shimadzu XRD-7000 setup. Pictures and movies were recorded on a smart phone (Vivo X23) or an industrial digital camera (E3ISPM05000KPA) linked to a stereo microscope (Carton SPZT-50PFM). The information codes were registered on www.colorzip.com and read by a smart phones (iPhone 5S) using the COLORCODETM app, which at the time the work was performed could be downloaded for free from the Apple app store.

Single crystal X-ray diffractions

Unless otherwise noted, single crystals used to obtain the X-ray diffraction structures reported in the main text grew as yellow prisms, blocks, or colourless prisms. The data crystals used for single crystal analyses were cut from clusters of the corresponding crystals. The data were collected on Saturn724 + (2 × 2 bin mode) or SuperNova, Dual, Cu at Home/Near, AtlasS2 diffractometers. Data reduction was performed using the CrystalClear (Rigaku Inc., 2007) or CrysAlisPro 1.171.39.32a (Rigaku OD, 2017) software packages. The structures were refined by full–matrix least–squares on F2 with anisotropic displacement parameters for the non–H atoms using SHELXL-201447. The hydrogen atoms were calculated in idealized positions with isotropic displacement parameters set to 1.2 × Ueq of the attached atom (1.5 × Ueq for methyl hydrogen atoms). Definitions used for calculating R(F), Rw(F2) and the goodness of fit, S, are given in Supplementary Tables 1, 2. Neutral atom scattering factors and values used to calculate the linear absorption coefficient are from the International Tables for X-ray Crystallography (1992)48. All ellipsoid figures were generated using SHELXTL/PC49.

Synthesis of CDMB-8

Under an argon atmosphere, a mixture of 1 (600 mg, 0.88 mmol), 2 (500 mg, 0.88 mmol), Pd(dppf)2Cl2·CH2Cl2 (148 mg, 0.18 mmol), Cs2CO3 (14.4 g, 44 mmol), and 1000 mL deaerated toluene were added to a 2 L three-necked round-bottomed flask. The reaction mixture was heated under reflux for 12 h. After allowing to cool to room temperature, the volatiles were removed using a rotary evaporator. The resulting residue was dissolved in 100 mL CH2Cl2, then filtered through a short neutral alumina column and washed with CH2Cl2 (50 mL). The volatiles (primarily CH2Cl2) were removed from the filtrate via rotary evaporation. The resulting residue was dissolved in 50 mL cyclohexane and purified by a neutral alumina column using cyclohexane as the eluent to give analytically pure Cs-CDMB-8 and D4d-CDMB-8 as a white solid 110 mg (15%) and 180 mg (25%), respectively. Cs-CDMB-8: 1H NMR (500 MHz, TCE-d2, 278 K) δ (ppm): 7.08 (s, 2H), 7.04 (s, 2H), 7.02 (s, 2H), 7.01 (s, 1H), 6.96 (s, 1H), 6.91 (s, 1H), 6.89 (s, 2H), 6.86 (s, 2H), 6.83 (s, 2H), 6.81 (s, 2H), 2.16 (s, 6H), 2.12(s, 6H), 2.11 (s, 6H), 2.09 (s, 6H), 2.08 (s, 6H), 2.07 (s, 12H), 2.02 (s, 6H). D4d-CDMB-8: 1H NMR (500 MHz, TCE-d2, 278 K) δ (ppm): 7.03 (s, 8H), 6.75 (s, 8H), 2.01 (s, 48H). Both products were further characterized by single crystal X-ray diffraction analysis (Supplementary Fig. 1).

Preparation of co-crystal materials

Subjecting mixtures of D4d-CDMB-8 (1.00 mM), and 1 molar equiv. of perylene in THF/CH3CN (1/1, v/v) or toluene (Tol) to slow evaporation resulted in the formation of single crystals of [(D4d-CDMB-8)2(Py•6CH3CN)•Py•2THF] (Cα) or [(D4d-CDMB-8)2(Py)2•3Tol] (Cδ), respectively. Separately, single crystals of [D4d-CDMB-8(NB)2•2NB] (Cβ) were obtained via the slow evaporation of D4d-CDMB-8 (1.00 mM) in nitrobenzene (NB), or by dissolving Cα in nitrobenzene and subjecting the resulting solution to slow evaporation. These various single crystals were analyzed by X-ray diffraction methods.

Organic solvent vapour treatment equipment and conditions

Small borosilicate glass fragments (thickness: 0.3 cm) were placed in a 100 mL petri dish, and a borosilicate glass plate (4 × 4 × 0.3 cm) was stacked up on these borosilicate glass fragments. The test materials were loaded on a small borosilicate glass block (0.5 × 0.5 × 0.1 cm) and set in the centre of the glass plate. Two millilitres of organic solvents liquid were dropwise added to the bottom of the petri dish, which was immediately covered with the lid (Supplementary Fig. 14). Note: These conditions provide the organic solvent vapours in near-saturated form in air at room temperature (298 K).

In situ time-dependent emission spectra collection

Briefly, the test material is loaded on a paper square (0.5 × 0.5 × 0.1 cm). The paper square is fixed on a quartz plate (3 × 1 × 0.1 cm) by means of a copper wire. The quartz plate is then placed in a 20 mL borosilicate glass bottle and set on the sample stage of an Edinburgh Instruments FS5 instrument. The excitation light (365 nm) is then focused on the sample and the spectra features recorded. At this juncture, 0.5 mL of the organic solvent in question was dropped in liquid form onto the bottom of the glass bottle with an injector (Supplementary Fig. 15). The setup was then covered with the lid immediately (without tightening so as to allow venting to the atmosphere. these conditions provide the organic solvent vapours that are essentially saturated in air at room temperature (298 K)). The emission spectra were recorded as a function of time after the organic solvent in question was added.

The equipment and conditions for 4D code generated

A small glass fragment (thickness: 0.3 cm) was placed in a 100 mL petri dish, and a borosilicate glass plate (4 × 4 × 0.3 cm) was stacked up on theses glass fragments. Predetermined patterns were set on the glass plate, 2 mL of the organic solvent in question (in liquid form) was are added to the bottom of petri dish, which was immediately covered with the lid (these conditions provide the organic solvent vapours in near saturated form in air and at room temperature (298 K)) (Supplementary Fig. 50). Pictures and movies were recorded under natural with/without UV light (using a commercial ultraviolet lamp (365 nm)). Movies showing the conversion of pattern A0 to pattern D upon treatment with THF/CH3CN (1/1, v/v) vapour are given in Supplementary Movies 3, 4.