**3. Results**

## *3.1. Equilibrium Properties*

The qualitative phase diagram of the bulk system was published in previous work [17] and is sketched in Figure 2. The three isochores studied for each pore width *W* are marked with symbols in this diagram. These isochores correspond to values at which the clustercrystal, the hexagonal and the lamellar phases are stable at low temperatures in bulk. The structures of the confined fluid in the slit pores at *T*∗ = 0.3 obtained from the MD simulations are shown in Figure 3. The stability of these structures with temperature was studied by performing simulations in the *NVT* ensemble at *T*∗ = 0.20–0.50, and the results are summarised in Figure 2, where the colors of the symbols represent the various structures formed. The results obtained in each density region are described in detail in what follows.

**Figure 2.** Sketch of the bulk phase diagram, using data from Ref. [17]. The state points studied for each pore size *W*∗ = 5, 7, 9 and 11 are marked with different symbols, and their colours indicate the structure adopted by the confined fluid in each thermodynamic state, as provided in the legend.

**Figure 3.** Local density isosurfaces *<sup>ρ</sup>*<sup>∗</sup>*iso* = 0.30 for all the ordered microphases obtained at different slit widths, *W*<sup>∗</sup>. Note that the density chosen for the isosurfaces is somewhat lower than that in our previous work on SALR systems modelled with the square-well linear model (in which we chose *<sup>ρ</sup>*<sup>∗</sup>*iso* = 0.40) [25–27]. The reason for this new choice is that the clusters obtained with the Lennard-Jones plus Yukawa model used in this work are appreciably smaller [17]. Two views are presented for cluster-crystal and hexagonal phases and one for the lamellar phase. The number densities in reduced units, *ρ*<sup>∗</sup>, are specified and the temperature is *T*∗ = 0.30.

#### 3.1.1. Low Density: The Cluster-Crystal

Let us start discussing the structures obtained by the MD simulations at *T*∗ = 0.3 and low densities, *ρ*∗ ≈ 0.12 − 0.16 (Figure 3). Under these conditions the fluid is still able to organise into an ordered cluster-crystal under confinement, except for the pore size *W*∗ = 9. In particular, the fluid forms one layer of hexagonally-packed clusters for *W*∗ = 5 and *W*∗ = 7, the difference being that clusters are roughly spherical in the narrowest pore and adopt a spherocylindrical shape in the *W*∗ = 7 pore. At *W*∗ = 11, the pore is wide enough to host a stack of two hexagonally-packed layers of nearly spherical clusters. Finally, at

*W*∗ = 9, the system assembles into a structure composed of two layers formed by a mixture of spherical and spherocylindrical clusters, in which some local hexagonal ordering can be observed, but that is globally disordered.

The diameter of the clusters (*d*<sup>∗</sup>0 = *d*0/*σ*) measured from the local density isosurfaces projected on the plane perpendicular to the pore walls, as well as the distance (*l*∗0 = *l*0/*σ*) between nearest neighbour clusters are given in Table 2. For the three pore widths for which ordered cluster structures are observed, *l*∗0 and *d*∗0 adopt values relatively close to those of the bulk system, with a maximum deviation of about 5%–6%. Larger differences can be seen in the CSD (Figure 4, left panel). At *T*∗ = 0.30, the bulk CSD is bimodal, exhibiting two peaks of similar probability at *n* = 19 and *n* = 23 [17]. For *W*∗ = 5 the CSD is slightly narrower than in the bulk system and peaks at slightly smaller sizes, whereas for the remaining pore widths, the CSD is shifted to larger sizes. This effect is especially pronounced for *W*∗ = 7, in which the maximum is located at *n* = 31, consistently with the formation of elongated clusters (Figure 3).

**Table 2.** Estimation of the distance between clusters (*l*∗0 = *l*0/*σ*) and the average cluster size (*d*<sup>∗</sup>0 = *d*0/*σ*) in bulk and in the confined systems. The cluster size *d*∗0 corresponds to the average cluster diameter in spherical and cylindrical clusters, and to the width of the lamellae in the lamellar phase.


**Figure 4.** Cluster-size distributions of the cluster-crystal in bulk and in the slit pores of width *W*∗ at *T*∗ = 0.3 and *T*∗ = 0.4.

The reason why the cluster-crystal becomes incommensurate for the *W*∗ = 9 slit pore can be rationalised from the values of *d*∗0 and *l*∗0 . This pore is too wide for the fluid to organize into a single layer of spherocylinders with their axial directions aligned perpendicularly to the pore walls. In spherocylindrical clusters that are 7*σ* high, i.e., of height comparable to the accessible pore width in which the particles can move, many particles experience repulsive interactions, making this configuration energetically unfavourable. A possible alternative would be to form two layers of hexagonally-packed spherical clusters. Taking the values of *d*∗0 and *l*∗0 from the bulk system, these two layers can be nicely accommodated in a slit pore of width *W*∗ ≈ 2 + *d*∗0 + √2/3*l*<sup>∗</sup>0 = 9.9, where *d*∗0 is the average cluster diameter, √2/3*l*<sup>∗</sup>0 is the *z*-distance between two hexagonally-packed layers in which

the distance between the nearest clusters is *l* ∗ 0 , and the factor 2 takes into account that the centre of the particles can not ge<sup>t</sup> closer than *σ* to the pore walls. Thus, in order to accommodate these two layers in the *W*∗ = 9 pore, either the distance between the two layers and/or the shape of the clusters would have to be modified from those in the bulk phase. Our simulations indicate that in these conditions the system is not able to find an ordered cluster phase, forming instead a structure in which spherical and elongated clusters coexist and exhibiting only local order in some regions. Finally, in the pore size *W*∗ = 11, two layers of the bulk cluster-crystal can be fitted leaving some extra room in the pore. In this case, the cluster-crystal is somewhat expanded in order to occupy the whole accessible volume within the pore, as evidenced by the larger values of *d*∗ 0 (as well as in the shift of the CSD to larger sizes, Figure 4) and of *l* ∗ 0 as compared to in bulk.

Focusing now on the stability of the assembled structures with temperature, our simulations indicate that the confined cluster-crystal phase remains stable up to higher temperatures than in bulk, except for the pore width *W*∗ = 9, which, as we have just seen, is incommensurate with the bulk cluster-crystal (Figure 2). In particular, the cluster-crystal is able to survive up to *T*∗ = 0.30 when confined in pores of sizes *W*∗ = 5, 7 and 11, whereas in bulk it melts at *T*∗ = 0.20 − 0.25 depending on the density. Shifts in the coexistence lines between two phases are common under confinement and have been observed either in complex [26,27,35] and simple [36] fluids. On the contrary, for the pore size *W*∗ = 9, the structure remains only partially ordered down to *T*∗ = 0.20.

As can be seen in Figure 5 (first row), the particle density profiles measured along the direction perpendicular to the pore walls, exhibit pronounced maxima and minima, indicating the ordering of the particles in layers for all the investigated pore widths and at all temperatures, becoming particularly sharp at low temperatures. At *T*∗ = 0.20, the density profiles in the *W*∗ = 5 and *W*∗ = 7 pores are larger than zero anywhere within the pore, except for distances shorter than the particle repulsive core radius, which reflects that a single layer of clusters has been formed. However, the number of maxima in the density profiles differs in the two pores: four for *W*∗ = 5 and six for *W*∗ = 7. In both cases, two of these maxima form at the walls and are less pronounced than those in the pore central region. The distance between two adjacent maxima is of the order of the particle diameter, being somewhat shorter at the pore central region (about 0.7 *σ* for *W*∗ = 5 and 0.9 *σ* for *W*∗ = 7) than at the pore walls (about 1.0 *σ* in both cases). For the two widest pores, *W*∗ = 9 and *W*∗ = 11, the formation of two clearly different layers of clusters is reflected in the pronounced decrease of the local density at the pore central region. Curiously, this decrease is more pronounced for *W*∗ = 9 than for *W*∗ = 11 at all temperatures, despite the fact that the confined fluid is more ordered at *W*∗ = 11. Especially remarkable, is that at *T*∗ = 0.5, the two layers are significantly smoothed for *W*∗ = 11 but are still visible for *W*∗ = 9. As temperature is lowered, smaller peaks develop within each of these two layers, and their interdistance is again of the order of the particle diameter (about 0.95 *σ* for *W*∗ = 9 and 0.90 *σ* for *W*∗ = 11).

The presence of very sharp maxima and minima in the density profiles at low temperatures indicates internal ordering of the clusters, a phenomenon already observed in the bulk system [17]. This motivated us to monitor the internal ordering of the clusters as a function of temperature by measuring the fraction of particles within local icosahedral environments as identified with the CNA analysis. As can be seen in Figure 6 (top panel), at these low densities the internal ordering exhibits a similar temperature behaviour as in the bulk system. Clusters are internally ordered at low temperatures (as only the inner particles have icosahedral local environments, a fraction of particles in icosahedral environments of around 0.1 indicates that almost nearly all the clusters are internally ordered [17]), and gradually become disordered as the temperature increases. Visual inspection of the configurations (see Figure 6) reveals that, at the lowest temperature, the clusters exhibit well defined geometries, often consisting in interpenetrated icosahedra sharing a five-fold axis (two, three or even four icosahedra can be merged to form clusters with *n* = 19, *n* = 25 and *n* = 31 particles, which appear with relatively large probabilities, as shown in Figure 4

**Figure 5.** Density profiles along the *z*-direction at different temperatures and slit widths.

**Figure 6.** Top panel:the fraction of particles with local icosahedral environments as a function of temperature for the bulk and the confined systems at a low density at which the cluster-crystal phase is stable. Central panel: the fraction of particles with local icosahedral environments as a function of temperature for the bulk and the confined systems at an intermediate density at which the cylindrical phase is stable. Bottom panel: the fraction of particles within a hexagonal local environment as a function of temperature for the bulk and the confined systems at a high density at which the lamellar phase is stable. Note that the classification of particles in these plots is based solely on analysis of the local structure around each particle; the dynamics of the particles was not taken into account in this analysis.

#### 3.1.2. Intermediate Density: The Hexagonal Phase

At intermediate densities (*ρ*<sup>∗</sup> ≈ 0.23 − 0.27) and *T*∗ = 0.3, the confined fluid organises into cylindrical clusters for the four pore sizes, as in the bulk system (two different views for each pore are shown in Figure 3), but there are clear structural differences depending on the pore width. For *W*∗ = 5, one layer of cylindrical aggregates with roughly circular cross-sections is formed. This is hardly surprising because the bulk cylinder diameter (*d*0 = 2.75 *σ*) is comparable to the accessible pore width (which is approximately equal to *W*∗ − 2*σ*). The diameter of the confined cylinders becomes somewhat larger than in the bulk system, probably to occupy as much as possible of the available pore space (see Table 2). For a wider pore ( *W*∗ = 7), the fluid organises into two layers of cylindrical clusters. The cylinders in this structure are deformed with respect to those in the bulk phase, adopting ellipsoidal (instead of circular) cross-sections. This suggests certain incommensurability of the pore size with the bulk cylindrical phase that can be overcome with a small deformation of the cylinders. As a rough estimation, two layers of the bulk cylindrical phase can fit in a pore of width *W*∗ = 2 + *d*∗ 0 + √3/2*l* ∗ 0 ≈ 9.5, where the term √3/2*l* ∗ 0 accounts for the distance in the *z* direction between the centres of two layers of cylinders in which the distance between the nearest cylinders is *l* ∗ 0 . Surprisingly, this pore size estimate is significantly larger than the actual pore width ( *W*∗ = 7), but the cylindrical phase is still able to survive by deformations of the cross-section of the cylinders and probably also by adjusting the distance between them. As a consequence of this, the average energy of the confined fluid in the *W*∗ = 7 pore (*u*∗ = −1.904) is higher than in the bulk system (*u*∗ = −2.065).

Following the same reasoning, the pore size *W*∗ = 9 has almost the appropriate size to fit two layers of the bulk hexagonal phase and, thus, one would expect that the fluid would be less compressed in this case. This is exactly what we observe in the simulations. The fluid still organises into two layers of cylindrical clusters, which now adopt nearly circular cross-sections as in bulk. On the contrary, for *W*∗ = 11, the pore size is somewhat wider than needed for hosting two perfect layers of the bulk cylindrical phase. This is partially offset by forming slightly thicker cylinders and increasing the distance between them as compared to the bulk phase (see Table 2). Note that the orientation of the cylinders with the simulation box is different depending on the pore size to adjust the separation between the nearest cylinders to a value similar to that of the bulk system.

The cylindrical phase is destabilised at temperatures slightly lower than in the bulk system, in particular it remains stable up to *T*∗ ≈ 0.30, whereas in bulk it survives up to *T*∗ ≈ 0.35 (Figure 2). The number of layers of cylinders can again be easily inferred from the local density profiles *ρ*(*z*) and, except for the narrower pore, the layering of particles at low temperatures is enhanced as compared to the cluster-crystal (see Figure 5). For the pore size *W*∗ = 5, one single layer of cylinders is formed, and the density profiles exhibit two rounded peaks of enhanced density, indicating a mild tendency of the particles in the cylinders to sit preferentially in these two planes. For *W*∗ = 7 and *W*∗ = 9, two layers of cylinders are formed, and this is reflected in the density profiles by a region of low density between the two layers. At low temperatures, each of these two layers of cylindrical clusters exhibits three peaks, the intensities of which vary with the pore width. For the two pore sizes, the central peak in each of the two layers is the highest. The two edge peaks away from the centre of the cylindrical clusters are equal in the *W*∗ = 9 pore, but in the *W*∗ = 7 pore the peak closer to the pore centre is smaller.

These profiles are consistent with the previous observation from the 3D local density plots shown in Figure 3, in that the cross-sections of the cylinders is circular in the *W*∗ = 9 pore, but are significantly deformed in the *W*∗ = 7 pore. The two peaks closer to the pore centre become shoulders of the central peak of each layer of cylindrical clusters at *T*∗ = 0.3 in the *W*∗ = 7 pore, but they survive up to *T*∗ = 0.4 in the *W*∗ = 9 pore. The same occurs for the region of very low density between the two layers of cylinders that persists up to *T*∗ = 0.3 in the *W*∗ = 9 pore, but that becomes a region of small density in the *W*∗ = 7 pore at this same temperature. For *W*∗ = 11, the two layers of cylinders are not separated

by a region of low density even at the lowest considered temperature. The reason is that the cylinders adopt a sinusoidal shape in the direction perpendicular to the walls to use as much as possible of the free pore volume that remains by fitting two layers of cylinders in this wide pore.

Visual inspection of the configurations reveals that, as in the bulk system [17], at low temperatures the cylindrical clusters adopt ordered configurations consisting in decagonal tubes made by interpenetration of isosahedra sharing a five-fold axis. As can be seen in Figure 6, central panel, the evolution of the fraction of particles with icosahedral symmetry with temperature exhibits a similar behaviour to the bulk system. Unsurprisingly, the results are almost exactly the same as those of the bulk system for the most commensurate pore *W*∗ = 9, and the larger reduction of order is observed for the most incommensurate pore *W*∗ = 7.

#### 3.1.3. High Density: The Lamellar Phase

At high densities (*ρ*<sup>∗</sup> ≈ 0.42–0.49) and *T*∗ = 0.3, the fluid organises into lamellar structures for the three larger considered pore sizes, as in bulk. This is the expected behaviour, as the geometry of the pores is fully compatible with the lamellar phase. At *W*∗ = 5, the fluid occupies the whole pore volume, that is wider than the size of bulk lamellae (*d*<sup>∗</sup>0 = 2.9 to be compared to *d*∗0 = 2.2 in bulk, see Table 2). For *W*∗ = 7, two lamellae are formed, this time narrower than in the bulk system (*d*<sup>∗</sup>0 = 1.5 to be compared to *d*∗0 = 2.2 in bulk), and with a slightly shorter separation between them (*l*∗0 = 3.7 versus *l*∗0 = 4.6 in bulk). For *W*∗ = 9, the system assembles into two lamellae, the thickness and interdistance of which are comparable to those in bulk, indicating that this pore size matches very well the periodicity of the bulk lamellar phase. For *W*∗ = 11, a third lamella is formed, although at this temperature, *T*∗ = 0.3, both the width of the lamellae and especially the distance between them are reduced with respect to the bulk phase to adjust to the available pore volume.

The lamellar phase is able to survive up to *T*∗ = 0.4 for all pore widths, i.e., at temperatures higher than the bulk system in which the transition occurs at *T*∗ ≈ 0.35 [17] (see Figure 2). Again this is not entirely surprising, as the geometry of the pores is compatible with the lamellar phase. The density profiles *ρ*(*z*) further reveal that the lamellar phase is particularly stable with temperature, especially for the pore sizes *W*∗ = 7 and *W*∗ = 11, in which the fluid organises into two and three lamellae, respectively. Each lamella is made of two molecular layers, as evidenced by the two sharp peaks observed in each layer up to relatively high temperatures (up to *T*∗ = 0.4 for *W*∗ = 7 and up to *T*∗ = 0.3 for *W*∗ = 11). The sharpness of these peaks indicates that the internal structure of the lamellae remains ordered at these temperatures. Curiously, for *W*∗ = 11 and *T*∗ = 0.4 the two lamellae close to the pore walls are still very structured (they are internally ordered), but the middle one exhibits two much more rounded peaks (it is internally disordered). This indicates that the proximity to the walls induces the internal ordering of the lamellae, and such internally ordered lamellae can coexist with disordered lamellae away from the walls. For the pore width *W*∗ = 9, only two lamellae are formed, but each one is now composed of two equally populated molecular layers (next to the pore walls) and by an incomplete third hexagonally-packed layer facing the centre of the pore, signalled by a less sharp peak. In this case, the peaks in each lamella are already rounded at *T*∗ = 0.3, indicating that in this case the internal ordering of the lamellae is less significant at a high temperature. As found for the cluster-crystal and the cylindrical phases, the tendency of the particles to arrange in layers parallel to the walls is significantly reduced in the narrowest pore (*W*∗ = 5), which only exhibits fairly rounded peaks even at low temperatures.

The internal ordering of the lamellae was investigated by measuring the fraction of particles with solid-like environments using the Lechner and Dellago local order parameter [37]. As can be seen in Figure 6 (bottom panel), the fraction of solid-like particles as a function of temperature is strongly dependent on the pore size, differing also from the bulk phase for all pore sizes. At *T*∗ = 0.2 the vast majority of the particles have local solid

environments (close to 100%) for all pores, except for *W*∗ = 9, in which case it drops to 90%. This is due to the growth of a third incomplete molecular layer facing the centre of the pore in each lamella. For the *W*∗ = 7 pore, the transition from ordered to disordered lamellae is discontinuous as in bulk, but occurs at a higher temperature than in the homogeneous system. For *W*∗ = 11, the decay of the number of particles in ordered environments is more gradual, e.g., at *T*∗ = 0.4 about 60%–65% of the particles have solid-like environments. The reason is that, as mentioned before, the two lamellae at the pore walls become disordered at a higher temperature ( *T*∗ = 0.4) than the one at the centre of the pore ( *T*∗ = 0.3) (see Figure 6). These results indicate that the walls promote the internal ordering of the lamellae (i.e., they remain ordered up to a higher temperature than in bulk), but those lamellae that are not next to the walls ge<sup>t</sup> ordered at similar temperatures as in bulk. Finally, for *W*∗ = 5 and *W*∗ = 9, the lamellae become disordered at lower temperatures than in bulk, which is attributed to some incommensurability of the bulk lamellar phase with these pore sizes.

#### *3.2. Dynamic Properties*

Once we had characterised the equilibrium phase behaviour, we also analysed the dynamics at temperatures around which the periodic microphases start to form. The MSD measured in the four pore sizes at densities at which the cluster-crystal, the cylindrical and lamellar phases are formed are collected in Figure 7, and the diffusion coefficients obtained from these data are plotted in Figure 8. The comparison of the diffusion constant is not made either at constant density nor at constant chemical potential for all the pores, as it is often done in the literature. Instead, in this work we choose to make the comparison under those conditions at which the most ordered structure was obtained in each pore size (which are those shown in Figure 3), as our aim is to investigate if the diffusion of the particles is altered by confinement under the temperature and density conditions at which the periodic microphases start to form from the fluid phase. Note that it is not always possible to obtain different ordered structures at the same density or the same chemical potential for different sizes of the pores, because, due to incommensurability, these ordered structures may be destabilised and become disordered.

#### 3.2.1. Low Density: Cluster-Crystal

The behaviour of the MSD at low densities and temperatures just above those at which the cluster-crystal starts to form, *T*∗ = 0.4, is qualitatively similar in the four considered pore sizes and also in the bulk system. The MSD at long times is diffusive for all the pore sizes and in the bulk system. The diffusion coefficient, calculated using Einstein's relation (Equation (7)), as a function of pore size is shown in Figure 8. As can be seen, the diffusion coefficient has a nonmonotonic behaviour with the pore size. The maximum diffusion is achieved for the narrowest pore, in which case the diffusion coefficient is even higher than for the bulk system. The minimum diffusion corresponds to the *W*∗ = 7 pore, and then diffusion increases with pore size until it reaches the bulk behaviour. Note that the density in the narrowest pore is somewhat lower than in the remaining pores and than in bulk, and this might partly explain why diffusion is faster in this system. However, it is also worth mentioning that the narrowest pore is the only one in which the fluid is still organised in intermediate size clusters at *T*∗ = 0.4, as in the bulk system (see Figure 4, right panel). On the contrary, in the remaining pore sizes, the CSD distributions are shifted to larger sizes. It is important to highlight that the nonmonotonic variation of the diffusion constant with the pore size cannot be explained solely based on the density of the fluid. For example, the diffusion constant for *W*∗ = 7 (*ρ*<sup>∗</sup> = 0.1561) is lower than that for *W*∗ = 9 (*ρ*<sup>∗</sup> = 0.1668), in spite of the density of the fluid being higher in the latter case.

On the contrary, at a temperature just below that at which the periodic microphases start to be seen, *T*∗ = 0.3, the behaviour of the MSD at long times depends on the pore size. For the narrowest pore, the particle movement is diffusive as in the bulk system, but, for the remaining pores, it becomes subdiffusive, this effect being more pronounced for the pore size *W*∗ = 7. Our hypothesis is that the lower diffusion in the pore *W*∗ = 7 is a

consequence of the higher ordering of the clusters as compared to the defective structures found for *W*∗ = 5 and especially for *W*∗ = 9, as can be seen in the density isosurface plots shown in Figure 3.

**Figure 7.** Particle mean squared displacement (MSD) of the fluid confined in slit pores of different width *W*∗ at different temperatures at densities at which the cluster-crystal (**top** row), the cylindrical (**middle** row) and the lamellar (**bottom** row) phases are stable. For comparison, the MSD for the bulk system under similar thermodynamic conditions are also included. The dashed black and blue lines show the expected behaviour for diffusive (MSD∝ *tβ*, *β* = 1) and ballistic (*β* = 2) behaviour.

**Figure 8.** Diffusion coefficient as a function of pore width, for low (**left** panel), medium (**middle** panel) and high (**right** panel) densities, at temperatures around those at which the periodic microphases start to spontaneously form.

#### 3.2.2. Intermediate Density: Cylindrical Phase

In the cylindrical phase the particle movement is diffusive at long times either at temperatures just above (*T*∗ = 0.4) and below (*T*∗ = 0.3) those at which the cylindrical clusters start to form. At *T*∗ = 0.4, the diffusion coefficient adopts similar values for the four pore sizes, being higher in confinement than in the bulk system (Figure 8, central panel). Note that this cannot be explained on the basis of the densities, because, depending on the pore size, the chosen states exhibit both higher and lower densities than the bulk system. Curiously, both in confinement and in bulk, the system is organised in a percolating fluid at this temperature. Our hypothesis is that, consistently with the shift to lower temperatures of the stability region of the cylindrical clusters with respect to the bulk system (Figure 2), confinement partly destroys the clustering at these intermediate densities, thus facilitating the particle diffusion.

At *T*∗ = 0.3, the diffusion coefficient is similar in the bulk system and in the *W*∗ = 5 and *W*∗ = 11 pores, adopting somewhat larger values for *W*∗ = 7 and *W*∗ = 9. It is important to note, however, that cylinders are parallel to one of the edges of the square section of the simulation box in the *W*∗ = 7 and *W*∗ = 9 pores, whereas for *W*∗ = 5 and *W*∗ = 11, they are tilted with respect to one of the edges. Thus, in the former case each cylinder is an independent cluster, but in the latter case all the cylinders are connected to each other due to the periodicity of the system. As a consequence, the cylindrical clusters can move with respect to their neighbours in the narrowest and widest considered pores, but not in the *W*∗ = 7 and *W*∗ = 9 pores. Thus, it is not possible to make a fair comparison between the diffusion coefficients as a function of the pore sizes in this case.

#### 3.2.3. High Density: Lamellar Phase

In the lamellar case the MSD exhibits diffusive behaviour at long times at temperatures somewhat above (*T*∗ = 0.5) those at which the lamellar phase starts to form. At this temperature, the diffusion coefficient under confinement is significantly lower than that of the bulk system for the four considered pore sizes. Our hypothesis is that this could be related to the more efficient packing obtained in the four confined systems as compared to that in the bulk system. Note however, that there is some ambiguity on how to define the density in the confined pores, as one can take into account or not the particle excluded volume close to the pore walls.

At *T*∗ = 0.4, the diffusion coefficient of the lamellar phase increases with the pore size, except for *W*∗ = 7, the size at which the fluid exhibits the higher diffusion under confinement. As can be seen in Figure 7, the scaling of the MSD with time reveals a superdiffusive behaviour in this case (i.e., the MSD is proportional to *tβ*, *β* being an exponent higher than 1). Our hypothesis is that the origin of this enhanced diffusion is related to the smooth surfaces of the formed lamellae in this pore size. For *W*∗ = 7, the fluid organises into two lamellae, each one made of two hexagonally-packed layers of particles. As a consequence of the smooth lamellar surfaces and pore walls, the two lamellae can slide with respect to each other due to the thermal movement, leading to a high diffusion coefficient in this case. This effect is not observed for *W*∗ = 9 and *W*∗ = 11, because the lamellae surfaces are no longer smooth, due to the formation of an incomplete third layer at *W*∗ = 9 and to the disordered local structure of the central lamella at *W*∗ = 11. At *T*∗ = 0.4, the diffusion coefficient is only slightly higher in bulk than in any of the considered confined systems. It is interesting to note that the fluid is organised into a lamellar phase at this temperature in the three largest considered pores, but it forms a percolating fluid in bulk.

#### **4. Discussion and Conclusions**

In this work we have studied the assembly of colloids with competing interactions when confined in narrow slit pores at densities at which the cluster-crystal, the hexagonal and the lamellar phases are stable in bulk. We have found that those periodic modulated phases also form under confinement. In particular, our simulations predict that the clustercrystal and the lamellar phases are often stable up to higher temperatures when confined in slit pores than in the bulk system, but that of the cylindrical phase is lower than in bulk. In the cases in which the pore size is not perfectly commensurate with the pore

width, the fluid is often able to adjust the cluster shape, size and interdistance between clusters to fit in the available volume in the pore. One exception to this general behaviour is that the cluster-crystal was not formed even at very low temperatures in the *W*∗ = 9 wide slit pore, which can be easily rationalised because this pore size is incommensurate with the corresponding bulk cluster-crystal. Thus, we can conclude that, in general, the presence of walls promotes the formation of the lamellar phase, as expected, but also of the cluster-crystal. The results obtained in this work are similar to those observed in block copolymers confined in slit pores [38]. This suggests that the universality of the phase behaviour in systems with competing interactions observed in bulk can be extended to confined systems.

We have also observed that the presence of walls induces the ordering of the particles within the clusters (spherical, cylindrical or lamellar) in layers of particles parallel to the pore walls. This has already been observed in simple and complex fluids (see, e.g., Refs. [24,39]), and also recently in the adsorption of colloids with competing interactions at an attractive surface [40]. In the case of the lamellar phase, this leads to the internal ordering of the lamellae at higher temperatures than in the bulk system, and to an interesting behaviour in which the lamellae adjacent to the pore walls remain ordered while the lamellae further away from the walls become disordered, a phenomenon observed in the widest considered slit pore. The local ordering in the vicinity of a flat surface has also been observed in experiments of block copolymers under confinement [41]. Both our simulations and the experiments already performed in different systems with competing interactions under confinement might help to design new experiments under the proper conditions to finally obtain ordered microphases in colloidal systems.

Finally, we found that at temperatures just above those at which periodic microphases start to be seen, the diffusion coefficient of the confined fluid can adopt values higher or lower than in bulk depending on the density and on the pore width. In particular, we observed that the diffusion coefficient of the colloidal particles depends on the pore width. This dependence is complex, because the walls induce the internal ordering of the clusters. For a given phase (cluster-crystal, cylindrical or lamellar), the observed nonmonotonic behaviour with the pore size cannot be explained based solely on the density of the confined fluid, as it is often found that the diffusion coefficient does not correlate inversely with the density of the confined fluid, as one would expect for normal fluids. Depending on the shape of the clusters and the separation between the pore walls, it is possible to obtain either larger and smaller values of the diffusion coefficient than in the corresponding bulk systems.

The main conclusion of our work is that the formation of the lamellar and clustercrystal phases appears to be favoured by confinement in simple slit pores. Although in some cases, the diffusion might be lower in confinement than in bulk, the formation of the periodic microphases was observed in relatively short times in our simulations, indicating that there should not be important kinetic bottlenecks that hinder their formation. We sugges<sup>t</sup> that confining colloids with competing interactions in simple slit pores might be a promising route for the experimental observation of those phases.

**Author Contributions:** Conceptualisation, H.S., W.T.G. and E.G.N.; methodology, H.S., W.T.G. and E.G.N.; software, H.S.; validation, H.S.; formal analysis, H.S.; investigation, H.S.; resources, H.S.; data curation, H.S.; writing—original draft preparation, E.G.N.; writing—review and editing, H.S., W.T.G. and E.G.N.; visualisation, H.S.; supervision, W.T.G. and E.G.N.; project administration, W.T.G. and E.G.N.; funding acquisition, W.T.G. and E.G.N. All authors have read and agreed to the published version of the manuscript.

**Funding:** This publication is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie gran<sup>t</sup> agreement No. 711859. Scientific work was funded from the financial resources for science in the years 2017–2021 awarded by the Polish Ministry of Science and Higher Education for the implementation of an international co-financed project. We would like to acknowledge the support from NCN gran<sup>t</sup>

No 2018/30/Q/ST3/00434 and from the Agencia Estatal de Investigación and the Fondo Europeo de Desarrollo Regional (FEDER), Grant No FIS2017-89361-C3-2-P.

**Data Availability Statement:** The data that support the findings of this study are available from the corresponding author upon reasonable request.

**Acknowledgments:** In this section you can acknowledge any support given which is not covered by the author contribution or funding sections. This may include administrative and technical support, or donations in kind (e.g., materials used for experiments).

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.
