Introduction

Bacterial colonies consisting of cells with nearly identical geometry and mechancial properties are uniquely suited for studying the non-equilibrium statistical mechanics of living matter1,2,3. A well-established biological model system is the coccoid/diplococcoid bacterium Neisseria gonorrhoeae. With a spherical cell body with a diameter of roughly 1 μm, the bacterium forms colonies that are reminiscent of nonliving colloidal assemblies. However, bacteria grow and reproduce. Moreover, while colloidal assemblies are held together by passive attractive interactions, such as depletion forces, N. gonorrhoeae colonies are held together by extracellular filaments called type IV pili (T4P) that are cyclically elongated and retracted4. T4P are helical polymers consisting mainly of the major subunit PilE. Anchored in a transmembrane complex, T4P are isotropically displayed on the whole cell surface of N. gonorrhoeae5. Their elongation and retraction is driven by the dedicated ATPases PilF and PilT, respectively. PilF is required for pilus polymerization, and PilT drives pilus retraction and depolymerization. During retraction, T4P are capable of generating high forces exceeding 100 pN6,7, which is 20 times higher than the force generated by muscle myosin and makes the T4P one of the strongest molecular machines known so far8, and the retraction proceeds with velocities up to 2 μm/s2,5. When individual cells come into proximity of abiotic surfaces such as glass, cells can attach via T4P. Since N. gonorrhoeae generates multiple pili simultaneously, a tug-of-war between pili on different sides of the cell body ensues. On glass surfaces, the average detachment force is an order of magnitude smaller than the maximum force generated by pili. Therefore, the tug-of-war leads to a random walk of individual bacteria on surfaces5,9,10,11,12,13. In aerobic environments, individual cells form colonies. In colonies, cells are held together by T4P, which produce time-dependent attractive interactions among bacteria14,15. The fact that this interaction is caused by time-dependent non-equilibrium forces affects the shape, dynamics, and sorting behavior of bacterial colonies. N. gonorrhoeae mutants without T4P cannot aggregate into colonies16. The strength of cell-cell attraction is affected by T4P post-translational modifications and can be controlled by inhibiting or activating different steps of the pilin glycosylation pathway17.

The material properties of Neisseria colonies have been characterized as liquid-like1 with effective viscosities of η 350 Pa s for N. gonorrhoeae2. Microcolonies display properties that are partially reminiscent of droplets exhibiting an effective surface tension. Evidence for an effective surface tension is firstly the spherical shape of microcolonies formed by N. gonorrhoeae with retractile T4P18. Second, upon contact, two microcolonies fuse to form a sphere with larger radius2,15,16. Depending on the strength and activity of T4P interactions, initial fusion is however followed by slow coalescence of the two microcolonies that can take hours12,19 and the mechanical response of colonies certainly contains elastic components on some time scales.

While material properties of N. gonorrhoeae colonies have been characterized1, some non-equilibrium effects resulting from active bacterial force-generation remain to be explored. In thermodynamic equilibrium, the velocity correlation measured in particle systems is generally proportional to the linear response with respect to a small perturbation, which is called a fluctuation-response relation20. The extent of the violation of this fluctuation-response relation in non-equilibrium states can be related to the rate of energy dissipation21,22. For bacterial colonies, active force generation by T4P changes the fluctuations of the conservative forces experienced by the cells and entails energy dissipation. Therefore, the fluctuation-response relation is expected to be violated in bacterial colonies under the premise that colonies can be described as physical particle system23,24,25. However, the frequency characteristics and measurability of this violation are unknown. Thus, the aim of this work is to establish theoretical predictions regarding the non-equilibrium fluctuations of N. gonorrhoeae colonies.

Internally driven many-particle systems can also exhibit non-equilibrium phase transitions, which has been investigated for some classes of model systems26,27,28,29. Notably, for active particles that undergo rotational motion and thus, on average, obey rotational symmetry, density fluctuations are Gaussian, and the non-equilibrium phase transitions can be understood in a framework similar to equilibrium phase transitions30,31. For N. gonorrhoeae colonies, the average force generation by individual bacteria is presumably almost spherosymmetric, and therefore it may be challenging to distinguish genuine non-equilibrium colony dynamics from dynamics that are also be observable in passive systems. However, it has been shown experimentally that mechanical forces govern the sorting of different cells during the early formation of N. gonorrhoeae colonies32. Mutants with different T4P density and rupture forces of T4P-mediated adhesion spatially segregate inside colonies, suggesting a sorting process driven by pilus retraction that also depends on differential adhesiveness19,32. Self-sorting of Neisseriae colonies has been studied experimentally by changing the post-translational modification of T4P, their activity, and computer simulations have been conducted1,19,32.

In general, the physical properties of large bacterial colonies are ideally studied with a combination of experiments, theory, and detailed computer simulations. Previous work includes simulations of the dynamics of single cells due to individual pili5,11,12,13 and coarse-grained approaches or continuum theories for the description of Neisseria colonies33. Furthermore, multiscale simulations combining overdamped cell dynamics with stochastic pilus activity have shown great promise for the investigation of the behavior of Neisseria colonies on different length scales1,12. Mechanical forces in bacterial colonies are not only actively generated by T4P but also by cell growth and division. For the case of mammalian cells, tissue growth has been studied extensively with particle-based simulations where individual cells are represented as spheres34,35,36. The sphericity and growth dynamics assumed for cells with these models are also appropriate for simulating coccoid bacteria.

The present work is based on a code for multiscale simulation of colonies consisting of coccoid bacteria that employ T4P to generate active forces, while also growing and dividing. We employ here the highly parallel, classical molecular dynamics simulator LAMMPS37 and add a dedicated extension for the simulation of growing cells that interact with each other through elastic, retractable bonds representing pili. Using this model, we simulate the growth dynamics of colonies and the structural order of cells inside colonies. With appropriate parameterization, the simulation results are qualitatively consistent with experimental findings. Simulations results for cell segregation in colonies consisting of different mutants of the T4P machinery also agree qualitatively with experimental results. Furthermore, we predict a strong violation of the equilibrium fluctuation-response theorem for the colony shape and show that a colony invasion of narrow channels is driven by active pilus-mediated forces.

Results and discussion

Simulation of colonies of coccoid cells

In our simulations, colonies are grown from individual cells through cell division. An individual cell is also called a coccus. A pair of dividing N. gonorrhoeae cells is called a diplococcus and has the shape of two partially overlapping spheres. During the growth, each diplococcus divides approximately with rate α into a pair of individual cocci, which in turn again become diplococci after some time. The fraction of dead cells in N. gonorrhoeae colonies is reported to be below 5%38, and cell death is therefore neglected in our model. Each individual coccus is endowed with a repulsive potential modeling volume exclusion. In addition, cells experience dissipative forces resulting from the relative motion of neighboring cells and thermal fluctuations. Each cell has a fixed number of pili. By modeling the pili as dynamic springs that can extend, retract, bind and unbind either with other pili or with the environment, we faithfully represent the stochatic nature of cell-generated forces.

Cell geometry and bacterial growth

All simulations are conducted in a three-dimensional, Cartesian coordinate system. Individual cells are modeled as soft spheres with radius R. The position of the center of bacterium i is denoted by ri. The vector between a pair of bacteria with indices (i, j) is denoted by rij = ri − rj and their distance is \({r}_{ij} =\big|{{{{{{{{\bf{r}}}}}}}}}_{ij}\big|\).

The division of a cell with index i is modeled by insertion of a second sphere with index j on top of i so that the excluded volume remains the same during insertion, see Fig. 1a. The pair of cells is initially connected by an elastic spring with time-dependent rest length l(t), thus forming a diplococcus. The initial orientation of the vector connecting the cell pair is chosen randomly. Then, the growth of the diplococcus is simulated by increasing the rest length of the spring that connects the cell pair as

$$\frac{{{{{{{{\rm{d}}}}}}}}l(t)}{{{{{{{{\rm{d}}}}}}}}t}=\frac{\alpha }{{\nu }_{{{{{{{{\rm{r}}}}}}}}}},$$
(1)

with a rate constant α and a constant with units of length 1/νr. This linear growth of the long axis of the diplococcus with time is consistent with experimental data39. Note that the geometry of the growth of the diplococcus implies that the volume growth rate increases with the size of the individual diplococcus. As a generalization, one could also include a growth rate α that explicitly depends on the size of the diplococcus to represent an arbitrary volume dependency of the growth on the single-cell level40. A further complication that has not been included in the model, for simplicity, is that the direction of growth and division in Neisseria likely follows a complex pattern determined by alternating perpendicular division planes39. Once the length l(t) reaches a threshold lt, the connecting spring is removed, and the two spheres are treated as individual cocci. Instantaneous forces acting on either of the two cocci during their separation are equally distributed among the two cocci to ensure momentum conservation. The time between the creation of a diplococcus and separation of the two daughter cells is given by tr = ltνr/α.

Fig. 1: Schematic representation of the two active processes occurring in the simulations.
figure 1

a A bacterium grows into a diplococcus and then divides into two individual bacteria. b Two cells bind to each other via pili. Subsequently, pili are retracted by the bacteria leading to a force build-up. The bond connecting the pili ruptures stochastically in a force-dependent manner.

After the separation of a diplococcus, the two individual cocci do not become diplococci instantaneously. Rather, individual cells are turned into diplococci at a constant rate per cell, for which we employ for simplicity the same rate constant α that also appears in Eq. (1). This means that the separation of a diplococcus (division) is followed by a random refractory time, which prevents an unphysical synchronization of the division events in the simulations.

The growth and division model employed in this work is primarily motivated by its simplicity and numerical stability. For several bacterial organisms, experimental studies have demonstrated that homeostasis of cell size can be explained by a phenomenological “adder rule”, whereby cells increase by a constant volume each generation, regardless of initial size at division41,42,43. Thereby, the volume increment during each generation sets the division time and division times obey a Gaussian distribution. For our model, however, we choose to keep the sizes of the spheres always the same to enable a robust parametrization. This choice produces a natural scale for cell division and insofar determines the division times. The additive noise in bacterial division times that reportedly results in their Gaussian distribution42 is represented in our model approximately by the random refractory time between pair separation and creation of daughter cells in the next generation.

Dynamics of type IV pili

Each cell is assumed to have a constant number of pili, typically around seven, see Fig. 1b and Table 1. A pilus of bacterium i is assumed to bind with a rate kbind to one pilus of a neighboring bacterium j. For binding, the distance between i and j, rij, is required to be less than a cutoff distance dbind. This cutoff distance ensures that only bacteria bind to each other when they are in proximity to each other. In some simulations, a distance-based criterion and a Voronoi tessellation are combined to limit pilus interactions only to immediate neighbors that have a distance from each other that is smaller than the cutoff for pilus binding. For simplicity, we assume that pilus-based forces act along the straight lines connecting the centers of cell pairs. It is assumed that two bacteria can only have one pair of pili adhering to each other. Likewise, the bundling of pili5 is also neglected due to its unknown role in cell colonies. Pili of the two cells in a diplococcus do not bind to each other. The pilus-based cell–cell connection is modeled as a spring connecting the centers of two cells. The rest length of the pilus connecting two cells with indices i and j is denoted by Lij. The force exerted on the pair of cells is purely attractive and given by

$${f}_{ij}^{p}=\min \left[0,-k[{r}_{ij}(t)-{L}_{ij}(t)]\right],$$
(2)

where k is the pilus’ spring constant. Once the pilus is bound, it is assumed to retract. Thus, the effective pilus dynamics employed for our model exclude non-retracting pili that form passive bonds among cells, see also earlier work11. Pilus retraction leads to a continuous shortening of its rest length as

$${L}_{ij}(t)=\max \left[2R,{r}_{ij}(0)-\int\nolimits_{0}^{t}{v}_{{{{{{{{\rm{re}}}}}}}}}(t){{{{{{{\rm{d}}}}}}}}t\right],$$
(3)

where \({v}_{{{{{{{{\rm{re}}}}}}}}}\) is the force-dependent retraction velocity of pili. To describe the force–velocity relationship for T4P retraction motors7, we employ the linearized relation

$${v}_{{{{{{{{\rm{re}}}}}}}}}(t)=\max \left[0,{v}_{{{{{{{{\rm{re}}}}}}}}}(0)\left(1-\frac{{f}_{ij}^{p}}{{f}_{{{{{{{{\rm{s}}}}}}}}}}\right)\right],$$
(4)

where the stall force fs represents the maximal force a retracting pilus can generate. Furthermore, it is assumed that the bonds between the pili rupture under stress with a force-dependent rate as

$${\gamma }_{{{{{{{{\rm{rupt}}}}}}}}}=\frac{1}{{t}_{1}{e}^{-{f}_{ij}^{p}/{F}_{{{{{{{{\rm{c,1}}}}}}}}}}+{t}_{2}{e}^{-{f}_{ij}^{p}/{F}_{{{{{{{{\rm{c,2}}}}}}}}}}},$$
(5)

where t1 and t2 are two characteristic rupture time, Fc,1 and Fc,2 are two characteristic rupture force. To simplify the analysis of the colony dynamics, we employ an idealized pilus rupture rate starting from the section “Active phase segregation in mixed colonies” in all following sections of the “Results and discussion”. The idealized pilus rupture rate is

$${\gamma }_{{{{{{{{\rm{rupt}}}}}}}}}={k}_{{{{{{{{\rm{rupt}}}}}}}}}{e}^{{f}_{ij}^{p}/{F}_{{{{{{{{\rm{rupt}}}}}}}}}},$$
(6)

where krupt is the pilus rupture rate without loading and Frupt is a characteristic rupture force. Related models of pilus dynamics have been employed previously5,11,12,44.

Table 1 The choice of parameters for the simulations.

Dynamics of bacteria

For simulating the cell dynamics, we employ an algorithm similar to dissipative particle dynamics (DPD)45,46, where we assume a soft repulsion between cells, a frictional force proportional to the relative velocity of neighboring cells, and thermal noise forces that satisfy the Einstein relation. Underdamped equations of motion for every cell i with mass mi, position ri, velocity vi, and force fi are assumed as

$$\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{{\bf{r}}}}}}}}}_{i}}{{{{{{{{\rm{d}}}}}}}}t}={{{{{{{{\bf{v}}}}}}}}}_{i},\,\,\,\,\,\,{m}_{i}\frac{{{{{{{{\rm{d}}}}}}}}{{{{{{{{\bf{v}}}}}}}}}_{i}}{{{{{{{{\rm{d}}}}}}}}t}={{{{{{{{\bf{f}}}}}}}}}_{i}.$$
(7)

The force acting on each pair of cells consists of conservative forces \({{{{{{{{\bf{F}}}}}}}}}_{ij}^{c}\), dissipative forces \({{{{{{{{\bf{F}}}}}}}}}_{ij}^{d}\), thermal fluctuations \({{{{{{{{\bf{F}}}}}}}}}_{ij}^{r}\) and forces from active pilus retraction \({{{{{{{{\bf{F}}}}}}}}}_{ij}^{p}\). Overall, the sum of these forces is

$${{{{{{{{\bf{f}}}}}}}}}_{i}=\mathop{\sum}\limits_{j\ne i}({{{{{{{{\bf{F}}}}}}}}}_{ij}^{c}+{{{{{{{{\bf{F}}}}}}}}}_{ij}^{d}+{{{{{{{{\bf{F}}}}}}}}}_{ij}^{r}+{{{{{{{{\bf{F}}}}}}}}}_{ij}^{p}).$$
(8)

For defining the individual force terms, we employ the vector between the centers of masses rij = ri − rj and the unit vector pointing towards cell i denoted by \({\widehat{{{{{{{{\bf{r}}}}}}}}}}_{ij}={{{{{{{{\bf{r}}}}}}}}}_{ij}/{r}_{ij}\).

The conservative force acting between pairs of unbound bacteria is

$${{{{{{{{\bf{F}}}}}}}}}_{ij}^{c}=\left\{\begin{array}{ll}{a}_{0}(1-{r}_{ij}/{d}_{{{{{{{{\rm{con}}}}}}}}}){\widehat{{{{{{{{\bf{r}}}}}}}}}}_{ij}\quad \hfill &({r}_{ij} \; < \;{d}_{{{{{{{{\rm{con}}}}}}}}})\\ 0\quad \hfill &({r}_{ij}\;\ge \;{d}_{{{{{{{{\rm{con}}}}}}}}})\end{array}\right.,$$
(9)

where a0 is the maximum conservative force between bacterium i and j, the cutoff distance for the repulsive cell-cell interaction is denoted by dcon = 2R. For a diplococcus consisting of two spheres, the conservative force due to growth is

$${{{{{{{{\bf{F}}}}}}}}}_{ij}^{c}={a}_{{{{{{{{\rm{growth}}}}}}}}}({l}_{i}-{r}_{ij}){\widehat{{{{{{{{\bf{r}}}}}}}}}}_{ij},$$
(10)

where agrowth is the elastic constant of the spring connecting the two cells of a diplococcus. The dissipative and random forces are, respectively, given by

$${{{{{{{{\bf{F}}}}}}}}}_{ij}^{d}=-\gamma {\omega }^{D}({r}_{ij})({\widehat{{{{{{{{\bf{r}}}}}}}}}}_{ij}\cdot {{{{{{{{\bf{v}}}}}}}}}_{ij}){\widehat{{{{{{{{\bf{r}}}}}}}}}}_{ij},$$
(11)
$${{{{{{{{\bf{F}}}}}}}}}_{ij}^{r}=\sqrt{2\gamma {k}_{{{{{{{{\rm{B}}}}}}}}}T}{\omega }^{R}({r}_{ij}){\theta }_{ij}{\widehat{{{{{{{{\bf{r}}}}}}}}}}_{ij},$$
(12)

where γ is a friction coefficient, ωD and ωR are distance-dependent weight functions, kB is the Boltzmann constant, T is the ambient temperature and θij = θji is a random number drawn from a Gaussian distribution with zero mean and unit variance. For the distance-dependence of the friction force we choose

$${\omega }^{D}(r)={[{\omega }^{R}(r)]}^{2}=\left\{\begin{array}{ll}{(1-{r}_{ij}/{d}_{{{{{{{{\rm{dpd}}}}}}}}})}^{2}\quad \hfill &({r}_{ij} \; < \;{d}_{{{{{{{{\rm{dpd}}}}}}}}})\\ 0\quad \hfill &({r}_{ij}\ge {d}_{{{{{{{{\rm{dpd}}}}}}}}})\end{array}\right.,$$
(13)

where ddpd is the cutoff distance for dissipative and random forces. Finally, the forces resulting from the retraction of pili are given in their vectorial form by

$${{{{{{{{\bf{F}}}}}}}}}_{ij}^{p}={f}_{ij}^{p}{\widehat{{{{{{{{\bf{r}}}}}}}}}}_{ij}.$$
(14)

Note that we do not consider the torques generated by T4P between pairs of cells, which, however, have been incorporated in related models of others12.

Exponential colony growth

Figure 2 shows simulation results for colony growth. As for experimental systems, colonies approximately maintain a spherical shape during growth. In the simulations, both the number of bacteria and the colony radius increase exponentially with time. Colony radii are quantified by measuring the distance between the center of mass and cells on the boundary at a fixed polar angle and azimuth. Since we have not taken into account a position-dependence of nutrient availability inside colonies, we expect to see such growth dynamics in experiments only for small cell colonies in rich media. Experimentally, an exponential increase of the radii of N. gonorrhoeae colonies has been observed for about three hours during the initial growth of young colonies38.

Fig. 2: Simulations of growing colonies.
figure 2

a Simulation snapshots showing colony formation. b Confocal section of a microcolony of fluorescently labeled N. gonorrhoeae. Scale bar: 5 μm. c The colony radii increase exponentially with time during the simulations. Growth and division are switched off before the end of the simulation. Inset: the number of cells increases exponentially with time and simulation results agree with an analytical expression.

Next, analytical formulas are derived for the simulated growth dynamics. The cell-growth simulations are based on the assumption of two growth phases—consisting of single cocci and diplococci. The advantage of this two-phase model is that it allows the introduction of a controllable randomization of division events and thus the avoidance of artificial division synchronization. A single coccus can divide to form a diplococcus, which is a random event that occurs with rate α. The resulting diplococcus cannot divide immediately but grows on average for a time tr until it separates into two single cocci that can then divide. We denote the average number of all cells forming the cocci and diplococci by N(t). The average number of cells that are single cocci is denoted by Nc(t). Since only the single cocci are assumed to divide, the overall number of bacteria is determined by

$$\frac{{{{{{{{\rm{d}}}}}}}}N(t)}{{{{{{{{\rm{d}}}}}}}}t}={N}_{{{{{{{{\rm{c}}}}}}}}}(t)\alpha .$$
(15)

We next consider the governing equation for the number of single cocci Nc(t), which increases at time t through the separation of diplococci. The separating diplococci, in turn, were formed at time t − tr through the division of single cocci. Hence, the increase of single cocci at time t is given by 2αNc(t − tr), where factor 2 results from cell doubling during division. Simultaneously, the number of single cocci is reduced through the formation of diplococci with rate αNc(t). Overall, we obtain

$$\frac{{{{{{{{\rm{d}}}}}}}}{N}_{{{{{{{{\rm{c}}}}}}}}}(t)}{{{{{{{{\rm{d}}}}}}}}t}=2\alpha {N}_{{{{{{{{\rm{c}}}}}}}}}(t-{t}_{{{{{{{{\rm{r}}}}}}}}})-\alpha {N}_{{{{{{{{\rm{c}}}}}}}}}(t).$$
(16)

Growth is assumed to obey an exponential time dependence, and the ansatz Nc(t) = Nc(0)eαpt with a constant p is inserted into Eq. (16). This yields a nonlinear equation determining p as

$$p=2{e}^{-p\alpha {t}_{{{{{{{{\rm{r}}}}}}}}}}-1.$$
(17)

Insertion of this result into Eq. (15) yields the final result for the overall cell number as

$$N(t)={N}_{{{{{{{{\rm{c}}}}}}}}}(0){e}^{\alpha pt}/p.$$
(18)

Thus, the effective growth rate of the cell number in simulations is given by αp. Formula (18) has no free parameters and fits the simulation results very well, see the inset of Fig. 2c.

Pilus-mediated interactions determine local colony order

To establish that the parameter values chosen for simulating pilus dynamics and forces correspond to measured values for N. gonorrhoeae, the distributions of rupture forces in our simulations are recorded. For adjusting the parameters governing pilus binding and rupture, simulation results are compared with measured rupture force distributions, see Fig. 3a, b. The rupture-force values used for Fig. 3a correspond to previously published data2, where the experimental procedures are explained in detail. To examine how the active force generation affects the mobility of cells in colonies, we next compare the simulated long-time diffusion coefficient of cells in colonies with stationary size with experimental data47, see Fig. 3c. Consistent with the experimental results and previous computational work19,47, diffusive motion of cells decreases at the center of the colonies. These gradients in mobility are not a result of graded mechanical activity because all cells in the simulations have the same properties. Rather, the reduced motion inside the colonies is due to a "caging” of every cell by its neighbors48. This mutual obstruction of movement is reduced at the periphery of the colony as a result of the lower cell density. Treatment of the colonies with the antibiotic azithromycin reduces the T4P–T4P binding among neighboring cells. Accordingly, cell motility in colonies treated with azithromycin is increased (Fig. 3c, inset)47. Note that the employed concentrations of azithromycin do not completely abolish T4P retraction or lead to a high cell death rate. In simulations, the reduced pilus interaction of azithromycin-treated cells are represented by variation of the binding constant for T4P, kbind (Fig. 3c).

Fig. 3: Pilus-generated forces and local colony order.
figure 3

a Experimental results for the distribution of pilus–pilus bond rupture forces measured with an optical trap17. Forces above 80 pN cannot be measured precisely, the histogram bar at 100 pN represents the contribution of all forces over 80 pN. b Distribution of pilus–pilus bond rupture forces in simulations. c Diffusion coefficient of bacteria as a function of distance from the colony edge dedge in simulations. Error bars show standard deviations in three samples. Inset: experimental data for wild-type cells and azithromycin-treated cells47. d Radial distribution function (RDF) of cells inside simulated colonies for different pilus retraction velocities. The shape of the functions, with decreasing, quasiperiodic maxima resembles the RDF of a liquid. For passive pili (\({v}_{{{{{{{{\rm{re}}}}}}}}}=0\)), kbind = 2 s−1 is used, compare Table 1. e The maxima in the RDF become more pronounced with increasing numbers of pili per cell, thus, pili promote ordering. f Experimentally determined RDF for wild-type cells and azithromycin-treated cells with fewer T4P47. The cell diameter dc is 1.02 μm for the untreated control cells and is 1.42 μm for the azithromycin-treated cells. Error bars are the standard error of the mean with a sample size of 24 colonies.

Next, the local order in simulated colonies is investigated. The degree of local ordering is characterized by the radial distribution function (RDF), which is the average local particle density at distance r from any reference particle, normalized by the average particle density of the system49,50. The RDF is defined as

$$g(r)=\frac{V}{N}\mathop{\sum }\limits_{i=1}^{N}\frac{{\phi }_{i}(r)}{N{V}_{{{{{{{{\rm{shell}}}}}}}}}(r)},$$
(19)

where ϕi(r) is the number of particles whose distance to the ith particle is between r − Δr and r + Δr with Δr = 0.05 μm, Vshell(r) is the volume of the shell between radii r − Δr and r + Δr, N is the total number of particles in the system, and V is the volume of the colony. In Fig. 3d, e, the RDFs of bacteria inside stationary, non-growing colonies are displayed. For cells carrying 2–12 pili, which corresponds to the experimentally established number for wild-type N. gonorrhoeae, the RDFs have the typical characteristics seen for liquids with multiple, maxima that are decreasing in magnitude with increasing r. Hence, pilus-based cell–cell interaction generates structures with short-range order. Since the pili also cause relative motion of the bacteria, decreasing pilus retraction speed increases the spatial ordering as can be seen in Fig. 3d. Higher numbers of pili result in more pronounced maxima and therefore to a higher degree of spatial ordering (Fig. 3e). Experimentally, a lower number of T4P can be induced by treatment of the colonies with sub-inhibitory concentrations of antibiotics47,51. Figure 3f displays experimentally measured RDFs for wild-type cells and azithromycin-treated cells. Distances in this plot are scaled by the different mean diameters of the bacteria. Lowering the number of T4P by azithromycin treatment reduces the local ordering, which is in good qualitative agreement with the simulation results. Experiments were performed as described previously47.

Active-phase segregation in mixed colonies

Experimentally, strains carrying mutations affecting the T4P machinery have been found to segregate during the formation of colonies19,32. Bacterial segregation was seen to be dependent on the number of pili per cell, on post-translational pilus modifications that modify binding properties, and on the ability of bacteria to retract their pili. The observed colony morphotypes were suggested to be in agreement with the so-called differential-strength-of-adhesion hypothesis52, which proposes that contractive activity of cells in addition to differential adhesiveness drives cell sorting. While active force generation was seen to be necessary for defined morphologies of mixed microcolonies, an experimental separation of the effect of pilus activity from differential adhesiveness is challenging due to the molecular complexity of pili. Simulations allow the systematic study of how the variation of different parameters affects segregation.

To establish that the simulations produce results that are consistent with experimental data, experimentally studied cases of colony segregation are re-investigated. We first simulate the simultaneous growth of two kinds of strains carrying different numbers of pili, which is similar to earlier experimental work32. In simulations, the growing colonies segregate, and the cells that have many pili concentrate in the center of the colony, while cells with fewer pili form a spherical shell in the periphery, see Fig. 4a. Qualitatively, this configuration can be explained by the hierarchy of interaction strengths32. The mutual attraction of a pair of cells with many pili is larger than the attraction of a cell with many pili to a cell with few pili. The weakest attraction occurs among pairs of cells with few pili. The formation a shell of weakly-binding cells in the periphery is energetically advantageous because of the reduction of surface-energy cost. For binary mixtures of bacteria with different pilus-rupture probabilities, other hierarchies of interaction strength are possible. For a mixture of two cell types that have high pilus rupture forces among each other but lower rupture forces for pairs of different cells, simulations show the formation of two segregated half-spheres during growth, see Fig. 4b. This is consistent with experimental results, where wild-type cells were mixed with mutants deficient in post-translational pilin glycosylation32.

Fig. 4: Phase segregation of mixed colonies.
figure 4

a Simulation snapshots for three time points, t1 − t3, of a growing colony consisting of cells with 14 pili (red) and cells with 7 pili (green). b Snapshots for three time points, t1 − t3, of the simulated growth of a mixture of wild-type cells (WT, green) and mutants deficient in post-translational pilin glycosylation (GD, red)32. Pilus rupture forces are as follows: \({F}_{{{{{{{{\rm{rupt}}}}}}}}}^{{{{{{{{\rm{WT-WT}}}}}}}}}=22.5\,{{{{{{{\rm{pN}}}}}}}}\), \({F}_{{{{{{{{\rm{rupt}}}}}}}}}^{{{{{{{{\rm{GD-WT}}}}}}}}}=20\,{{{{{{{\rm{pN}}}}}}}}\), \({F}_{{{{{{{{\rm{rupt}}}}}}}}}^{{{{{{{{\rm{GD-GD}}}}}}}}}=45\,{{{{{{{\rm{pN}}}}}}}}\). In (a) and (b), Voronoi tessellation is used to locate neighbors for pilus binding. c Segregation of a binary mixture of wild-type bacteria (green) and pilus-retraction-deficient cells (red). Pilus-mediated interactions are long-ranged in this example with dbind = 2.5 μm. At time t0, the colony is randomly mixed. Over time, the proportion of pilus-retraction-deficient cells increases in the colony periphery, t1, and wild-type cells then accumulate in a concentric sphere inside the colony, t2. The concentric sphere eventually disappears and wild-type cells accumulate in the colony center, t3. d Lifetime of the concentric sphere arrangement for short-ranged pilus interactions, dbind = 2.5 μm. Lifetimes are given in percent of the longest observed lifetime (3000 s). e Lifetime of the concentric sphere arrangement for long-ranged pilus interactions, dbind = 3.5 μm. Lifetimes are given in percent of 3000 s. f Diffusion coefficients of individual cells as a function of their distance from the colony center divided by the colony radius, dcm. Pure colonies consist of one type of cells, the mixed colony is the segregated system shown in (c, t3). g The mean radial number density of wild-type cells (green) for the simulation snapshots shown in (c).

Previous work on pilus-driven self-assembly of colonies has shown that binary cell mixtures consisting of cells with intact and retraction-deficient pili segregate12,19. To learn more about the segregation dynamics in this case, we start our simulations with fully grown colonies consisting of random binary cell mixtures, see Fig. 4c. Half of the cells can retract their pili and the other half are retraction-deficient. Since both cell types have the same number of pili, no differential in adhesiveness exists. Nevertheless, the initial random distribution of different cell types gradually disappears and the retraction-deficient cells accumulate at the periphery of the simulated colony, as found in earlier work12. Unexpectedly, our simulations also predict the existence of a metastable intermediate state, in which active, pilus-retracting cells form a concentric spherical shell inside the colony (see Fig. 4(c, t2)). This intermediate state has to our knowledge not yet been observed experimentally. The lifetime of the predicted intermediate state depends on the pilus-based interactions and on the strength of the cell-cell repulsion. We quantify the effect of pilus-retraction velocity and cell-cell repulsion on the appearance of the metastable concentric shell. Heatmaps of the average lifetimes of the concentric spheres as a percentage of the simulation time are shown in Fig. 4d. For short-ranged pilus interactions, the concentric shell of retracting cells inside the colony hardly appears, see Fig. 4d, (dbind = 2 μm). Likewise, this metastable state is suppressed if pilus-mediated interactions are limited to the next neighbors via Voronoi tesselation. The appearance of the metastable state requires long-ranged pilus–pilus interactions and rather stiff repulsive potentials among cells, see Fig. 4e (dbind = 3 μm). Through such long-ranged pilus–pilus interactions, cells can exert forces on other cells that are not their direct neighbors. Experimentally, it has been established that the length of T4P follows an exponential distribution with a length scale around 0.8 μm and measured maximum lengths up to 5 μm53. Thus, the average T4P length is about the diameter of a coccus. For our simulations, we, therefore, chose a default binding cutoff equal to 1.5 times the cell diameter plus two times the cell radius (dbind = 2.5 μm). Experimentally, longer-ranged interaction forces could occur for bacteria under stress conditions that affect T4P dynamics53 or in situations where extracellular matrix constituents, such as polysaccarides or DNA, transmit forces inside colonies. The simulation results suggest that an experimental observation of a metastable concentric shell during phase separation would point toward the existence of such long-ranged, pilus-based interactions among bacteria.

Figure 4f shows plots of the diffusion coefficient of cells as a function of the distance from the colony center. For cell colonies consisting of one cell type, diffusive motion of cells decreases at the center of the colonies as already shown above. In contrast, for segregated colonies consisting of cells with retracting and non-retracting pili, the diffusion constant decreases with the distance from the colony center. This position-dependence of the cell mobility is consistent with the increasing concentration of pilus-retraction-deficient cells at the periphery of the colony, see Fig. 4g.

Non-equilibrium fluctuations of colony boundaries

The position fluctuations of cells in colonies, on the one hand, provide information about the viscoelastic properties of the system and, on the other hand, carry information about the non-equilibrium forces holding the system together. While it is trivial to keep track of cell positions in simulations, high-precision measurement of cell positions inside a three-dimensional colony is challenging in experiments. However, it is possible to image whole colonies with high frame rate and subsequently extract the colony edges from the images. Thus, the non-equilibrium fluctuations of colony boundaries are observable. We mimic here such a measurement in simulations by tracking cells located in a fixed small sector at the edge of colonies in the stationary state, as shown in Fig. 5a. In this setup, a movement of bacteria at the colony edge can either result from thermal noise or the activities of pili. Colonies are grown in simulations using wild-type cells. After switching off colony growth, the role of pilus activity for the stationary state is studied. The decay time of the velocity autocorrelation function (VACF) in the stationary state without active pilus-mediated forces, \({v}_{{{{{{{{\rm{re}}}}}}}}}=0\), corresponds to the inertial time scale in simulations. Thus, we roughly have an inertial decay time \({t}_{{{{{{{{\rm{inert}}}}}}}}}\simeq 0.1\,{k}_{{{{{{{{\rm{rupt}}}}}}}}}^{-1}\) (simulation units), see Fig. 5b. The cell motion resulting from pilus retraction strongly increases the VACF below the time scale of pilus-bond rupture \({k}_{{{{{{{{\rm{rupt}}}}}}}}}^{-1}=1\,{{{{{{{\rm{s}}}}}}}}\).

Fig. 5: Active fluctuations at the periphery of colonies.
figure 5

a Simulated setup for quantifying boundary fluctuations by measuring the radial distance rCMS between a fixed angular position on the surface and the colony center. b Active pilus retraction results in a slower decay of the velocity autocorrelation function (VACF) of the surface point. Main plot: colonies are first grown from cells with retracting pili and the role of pili is studied after growth is switched off. Inset: colonies are grown with retraction-deficient cells. c Active pilus retraction produces a power spectral density of fluctuations characteristic for a visco-elastic material with an elastic behavior at low frequencies. For passive colonies, \({v}_{{{{{{{{\rm{re}}}}}}}}}=0\), bond rupture results in a viscous material behavior. Colony size is 4000 cells. For comparison with experimental data, a small colony with 600 mutant cells is simulated having a higher binding rate \({k}_{{{{{{{{\rm{bind}}}}}}}}}^{{{{{{{{\rm{mutant}}}}}}}}}=50\,{{{{{{{{\rm{s}}}}}}}}}^{-1}\), lower rupture rate \({k}_{{{{{{{{\rm{rupt}}}}}}}}}^{{{{{{{{\rm{mutant}}}}}}}}}=1\,{{{{{{{{\rm{s}}}}}}}}}^{-1}\) and lower retraction velocity \({v}_{{{{{{{{\rm{re}}}}}}}}}=0.5\,\upmu {{{{{{{\rm{m}}}}}}}}/{{{{{{{\rm{s}}}}}}}}\). Inset: experimental data for wild-type cells and a ΔpptA strain, error bars show standard deviations with three samples. d Simulated setup for colony-shape perturbation. e Simulated mutant colonies with retraction-deficient pili that form permanent bonds. The equilibrium fluctuation-response relationship holds. f For simulated wild-type cells, the equilibrium fluctuation-response relationship is strongly violated (\({v}_{{{{{{{{\rm{re}}}}}}}}}=1.0\,\upmu {{{{{{{\rm{m}}}}}}}}/{{{{{{{\rm{s}}}}}}}}\), dbind = 3.0 μm).

With the radial distance rCMS(t) between the center of mass and the edge of the colony, the deviations from the time average are given by X(t) = (rCMS(t) − 〈rCMS〉). The power spectral density (PSD) of the displacement is given by

$$P(\omega )=\frac{| \widetilde{X}(\omega ){| }^{2}}{s\,n},$$
(20)

where \(\widetilde{X}(\omega )\) is the discrete Fourier transform of X(t), s is the sampling rate, and n is the number of data points. The PSDs of the radial motion of bacteria at the boundary in our simulated colonies are shown in Fig. 5c. Fluctuations with frequencies ω 10 Hz are expected to be experimentally accessible. For ω > 2π/tinert 50 Hz, the results are not expected to match with experiments since here inertial effects start to play a role in the simulations.

First, retraction-deficient, passive pili with \({v}_{{{{{{{{\rm{re}}}}}}}}}=0\) are considered. Since these pili only form temporary, rupturing bonds between the cells, they produce an effective friction among cells. The boundary fluctuation is similar to the motion of an overdamped particle in a purely viscous environment P(ω) ω−2. Second, for retraction-deficient, passive pili that form permanent bonds (\({v}_{{{{{{{{\rm{re}}}}}}}}}=0\), no rupture), we find boundary fluctuations that are similar to the motion of an overdamped particle in an harmonic potential with \(P(\omega )\propto {{{{{{{\rm{const.}}}}}}}}\) at low frequencies and P(ω) ω−2 for high frequency (not shown). Third, wild-type cells with retracting T4P are considered (\({v}_{{{{{{{{\rm{re}}}}}}}}}=[0.5,2]\,\upmu {{{{{{{\rm{m}}}}}}}}\)/s). In this case, pilus retraction, on the one hand, enhances the elastic forces among cells, on the other hand, increases the rupture rate of bonds formed by T4P. Overall, the activity of T4P results in viscoelastic material properties with a pronounced elastic response at low frequencies. Simulations show that this elastic response does not occur if temporary cell–cell connections are formed by passive links.

The inset of Fig. 5c shows experimental results for the PSDs of wild-type cells and a strain carrying inactivating deletions in genes that encode the phosphotransferase PptA, which is required for the post-translational modification of T4P (ΔpptA). For wild-type cells, where the colony contains around 4000 cells, the experimentally measured colony boundary fluctuations up to 10 Hz are in good qualitative agreement with our simulation results. For a qualitative assessment of the experimental data for the ΔpptA strain, a smaller colony with about 600 mutants is simulated. Here, the parameters governing T4P dynamics are adjusted to mimic the higher binding probability and lower rupture frequency measured for the ΔpptA strain in comparison to the wild-type17. A binding rate of \({k}_{{{{{{{{\rm{bind}}}}}}}}}^{{{{{{{{\rm{mutant}}}}}}}}}=50\,{{{{{{{{\rm{s}}}}}}}}}^{-1}\) and lower rupture rate \({k}_{{{{{{{{\rm{rupt}}}}}}}}}^{{{{{{{{\rm{mutant}}}}}}}}}=1\,{{{{{{{{\rm{s}}}}}}}}}^{-1}\) were chosen, compare to Table 1. We also find that a lower retraction velocity needs to be chosen for the simulated mutant strain, compared to the wild-type strain (\({v}_{{{{{{{{\rm{re}}}}}}}}}=0.5\,\upmu {{{{{{{\rm{m}}}}}}}}/{{{{{{{\rm{s}}}}}}}}\)). This lower retraction velocity is necessary in simulations to mimic the lower retraction frequency of the mutant17 and reduces the apparent elastic modulus at low frequencies. Overall, the higher plateau value of the PSD at low frequencies suggests that post-translational modification of T4Ps in wild-type cells leads to “stiffer” N. gonorrhoeae colonies.

Since shape fluctuations of a wild-type cell colony mainly result from active forces, a violation of the equilibrium fluctuation-response relation is expected. To find out how a fluctuation-response relation can be measured experimentally, we simulate a setup for controlled mechanical perturbation of the colony boundary. This setup is inspired by techniques for measuring active fluctuations in cell membranes54. We fix a simulated colony between walls and stick a bead with radius RB = 1.5 μm onto one side of the colony, see Fig. 5d. The same parameter values are used to describe pilus interaction with walls and pilus–pilus interaction. The pairwise interactions between the bead and the cells is modeled with a Morse potential. Denoting the distance between the bead and any neighboring cell i by ri,B, the potential is given by

$${{{\Psi }}}_{i}^{B}({r}_{i,{{{{{{{\rm{B}}}}}}}}})={c}_{{{{{{{{\rm{mors}}}}}}}}}\,[{e}^{-2\beta ({r}_{i,{{{{{{{\rm{B}}}}}}}}}-{R}_{i,{{{{{{{\rm{B}}}}}}}}})}-2{e}^{-\beta ({r}_{i,{{{{{{{\rm{B}}}}}}}}}-{R}_{i,{{{{{{{\rm{B}}}}}}}}})}],\,\,\,\,{{{{{{{\rm{for}}}}}}}}\,\,{r}_{i,{{{{{{{\rm{B}}}}}}}}}\le {d}_{{{{{{{{\rm{mors}}}}}}}}},$$
(21)
$${{{\Psi }}}_{i}^{B}({r}_{i,{{{{{{{\rm{B}}}}}}}}})={{{\Psi }}}_{i}^{B}({d}_{{{{{{{{\rm{mors}}}}}}}}}),\,\,\,\,{{{{{{{\rm{for}}}}}}}}\,\,{r}_{i,{{{{{{{\rm{B}}}}}}}}} \; > \;{d}_{{{{{{{{\rm{mors}}}}}}}}},$$
(22)

where sum of the radii of cell and beads is given by Ri,B = R + RB. The cutoff for the interaction potential is set at dmors = 3.1 μm. Other parameter values of the potential are fixed as cmors = 10 pNμm (energy unit: fcdc) and β = 1 μm−1. The radial displacement of the bead relative to the center of the colony, x(t), is employed to quantify the fluctuations of the colony boundary through a PSD P(ω) given by Eq. (20). Alternatively, a sinusoidally varying force Fext(t) is applied to the beads’ center, pointing towards the colony center. The Fourier transform of the force is given by \({\hat{F}}_{{{{{{{{\rm{ext}}}}}}}}}(\omega )\) with angular frequency ω. The response function is given by

$$\hat{\chi }(\omega )\equiv \frac{\hat{x}(\omega )}{{\hat{F}}_{{{{{{{{\rm{ext}}}}}}}}}(\omega )}.$$
(23)

The imaginary part of the response function \(\hat{\chi }(\omega )\) is denoted by \(\hat{\chi }^{\prime} (\omega )\) and we define the quantity \(H(\omega )\equiv -\hat{\chi }^{\prime} (\omega )2{k}_{B}T/\omega\). For systems in thermal equilibrium, the fluctuation-response theorem states that

$$P(\omega )=H(\omega ).$$
(24)

For colonies consisting of bacteria with retraction-deficient, passive pili and permanent bounds (\({v}_{{{{{{{{\rm{re}}}}}}}}}=0\)), Eq. (24) is satisfied and the fluctuation-response theorem holds as expected, see Fig. 5e. In simulations of colonies consisting of wild-type bacteria that can retract their pili (\({v}_{{{{{{{{\rm{re}}}}}}}}}=1.0\,\upmu {{{{{{{\rm{m}}}}}}}}/{{{{{{{\rm{s}}}}}}}}\)) and form dynamic bonds with other cells, the equilibrium fluctuation response relationship is violated across the whole experimentally relevant frequency range of [0−10] Hz. Note that constraining the colony in between walls and then tracking the motion of a bead is not equivalent to tracking the distance of the colony boundary from its center. Hence the spectral densities in Fig. 5c, f are different. For wild-type bacteria, the simulations predict a very strong deviation from Eq. (24), where P(ω) is several orders of magnitude larger than H(ω). Such deviations are likely measurable in experiments.

Active colony spreading on a surface

An important aspect of growing bacterial colonies is the colonization of surfaces and the invasion of tubes and channels. To investigate the role of active adhesion forces for the colony behavior in such situations, we consider the interaction of cells with walls that provide attachment sites for pili. Walls are represented by a layer of immobile, soft spheres. Cell-wall interactions are represented by the same conservative potential employed for cell–cell repulsion. Since biomolecular binding affinities are typically determined by the unbinding rate, the pilus unbinding rate kplane, corresponding to krupt for pilus–pilus unbinding, is varied. The other parameters governing pilus–wall binding are assumed to be the same as for pilus–pilus interactions, see Table 1. Experimentally, such wall properties can be realized, e.g., by coating hydrogel surfaces with pilin.

For colonies spreading on a planar wall, the shape results from a competition between the cell-cell interactions within the colony and the interactions of the cells with the substrate. Previous simulation studies showed that the radius of the contact zone between the colony and the wall increases with the rupture force scale12, which can be called “partial wetting”. Here, we vary the dissociation-rate constant of the pilus–wall bonds to assess the wetting transition. Simulation snapshots of colonies growing on a planar surface are shown in Fig. 6a–c. If the dissociation-rate constant of the pilus–wall bonds is smaller than the dissociation rate constant for pilus–pilus bonds, kplane 2 s−1 < krupt = 3 s−1, we find that the colonies dissolve and the bacteria are evenly dispersed along the surface, see Fig. 6a, d, which corresponds to complete wetting. For kplane ≥ krupt, the colonies assume rounded shapes that can still remain in loose contact with the surface, see Fig. 6b, c.

Fig. 6: Colony spreading on planar surfaces.
figure 6

ac Simulation snapshots of spreading colonies. Depending on the dissociation rate constant of pilus-surface bonds, kplane, colonies undergo a partial or complete wetting transition. d A complete wetting occurs when kplanekrupt = 2 s−1. e The time dependence of the diameter of the spreading colony, dsurface, obeys approximately a power law. If not given otherwise, pilus-substrate-binding rates and rupture forces are assumed to be the same as for pilus–pilus bonds, see Table 1. Error bars represent standard deviations from samples of three simulations.

To assess the dynamics of the wetting process, we next record the diameter dsurface of the contact zone of a spreading colony on the surface. For a passive, Newtonian fluid on a planar surface, the diameter of a spreading droplet asymptotically obeys a power-law dependence on time t as dsurface ~ tϑ, known as Tanner’s law55,56,57. The exponent ϑ depends on droplet size and on dimension. Droplets that are much smaller than the capillary length obey in three dimensions for long times the scaling ~t1/1057, which results from a leading-order balance of capillary forces with dissipation close to the wetting line. It has also been theoretically predicted that thermal fluctuations promote spreading of nanodroplets and lead to a scaling of ~t1/658. In our simulations of active bacterial colonies, a regime with the classical passive-liquid scaling ~t1/10 is not observed. Rather, we find that the diameter dsurface obeys a power law with an exponent close to 1/4, which is very similar for different parameter choices, see Fig. 6e. Such a scaling indicates that the dynamics is dominated by a balance of surface-attraction and dissipation in the bulk of the colony. The scaling breaks down at long times when the colony reaches a stationary, rounded shape on the surface.

Active colony invasion of narrow channels

We next simulate the invasion of small channels by colonies. The colonization of protective niches can present a selective advantage in abiotic environments and can also be an important aspect of host–pathogen interaction. Previous work on Neisseria meningitidis, the causative agent of meningitis, showed that attractive forces generated by T4P fluidize the bacterial colonies, which is required for efficient colonization of the blood capillary network during infection. Furthermore, simulations of N. gonorrhoeae migration through asymmetric corrugated channels show a rectification of motion for active bacteria59. However, a systematic assessment of the conditions necessary for the active invasion of constrictions is missing. To focus on the role of pilus activity, we only consider colonies that are not growing or dividing, and channels are represented with the same methods as walls in the previous section, “Active colony spreading on a surface”.

Like for cell-surface interaction, the behavior of active colonies is seen to be qualitatively similar to a liquid minimizing surface energy. Active pilus retraction can cause a rapid and complete invasion of the channel, see Fig. 7a–e. For passive cells (\({v}_{{{{{{{{\rm{re}}}}}}}}}=0\)), colonies can attach to the walls, but the proper invasion of the whole channel is not observed, see Fig. 7f. A complete entrance of passive colonies into the channels never occurs in our simulations, even for large surface affinity, kplane 0.01 s−1, and very long simulation times. For active colonies, the onset of channel invasion occurs rather suddenly when increasing the affinity for the substrate (~1/kplane), see Fig. 7d. However, the threshold value of kplane below which channel invasion occurs is not the same as the threshold required for complete wetting of a planar substrate shown in Fig. 6. The reason for different threshold affinities is presumably that the formation of a monolayer of cells on a planar surface is energetically more costly than the formation of a cylindrical colony with finite internal volume. Consistent with this interpretation, we find that the narrower the channel is, the higher the surface-binding affinity has to be to achieve channel invasion, see Fig. 7g. For very narrow channels, w 2.5 μm, we find that the invasion does not occur through collective motion of an intact colony but that individual cells and small collections of cells break off from the colony and individually explore the channel, see Fig. 7e. A possible cause for this break-up is that the high curvature of very narrow channels results in a surface area per cell that is larger than the surface area per cell on a plane. Since the number of T4P is limited, the geometry of narrow channels increases the effective binding affinity between cells and walls and decreases the effective binding affinity among cells is reduced. The break-up of colonies during the invasion of these channels is therefore due to the finite inherent length scale of the “bacterial active fluid”.

Fig. 7: Colonies atop surfaces containing channels.
figure 7

ac Simulated wild-type colonies that are initially positioned on top of a narrow channel can invade the channel by making use of pilus activity if the pilus–substrate bonds are strong. The length that a colony enters a channel is denoted by L. d Colonies more easily invade a wider channel. e Invasion of very narrow channels is possible, but colonies break up in this geometry f Passive colonies are not seen to invade channels fully in simulations. g Stationary lengths of colonies after entering channels of different widths. Depending on the channel width, full entrance of the colony occurs below a critical value of kplane. h The time evolution of the enter length is described approximately by a power law. Error bars represent standard deviations from three simulation samples.

To quantify the dynamics of colony invasion, we next record the speed of the front of the colony moving down the channel and plot it as a function of the enter length L(t), see Fig. 7h. For passive liquids, the penetration dynamics into horizontal capillary tubes under the assumption of negligible gravity and inertia obeys an approximate scaling of \(L(t) \sim \sqrt{t}\), which is derived as follows60. The liquid viscosity is denoted by ηp, the presumably constant surface-contact angle is θp, the surface tension is σp and the channel diameter w. Then, the balance of capillary driving force with viscous friction can be written as \(8{\eta }_{{{{{{{{\rm{p}}}}}}}}}L(t)\dot{L}(t)/{w}^{2}={\sigma }_{{{{{{{{\rm{p}}}}}}}}}\cos {\theta }_{{{{{{{{\rm{p}}}}}}}}}/w\). Solution of this differential equation for L(t) yields the Lucas–Washburn equation61,62

$$L(t)=\sqrt{\frac{w\,{\sigma }_{{{{{{{{\rm{p}}}}}}}}}\cos {\theta }_{{{{{{{{\rm{p}}}}}}}}}}{8\,{\eta }_{{{{{{{{\rm{p}}}}}}}}}}}\sqrt{t}.$$
(25)

For our active colonies, we find that the invasion dynamics for thin channels of width w = 3.3 μm obey the \(L(t) \sim \sqrt{t}\) scaling of passive liquids. These channels are wide enough to prevent colony break-up. For thicker channels, the Lucas–Washburn-like scaling no longer holds in our simulations, as is the case for passive liquids, where the deviations are attributed to inertial effects and to a dependence of the contact angle on the wetting dynamics.

Overall, channel invasion by active bacterial colonies displays a striking qualitative similarity to capillary wetting by passive liquids. However, for passive colonies, having a mesoscopic internal length scale, we do not observe channel invasion in simulations. The main role of pilus-mediated random activity is to increase the fluidity and to thereby change the dynamics of colony-surface interactions. Thus, T4P activity allows the occurrence of channel invasion and surface spreading on biologically relevant time scales.

Conclusions

We have introduced a simulation model to study the non-equilibrium structure and dynamics of colonies of active, growing bacteria on different time and length scales. Bacterial cells are modeled with an algorithm akin to dissipative particle dynamics. Parameter values are carefully chosen to allow comparison of the simulation results with experimental measurements. We investigate different physical aspects of N. gonorrhoeae colonies, including growth dynamics, local ordering, and the self-sorting of bacteria in colonies. Simulation results are in good qualitative agreement with experimental data. We also propose a setup for measuring fluctuations in the colony shape and its response to the external force. The simulations predict a strong, measurable violation of the equilibrium fluctuation-response relationship. Furthermore, the model shows that actively fluctuating adhesion forces can allow the bacterial invasion of narrow channels. Thus, active force generation is not only required for bacterial migration, but can determine the rheology of cell colonies and drive the colonization of constricted environments, which represent central aspects for host infection and bacterial contamination of abiotic environments. At present, basic physical mechanisms underlying the collective interaction of active particles with complex surfaces are hardly understood. We expect that future experimental and theoretical work on the non-equilibrium properties of bacterial colonies will generate insights that deepen our understanding of the emergent properties of such active matter systems.

Methods

Simulation details and parameter values

The simulation code is integrated into the molecular dynamics simulator LAMMPS37, which allows an efficient parallelization while providing great flexibility regarding the model choice. To model the cellular dynamics described above, we wrote a C++ code. The velocity-Verlet algorithm is used to advance the set of positions, velocities, and forces. The code is parallelized for execution on CPUs and large colonies consisting of ten thousands of bacteria can be simulated efficiently. The colonies are visualized with OVITO63.

The characteristic scales that are used as simulation units are the cell diameter dc = 2R = 1 μm, a time scale given by the inverse of the default value of the pilus-unbinding rate constant tc = 1/krupt = 1s, and a force scale of fc = 1 pN. Parameter values that are used for the simulations are listed in Table 1. Whenever alternative parameter values are used, they are provided with the results.

Separation of time scales

In the simulations, the time scale of viscous relaxation is smaller than the time scale of pilus-based interaction. Thus, inertial effects are negligible. Moreover, the time scale of the pilus-based interaction is much smaller than the time scale of cell division tc 1/α. Simulations typically start with one bacterium, and colonies are formed by letting the cells grow and divide. The colony structures emerge during growth due to the repulsive interactions, thermal noise, and pilus-based interactions, as shown in Fig. 2a. In some simulations, it is desirable to completely remove the effect of cell growth on the bacterial dynamics. For this purpose, cell growth and division are switched off after a sufficient colony size is reached.

Experiments

The presented data, with the exception of the data for Fig. 5c, was originally generated for earlier experimental work17,47,48. Bacterial colonies were grown as described previously17,51. Briefly, for assessing colony structure and dynamics, bacteria were incubated within a flow chamber under continuous nutrient supply for one hour to several hours. A constant supply of nutrients and, if used, antibiotics were ensured by applying continuous flow. For calculation of the RDF, bacteria were stained with Syto 9 to enable detection of the position of individual cells and to determine the cell volume. Colony dynamics were assessed with gfp and mcherry expressing cells17. The displayed experimental data relates in detail to previous work as follows. The confocal section of a microcolony of fluorescently labeled bacteria in Fig. 2b was produced as described in an experimental study on the effect of caging cellular motion in colonies48. The rupture forces of T4P bonds shown in Fig. 3a were measured with an optical trap17. The diffusion coefficients and RDFs shown in Fig. 3c, f were measured as described for an experimental study of the effect of antibiotics on colony morphology47. The PSDs of the colony boundary fluctuations shown in Fig. 5c were calculated from time-lapse images of colonies recorded at 10 Hz for one minute. The experimental methods for recording the time-lapse images are detailed in earlier reports of experimental work2,17.

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.