## Abstract

One of the most important problems in development is how epigenetic domains can be first established, and then maintained, within cells. To address this question, we propose a framework which couples 3D chromatin folding dynamics, to a “recolouring” process modeling the writing of epigenetic marks. Because many intra-chromatin interactions are mediated by bridging proteins, we consider a “two-state” model with self-attractive interactions between two epigenetic marks which are alike (either active or inactive). This model displays a first-order-like transition between a swollen, epigenetically disordered, phase, and a compact, epigenetically coherent, chromatin globule. If the self-attraction strength exceeds a threshold, the chromatin dynamics becomes glassy, and the corresponding interaction network freezes. By modifying the epigenetic read-write process according to more biologically-inspired assumptions, our polymer model with recolouring recapitulates the ultrasensitive response of epigenetic switches to perturbations, and accounts for long-lived multi-domain conformations, strikingly similar to the topologically-associating-domains observed in eukaryotic chromosomes.

## INTRODUCTION

The word “*epigenetics*” refers to heritable changes in gene expression that occur without alterations of the underlying DNA sequence [1, 2]. It is by now well established that such changes often arise through biochemical modifications occurring on histone proteins while these are bound to eukaryotic DNA to form nucleosomes, the building blocks of the chromatin fiber [1]. These modifications, or “epigenetic marks”, are currently thought of as forming a “histone-code” [3], which ultimately regulates expression [4].

It is clear that this histone-code has to be established *de novo* during cell development and inherited after each cell cycle through major genetic events such as replication, mitosis, or cell division [5]. A fundamental question in cell biology and biophysics is, therefore, how certain epigenetic patterns are established, and what mechanism can make them heritable. One striking example of epigenetic imprinting is the “X chromosome inactivation”, which refers to the silencing of one of the two X chromosomes within the nucleus of mammalian female cells – this is crucial to avoid over-expression of the genes in the X chromosomes, which would ultimately be fatal for the cell. While the choice of which chromosome should be inactivated is stochastic within embryonic stem cells, it is faithfully inherited in differentiated cells [6]. The inactivation process is achieved, in practice, through the spreading of repressive histone modifications, which turn the chromosome into a transcriptionally silenced Barr body [7–9]. This is an example of an “epigenetic switch”, a term which generically refers to the up or down-regulation of specific genes in response to, *e.g.*, seasonal changes [10–12], dietary restrictions [13], aging [14] or parental imprinting [15].

Although one of the current paradigms of the field is that the epigenetic landscape and 3D genome folding are intimately related [16–24], most of the existing biophysical studies incorporating epigenetic *dynamics* have focused on 1-dimensional (1D) or mean field models [25–34]. While these models can successfully explain some aspects of the establishment, spreading, and stability of epigenetic marks, they cannot fully capture the underlying 3-dimensional (3D) dynamic organisation of the chromatin. This may, though, be a key aspect to consider: for instance, repressive epigenetic modifications are thought to correlate with chromatin compaction [1, 29], therefore it is clear that there must be a strong feedback between the self-regulated organisation of epigenetic marks and the 3D folding of chromatin. In light of this, here we propose a polymer model of epigenetic switches, which directly couples the 3D dynamics of chromatin folding to the 1D dynamics of epigenetics spreading.

More specifically, we start from the observation that there are enzymes which can either “read” or “write” epigenetic marks (Fig. 1). The “readers” are multivalent proteins [17] which bridge chromatin segments bearing the same histone marks. The “writers” are enzymes that are responsible for the establishment and propagation of a specific epigenetic mark, perhaps while performing facilitated diffusion along chromatin [35]. There is evidence that writers of a given mark are recruited by readers of that same mark [12, 25, 26, 28, 29, 36–38], thereby creating a positive feedback loop which can sustain epigenetic memory [26]. For example, a region which is actively transcribed by an RNA polymerase is rich in active epigenetic marks (such as the H3K4-methylated marks) [36, 39]: the polymerase in this example is “reader” which recruits the “writer” Set1/2 [39, 40]. Likewise, the *de novo* formation of centromeres in human nuclei occurs through the creation of the centromere-specific nucleosome CENP-A (a modified histone, which can thus be viewed as an “epigenetic mark”) via the concerted action of the chaperone protein HJURP (the “writer”) and the Mis18 complex (the “reader”) [38]. Other examples of this read-write mechanism are shown in Fig. 1. This mechanism creates a route through which epigenetic marks can spread to spatially proximate regions on the chromatin, and it is responsible for the coupling between the 3D folding and 1D epigenetic dynamics, addressed for the first time in this work.

Here we find that, for the simplest case of only 2 epigenetic states which symmetrically compete with each-other (*e.g.*, corresponding to “active” or “inactive” chromatin [1]), our model predicts a first-order-like phase transition between a swollen, epigenetically disordered, phase, and a collapsed, epigenetically coherent, one. The first-order nature of the transition, within our model, is due to the coupling between 3D and 1D dynamics, and is important because it allows for a bistable epigenetic switch, that can retain memory of its state. When quenching the system to well below the transition point, we observe a faster 3D collapse of the model chromatin; surprisingly, this is accompanied by a *slower* 1D epigenetic dynamics. We call this regime a “glassy” phase, which is characterized, in 3D, by a frozen network of strong and short-ranged intra-chain interactions giving rise to dynamical frustration and the observed slowing down, and, in 1D, by a large number of short epigenetic domains.

If the change from one epigenetic mark into the other requires going through an intermediate epigenetic state, we find two main results. First, a long-lived metastable mixed state (MMS), previously absent, is now observed: this is characterized by a swollen configuration of the underlying chain where all epigenetic marks coexist. Second, we find that the MMS is remarkably sensitive to external local perturbations, while the epigenetically coherent states, once established, still display robust stability against major reorganisation events, such as replication. This behaviour is reminiscent of the features associated with epigenetic switches, and the “X-Chromosome Inactivation” (XIC).

We conclude our work by looking at the case in which the epigenetic writing is an ATP-driven, and hence a non-equilibrium process. In this case, detailed balance is explicitly broken and there is no thermodynamic mapping of the underlying stochastic process. This case leads to a further possible regime, characterized by the formation of a long-lived multi-pearl structure, where each “pearl” (or chromatin domain) is associated with a distinct epigenetic domain. This regime is qualitatively different from the glassy phase, as the domains reach a macroscopic size and a significant fraction of chain length. Finally, these self-organised structures are reminiscent of “topologically associating domains” (TADs), experimentally observed in chromosomal contact maps [45].

## MODELS AND METHODS

We model the chromatin fiber as a semi-flexible bead-and-spring chain of *M* beads of size *σ* [17, 46–50]. For concreteness, we consider *σ* = 3 kbp ≃ 30 nm, corresponding approximately to 15 nucleosomes – this mapping is commonly used when modeling chromatin dynamics [46, 47, 50]. To each bead, we assign a “colour” *q* representing a possible epigenetic state (mark). Here we consider *q* ∈ {1, 2, 3}, *i.e.* three epigenetic marks such as methylated (inactive), unmarked (intermediate) and acetylated (active).

In addition to the standard effective potentials to ensure chain connectivity (through a harmonic potential between consecutive beads) and bending rigidity (through a Kratky-Porod potential [52]), we consider a repulsive/attractive interaction mediated by the epigenetic marks (colours). This is described by a truncated-and-shifted Lennard-Jones potential, defined as follows,
whereas . In Eq. (8), is a normalization constant and the parameter *ϵ*_{ab} is set so that *ϵ*_{ab} = *ϵ* for *q*_{a} = *q*_{b} and *ϵ*_{ab} = *k*_{B}*T*_{L} otherwise. The *q*-dependent interaction cut-off is given by 2^{1/6}*σ*, to model steric repulsion, or *R*_{i} > 2^{1/6}*σ* to model attraction. [Here, we consider *R*_{i} = 1.8*σ*, which simultaneously ensures short-range interaction and computational efficiency] In what follows, the cut-offs are chosen so that beads with different colours, or with colour corresponding to no epigenetic marks (i.e., *q* = 3), interact via steric repulsion, whereas beads with the same colour, and corresponding to a given epigenetic mark (*e.g., q* = 1, or *q* = 2), self-attract, modeling interactions mediated by a bridging protein, one of the “readers” [1, 17].

The time evolution of the system is obtained by coupling a 3D Brownian polymer dynamics at temperature *T*_{L}, with a recolouring Monte-Carlo dynamics of the beads which does not conserve the number of monomer types. Recolouring moves are proposed every *τ*_{Rec} = 10^{3}*τ*_{Br}, where *τ*_{Br} is the Brownian time associated with the dynamics of a single polymer bead, and they are realized in practice by attempting *M* changes of the beads colour. To compare between simulation and physical time units, a Brownian time *τ*_{Br} is here mapped to 10 milliseconds, corresponding to an effective nucleoplasm viscosity *η* ≃ 150 cP. This is an intermediate and conservative value within the range that can be estimated from the literature [47, 53] and from a direct mapping with the experimental data of Ref. [54] (see SI Fig. S1). With this choice, the recolouring rate is ~ 0.1 s^{−1} and a simulation runtime of 10^{6} Brownian times corresponds to 2.5-3 hours (see SI for more details on the mapping). Each colour change is accepted according to the standard Metropolis acceptance ratio with effective temperature *T*_{Rec} and Potts-like energy difference computed between beads that are spatially proximate (*i.e.*, within distance *R*_{i} in 3D). It is important to notice that, whenever *T*_{L} ≠ *T*_{Rec}, detailed balance of the full dynamics is broken, which may be appropriate if epigenetic spreading and writing depend on non-thermal processes (*e.g.*, if they are ATP-driven). More details on the model, and values of all simulation parameters, are given in the SI and Fig. S1 [55].

The model we use therefore couples an Ising-like (or Potts-like) epigenetic recolouring dynamics, to the 3-dimensional kinetics of polymer folding. In most simulations we consider, for simplicity, *T*_{L} = *T*_{Rec}, and we start from an equilibrated chain configuration in the swollen phase (*i.e.*, at very large *T*_{L}), where beads are randomly coloured with uniform probability. The polymer and epigenetic dynamics is then studied tuning the interaction parameter *α* = *ϵ/k*_{B}*T*_{L} to values near or below the critical value *α*_{c} for which we observe the polymer collapse.

## RESULTS

### The “two-state” model displays a first-order-like transition which naturally explains both epigenetic memory and bistability

For simplicity, we focus here on the case in which three states are present, but only two of them (*q* = 1, red and *q* = 2, blue) are self-attractive, while the third is a neutral state that does not self-attract, but can participate to colouring dynamics (*q* = 3, grey). Transition between any two of these three states are possible in this model. Because we find that the grey (unmarked) state rapidly disappears from the polymer at the advantage of the self-attractive ones, we refer to this as an effectively “two-state” model. This scenario represents the case with two competing epigenetic marks (*e.g.*, an active acetylation mark and an inactive methylation mark), while the third state represents unmarked chromatin.

Fig. 2 reports the polymer and epigenetic dynamics (starting from the swollen and randomly coloured initial state), for two different values of *α* = *ϵ*/*k*_{B}*T*_{L} below and above the critical point *α*_{c}. The global epigenetic recolouring is captured by *N*_{b}(*q, t*), the total number of beads in state *q* at time *t*; the local epigenetic dynamics is instead represented by a “kymograph” [51], which describes the change in colour of the polymer beads as time evolves (Fig. 2).

It is readily seen that above the critical point *α*_{c} ≃ 0.9 (for *M* = 2000), the chain condenses fairly quickly into a single globule and clusters of colours emerge and coarsen. Differently-coloured clusters compete, and the system ultimately evolves into an epigenetically coherent globular phase. This is markedly different from the case in which *α* < *α*_{c} where no collapse and epigenetic ordering occurs. Because the red-red and blue-blue interactions are equal, the selection of which epigenetic mark dominates is via symmetry-breaking of the red↔blue symmetry.

The transition between the swollen-disordered and collapsed-coherent phases bears the hallmark of a discontinuous, first-order-like transition [56, 57]: for instance, we observe metastability of each of the two phases at *α* ≃ *α*_{c} as well as marked hysteresis (see SI, Figs. S2–S3). To better characterize the transition, we perform a set of simulations on a shorter polymer with *M* = 50 beads in order to enhance sampling. We average data from 100 simulations (see SI, Fig. S4, for single trajectories), each 10^{6} Brownian times long, and calculate the joint probability of observing a state with a given value of gyration radius, *R*_{g}, and signed “epigenetic magnetisation” [32],

The result (see Fig. 3 and SI, Fig. S3) shows that the single maximum expected for the swollen-disordered phase (large *R*_{g} and small ) splits into two symmetric maxima corresponding to the collapsed-ordered phase (small *R*_{g} and ). More importantly, at the critical point three maxima are clearly visible suggesting the presence of phase coexistence (see Fig. 3 and SI Fig. S2–S3).

The existence of a first-order-like transition in this model provides a marked difference between our model and previous ones, which approximated the epigenetic (recolouring) dynamics as a one-dimensional process, where nucleosome recruitment was regulated by choosing an *ad hoc* long-range interaction [25, 32]. These effectively 1D models display either a second order transition [25, 58, 59], or a first-order transition, but only in the mean-field (“all against all”) case [32]. In our model the first-order-nature of the transition critically requires the coupling between the 3D polymer collapse and the 1D epigenetic dynamics – in this sense, the underlying physics is similar to that of magnetic polymers [60].

The dynamical feedback between chromatin folding and epigenetic recolouring can be appreciated by looking at Suppl. Movies M1-M2, where it can be seen that local epigenetic fluctuations trigger local chromatin compaction. Suppl. Movies M1-M2 also show that the dynamics of the transition from swollen to globular phase is, to some extent, similar to that experienced by a homopolymer in poor solvent conditions [61–68]. namely a formation of small compact clusters along the chain (pearls) that eventually coalesce into a single globule. Unlike the homopolymer case, however, the pearls may be differently coloured giving rise at intermediate or late times to frustrated dynamics, where two or more globules of different colours compete through strong surface tension effects. When several globules are present, we observe cases in which two or more pearls of the same colour, that are distant along the chain but close in 3D, merge by forming long-ranged loops (see snapshots in Fig. 2, contact maps in SI and Suppl. Movies M1-M2).

Finally, we should like to stress that a first-order-like transition in this system is important for biological applications, since it naturally provides a framework within which epigenetic states can be established and maintained in the presence of external fluctuations. In particular it is well known that when a gene is switched off, for instance after development, it can very rarely be re-activated following further cellular division. This is an example of epigenetic memory, which is naturally explained within our model (as there is hysteresis). At the same time, two cell lines might display different patterns of active and inactive genes, therefore providing a clear example of epigenetic bistability, which is also recovered within this model, due to the red-blue symmetry breaking. All this strongly suggests that the features characterising the above-mentioned “epigenetic switches” may be inherited from an effective first-order-like transition driven by the coupling between epigenetic dynamics and chromatin folding as the one displayed by the model presented here.

### Deep quenches into the collapsed phase leads to a “topological freezing” which slows down epigenetic dynamics

An intriguing feature observed in the dynamics towards the symmetry-breaking is that quenching at different temperatures affects non trivially the timescales of chromatin condensation and epigenetic evolution towards a single coherent state (see also Suppl. Movie M3). The separation between these two timescales increases with *α* (*i.e.*, for deeper quenches), as can be readily seen in Fig 4, where we compare the time evolution of the mean squared radius of gyration of the chain and the time-dependent (absolute) epigenetic magnetisation
for different values of *α.*

While *R*_{g} decays exponentially with a timescale that decreases as *α* increases (Fig. 4(a)), the epigenetic magnetisation grows as , where the dynamical exponent *β* decreases from ≃ 2/3 to ≃ 1/3 as *α* increases. Note that the value 2/3 has been reported in the literature as the one characterizing the coarsening of pearls in the dynamics of homopolymer collapse [63]. The fact that in our model this exponent is obtained for low values of *α* suggests that in this regime the timescales of polymer collapse and epigenetic coarsening are similar. In this case, we expect *m*(*t*) to scale with the size of the largest pearl in the polymer, whose colour is the most likely to be selected for the final domain – *i.e.*, the dynamics is essentially determined by the homopolymer case. Our data are instead consistent with an apparent exponent smaller than 2/3 for larger *α*, signalling a slower epigenetic dynamics.

The interesting finding that a fast collapse transition gives rise to a slowing down of the recolouring dynamics can be understood in terms of the evolution of the network of intrachain contacts. This can be monitored by defining the interaction matrix
where *a*, *b* = 1,…, *M* denote two monomers, and . From the interaction matrix we can readily obtain useful informations on the network structure, such as the average number of neighbours per bead,
or the average “spanning distance”, which quantifies whether the network is short- or long-ranged (see SI for details). The contact probability between beads *a* and *b* can also be simply computed, as the time average of *P*_{ab}(*t*).

As expected, for larger values of *α*, *N*_{n}(*t*) saturates to a maximum value (see SI, Fig. S9). On the other hand, and more importantly, for higher values of the interaction strength *α*, a dramatic change in the spanning distance is observed. This effect is well captured by plotting a network representation of the monomer-monomer contacts, as reported in Fig. 5 (see SI, Figs. S6–S9 for a more quantitative analysis). This figure shows that at large *α* there is a depletion of the number of edges connecting distant monomers along the chain, while short-ranged contacts are enhanced (see caption of Fig. 5 for details; see also contact maps in SI Fig. S5). Note that this finding is consistent with the fractal, or crumpled, globule conjecture [46, 69, 70], for which a globule obtained by a fast collapse dynamics is rich of local contacts and poor in non-local ones. However, the present system represents a novel instance of “annealed” collapsing globule, whose segments are dynamically recoloured as it folds.

Finally, in order to characterize the change in the kinetics of the network, we quantify the “mobility” of the contacts, or the “neighbour exchange rate”, following polymer collapse. We therefore compute
where is the gap between two measurements. We find that above *α* = 3, the time-averaged value of the neighbour exchange rate, normalized by the average number of neighbours, , sharply drops from values near unity, indicative of mobile rearranging networks, to values close to zero, signalling a frozen network or contacts (see SI Fig. S10).

The “topological freezing” (see also Suppl. Movie M3) due to fast folding is also partially reflected by the strongly aspherical shapes taken by the collapsed coils in the large *α* regime (see snapshots in Fig. 2 and Fig. 5).

The emerging scenario is therefore markedly different from the one suggested in models for epigenetic dynamics with long-range [25, 58, 59] or mean-field interactions [32], where any two beads in the chain would have a finite interaction probability. Instead, in our case, this is only a valid approximation at small *α*, whereas at large *α* a given bead interacts with only a subset of other beads (see Fig. S6), and it is only by averaging over different trajectories and beads that we get the power-law decay of the contact probability assumed in those studies (see Fig. S7). This observation is, once again, intimately related to the fact that we are explicitly taking into account the 3D folding together with the epigenetic dynamics.

In this Section we have therefore shown that considering large interaction strengths between the self-attracting marks (*e.g.* via strongly binding “readers”) leads to the formation of long-lived and short-ranged domains (see Figs. 4–5 and contact maps in Fig. S5); while these features might be akin to the ones inferred from experimental contacts maps (Hi-C) [45], both the network of interactions and the epigenetic dynamics appear to be glassy and frozen (Figs. 4 and S6–S10) on the timescales of our simulations (~ 2.5-3 hours of physical time).

### Forcing the passage through the “unmarked” state triggers ultrasensitive kinetic response while retaining a first-order-like transition

Up until now, our model has been based on a simple rule for the epigenetic dynamics, where each state can be transformed into any other state. In general, a specific biochemical pathway might be required to change an epigenetic mark [1, 25]. Often, a nucleosome with a specific epigenetic mark (corresponding to, say, the “blue” state), can be converted into another state (say, the “red” one) only after the first mark has been removed. This two-step re-writing mechanism can be described by considering a “neutral” or “intermediate” state (IS) through which any nucleosome has to transit before changing its epigenetic state (say, from “blue” to “red”) [25, 27, 30]. Previous studies, based on mean field or *ad hoc* power law interaction rules for the recruitment of epigenetic marks have shown that the presence of such an intermediate unmakred state can enhance bistability and create a long-lived mixed metastable state (MMS), in which all epigenetic states coexist in the same system [30].

Differently from the simulations reported in the previous Sections, where we never observed a long-lived mixed state, as the “red” or “blue” beads rapidly took over the “grey” beads, in this case we do observe that the mixed state is metastable for a range of . The observed MMS has a characteristic life-time is much longer than the one observed for the disordered state in the “two-state” model when (see SI, Fig. S12). The observed MMS is reminiscent of the one found in Ref. [30], although a difference is the absence of large ordered domains in our case.

A typical example of a mixed metastable state (MMS) is reported in the early times of Fig. 6: one can see that it is characterized by a swollen coil with no sign of epigenetic domains, and all three states coexist in the same configuration. To quantify the metastability of the mixed state, we performed 30 independent simulations and found that for *α* = 1 the MMS survives with probability 50% after 10^{6} Brownian times. By analysing the survival probability of the MMS as a function of time (see SI, Fig. S12), we further quantified its characteristic decay time (again at *α* = 1) as , corresponding to about 3 hours in physical time according to our mapping. In contrast, we note that for *α* ≥ 1.25 the MMS state is unstable and never observed.

In order to study the stability of the MMS against external agents, we perturb the system by manually recolouring (in a coherent fashion) a localized fraction (10%) of beads along the chain. From Fig. 6 one can see that, after the perturbation (performed at *t* = 0), the chain forms a nucleation site around the artificially recoloured region that eventually grows as an epigenetically coherent globule. The spreading of the local epigenetic domain throughout the whole chain can be followed from the kymograph in Fig. 6; it appears that the spreading is approximately linear until the winning mark (here red) takes over the whole chain. The spreading may be linear because the nucleation occurs along an epigenetically disordered swollen chain, so that the mark cannot easily jump long distances along the polymer due to the steep decay for long range contacts in the swollen phase (see also Suppl. Movie M4 and contact maps in Fig. S11). [Note that the argument for linear spreading also applies to spontaneous nucleation, triggered by a fluctuation rather than by an external perturbation, see SI.] The spreading speed can be estimated from the “wake” left in the kymograph: it takes 0.4 10^{6} Brownian times (about 1 hour of real time) to cover 6 Mbp.

It is remarkable that, even if the spreading remained linear for a longer polymer, this speed would suffice to spread a mark through a whole chromosome. For instance, the X-chromosome (123 Mbp) could be “recoloured” within one cell cycle (24 h). All this suggests that the model presented in this Section may thus be relevant for the fascinating “X-chromosome inactivation” in embryonic mammalian cells [9], and, in more general terms, to the spreading of inactive heterochromatin along chromosomes [29].

It is also worth stressing that, in practice, for an *in vivo* chromatin fiber, this local coherent recolouring perturbation might be due to an increase in local concentration of a given “writer” (or of a reader-writer pair): our results therefore show that a localised perturbation can trigger an extensive epigenetic response, or “epigenetic switch”, that might affect a large chromatin region or even an entire chromosome.

To test the stability of the coherent globular state following the symmetry breaking, we perform an extensive random recolouring of the polymer where one of the three possible states is randomly assigned to 50% of the beads. This perturbation is chosen because it qualitatively mimics [71] how epigenetic marks may be semi-conservatively passed on during DNA replication [25, 27, 72].

After this instantaneous extensive random recolouring (performed at in Fig. 6), we observe that the model chromatin returns to the same ordered state, suggesting that the epigenetically coherent state, once selected, is robust to even extensive perturbations such as semi-conservative replication events (see also Suppl. Movie M4).

The largely asymmetric response of the system against external perturbations, which has been shown to depend on its instantaneous state, is known as “ultra-sensitivity” [26]. We have therefore shown that forcing the passage through the “unmarked” state triggers ultrasensitivity, while retaining the discontinuous nature of the transition already captured by the simpler “two state” model.

From a physics perspective, the results reported in this Section and encapsulated in Figure 6 are of interest because they show that the presence of the intermediate state do not affect the robustness of the steady states or the nature of the first-order-like transition, therefore the previously discussed main epigenetic features of our model, memory and bistability, are maintained.

Another important remark is that ultrasensitivity is a highly desirable feature in epigenetic switches and during development. A striking example of this feature is the previously mentioned X-chromosome inactivation in mammalian female embryonic stem cells. While the selection of the chromosome copy to inactivate is stochastic at the embryonic stage, it is important to note that the choice is then epigenetically inherited in committed daughter cells [6]. Thus, in terms of the model presented here, one may imagine that a small and localised perturbation in the reading-writing machinery may be able to trigger an epigenetic response that drives a whole chromosome from a mixed metastable state into an inactive heterochromatic state within one cell cycle (*e.g.*, an “all-red” state in terms on Fig. 6). When the genetic material is then replicated, an extensive epigenetic fluctuation may be imagined to take place on the whole chromosome. In turn, this extensive (global) perturbation decays over time, therefore leading to the same “red” heterochromatic stable state, and ensuring the inheritance of the epigenetic silencing.

### Non-equilibrium recolouring dynamics creates a 3D organisation resembling “topologically associating domains”

In the previous Sections we have considered the case in which the epigenetic read-write mechanism and the chromatin folding are governed by transition rules between different microstates that obey detailed balance and that can be described in terms of an effective free energy. This is certainly a simplification because the epigenetic writing is in general a non-thermal, out-of-equilibrium process, which entails biochemical enzymatic reactions with chromatin remodelling and ATP consumption [1]. Thus, it is important to see what is the impact of breaking detailed balance in the dynamics of our model.

We address this point by considering a recolouring temperature TRec that differs from the polymer dynamics temperature *T*_{L}. When *T*_{Rec} *≠ T*_{L}, one can readily show, through the Kolmogorov criterion, that detailed balance is violated, as there is a net probability flux along a closed loop through some of the possible states of the system (see SI). In this case, a systematic scan of the parameter space is computationally highly demanding and outside the scope of the current work. Here we focus on a specific case where the recolouring temperature is very low, and fixed to , while we vary *T*_{L}: this case allows to highlight some key qualitative differences in the behaviour of the system which are due to the non-equilibrium epigenetic dynamics. In what follows, we first discuss some expectations based on some general arguments, and then present results from computer simulations.

First, imagine that the Langevin temperature . In this limit, we expect the polymer to be in the swollen disordered phase, whatever the value of *T*_{rec} (no matter how low, as long as greater than zero). This is because a swollen self-avoiding walk is characterized by an intra-chain contact probability scaling as
with [73, 74]. This value implies that the interactions are too short-ranged to trigger a phase transition in the epigenetic state, at least within the Ising-like models considered in Ref. [58].

Consider then what happens as *T*_{L} decreases. An important lengthscale characterizing order in our system is the epigenetic correlation length, which quantifies the size of the epigenetic domains along the chain. This lengthscale, *ξ* can be defined through the exponential decay of the epigenetic correlation function (see SI). A second important lengthscale is the blob size. In particular, a homopolymer at temperature *T*_{L} > Θ, where Θ denotes the collapse temperature, can be seen as a collection of transient de Gennes’ blobs with typical size [61]

Now, as *T*_{L} decreases, remaining larger than Θ, the size of the transient de Gennes’ blobs *m** increases. However, these will normally appear randomly along the chain and diffuse over the duration of the simulation to leave no detectable domain in contact maps. If, on the other hand, ξ ~ *m**, we expect states with one blob per epigenetic domain to be favoured, as the epigenetic recolouring and chromatin folding would be maximally coupled. As a consequence, we may expect the resulting recolouring dynamics to slow down significantly: in this condition, chromatin domains may therefore form, and be long-lived. Finally, the last regime to consider is when *T*_{L} is small enough: in this case we expect collapse into an epigenetically coherent globule, similarly to the results from previous Sections.

To test these expectations, we now discuss computer simulations of the “two-state” model, where we varied *T*_{L} while keeping . By starting from a swollen disordered polymer (which as previously mentioned is expected to be stable for *T*_{L} *→* ∞), at high enough *T*_{L}, we find swollen polymers which do not form domains in the simulated contact map (see SI, this phase is also discussed more below). For lower *T*_{L} we reach the temperature range that allows for transient blob formation. These are indeed stabilized by the existence of distinct epigenetic domains which appear at the beginning of the simulation; examples of this regime are reported in Fig. 7 and in the SI (Fig. S15).

This is the most interesting regime as the chromatin fiber displays a multi-pearl structure, reminiscent of the topologically-associating-domains (TADs) found in Hi-C maps [45]. These TADs lead to a “block-like” appearance of the contact map (see Figure 7, [75]), not unlike the ones reported in the literature [17, 50, 76]. Fig. 7 also shows the number of beads in state *q*, *N*_{b}(*q, t*) along with the kymograph tracking the system for 5 10^{6} *τ*_{Br} timesteps (corresponding to ~ 14 hours of physical time according to our mapping). These results show that the boundaries between domains, once established, are long-lived as several are retained throughout the simulation. This figure should be compared and contrasted with Figures 2 and 4, where the kymographs show either quickly disappearing domains, or long-lived ones that are very small, when the dynamics is glassy. In both those cases, the *N*_{b}(*q, t*) curves show that the system is breaking the red-blue symmetry and the magnetisation is diverging. Here, instead, *N*_{b}(*q, t*) appears to change much more slowly (or is kinetically arrested).

While the TAD-like structure observed at intermediate *T*_{L} is long-lived, it might be only metastable, as choosing a swollen but ordered (homopolymer) initial condition, we find that, surprisingly, no domains appear, and the polymer remains homogeneously coloured throughout the simulation without collapsing into a globule. This is a signature of the existence of a swollen but epigenetically ordered phase. We recall that, remarkably, this phase cannot ever be found in the equilibrium limit of the model, *T*_{L} = *T*_{Rec}. This new swollen and ordered regime may be due to the fact that, when *T*_{L} decreases, the effective contact exponent will no longer be the one for self-avoiding polymers (*c* > 2), but it may be effectively closer to the one for ideal (*c* = 3/2) or collapsed polymers (*c* = 1), both of which allow for long-range interactions between epigenetic segments, possibly triggering epigenetic ordering (see SI, Fig. S16, [77]).

Finally, by lowering *T*_{L} further, below the theta point for an homopolymer (, see SI Fig. S13) one achieves the point where the polymer collapses into a single epigenetically ordered globule (see SI, Fig. S15–S16).

In this Section we have therefore shown that non-equilibrium epigenetic dynamics creates new features in the time evolution and steady state behaviour of the system, and may be important to understand the biophysics of TAD establishment and maintenance. Besides this, we should also mention that the domains emerging in the presented model appear randomly along the chain (*i.e*. no two simulations display the same epigenetic pattern); this is symptomatic of the fact that, for simplicity, our model does not consider structural and insulator elements such as CTCF, promoters, or other architectural [1] and “bookmarking” [78] proteins which may be crucial for the *de novo* establishment of epigenetic domains. Nonetheless, our model strongly suggests that non-equilibrium processes can play a key role in shaping the organisation of chromosomes. While it has been conjectured for some time that genome regulation entails highly out-of-equilibrium processes, we have here reported a concrete instance in which breaking detailed balance naturally creates a pathway for generating a chromatin organisation resembling the one observed *in vivo* chromosomes.

## DISCUSSION AND CONCLUSIONS

In this work, we have studied a 3D polymer model with epigenetic “recolouring”, which explicitly takes into account the coupling between the 3D folding dynamics of a semi-flexible chromatin fiber and the 1D “epigenetic” spreading. Supported by several experimental findings and well-established models [1, 17], we assume self-attractive interactions between chromatin segments bearing the same epigenetic mark, but not between unmarked or differently-marked segments. We also assume a positive feedback between “readers” (binding proteins aiding the folding) and “writers” (histone-modifying enzymes performing the recolouring), which is supported by experimental findings and 1D models [25, 26, 29, 39, 44, 79].

One important novel element of the presented model is that the underlying epigenetic landscape is *dynamic*, while most of the previous works studying the 3D organisation of chromatin relied on a fixed, or *static*, epigenetic landscape [17, 20–23, 50, 80]. The dynamic nature of the epigenetic modifications is crucial to investigate the *de novo* self-organised emergence of epigenetically coherent domains, which is of broad relevance in development and after cell division [39].

In particular, the model presented here is able, for the first time to our knowledge, to couple the dynamic underlying epigenetic landscape to the motion of the chromatin in 3D. Furthermore, the synergy between the folding of chromatin and the spreading of histone modifications may be a crucial aspect of nuclear organisation as these two processes are very likely to occur on similar timescales. From a biological perspective, one may indeed argue that the formation of local TADs in a cell requires at least several minutes [1], while the establishment of higher order, non-local contacts, is even slower [80]; at the same time, histone-modifications, such as acetylation or methylation, occur through enzymatic reactions whose rate is of the order of inverse seconds or minutes [39, 81]. For instance, active epigenetic marks are deposited by a travelling polymerase during the ~ 10 minutes over which it transcribes an average human gene of 10 kbp [82]. Similar considerations apply to our work as well: while the microscopic recolouring dynamics takes place over timescales of about 10^{3} *τ*_{Br} ~ 10s, the spreading of a coherent mark (e.g. see kymographs in Fig. 2,4, 6 and 7) may occur on timescales ranging from 5 10^{5} *τ*_{Br} to 5 10^{6} *τ*_{Br} which are 5-50 times larger than the polymer re-orientation time (about 10^{5} *τ*_{Br}, see SI).

Furthermore, there are examples of biological phenomena *in vivo* which point to the importance of the feedback between 3D chromatin and epigenetic dynamics. A clear example is the inactivation of an active and “open” [1] chromatin region which is turned into heterochromatin. In this case, the associated methylation marks favour chromatin self-attractive interactions [82] and these, in turn, drive the formation of a condensed structure [1, 39] whose inner core might be difficult to be reached by other freely diffusing reactivating enzymes.

Rather fitting in this picture, we highlight that one of our main results is that the coupling between conformational and epigenetic dynamics can naturally drive the transition between a swollen and epigenetically disordered phase at high temperatures and a compact and epigenetically coherent phase at low temperatures (Fig. 2), and that this transition is discontinuous, or first-order-like, in nature (Fig. 3).

While it is known that purely short-range interactions cannot drive the system into a phase transition, effective (or *ad hoc*) long-range interactions within an Ising-like framework can induce a (continuous) phase transition in the thermodynamic limit [58, 59]. In our case, importantly, the transition is discontinuous (see Fig. 3), and this is intimately related to the coupling between 3D and 1D dynamics. The physics leading to a first-order-like transition is therefore reminiscent of that at work for magnetic polymers [41] and hence fundamentally different with respect to previous works, which could not address the conformation-epigenetics positive feedback coupling.

It is especially interesting to notice that the discontinuous nature of the transition observed in this model can naturally account for bistability and hysteresis, which are both properties normally associated with epigenetic switches.

We note that the model reported here also displays a richness of physical behaviours. For instance, we intriguingly find that by increasing the strength of self-attraction the progress towards the final globular and epigenetically coherent phase is much slower (Fig. 4); we characterize this glass-like dynamics by analysing the network of contacts and identifying a dramatic slowing down in the exchange of neighbours alongside a depletion of non-local contacts (see Figs. 5). We argue that the physics underlying the emergence of a frozen network of intra-chain interactions might be reminiscent of the physics of spin glasses with quenched disorder [56, 70, 83] (see Figs. 5 and SI Fig. S10).

We have also shown that the nature of the transition or the long-time behaviour of the system is not affected by forcing the passage through an intermediate (neutral or unmarked) state during the epigenetic writing. In contrast, this restriction in kinetic pathway produces major effects on the dynamics. Most notably, it allows for the existence of a long-lived metastable mixed state (MMS) in which all three epigenetic states coexist even above the critical point *α*_{c} observed for the simpler “two-state” model. This case is interesting as it displays ultrasensitivity to external perturbations: the MMS is sensitive to small local fluctuations which drive large conformational and global changes, while the epigenetically coherent states are broadly stable against major and extensive re-organisation events such as semi-conservative chromatin replication (Fig. 6).

Like hysteresis and bistability, ultrasensitivity is important in *in vivo* situations, in order to enable regulation of gene expression and ensure heritability of epigenetic marks in development. For instance, it is often that case that, during development, a localized external stimulus (*e.g.*, changes in the concentration of a transcription factor or a morphogen) is enough to trigger commitment of a group of cells to develop into a cell type characterizing a certain tissue rather than another [1]. On the other hand, once differentiated, such cells need to display stability against intrinsic or extrinsic noise. Ultrasensitivity similar to the one we report within this framework would enable both types of responses, depending on the instantaneous chromatin state.

A further captivating example of ultrasensitive response is the previously mentioned case of the X-chromosome in-activation. Also in that case, the selection of which of the two X-chromosomes to silence is stochastic in female mammalian embryonic stem cells: specifically, it is suggested that a localized increase in the level of some RNA transcripts (XistRNA) can trigger heterochromatization of the whole chromosome, which turns into the so-called Barr body, by propagating repressive marks through recruitment of the polycomb complex PRC2 [9]. Once the inactive X copy is selected, the choice is then epigenetically inherited in daughter cells [6], which therefore suggests robustness through disruptive replication events.

Finally, we have studied the case in which the epigenetic dynamics is subject to a different stochastic noise, with respect to the 3D chromatin dynamics. This effectively “non-equilibrium” case, where detailed balance of the underlying dynamics is broken, leads to interesting and unique physical behaviours. Possibly the most pertinent is that we observe, and justify, the existence of a parameter range for which a long-lived multi-pearl state consisting of several globular domains coexist, at least for a time corresponding to our longest simulation timescales which roughly compare to 14 hours of physical time (see Fig. 7 and Models and Methods for the time mapping). This multi-pearl structure is qualitatively reminiscent of the topologically associated domains in which a chromosome folds *in vivo*, and requires efficient epigenetic spreading in 1D, together with vicinity to the theta point for homopolymer collapse in 3D.

Although one of the current paradigms of chromosome biology and biophysics is that the epigenetic landscape directs 3D genome folding [16–19, 22], an outstanding question is how the epigenetic landscape is established in the first place – and how this can be reset *de novo* after each cell division. In this respect, our results suggest that the inherent non-equilibrium (*i.e.*, ATP-driven) nature of the epigenetic read-write mechanism, can provide a pathway to enlarge the possible breadth of epigenetic patterns which can be established stochastically, with respect to thermodynamic models.

It is indeed becoming increasingly clear that ATP-driven processes are crucial to regulate chromatin organisation [84, 85]; nonetheless how this is achieved remains largely obscure [86]. The work presented here provides a concrete example of how this may occur, and suggests that it would be of interest to develop experimental strategies to perturb, for instance, the interaction between reading and writing machines (e.g., by targeting the recruitment between Set1/2 and RNA polymerase, or between EZH2 and PRC, etc.), in order to determine what is the effect of the positive feedback loop on the structure of epigenetic and chromatin domains, and to what extent these require out-of-equilibrium dynamics in order to be established.

Furthermore, we envisage that the “recolourable polymer model” formalised in this work and aimed at studying the interplay between 3D chromatin folding and epigenetic dynamics, might be extended in the future to take into account more biologically detailed (although less general) cases. For instance, one may introduce RNA polymerase as a special “writer” of active marks, which can display specific interactions with chromatin, e.g., promote looping [86]. More generally, our framework can be used as a starting point for a whole family of polymer models which can be used to understand and interpret the outcomes of experiments designed to probe the interplay between *dynamic* epigenetic landscape and chromatin organisation.

To conclude, the model presented in this work can therefore be thought of as a general paradigm to study 3D chromatin dynamics coupled to an epigenetic read-write kinetics in chromosomes. All our findings strongly support the hypothesis that positive feedback is a general mechanism through which epigenetic domains, ultrasensitivity and epigenetic switches might be established and regulated in the cell nucleus. We highlight that, within this model, the interplay between polymer conformation and epigenetics plays a major role in the nature and stability of the emerging epigenetic states, which had not previously been appreciated, and we feel ought to be investigated in future experiments.

We acknowledge ERC for funding (Consolidator Grant THREEDCELLPHYSICS, Ref. 648050). We also wish to thank A. Y. Grosberg for a stimulating discussion in Trieste.

## COMPUTATIONAL DETAILS

The polymer is simulated as a semi-flexible [52] beadspring chain in which each bead has an internal degree of freedom denoted by *q* = {1, 2, 3}.

The attraction/repulsion between the beads is regulated by the truncated and shifted Lennard-Jones (LJ) potential as described in the main text:
and . The *q*-dependent interaction cut-off is set to: (i) 2^{1/6}*σ*, modelling only steric interaction between beads with different colours, or with colour corresponding to no epigenetic marks (i.e., *q* = 3); (ii) *R*_{1} = 1.8*σ* between beads with the same colour, and corresponding to a given epigenetic mark (e.g., *q* = 1, or *q* = 2), modelling self-attraction, e.g., mediated by a bridging protein [1]. The free parameter is set so that for *q*_{a} = *q*_{b} = {1, 2} and otherwise. Because the potential is shifted to equal zero at the cut-off, we normalise in order to set the minimum of the attractive part to (see also Fig. S1).

The connectivity is taken into account via a harmonic potential between consecutive beads
where . The stiffness is modelled via a Kratky-Porod term [52]
where *t*_{a} and *t*_{b} are the vectors joining monomers *α*,*α*+1 and *b*,*b*+1 respectively. The parameter *l*_{K}/2 is identified with the persistence length *l*_{P} of the chain, here set to *l*_{P} = 3*σ*.

The total potential *U*^{a}(*x*) experienced by each bead is given by the sum over all the possible interacting pairs and triplets, *i.e.*

The dynamics of each bead is evolved by means of a Brownian Dynamics (BD) scheme, *i.e*. with implicit solvent. The corresponding Langevin equation reads
where *γ* is the friction coefficient and *ξ*_{a} a stochastic noise which obeys the fluctuation dissipation relationship , where the Latin indexes run over particles while Greek indexes over Cartesian components.

Using the Einstein relation we set
where *η* is the solution viscosity. The effective viscosity of the nucleoplasm depends on particle size and timescales: here we consider a bead size of *σ* = 30 nm, corresponding to 3 kbp [17, 47]. A linear extrapolation from the data in Ref. [53] would lead to *η* ~ 5 – 10 cP for the early time viscosity for a particle of size 30 nm - this is a lower bound as the early time diffusion coefficient larger than the late time value (equivalently, the early time effective viscosity is lower than the late time value) [53]. The effective viscosity can also be inferred indirectly from the mapping done in Ref. [47] to fit yeast data; in this case it can be estimated to be in the range *η* ≃ 100 – 200 cP. By using these numbers and *T*_{L} = 300*K* one can define a Brownian time
as the time required for a bead to diffuse its own size. We have also performed a direct mapping using the experimental data in yeast of Ref. [54] and the data obtained from our simulations for polymer *M* = 2000 beads long and . Comparing the mean square displacement of the monomers we found that, in agreement with the previous discussion, the best match between the datasets is attained for ms (see Fig. S1(B)). For definitiveness, and using the worst-case scenario within this mapping strategy, we will assume *τ*_{Br} = 10 ms throughout the rest of the work (as in Ref. [47]). For comparison, it is also useful to mention and to bear in mind that the typical re-orientation time for a polymer with no attractive interactions and *M* = 2000 beads long is about 10^{5} *τ*_{Br} within our numerical scheme. The dynamics is then evolved using a velocity-Verlet integration within the LAMMPS engine in Brownian dynamics mode (NVT ensemble). The simulation runtime typically encompasses 10^{6} *τ*_{Br} and is therefore comparable to 2.5 – 3 hours of real time.

The systems are simulated in a box of linear size *L* and in the dilute regime (assuming each monomer occupies a cylindrical volume π*σ*^{3}/4 one can estimate the volume fraction as , for a number of monomers *M* = 2000). The box is surrounded by a purely repulsive wall in order to avoid self-interactions through periodic boundaries. The initial configuration is typically that of an ideal random walk in which each bead assumes a random value (colour) *q*. We then run 10^{4} *τ*_{Br} timesteps in which the only force field is an increasingly stronger steric soft repulsion between every pair of beads, while their colour is left unaltered. The explicit form of the soft potential we use is
where *d*_{c} = 2^{1/6}*σ* is the cutoff distance and *A* the maximum of the potential at *d*_{ij} = 0.This “warm-up” equilibration run transforms the ideal random walk conformations into one obeying self-avoiding statistics as it removes the overlaps between monomers.

Following this equilibration, we start the main run, typically consisting of 10^{6} *τ*_{Br} timesteps, in which *M* recolouring moves are attempted every 10^{3} *τ*_{Br} timesteps. Each recolouring move is accepted or rejected using a Metropolis algorithm, *i.e*. the acceptance probability is given by
where *∆E* is the difference between the new energy (after re-colouring) and the old one (before recolouring). The energy appearing in Eq. (16) is computed from Eq. (15). In particular, upon recolouring any one bead, the only part of the energy function that changes is the LJ potential (Eq. (8) and Fig. S1), as same coloured beads interact through an attractive potential while differently coloured ones only through the repulsive part of the potential. It is important to note that the temperature appearing in the exponent is the “recolouring” temperature *T*_{Rec}, which is not necessarily identical to *T*_{L}, the temperature used in the Langevin equation for the stochastic noise.

The total polymer length is taken *M* = 2000*σ* ≃ 6 10^{4} nm or 6 Mbp at the 3 kbp per bead resolution which we use. When probing the nature of the phase transition of the “two state” model we decrease the length to *M* = 50 and perform 100 independent simulations of 10^{6} *τ*_{Br} in order to enhance sampling (as these short chain equilibrate quickly).

## THE DETAILED BALANCE IS BROKEN WHEN*T*_{P} ≠ *T*_{L}

According to the Kolmogorov criterion, in a stochastic dynamics satisfying detailed balance the product of the transition rates over any closed loop over some states of the system must not depend on the sense along which we go through the loop [88]. This is not in general the case when *T*_{Rec} ≠ *T*_{Langevin}. To see why this is so, let us imagine a simple case where two loose beads initially of the same colour interact only with the LJ potential, without any chain in between. Imagine further than the beads are initially close to each other and are then moved apart by a thermal fluctuation. This happens with probability . At this stage, a change in the colour of the bead (*q*) occurs with probability 1, as there is no energy penalty. When the beads have different colours, they can come close to each other still with probability 1, as there is now no attraction or penalty in being close together (as long their distance is greater than 2^{1/6}*σ*). Once they are back together, also the recolouring move that causes the two beads to have the same *q* occurs with probability 1 as this move is energetically favourable. Therefore we obtain

By performing the loop in the reverse direction (*i.e*. change *q* first, then separate the beads, change back *q*, and finally put the beads back in contact) one instead obtains

The two transition probabilities are equal only if *T*_{Rec} = *T*_{L}. In particular, if *T*_{L} > T_{Rec} the “direct” loop is more likely to happen than its reverse, while the opposite is true if *T _{L}* <

*T*

_{Rec}: detailed balance is therefore violated when

*T*

_{L}≠

*T*

_{Rec}.

## SECOND VIRIAL COEFFICIENT

Given our interparticle potential, it is straightforward to extract the second virial coefficient *u*_{2} by using the Mayer relation and Eq. (8) [89]:
We find that is positive for *q*_{a} ≠ *q*_{b} and negative when *q*_{a} = *q*_{b}. In particular, we find that while ranges from −9.3 (for ) to −400 (for .)

## FIRST-ORDER-LIKE NATURE OF THE TRANSITION

We have investigated the nature of the transition from swollen-disordered phase to the collapsed-ordered phase in two ways: (i) by studying hysteresis cycles of a chain with *M* = 2000 beads (5 runs) and (ii) by measuring the joint probability from simulations with a well-equilibrated chain with *M* = 50 beads (100 runs).

The results obtained from the first study, (i), are shown in Fig. S2 (see also Suppl. Movie M7). This figure shows that there is a region of the interaction parameter *α* ≃ 0.9 – 1.0 for which the two phases (collapsed and swollen) are both metastable. Specifically, *α* ≃ 1 is needed to collapse a swollen chain (red curve), but a lower interaction parameter *α* is required to send the chain back into the swollen phase, once it is collapsed (blue curve). The curves are made by slowly increasing and decreasing e over a range of *0.3k*_{B}*T* over 10^{6} Brownian times.

The results from the second study, (ii), are reported in Fig. S3. In this figure we show a series of plots representing the joint probability distribution , *i.e*. the probability of observing the system in a certain state with given signed magnetisation and radius of gyration *R*_{g}. One may notice that the system undergoes a transition from a swollen (large *R*_{g}) and disordered phase to a compact (small *R*_{g}) and ordered (coherent magnetisation ) one. In particular, at the transition point *α*_{c} = 1.15 (for *M* = 50) the system shows the coexistence of both phases, *i.e*. the probability has three maxima (as *T*_{L} = *T*_{Rec} this is an equilibrium model, hence, equivalently, the free energy has three minima). To gain these results, we have sampled the phase space near the critical point *α*_{c} as broadly as possible by performing 100 independent simulations for a polymer of *M* = 50 beads and runtime 10^{6} *τ*_{Br} each, from which we obtain the joint probabilities reported in Fig. S3. Single trajectories of some of the 100 runs are shown in Fig. S4 for the same values of *α* used for the joint probability plots.

Finally, we highlight that we do not observe switching between the two symmetric metastable states, *i.e*. and , for a chain with *M* = 2000 beads, but only for shorter chains (see Fig. S4 and Suppl. Movie M8). This switching property was reported in literature for effectively 1D models [25, 30, 32], where a relatively small number of nucleosomes were considered.

This result is due to the fact that switching occurs when the system overcomes the energy barrier between the two states. This barrier grows with both the interaction strength *ϵ*, and the number of intrachain interactions, which increases with *M*. In other words, the average first passage time from one state to the other can be predicted by a Kramers formula, so that it is proportional to the exponential of the free energy barrier, which scales with *M*, so that switching time increases exponentially with *M* (or equivalently the switching probability decays exponentially with *M*).

## CONTACT MAPS – 2 STATE MODEL

In Fig. S5 we report a series of contact maps for the “two-state” model, starting from the time at which the quench is performed. One can notice that, while for high values of the interaction parameter *α*, the folding dynamics of the polymer, as well as the network of interactions, is frozen, for values of *α* closer to the transition point *α*_{c} = 0.9, the contact map evolves into a full checker-board interaction pattern.

## DECAY OF THE RADIUS OF GYRATION

In this section we illustrate a simple physical reasoning to rationalise the exponential decay of the gyration radius during the collapse at the transition point. Although there are some authors who argue that the collapse should be self-similar in time, and therefore, following a power law [61, 90], we have not found evidence of this self-similar collapse. This fact is presumably due either to the finite size of the chain used in our investigation, or to the initial condition. Indeed, in our simulations we start from random configurations far from a stretched coil, which is instead the situation often considered in theoretical models [61]. Therefore in our case the common assumption of neglecting long-ranged loops at the early stages of the collapse [61] may not be appropriate. Apart from the theory explored in Ref. [62], we have not found in the literature a simple argument as to why the size of the polymer should decrease exponentially in time during the collapse. For this reason we illustrate a simple argument below.

If one takes the growth (in number of monomers) of the pearls at very early times as *g* ~ *t*^{β}, with *β* unknown for the moment, the volume of the pearls will grow as
since each pearl is a crumpled globule *ν* = 1/*d* and hence
the total number of monomers in pearls is *gN*_{p} (where *N*_{p} is the number of pearls), therefore the number of inter-pearl monomers (not in the pearls) is
as at early times and *t* is small by definition of “early-time”. When pearls begin to appear, they are separated by a 3D distance given by the average number of inter-pearl monomers to the exponent *ν* and in particular the 3D distance *R*_{ip} is

For *t* = 0, Eq. (24) correctly predicts that the typical size of inter-pearl distance is the whole polymer (as *N*_{p} = 1). For *t* ≠ 0 it predicts a stretched exponential decay of the gyration radius for *β* < 1, and a simple exponential, for *β* = 1. Therefore our argument provides a reason for a non-power-law decay of *R*_{g}.

We note that this argument is valid at very early times, or when the chain is large enough that the number of monomers belonging to the growing pearls *N*_{p} is much smaller than the number of monomers in the chain. It does not make any assumption regarding the presence of long range loops, while it makes the assumption that segments of the polymer not in pearls are still in a self-avoiding walk conformation . Although we have observed that the growing of pearls introduce competing tensions along the chain, at early times (or for very large chains) such forces do not spread across the whole chain, therefore leaving intra-blobs segments tension-free.

Even if we cannot give an estimation for *β* within our reasoning, this is not needed to prove the non-power-law decay of *R*_{g} in time during the collapse. This exponent might assume values in between *β* = 1 for a mean-field dynamics of a conserved order parameter [91] *to β* ≃ 0.66 as observed numerically for the coarsening of pearls during a homopolymer collapse [63]. A more detailed study of the early stages of the collapse dynamics of a recolourable polymer might shed some light into the precise value of *β* for this case, and on the precise nature of the decay of the radius of gyration (stretched versus simple exponential).

## CONTACT PROBABILITY

In this Section we report the contact probabilities measured from our simulations (see Figs. S6 and S7). In order to highlight the differences between our simulations and effectively 1D models we measured the contact probability of a single bead (index *b* = 1000 along the chain, in Fig. S6). While in effective 1D models one normally assumes a contact probability leading to long range interactions, which are tuned by *c*, here we observe that within within a single run the contact probability assumes a shape closer to a sum of delta-functions. This suggests a strong preferential selection of certain contacts along the polymer within that run, and a strong deviation from a “mean-field” view where contacts are regulated via *P* (*c*) (which is an average over many conformations). In Fig. S6 we report our findings by showing (in the left hand side graphs), an “interaction plot” which shows how the pattern of beads contacting bead *b* = 1000 changes over time, for *α* = 1.25 – 5 *k*_{B}*T*_{L}. These plots show that the “fuzziness” that characterises mobile networks of contacts disappears when *α* ≥ 3*k*_{B}*T*_{L}. At these values of interaction strength, the contacts between some beads are present at all times and they never exchange.

The plots in Fig. S6 also show (on the right hand side) the time averaged contact probability (again for bead *b* = 1000). The graphs capture the strong departure from a mean-field-like interactions for high interaction strengths as in fact *P*_{c}(*m*) resemble a sum of delta-functions rather than a power law. The picture that emerges is therefore similar to that of spin-like variables interacting on a network, where the edges are established by the collapse dynamics. When the interaction parameters are higher than a certain value the edges of the network are frozen in place, resembling a spin glass. We finally stress, that although we observe this departure from the mean-field assumption, the average of *P*_{c}(*m*) over many beads and many simulations gives a more “traditional” power-law decay as we show in Fig. S7. In particular, we find *P*_{c}(*m*) ~ *m*^{−c} with *c* ranging from 1/3 to 1/2 for different interaction strengths at the end of the collapse dynamics (see Fig. S7), while they all start from a situation where compatible with a self-avoiding walk statistics (an ideal random walk would have *c* = 1.5 in 3d).

## CONNECTIVITY

In this section we introduce and compute several quantities to characterise the change in network connectivity. As described in the main text, we track the average number of neighbours *N*_{n}(*t*), and also the average spanning distance Δ_{s}(*t*) defined as
where *a* and *b* denote polymer beads. The dynamical changes of these quantities during the collapse in selected runs (denoted with “RW” and the index of the simulation) are reported in Fig. S8. From this figure it is important to notice that while there is an evident increase in number of neighbours and spanning distance for , the same is not observed for higher interaction parameters. In these cases, *e.g.*, the case with *α* = 3, the network of interactions is frozen, the number of neighbours quickly saturates to the maximum value while the spanning distance arrests to achieve a smaller values in steady state with respect to that for lower values of *α*.

The average of these quantities over different runs are shown in Fig. S9(a)-(b). Once again, we can readily see that while the number of neighbours increases and then plateaus at large *α*, the spanning distance has a more complex dependence on the interaction strength. In Fig. S9(c) we also show the late time averaged values (taken after the collapse and over the last 5 10^{5} *τ*_{Br}) alongside the value of the radius of gyration as a function of *α*. One can notice that both ∆_{s} and *R*_{g} are non-monotonic functions of *α*, therefore suggesting the existence of a critical *α*_{c} above which the response of the system changes. In particular one can notice that for *α* ≥ 3 the spanning distance starts to decrease and the radius of gyration to increase, corresponding to the formation of more short ranged network and more frustrated configurations at higher *α*.

Finally in Fig. S9(d) we report the value of the neighbour exchange rate *κ*_{n} divided by the average number of neighbours *N*_{n} at any time after the collapse: it can be seen that *κ*_{n}*/N*_{n} always reaches a steady state. This steady state value monotonically decreases and, in particular, undergoes a sharp transition around *α*_{c} ≃ 3 (see Fig. S10), above which the network of interactions is virtually frozen.

## DEPENDENCE ON INITIAL CONDITIONS WITHIN THE “TWO-STATE” MODEL

We note that the quenched disordered state observed for high values of *α* and identified as a “topologically frozen” state in the main text cannot be produced in the case the system was initialised as a uniformly coloured polymer (homopolymer). This initial condition would, in this case, lead to a standard homopolymer collapse. Another possible initial condition is a globular polymer with random colouring. This resembles the early stages of the collapse process shown in Fig. S5 and Suppl. Movie M3 and we therefore expect that the subsequent evolution is very similar to the one investigated in the main text, where the polymer is initialised as swollen and disordered.

## CONTACT MAPS – TWO-STATE MODEL WITH INTERMEDIATE STATE

In this section we report, in Fig. S11, the contact maps for the “two-state” model with intermediate state (IS) at different times and during the local recolouring perturbation. We started from the mixed metastable state (MMS) and then forced the recoloured a small (10%) segment in the middle of the chain. From Fig. S11 one can notice that this localised perturbation quickly drives the system towards the epigenetically coherent and globular state. As we show in the main text, this ordered phase is instead robust against major global reorganisation events such as a semi-conservative replication. This ultra-sensitive response, *i.e*. a dramatically different response of the system to an external stimulus depending on the current state of the system, can be appreciated by looking at the large re-organisation and phase transition driven by such a small perturbation (Fig. S11 and main text Fig. ??) in contrast to the preserved coherent state even after a replication event (see main text Fig. ?? at late time).

## STABILITY OF METASTABLE MIXED STATE

In this section we aim to quantify the stability of the metastable mixed state (MMS) whose existence was reported in the main text in the “two-state” with intermediate state model. In order to do this we perform 30 simulations with a chain *M* = 2000 beads long and monitor the (signed) epigenetic magnetisation as a function of time. From this it is straightforward to obtain the survival probability of the MMS, i.e., the fraction of MMS which survives as a function of time. The results are reported in Fig. S12 (for *α* = 1) where we show the behaviour of the signed epigenetic magnetisation for all 30 simulations (left) as well as the survival probability (right). From the plot one can readily notice that at the end of the simulation (which last 10^{6} Brownian times, ~ 3 hours of real time, see mapping in Simulation Details) 50% of the replicas are still in the MMS. The survival probability can be fitted by a simple exponential with a characteristic decay time ~ 1.3 10^{6} Brownian times. It is also worth stressing that for the same value of *α*, the simpler “two-state” model, shows instead that 100% of the simulations end up in the collapsed and epigenetically coherent state before 10^{6} Brownian times. This can be seen from Fig. 4a of the main text where we plot the average epigenetic magnetisation as a function of time: this is observed to saturate near unity at 10^{6} Brownian times for *α* = 1. We finally note that we observed that the MMS is unstable in the case *α* ≥ 1.25, as all the 10 simulations we performed collapse within few hundreds of recolouring steps (10^{3} Brownian times, not shown). On the other hand we have not thoroughly explored the parameter space in order to find the precise range of *α* for which the MMS is metastable.

## THETA POINT FOR A HOMOPOLYMER

In the main text we describe an argument for which our “two-state” model with broken detailed balance leads to long-lived TADs, *i.e*. a block-like pattern along the contact map. As in this argument we use the value of the collapse transition temperature, or Θ temperature, for a homopoly-mer, here we estimate this approximately.

To do so, we study the behaviour of the radius of gyration for a homopolymer with *M* = 2000 beads, for different temperatures *T*_{L} and starting from a swollen self-avoiding configuration (Fig. S13). The curves are averaged over 10 independent simulations. We observe that for the polymer is not smaller than its initial state, and therefore consider this temperature as roughly the theta-point for the homopolymer (non-recolouring) case. At this stage it is worth reminding that the critical point for an equally long “recolourable” polymer is at .

## DEPENDENCE ON INITIAL CONDITIONS AND SEMI-CONSERVATIVE REPLICATION PROTOCOL WITHIN THE “TWO-STATE WITH INTERMEDIATE STATE” MODEL

The mixed metastable state (MMS) that is observed for values of *α* close to the critical value *α*_{c} is not observed for higher values of *α*. This is most likely because this MMS becomes unstable. Moreover, we have never observed the MMS emerging from polymers which were initially homogeneously coloured (homopolymers). On the other hand, we have observed the onset of MMS from a disordered and collapsed polymer. Within the same “two-state with intermediate state” model, in the main text we also report a case in which the polymer is stable against semi-conservative replications which turn 50% of the beads into a random colour. We also studied (data not shown) the case in which 50% of the monomers are turned grey (inactive). The collapsed state is stable also against this type of perturbation. It is a future challenge to investigate biologically-relevant replication strategies that might be overturn the dominant epigenetic mark and force an epigenetic switch in the system.

## CONTACT MAPS – TWO-STATE MODEL WITH BROKEN DETAILED BALANCE

In this section we report selected instantaneous contact maps for the “two-state” model with broken detailed balance. As one can notice, the off-diagonal contacts are temporary and very mobile. Averaging over such frames leads to the “block-like” structure reported in the main text, which is reminiscent of the TAD-like structures often reported by capture experiments in eukaryotic cells.

## THE EPIGENETIC CORRELATION LENGTH

In analogy to the Ising 1D magnetic correlation length, the “epigenetic correlation length”, can be measured by imagining that each bead has a epigenetic state *q* that can take any of the possible states: red, blue or grey. The epigenetic correlation function can therefore be expressed in terms of these variables as
and where the average is performed over independent system configurations and over different (uncorrelated) times. Since it is analogous to the 1D Ising (or Potts) magnetisation correlation function, takes the functional form
where the correlation length *ξ*(*T*_{Rec}) diverges with *M* as the system breaks the symmetry between red/blue epigenetic states. When the system displays different coexisting epigenetic states (multi-state regime), either in the glassy phase of the simplest “two-state” model or in the stable “block-like” organised regime of the model with broken detailed balance, *ξ*(*T*_{Rec}) is finite.

This length-scale is clearly dependent on *T*_{Rec}: even if the polymer were an immobile straight line, the correlation length would increase with decreasing *T*_{Rec} and ultimately diverge as *T*_{Rec} → 0 (as there is no transition in 1D Ising-like models with short-range interactions). Furthermore, in our model the dynamics of the polymer is coupled to the epigenetic organisation, and therefore *ξ*(*T*_{Rec}) is expected to depend more subtly on *T*_{Rec} (as well as *T*_{L}).

## OTHER REGIMES OF THE “TWO-STATE” MODEL WITH BROKEN DETAILED BALANCE

In this Section we report other regimes that we observe in the “two-state” model with broken detailed balance. In particular, we fix and change the value of *T*_{L} in the range . We observe that leads to a collapse of the coil into a single-state dominated globule, similar to that observed in the standard “two-state” model, but with a higher critical temperature (recall this is for the case with *T*_{L} = *T*_{Rec}). For the temperature range we considered, we found a transient, long-lived regime, where the averaged contact map a characteristic “block-like”. Here, higher temperatures *T*_{L} lead to a smaller size of the domains for fixed and small *T*_{Rec} (the domains are barely visible for ). The contact maps reported in Fig. S15 show the average frequency of contacts (upper triangle), and a weighted contact map (lower triangle), where each entry is coloured based on the frequency of contacts through the following method

In this equation, (blue), (red) and *F*(*q*_{i},*q*_{j}) = 0 if *q*_{i} *≠ q*_{j}; while Θ(*x*) = 1 if *x* > 0 and 0 otherwise and *R*_{i} = 1.8*σ* (see main text). By weighting the contacts in this way, one can classify the entries of the contact matrix based on the frequency of the interactions between same-coloured beads; this helps distinguish the different epigenetic domains along the polymer. In other words, entries *C*_{ij} in the contact map that are fully red (blue) indicate that all observed contacts between *i* and *j* were between red (blue) beads. The observed pattern is not trivial since the underlying epigenetic landscape is dynamic, therefore in principle a bead can become blue even though belonging to a red domain. Note that by using the same normalisation as for a standard contact map (maximum number of observed contacts) would lead to less well defined (whiter) domains. Thus, in Fig. S15 one can readily appreciate the existence of epigenetically stable domains that show enhanced contacts within themselves and little mixed interactions with nearest neighbouring ones.

## STABILITY OF THE EPIGENETIC DOMAINS IN THE OUT-OF-EQUILIBRIUM LIMIT OF THE MODEL

Here we comment on the stability of the epigenetic domains that can be seen emerging in the out-of-equilibrium limit of the “two-state” model when the (Langevin) temperature is larger than the theta temperature at which the polymer collapses when (about ). Here we address the question of what happens when the initial configuration with different initial conditions, either collapsed disordered (left in Fig. S16) or swollen ordered (right in Fig. S16). For the first case, as in the main manuscript, TAD-like long-lived domains form, and tend to coalesce on a very long time-scale (corresponding to hours of physical time). Starting from the swollen ordered phase, the single epigenetic domain is stable and no other ones form over the course of the simulations. As for the case of the ho-mopolymer, the chain remains swollen for , and eventually collapses for .

## REFERENCES

- [1].↵
- [2].↵
- [3].↵
- [4].↵
- [5].↵
- [6].↵
- [7].↵
- [8].
- [9].↵
- [10].↵
- [11].
- [12].↵
- [13].↵
- [14].↵
- [15].↵
- [16].↵
- [17].↵
- [18].
- [19].↵
- [20].↵
- [21].
- [22].↵
- [23].↵
- [24].↵
- [25].↵
- [26].↵
- [27].↵
- [28].↵
- [29].↵
- [30].↵
- [31].
- [32].↵
- [33].
- [34].↵
- [35].↵
- [36].↵
- [37].
- [38].↵
- [39].↵
- [40].↵
- [41].↵
- [42].↵
- [43].↵
- [44].↵
- [45].↵
- [46].↵
- [47].↵
- [48].
- [49].
- [50].↵
- [51].↵
- [52].↵
- [53].↵
- [54].↵
- [55].↵
- [56].↵
- [57].↵
- [58].↵
- [59].↵
- [60].↵
- [61].↵
- [62].↵
- [63].↵
- [64].
- [65].
- [66].
- [67].
- [68].↵
- [69].↵
- [70].↵
- [71].↵
- [72].↵
- [73].↵
- [74].↵
- [75].↵
- [76].↵
- [77].↵
- [78].↵
- [79].↵
- [80].↵
- [81].↵
- [82].↵
- [83].↵
- [84].↵
- [85].↵
- [86].↵
- [87].
- [88].↵
- [89].↵
- [90].↵
- [91].↵