### Creating a spherical domain

We start the calculation from a homogeneous system that contains \(90\%\) of homopolymer and \(10\%\) of diblock copolymer. A confinement method to confine the diblock copolymer in the middle of the box is implemented. In the first iteration step of the SCFT calculation we limit only the diblock to be in the middle of the simulation box. A small domain of the diblock in the middle of the box acting as a “seed” for the growth of a spherical diblock copolymer domain [38]. To make it simple, throughout the calculation we chose the Flory–Huggins interaction parameters between the homopolymer and diblock copolymer as \(\chi _{AC} = \chi _{BC} = \chi\). This means that the two blocks of the diblock copolymer *A*–*B* interact with the homopolymer *C* equally. Thus, there is no selective wetting of the diblock copolymer at the copolymer/homopolymer interface. To have a phase separation between the copolymer and the homopolymer, the interaction between them has to be strong enough. Here we choose \(\chi _{AC} = \chi _{BC} = 2.0\). Initially, the interaction between segments of the diblock copolymer is set at \(\chi _{AB} = 0\). The result after running a static SCFT calculation is shown in Fig. 1. In this figure we shown the isosurface for the diblock copolymer (\(\phi _{A}\) + \(\phi _{B}\)), which has a spherical shape and located at the center of the box. For the rest of the box, i.e. the surrounding area, which is completely dominated by the homopolymer, is not shown here. By varying the interaction between the copolymer and homopolymer, \(\chi\), and the homopolymer chain length, \(N_{C}\), we see that the occupation of the diblock copolymer in the spherical domain is proportional to the increase of \(\chi\) or \(N_{C}\). With \(N_{C}\) = 1, the occupation of the copolymer in the spherical domain is 60.6\(\%\), 85.0\(\%\) and 92.3\(\%\), for \(\chi\) = 1.0, 1.5 and 2.0, respectively. Outside the sphere the occupation of the copolymer is up to \(3\%\), for \(\chi\) = 1.0, and when the interaction is strong enough, \(\chi \ge 1.4\), the presence of the copolymer is almost disappeared. It means that when the interaction between the copolymer and the homopolymer is strong enough, outside of the sphere is totally occupied by the homopolymer, and inside the sphere is dominated by the copolymer. However, with this short chain length of the homopolymer, inside the sphere, there is always presence of the homopolymer.

Increasing the homopolymer chain length to \(N_{C} = 2\) the occupation of the copolymer in the sphere increases to 92\(\%\), \(98\%\) and \(99\%\) when \(\chi\) is 1.0, 1.5 and 2.0, respectively. Further increasing the homopolymer chain length to \(N_{C} = 5\), we obtain a total macrophase separation between the copolymer and homopolymer; in the sphere it is totally (\(100\%\)) occupied by the copolymer and outside it is totally occupied by the homopolymer.

### Effect of the homopolymer chain length

In this section, starting from a structure as shown in Fig. 1b, we calculate the microphase separation of the diblock copolymer in the sphere for different homopolymer chain lengths. First, we use a short homopolymer chain length, \(N_{C} = 1\). The interaction between the copolymer and the homopolymer is chosen at \(\chi = 1.0\), we see that when the interaction between two segments *A* and *B* of the diblock, \(\chi _{AB}\), increases from the initial zero value the occupation of the copolymer in the sphere is reduced. For example, the occupation of the copolymer is about \(56\%\) when \(\chi _{AB} = 0.2\), but when \(\chi _{AB}\) increases to 0.4 the occupation reduces to \(50\%\). This is due to the fact, that for a short homopolymer chain length and the interaction between the homopolymer and the copolymer is weak, inside the sphere always has a presence of the homopolymer and when the repulsive interaction between monomers *A* and *B* increases the homopolymer migrates into the interface of *A* and *B* domains. Furthermore, at this weak interaction regime between the copolymer and the homopolymer, \(\chi = 1.0\), the homopolymer outside the sphere can easily move inside the sphere and dilutes the diblock, hence, reduces the interaction between segments and prevents the diblock from segregating. Keep increasing \(\chi _{AB}\) to by 0.8 we observe that the whole system becomes homogeneous. This result is in well agreement with results obtained by Matsen [39] on the effect of the homopolymer molecular weight on the microphase transition in a weakly separated diblock copolymer and homopolymer blend. They found that at low weight homopolymers tend to be miscible with the microstructure, causing the lattice spacing to diverge and the system becomes homogeneous. This is because small homopolymers tend to distribute uniformly throughout the melt. Their nearly uniform distribution will produce a field with little spatial variation and thus with little tendency to induce segregation. They will instead dilute the copolymer concentration, effectively reducing the interaction between segments. The same conclusion was also made by Semenov [40] for diblock copolymer and homopolymer blends in a strong segregation regime. It is worth mentioning that when the homopolymer chain length is short the effect from the thermal fluctuation would be quite significant, however, in the case of short chain length the phase-separation only happens in a really low temperature regime hence the contribution from thermal fluctuation could be neglected [41].

In a weak interaction regime between the homopolymer and the copolymer, there is no microphase segregation between the diblock copolymer observed for any interaction value of \(\chi _{AB}\). By increasing the interaction between the homopolymer and the copolymer, \(\chi\), we see that the microphase starts to segregate, for example, at \(\chi = 2.0\), in Fig. 2 we show different stable morphologies for the *A*-type polymer inside the sphere at different values of \(\chi _{AB}\). At \(\chi _{AB} = 2.0\), when the microphase segregation takes place, in the interface regions between *A*-rich and *B*-rich layers there is presence of the homopolymer, up to \(18\%\) (of the volume fraction). Also, in the *A*-rich and *B*-rich domains themselves the occupations of the homopolymer are \(5\%\) and \(4\%\), respectively. It is also important to notice that by choosing the interaction between the homopolymer and copolymer strong enough, in the space outside the sphere it is totally occupied by the homopolymer and the copolymer is completely vanished.

To make things clear, in Fig. 3 we show the morphologies for all the components in the system, grey colour represents *A*-type, green for *B*-type and red for homopolymer *C*. In Fig. 3a only two components *A* and *B* are plotted, with isosurfaces \(\phi _{A} = \phi _{B} = 0.5\). From this picture we see that at the interfaces between *A*-rich and *B*-rich there is a gap. This gap is significantly filled with the homopolymer, up to 11\(\%\) for the case of \(\chi _{AB} = 1.2\). The plot for all three components is shown in Fig. 3b, with the isosurfaces \(\phi _{A} = \phi _{B} = 0.5\) and \(\phi _{C} = 0.1\). The structure for \(\chi _{AB} = 1.6\) is shown in Fig. 3c, with the occupation of the homopolymer at the two interfaces is in the range of \(11\%\) \(\rightarrow\) \(13\%\). To see how the polymers distribute in the system, in Fig. 4 we show volume fractions along a symmetrical line of the simulation box for all three components, for the case shown in Fig. 3c at \(\chi _{AB} = 1.6\). From this figure we see that the homopolymer occupies throughout the space and its presence peaks at the interfaces between the diblocks.

The presence of the homopolymer in the sphere depends not only on its interaction with the diblock copolymer but also the homopolymer chain length. To see details how the homopolymer chain length affects the diblock phase separation we now increase the homopolymer chain length to \(N_{C} = 5.0\). We observe that in the initial structure of the sphere when the interaction between monomers *A* and *B* (\(\chi _{AB}\)) was set at zero, the occupation of the copolymer in the sphere is almost \(100\%\) even the interaction between the copolymer and homopolymer is weak, at \(\chi = 1.0\). Some morphologies shown in Fig. 2 for \(N_{C} = 1.0\) are also obtained for \(N_{C} = 5.0\). However, in the latter the same morphology is obtained at a weaker value of \(\chi _{AB}\) compared to the former. Furthermore, unlike the previous case where at \(\chi = 1.0\) the system becomes homogeneous when the interaction between *A* and *B*, \(\chi _{AB}\), is strong, in the latter case, however, we observe phase segregation for high values of \(\chi _{AB}\).

### A bigger sphere

It has been shown in other works, that the morphology of a nanoparticle really depends on the size of the confinement [12, 20, 42]. To see how the size of the spherical domain affects its inner structures, we increase the diblock copolymer concentration in the simulation box from 10 to 20\(\%\). It is worthnoting that by increasing the size of the diblock spherical domain, the size of the bulk homopolymer in a fixed simulation box is decreasing and this could lead to a size effect of “bulk” homopolymer which confines the diblock sphere. To make sure our chosen system size (\(28 \times 28 \times 28\)) is large enough in order to eliminate the size effect, we carried out calculations for different box sizes but kept the volume of the diblock copolymer spherical domain constant. Our results show that at the size box from \(26 \times 26 \times 26\) all the results are identical.

With a bigger spherical domain more morphologies are observed compared to the previous case of a smaller one. In Fig. 5 we show morphologies as a function of the interaction parameter \(\chi _{AB}\). Figure 5a shows for the component *A*, and Fig. 5b shows for all three components *A*, *B* and *C*. Like the previous case, with \(N_{C} = 1.0\) and \(\chi = 2.0\), the microphase separation of the diblock takes place at \(\chi _{AB}\) as small as 1.2. At \(\chi _{AB} = 1.2\), in the center of the sphere forms a small spherical *A*-rich domain and in the outer layer forms 24 small islands. Increasing \(\chi _{AB}\) to 1.3, these small islands grow and then connect to each other and form a cage which comprises of 14 holes. From \(\chi _{AB} = 1.5\) the domains on the cage layer grow and fill all the holes to form an uniform shell. At \(\chi _{AB} = 1.8\), apart from the uniform shell, there is a new outer layer. This new layer comprises of many small islands. Continue increasing the \(\chi _{AB}\), these islands connect and form stripes, at \(\chi _{AB} = 2.3\). From \(\chi _{AB} = 2.5\) we have a coexisting of islands (6 islands) and discs (8 discs). In the center of the sphere it is now occupied by the *B*-rich domain, not *A*-rich domain like cases when \(\chi _{AB}\) is smaller than 2.5. The coexisting of islands and discs remains until \(\chi _{AB} = 2.8\) where the structure becomes a new uniform shell. Morphologies in Fig. 5 were also obtained for a diblock copolymer confined in a spherical surface under different surface fields and degree of confinement [15, 20, 23], and homopolymer volume fraction [22].

Like the previous case of a smaller sphere, the presence of the homopolymer inside the sphere changes dramatically when the homopolymer chain length is increased. Indeed, by increasing the homopolymer chain length \(N_{C}\) to 5.0 we obtain a complete macrophase separation, copolymer totally fills up the sphere and surrounded by the homopolymer. In this case our system can be compared with systems of diblock copolymers confined in a hard [23] or soft [15, 22, 43] spherical surface. Different morphologies when the homopolymer chain length \(N_{C} = 5\), for different values of \(\chi _{AB}\), are shown in Fig. 6.