Skip to main content
PNAS Nexus logoLink to PNAS Nexus
. 2026 Sep 17;5(9):pgag319. doi: 10.1093/pnasnexus/pgag319

High-resolution measurement of near-surface bacterial swimming reveals bimodal cell–surface separations

Hongbo Yu 1,#, Chi Zhang 2,✉,#, Rongjing Zhang 3,✉, Junhua Yuan 4,5,✉
Editor: Dennis Discher
PMCID: PMC13623003  PMID: 42812848

Abstract

Bacterial interactions with solid boundaries initiate surface sensing, adhesion, and biofilm formation, yet the dynamics of near-wall swimming remain difficult to quantify because the cell–surface gap is challenging to measure with high precision in real time. Here, we introduce a calibrated, exclusion-based fluorescence microscopy method that converts fluorescence intensity into absolute height using in situ microsphere calibration, enabling reconstruction of three-dimensional trajectories of swimming Escherichia coli with tens-of-nanometer axial precision over an ∼400-nm range. We observe that steady-state gap heights are bimodal: cells occupy two preferred separation regimes, a short-range state at ∼67 nm and a long-range hovering state at ∼240 nm. Increasing ionic strength enriches the short-range population and shifts it toward the surface, consistent with electrostatic screening predicted by Derjaguin–Landau–Verwey–Overbeek theory, whereas the hovering state remains essentially unchanged, indicating a predominantly hydrodynamic origin. We further quantify how gap height covaries with swimming speed and trajectory curvature. This approach reconciles disparate estimates of cell–surface distances reported previously and offers a robust, noninvasive tool for investigating the mechanisms of bacteria–surface interactions.


Significance statement.

Bacteria initiate surface sensing and biofilm formation while swimming within nanometers of interfaces, but this critical cell–surface gap has been difficult to measure directly for moving cells. We present a calibrated, exclusion-based fluorescence microscopy method that provides absolute, real-time gap measurements with tens-of-nanometer axial precision. Our data reveal that swimming Escherichia coli do not maintain a single equilibrium height but instead occupy two distinct, stable separation regimes. We demonstrate that these regimes are governed by different physical forces: short-range electrostatic interactions and long-range hydrodynamic forces. Resolving these coexisting states reconciles conflicting prior estimates, provides quantitative constraints for near-wall motility models, and offers a robust tool for probing early steps in surface colonization.

Introduction

Bacterial interactions with solid boundaries are fundamental to microbial life in both natural and engineered environments. The transition from a planktonic, swimming state to a sessile, surface-attached state is the critical first step in biofilm formation (1). This process often involves surface sensing via flagella or type IV pili, mechanisms that depend critically on the precise separation distance between the cell body and the substrate (2, 3). Consequently, understanding the physical dynamics of bacteria swimming within the near-surface layer is essential for elucidating the mechanisms of bacterial adhesion and for developing strategies to control biofilm formation on medical implants and industrial surfaces (4, 5).

When bacteria swim within a few micrometers of a solid surface, they can become hydrodynamically trapped, often exhibiting circular trajectories and surface accumulation (6–8). These behaviors emerge from the interplay of long-range hydrodynamic interactions (6, 7), short-range electrostatic and van der Waals forces described by Derjaguin–Landau–Verwey–Overbeek (DLVO) theory (9, 10), and Brownian motion (11). While hydrodynamic interactions can extend over micrometers, DLVO forces are typically confined to distances of less than ∼50 nm (12). Theoretical models suggest that the balance of these interactions dictates the cell's orientation and separation distance near solid surfaces (13, 14). Although these interactions are not uniformly sensitive to the cell–surface gap, near-wall swimming is governed by qualitatively different physics across this length scale—from far-field rotlet-dipole hydrodynamics, in which the circular-swimming radius scales as the fourth power of the gap (13), to a near-field regime dominated by higher-order hydrodynamic singularities and quasi-exponentially decaying surface forces (van der Waals, electrostatic) (14). Resolving the crossover between these regimes and quantitatively testing near-wall swimming models therefore requires measurements of the absolute gap height with nanometric precision.

Achieving such resolution for moving bacteria remains technically challenging. Early three-dimensional (3D) tracking resolved wall-associated swimming but lacked sufficient axial precision to determine the gaps directly (9). Holographic microscopy provides full 3D tracking, but limited axial resolution and the difficulty of locating the surface precisely can hinder accurate quantification of the cell–surface gap (15, 16). Total internal reflection fluorescence (TIRF) microscopy offers higher axial sensitivity but typically has a limited quantitative range (≲100 nm) and often relies on evanescent field calculations that can introduce substantial uncertainty (11, 12, 17–20). Consequently, many TIRF-based studies have relied on theoretical assumptions—such as a fixed minimum separation distance of 10 nm during individual bacterial trajectories—rather than absolute measurement of the distance (11, 19, 20). While recent numerical simulations and theoretical models predict a “hovering” state where bacteria maintain a stable distance from the wall (21), published estimates of this distance vary widely, ranging from a few nanometers to several hundred nanometers (8, 22–25). Resolving this discrepancy requires a method capable of measuring absolute separation distances without imposing assumed minimum gaps.

Recently, an in situ calibration approach based on exclusion-fluorescence imaging was used to measure the gap height of static, adhered cells (26). Here, we extend this strategy to develop a real-time, calibrated fluorescence microscopy method capable of tracking swimming Escherichia coli with ∼40 nm vertical uncertainty over an axial range of ∼400 nm. By calibrating fluorescence intensity against silica microspheres of known geometry, we reconstructed the 3D trajectories of individual cells. Our measurements reveal that bacterial height is not uniform but follows a bimodal distribution, with two distinct preferred separation distances at ∼67 and 240 nm. By modulating the ionic strength of the medium, we demonstrate that the short-range state is governed by electrostatic screening consistent with DLVO theory, while the long-range “hovering” state is hydrodynamically dominated. Furthermore, we quantify the correlations among separation distance, swimming speed, and trajectory curvature. This approach provides a robust, noninvasive tool for probing cell–surface interactions and offers quantitative insight into the biophysical processes that govern the earliest stages of bacterial colonization.

Results

Experimental setup and measurement procedure

To measure the separation distance between swimming bacteria and a solid surface with high axial sensitivity, we employed an optical approach that combines fluorescence imaging with in situ calibration using silica microspheres, enabling absolute axial position measurements of moving bacteria. As illustrated in Fig. 1A, the setup utilized a continuous-wave 488 nm laser, which was expanded, collimated, and directed obliquely into the sample chamber via a high-numerical-aperture oil-immersion objective (100×, NA = 1.49). The flow chamber consisted of a cleaned glass slide and a coverslip separated by 60-μm-thick double-sided tape. Prior to assembly, the coverslip was treated with poly-L-lysine (0.01% w/v, Sangon) to immobilize 2-μm-diameter silica microspheres. Bacteria were suspended in motility buffer containing fluorescein isothiocyanate–dextran (FITC–dextran) and introduced into the chamber, where they can swim freely near the coverslip surface (Fig. 1B). The laser excited the fluorescent solution in the chamber, and time-series fluorescence images were acquired at 25 frames per second (fps) using a highly sensitive electron-multiplying charge-coupled device (EMCCD) camera.

Figure 1.

For image description, please refer to the figure legend and surrounding text.

Objective-based oblique-illumination fluorescence microscopy and in situ height calibration. A) Schematic of the objective-based oblique-illumination fluorescence microscopy system. B) Illustration of immobilized silica microspheres and motile bacteria in the sample chamber. For a microsphere of radius R, the local gap height h at radial distance r from the sphere center is h(r)=R−R2−r2. The blue region schematically indicates the axial imaging depth. C) Representative fluorescence image of silica microspheres. Markers indicate the positions identified using a scale-normalized LoG algorithm. D) Azimuthally averaged radial fluorescence intensity profile of a single microsphere. Error bars denote the SD over eight radial directions (inset). E) Fluorescence intensity–height calibration curve averaged over four microspheres. The solid line shows a pow-law fit.

Figure 1C shows a representative fluorescence image of the silica microspheres. We obtained the radial fluorescence intensity profile of an individual microsphere (Fig. 1D) by azimuthally averaging the intensity (inset). Error bars represent the SD. Using the geometric relationship between gap height (h) and radial distance (r) for a sphere, we derived the fluorescence–height calibration curve. Figure 1E presents the average calibration curve obtained from four independent beads.

To determine bacterial separation distances, we developed a custom MATLAB algorithm that extracts bacterial trajectories in the x–y plane and converts local fluorescence intensity into axial position values using the calibration curve derived from silica microspheres within the same sample. By combining lateral and vertical positions, we reconstructed full 3D trajectories, enabling the tracking of bacterial movement relative to the surface with nanometric axial sensitivity under our experimental conditions (quantified below).

Validation of fluorescence–height calibration reliability

To evaluate the reliability and accuracy of the fluorescence–height calibration method, we conducted a series of quantitative validation experiments. First, we measured the diameters of 200 silica microspheres using a Nikon Ti-E phase-contrast microscope equipped with the same objective and camera used for fluorescence imaging. The diameter distribution (Fig. 2A) yielded a mean diameter of 1,981.54 ± 61.54 nm (mean ± SD), representing a relative deviation of ∼3% from the nominal size.

Figure 2.

For image description, please refer to the figure legend and surrounding text.

Validation of fluorescence–height calibration. A) Diameter distribution of 200 silica microspheres, yielding an average diameter of 1981.54 ± 61.54 nm (mean ± SD). B) Geometric uncertainty in the gap-height determination obtained from error propagation analysis. Circled points correspond to r = 500 and 800 nm (equivalently h = 134 and 400 nm, respectively). C) Reconstructed microsphere surface (point cloud) compared with the ideal spherical surface. D) Fluorescence intensity–height relationships obtained using 2-µm- and 5-µm-diameter microspheres, demonstrating consistency across bead sizes. The errors are SDs.

Uncertainty in the bead radius and lateral localization propagates into the inferred gap height. Using a lateral spatial resolution of σr ≈ 10 nm, the geometric uncertainty in estimating the gap height h is given by

σh(r)=(1−RR2−r2)2σR2+(rR2−r2)2σr2,

where R is the sphere radius, r is the radial distance from the sphere–surface contact point, and σR denotes the SD of the sphere radius. The resulting relationship between σh and r is shown in Fig. 2B. The error remains below 25 nm for r < 800 nm, which corresponds to a gap height of h < 400 nm.

To assess the influence of fluorescence imaging noise on height estimation, we used a subset of the microspheres to generate a fluorescence–height calibration curve and then reconstructed the 3D surface profile of an independent microsphere from its fluorescence intensity. Over the range h = 0 − 400 nm, the reconstructed profile agrees with the ideal spherical geometry, with deviations in h remaining within 15% (Fig. 2C). This confirms that the fluorescence-based reconstruction is quantitatively reliable in the near-surface region.

Furthermore, independent calibrations performed using 2- and 5-µm-diameter silica beads produced consistent fluorescence intensity values at the same gap heights, within experimental uncertainty (Fig. 2D). This demonstrates that the calibration is not sensitive to bead size and is robust across different microsphere diameters.

The calibration relies on the principle that the fluorescence–distance relationship is governed by the geometric exclusion of fluorophores and by the axial profile of the excitation field and is therefore largely independent of the material properties of the imaged object. As a validation, we reconstructed the 3D shape of bacteria immobilized on the coverslip and compared it with the expected rod-shaped geometry with hemispherical ends. The reconstruction yielded a mean absolute error of 78.6 nm at the level of individual surface points (Fig. S1), demonstrating that the method reliably recovers bacterial geometry under our experimental conditions. Importantly, because each bacterium provides ∼100–200 surface points per frame—with points in the apical region dominating the determination of the minimum gap—averaging substantially suppresses point-level noise, reducing the uncertainty in the fitted gap height to ∼10 nm.

Taking these factors into account, we estimate the effective axial uncertainty by combining contributions from calibration (∼20 nm), geometric fitting (∼10 nm), and motion-induced averaging during finite exposure. The axial component of bacterial motion during steady-state near-surface swimming is relatively small (|Vz| = 0.8 ± 0.6 µm/s, determined from our trajectory analysis below), corresponding to an axial displacement of ∼30 nm over a single 40 ms exposure. Combining contributions from calibration and geometric fitting in quadrature yields a static measurement uncertainty of ∼22 nm. Incorporating the motion-induced displacement (∼30 nm) as a conservative upper bound raises the overall effective axial uncertainty to ∼40 nm.

3D trajectories and height distribution of near-wall swimming E. coli

Using the fluorescence–height calibration curve obtained from immobilized silica microspheres, we reconstructed the axial positions along the body axis of individual smooth-swimming E. coli. Figure 3A displays four representative frames extracted from a video. For each frame, the z-positions of points on the cell surface were derived from their corresponding fluorescence intensities (Fig. 3B).

Figure 3.

For image description, please refer to the figure legend and surrounding text.

Reconstruction of bacterial surface height and cell–surface separation. A) Representative frames showing the instantaneous height map of a swimming bacterium relative to the substrate; cooler (warmer) colors indicate lower (higher) positions. B) 3D point cloud representing the reconstructed lower surface of the bacterium. C) Spherocylindrical model fitted to the reconstructed points to determine the cell–surface gap height, defined as the vertical distance from the substrate to the lowest point of the fitted cell body.

We determined cell position and orientation by fitting these data points to a rod-shaped model with hemispherical ends (Fig. 3C). For each bacterium, ∼100–200 surface points were extracted per frame, with points in the apical region dominating the determination of the minimum cell–surface separation. The use of a large number of points mitigates the impact of noise in individual measurements, such that the uncertainty in the fitted parameters decreases approximately as (σ/N).

The gap height between the bacterium and the surface was defined as the distance from the substrate to the lowest point of the fitted cell body. Consistent with previous studies (16), we observed that swimming cells were slightly tilted relative to the substrate.

A typical circular trajectory of the point on the cell body closest to the surface is shown in Fig. 4A. Analysis of 129 trajectories revealed that the cell–surface separation varied over time within a range of ∼400 nm. Individual trajectories typically contain approaching or receding motion relative to the substrate; a representative height time trace is shown in Fig. 4B. To quantify steady near-surface swimming, we identified continuous segments exhibiting locally stable height (see Materials and methods). Only trajectories containing sufficiently long stable segments were retained for further analysis. For each retained trajectory, the mean separation distance was computed by averaging the frame-by-frame separation distances across all frames within its stable segment (1–3 s in duration). The resulting distribution of these mean separation distances is shown in Fig. 4C.

Figure 4.

For image description, please refer to the figure legend and surrounding text.

3D near-surface trajectories and stable separation distances. A) Representative 3D trajectory (x, y, z) of a single near-wall swimming bacterium. Arrow indicates swimming direction, and the dot marks the starting point. B) The gap-height time trace for the trajectory presented in (A). The red segment indicates the interval classified as stable near-surface swimming. C) Distribution of mean gap heights, each computed over the stable segment of an individual trajectory (1–3 s in duration), excluding approach and departure phases. For each trajectory, the mean gap height was obtained by averaging the gap height across all frames within its stable segment.

Notably, the stable separation distances exhibit a bimodal distribution, indicating two preferred height regimes. One population is located near 67 nm, while a second population is centered at ∼240 nm. Fitting the bimodal distribution with a sum of two Gaussian functions yielded peak positions of 67.3 ± 6.1 and 242.6 ± 7.2 nm, with SDs of 25.9 and 50.5 nm, respectively (Fig. 5A).

Figure 5.

For image description, please refer to the figure legend and surrounding text.

Ionic strength modulates the short-range separation state. Histograms showing distributions of cell–surface gap heights measured in motility media with A) 0 mM, B) 30 mM, and C) 50 mM added NaCl. Each data point represents the mean gap height over a stable segment for a single trajectory. Solid curves represent the corresponding fitted, normalized probability density functions. Note that the base MM (without added NaCl) has an intrinsic ionic strength of ∼30 mM. D) Relative weights of the short-range (black) and long-range (red) populations as a function of Debye length. E) Peak positions of the short-range (black) and long-range (red) separation states as a function of Debye length.

The position of the second peak aligns with a previous study using digital holographic microscopy, which reported a mean cell–surface separation of ∼200 nm (22). Despite the higher measurement noise associated with holography for near-wall axial localization, the agreement with our experimental results further confirms the reliability of our fluorescence-based approach.

Finally, we determined the minimum separation distance for each bacterial trajectory (Fig. S2). Although most trajectories reached minimum gaps below 50 nm, a substantial fraction did not. Therefore, the common assumption of a uniform minimum separation distance of 10 nm is inconsistent with our data. This finding underscores the necessity of directly measuring absolute cell–surface distances rather than imposing an arbitrary “contact” offset.

Effect of ionic strength on the separation distance of swimming E. coli

To further elucidate the physical mechanisms underlying the bimodal distribution of bacterial separation distances during near-surface motility, we increased the ionic strength of the medium by adding 30 mM NaCl and 50 mM NaCl and repeated the measurements. These salt concentrations were selected to lie within a regime where the swimming speed remains essentially unaffected, ensuring that any observed change in the height distribution can be attributed to electrostatic screening rather than to motility-dependent hydrodynamic effects (20, 27). The results show that as ionic strength increased, the short-range peak became more pronounced and shifted toward smaller separation distances (Fig. 5A–C). Specifically, the relative weight of the short-range population increased from 25% under the control condition to 39% in the presence of 50 mM NaCl (Fig. 5D), while the short-range peak position shifted from 67.3 to 60.6 nm (Fig. 5E). This trend is consistent with electrostatic screening as described by DLVO theory.

According to DLVO theory, the range of electrostatic repulsion is characterized by Debye length λD∝1/I, where I is the ionic strength of the solution. The total force acting on a bacterium near the surface can be expressed as Ftotal=Fv+Fe+Fhydro, where Fv is the van der Waals force, Fe is the electrostatic repulsion, and Fhydro represents hydrodynamic interactions. As ionic strength increases, λD decreases, which shortens the range of Fe and consequently lowers the force-balance position of the bacteria, manifesting as a shift of the short-range peak toward the surface (Fig. 5E). This trend is consistent with a recent simulation study of near-surface swimming (14).

In contrast, the position of the long-range peak (∼240 nm) remained largely unchanged across salt conditions (Fig. 5E), indicating that this separation state is predominantly governed by hydrodynamic interactions and is relatively insensitive to ionic strength. Furthermore, the reduced range of electrostatic repulsion at higher ionic strength increases the likelihood of bacterial confinement closer to the surface, resulting in the observed increase in the relative weight of the short-range peak.

To assess the distribution of cell–surface separation distances, we analyzed the full set of instantaneous height measurements across all trajectories (Fig. S5), rather than relying solely on trajectory-averaged values, thereby increasing statistical power and avoiding potential bias. We then fitted the data using Gaussian mixture models with one and two components to determine whether the distribution is unimodal or bimodal. Model comparison based on the Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC) reveals that the two-component model is strongly favored (ΔAIC = 417, ΔBIC = 401), providing decisive statistical evidence for the existence of two distinct populations.

To quantitatively assess differences in cell–surface separation distances under different ionic strengths, we performed statistical comparisons between datasets using the nonparametric Wilcoxon rank-sum test (also known as the Mann–Whitney U test), applied to the full set of instantaneous height measurements extracted from all stable trajectory segments (Fig. S6). For the short-range population, the Mann–Whitney U test reveals significant differences between conditions (P < 0.001), with the peak position decreasing systematically as ionic strength increases. In contrast, the long-range population shows no statistically significant change across conditions (P > 0.05), indicating that this regime is insensitive to ionic strength.

Relationship between trajectory curvature, swimming speed, and cell–surface separation distance

The three key parameters characterizing bacterial motion near a surface are trajectory curvature, swimming speed, and cell–surface separation distance. Although the relationships among these parameters have been explored in previous studies, precise quantification has been hindered by the difficulty of measuring absolute separation distances. Leveraging our precise height measurements, we examined the correlations among swimming velocity, trajectory curvature, and separation distance.

Instantaneous swimming speeds were calculated using the second-order central difference method (28), and the local curvature at each point along the bacterial trajectories was calculated via a five-point fitting algorithm. The results (Fig. 6A and B) show a weak positive correlation between swimming speed and cell–surface separation, together with a clear negative correlation between trajectory curvature and separation distance. In addition, we analyzed 34 circular trajectories to extract the mean gap height and the radius of the fitted circular paths (Fig. S3A). This analysis revealed a significant linear relationship between trajectory radius and gap height (Fig. S3B).

Figure 6.

For image description, please refer to the figure legend and surrounding text.

Swimming kinematics correlate with cell–surface separation. A) Bacterial swimming speed exhibits a weak positive correlation with gap height. B) Trajectory curvature exhibits a negative correlation with gap height. Gray points show locally computed values along trajectories. Blue points show binned averages (30 points per bin in A; 20 points per bin in B). Solid lines are linear fits to the binned means.

Discussion

In this study, we implemented a fluorescence-based imaging technique capable of resolving the separation distance between swimming bacteria and solid surfaces with high axial sensitivity. By calibrating fluorescence intensity against the known geometry of immobilized silica microspheres, we determined absolute axial positions and reconstructed the 3D trajectories of individual E. coli cells in real time. We note that, due to the finite camera exposure time and the intrinsic motion of swimming bacteria, the measured axial positions correspond to exposure-time-averaged quantities rather than instantaneous positions. As detailed in the “Validation of fluorescence–height calibration reliability” section, the effective axial uncertainty of our method is ∼40 nm, comprising contributions from calibration, geometric fitting, and motion-induced averaging.

This approach enables direct mapping of near-wall height distributions during motion, overcoming a key limitation of earlier fluorescence-based studies that relied on assumed “contact” offsets or arbitrary minimum separation distances. Our analysis of single-cell trajectories revealed a striking bimodal distribution of bacterium–surface separation distances, characterized by two distinct stable regimes: a short-range state at ∼67 nm and a long-range state centered ∼240 nm.

By systematically modulating the ionic strength of the medium, we disentangled the physical mechanisms governing these two regimes. We found that the short-range state is highly sensitive to ionic conditions; increasing the ionic strength enhanced the population of this state and shifted it closer to the surface. This behavior is consistent with the screening of electrostatic repulsion described by DLVO theory. In contrast, the long-range “hovering” state remained robust against changes in ionic strength, maintaining a characteristic height of ∼240 nm. This insensitivity to electrostatic screening confirms that the long-range regime is sustained primarily by hydrodynamic interactions. Together, these observations reconcile disparate estimates of near-wall distances in the literature by demonstrating that bacteria can occupy at least two distinct, stable near-surface motility regimes rather than a single characteristic height.

We attributed the long-range (∼240 nm) mode to a finite-height hydrodynamic hovering state arising from coupled distance–orientation dynamics near a wall, where wall-modified translation and rotation balance to produce a stable fixed point. This interpretation is supported by boundary–element simulations of an E. coli–like swimmer, which predict a center-to-wall distance of ∼0.88–0.93 μm and a tilt angle of ∼0.028 rad (21), corresponding to a lowest-body gap of several hundred nanometers—consistent with our ∼240 nm mode and with previous holographic measurements reporting ∼200 nm separations (22).

It is worth noting that this hydrodynamic mechanism is distinct from a purely geometric effect of pitch or wobbling. Swimming cells have been shown to adopt a characteristic nose-down pitch and undergo periodic pitch-wobbling (16), which can modulate instantaneous gap estimates and broaden the height distribution within a single trajectory. However, because such periodic orientational fluctuations occur on a timescale much shorter than our 1–3 s stable segments, their contribution is largely averaged out in the trajectory-averaged stable gap heights used in Fig. 4C; they would be expected to broaden each peak somewhat but are unlikely to generate two distinct trajectory-level populations by themselves. Thus, we interpret the ∼240 nm mode as a hydrodynamically stabilized hovering branch and the ∼67 nm mode as a closer-approach branch governed by DLVO electrostatics.

We also note that temporal averaging over the camera exposure and inherent measurement uncertainties may broaden the observed height distributions. However, these effects are unlikely to artificially generate distinct spatial populations. Crucially, the separation between the two observed modes (∼170 nm) substantially exceeds our estimated overall measurement uncertainty (∼40 nm). This significant separation suggests that the bimodal distribution reflects a genuine physical feature of near-surface swimming behavior rather than an artifact of the measurement process.

Future technical developments could further refine the axial precision of this approach. Adopting high-speed, low-noise scientific complementary metal–oxide–semiconductor (sCMOS) cameras alongside brighter fluorophores would reduce exposure times, thereby minimizing motion-induced blur. In addition, incorporating directly controlled gap-height standards (e.g. via optical tweezers or nanofabricated spacers) could offer independent experimental benchmarks for further validate absolute gap heights for moving cells. These approaches would complement the in situ microsphere calibration and geometric cell-shape fitting established here, paving the way for sub-20-nm axial tracking of dynamic microswimmers at interfaces.

Our reconstructions further showed that the bacterial cell body maintains a slight tilt relative to the surface while swimming. Such a “tilted hovering” configuration is consistent with a torque balance between the rotating flagellar bundle and the cell body under wall-modified hydrodynamic drag, as anticipated by theoretical and numerical work (15, 21). This geometry provides a plausible mechanical basis for maintaining a stable separation while simultaneously generating the wall-induced reorientation that produces circular trajectories.

We also quantified the interplay between trajectory geometry and separation distance. Our data demonstrate a clear negative correlation between trajectory curvature and gap height, providing experimental validation for hydrodynamic theories which predict that wall-induced rotation weakens as the bacterium moves further from the boundary. Additionally, we observed a weak but positive correlation between swimming speed and separation distance. These precise measurements provide quantitative experimental constraints for the development and refinement of theoretical models describing microswimmer hydrodynamics near surfaces.

In summary, the calibrated fluorescence microscopy method presented here offers a robust and noninvasive tool for the quantitative study of bacterial dynamics near interfaces. By enabling single-cell resolution of the cell–surface gap, this approach bridges the gap between planktonic swimming and surface attachment. Future applications of this method to surfaces with varied chemical or topographical properties, as well as to multi-species communities, promise to deepen our understanding of the biophysical principles initiating biofilm formation and microbial colonization.

Materials and methods

Strain and cell culture

We used the smooth-swimming E. coli strain JY27 (derived from K12 strain RP437, ΔfliC cheY), which exhibits exclusive counterclockwise flagellar rotation. This strain was transformed with plasmid pBAD33fliC, expressing wild-type FliC under an arabinose-inducible promoter, to yield strain JY27-pBAD33fliC.

Cells of JY27-pBAD33fliC were cultured overnight at 33 °C in Luria–Bertani broth (1% tryptone, 0.5% yeast extract, 0.5% NaCl) with shaking at 200 rpm. The overnight culture was diluted 1:100 into T-broth (1% tryptone, 0.5% NaCl) supplemented with 25 µg/mL chloramphenicol and 0.01% arabinose, and grown for 3.5–4 h to an OD600 of ∼0.4. Cells were harvested by centrifugation at 1,000 × g for 6 min, washed twice, and resuspended in motility medium (MM; 10 mM potassium phosphate, 0.1 mM ethylenediaminetetraacetic acid [EDTA], 10 mM lactic acid, 1 mM methionine, pH 7.0). The prepared cell suspension was used immediately or stored at 4 °C for up to 6 h.

Preparation of fluorescent calibration solution

The fluorescent calibration solution was prepared using FITC–dextran (MW 500 kDa; Sigma, FD500S) and carboxyl-modified silica microspheres (2 μm diameter; Haian Zhichuan, SM-COOH-2). First, a stock solution of FITC–dextran was prepared by dissolving 2 mg of the material in 1 mL of MM, yielding a concentration of 2,000 ppm. Then, 20 μL of a 500-fold diluted silica microsphere suspension was gently vortex-mixed with 980 μL of the FITC–dextran stock solution. The resulting mixture was used directly for calibration experiments.

Sample preparation

The coverslip and slide were sequentially cleaned by ultrasonication for 30 min each in deionized water, ethanol, 1 M KOH, and again in deionized water, followed by drying. To immobilize a fraction of the silica microspheres, a portion of each cleaned coverslip was treated with a 0.01% poly-L-lysine solution (Sangon) for several minutes; the remaining area was left unmodified to allow for the observation of freely swimming bacteria. This approach ensured that the surface treatment had minimal influence on bacterial motility. The fluorescent calibration solution containing silica microspheres and FITC–dextran was then mixed with washed bacterial cells at a 1:1 volume ratio. A 20-μL aliquot of the mixture was injected into the sample chamber, which was constructed from a coverslip and a glass slide spaced by two 60-μm-thick double-sided tapes. Finally, the chamber was sealed with vacuum grease to prevent evaporation, and the sample was used immediately.

Swimming bacteria imaging

Fluorescence excitation was provided by a 488-nm laser, and emission signals were collected using a Nikon Ti-E inverted microscope equipped with a 100× oil-immersion objective (NA = 1.49). Images were recorded using an EMCCD camera (DU897, Andor) at a frame rate of 25 fps, with the exposure time set to the full frame interval. The focal plane was first adjusted under bright-field illumination to a position of ∼100 nm above the contact point between the microsphere and the coverslip. Given the objective depth of field of ∼400 nm, this configuration yields an effective axial probing range of a few hundred nanometers, in agreement with the experimentally calibrated measurement range (0–400 nm).

To extend the axial observation range, the incident laser angle was adjusted to 2°–3° below the critical angle, achieving oblique illumination near the total internal reflection threshold. Image acquisition commenced when three to five firmly attached silica microspheres and distinct trajectories of swimming E. coli cells were simultaneously visible in the field of view. All recordings were completed within 10 min of sealing the chamber to minimize potential adverse effects of oxygen depletion on bacterial motility.

Image processing and height calibration

Image processing and quantitative analysis were performed using MATLAB R2023a (MathWorks, United States) and Origin 2023 (OriginLab, United States). To obtain a frame-specific fluorescence–height calibration, we used the immobilized silica microspheres present in the same field of view as the swimming bacteria. Microsphere centers were localized automatically using a scale-normalized Laplacian-of-Gaussian (LoG) multi-scale blob detection algorithm. Briefly, each fluorescence image was convolved with second-order Gaussian derivative kernels over multiple spatial scales, and the LoG response was normalized by the square of the scale parameter so that circular objects of slightly different apparent radii could be detected with comparable sensitivity (29). Candidate bead centers were identified as local extrema in the normalized response map. Threshold-based filtering was then used to remove low-confidence detections and background features, and nonmaximum suppression (NMS) was applied to eliminate duplicate responses from the same bead. This automated LoG-NMS procedure provided bead centers and effective radii for in situ calibration in each frame, reducing user-dependent selection.

For each detected microsphere, a binary mask was generated to extract its fluorescence intensity profile. Eight radial cross-sections were sampled uniformly around the center and averaged to obtain the mean fluorescence intensity I as a function of the radial distance r. Based on the sphere geometry, the local height h between the microsphere and the substrate was calculated as

h(r)=R−R2−r2

where R is the sphere radius. We then paired I(r) with h(r) to obtain I(h), and fit the calibration data using a power-law function

I(h)=a⋅hb+c,

where a, b, and c are fit parameters.

The variation in fluorescence intensity arises because the local gap height determines the thickness of the fluorescent fluid layer; narrower gaps contain a smaller volume of dye within the imaging depth, resulting in reduced intensity. Because calibration can be performed independently for each video frame using microspheres in the same chamber, this approach enables real-time, in situ calibration and reduces potential systematic errors associated with illumination fluctuations, photobleaching, and other time-dependent imaging variations.

Reconstruction of cell surface and movement trajectory

To improve the signal-to-noise ratio and suppress background fluctuations, raw fluorescence images were preprocessed prior to quantitative analysis. Image smoothing was performed using an edge-preserving diffusion-based filter to suppress high-frequency noise while maintaining cellular boundaries. Individual bacterial cells were identified via connected-component analysis, and their centroids were calculated. Centroids were linked across consecutive frames using a nearest-neighbor association rule based on the minimum Euclidean distance, yielding time-ordered trajectories (x, y, t). Instantaneous swimming speeds v were derived for each trajectory; fragmented or insufficiently long trajectories were excluded from analysis.

For each bacterium in each frame, the cell geometry was modeled as a spherocylinder (a cylinder with hemispherical caps). Principal component analysis was employed to determine the cell's long-axis orientation. Using the fluorescence–height calibration, fluorescence intensities extracted directly from the raw images over the cell region were converted into local surface heights, yielding ∼100–200 reconstructed surface points per cell per frame. These surface points were then fitted to the spherocylinder model to determine the cell's 3D pose, including its centroid position, long-axis orientation, tilt angle, and vertical position. The cell–surface separation (gap height) was defined as the vertical distance from the substrate to the lowest point of the fitted cell body. By constraining the fit with the reconstructed surface points rather than a single intensity minimum, this procedure reduced sensitivity to local fluorescence noise and segmentation uncertainty and enabled the reconstruction of the full 3D bacterial trajectory (x, y, z) over time.

Identification of stable near-surface swimming segments

Trajectories shorter than 1 s were excluded from further analysis. For each remaining trajectory, we quantified local height stability using a sliding-window procedure. Specifically, we advanced a 1-s window along the trajectory and computed the SD of the cell–surface separation distance within each window. The distribution of windowed SDs (Fig. S4) exhibits a pronounced minimum near 90 nm. We therefore classified windows with an SD <90 nm as locally stable, corresponding to time intervals in which the bacterium maintained a relatively steady near-wall height without significant approach toward or departure from the substrate.

Adjacent locally stable windows were merged to form continuous stable segments. These segments were additionally inspected visually to confirm consistent tracking and exclude obvious artifacts. Only trajectories containing stable segments longer than 1 s and accounting for >50% of the total trajectory duration were retained for statistical analysis. For each retained trajectory, we identified a stable segment spanning 1–3 s. We then computed the gap height for every frame within this segment and averaged these values to obtain a single mean separation distance for that trajectory. The mean separation distances from all trajectories, pooled across different cells, were used to construct the distribution shown in Fig. 4C.

Integrated computational pipeline

The 3D reconstruction of bacterial trajectories relies on the coordinated integration of three computational steps described above. First, frame-by-frame microsphere-based calibration establishes an in situ fluorescence-to-height conversion under the same optical and illumination conditions used for imaging swimming bacteria, thereby minimizing systematic errors from illumination drift or photobleaching. Second, the resulting calibration is applied to convert fluorescence intensities across the cell body into a dense set of surface height values, which are then fitted to a spherocylindrical cell model to recover the 3D bacterial pose and the cell–surface gap height. Third, a sliding-window analysis of gap-height stability is used to identify locally stable near-wall swimming segments, excluding transient approach or departure events from further analysis. Together, this calibration-fitting-segmentation workflow enables reconstruction of cell–surface separations for freely swimming E. coli and provides the trajectory-resolved height data used in subsequent analyses of gap-height distributions and their dependence on ionic strength, swimming speed, and trajectory curvature.

Supplementary Material

pgag319_Supplementary_Data

Contributor Information

Hongbo Yu, Hefei National Research Center for Physical Sciences at the Microscale and Department of Physics, University of Science and Technology of China, Hefei, Anhui 230026, China.

Chi Zhang, Hefei National Research Center for Physical Sciences at the Microscale and Department of Physics, University of Science and Technology of China, Hefei, Anhui 230026, China.

Rongjing Zhang, Hefei National Research Center for Physical Sciences at the Microscale and Department of Physics, University of Science and Technology of China, Hefei, Anhui 230026, China.

Junhua Yuan, Hefei National Research Center for Physical Sciences at the Microscale and Department of Physics, University of Science and Technology of China, Hefei, Anhui 230026, China; College of Physics, Guizhou University, Guiyang 550025, China.

Supplementary Material

Supplementary material is available at PNAS Nexus online.

Competing Interest

The authors declare no competing interests.

Funding

This work was supported by Fundamental and Interdisciplinary Disciplines Breakthrough Plan of the Ministry of Education of China (JYB2025XDXM502), National Natural Science Foundation of China grants (12474204 and 12574235), USTC Research Funds of the Double First-Class Initiative (YD2030002501), and Guizhou Provincial Major Scientific and Technological Program XKBF (2025)010.

Author Contributions

Hongbo Yu (Data curation, Formal analysis, Investigation, Software, Validation, Visualization, Writing—original draft, Writing—review & editing), Chi Zhang (Data curation, Formal analysis, Investigation, Project administration, Validation, Writing—original draft, Writing—review & editing), Rongjing Zhang (Conceptualization, Funding acquisition, Investigation, Methodology, Resources, Supervision, Writing—original draft, Writing—review & editing), and Junhua Yuan (Conceptualization, Funding acquisition, Investigation, Methodology, Resources, Supervision, Writing—original draft, Writing—review & editing)

Data Availability

All data needed to evaluate the conclusions are present in the paper and/or the Supplementary material.

References

  • 1. Zhao  A, Sun  J, Liu  Y. 2023. Understanding bacterial biofilms: from definition to treatment strategies. Front Cell Infect Microbiol.  13:1137947. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2. Ellison  CK, et al.  2017. Obstruction of pilus retraction stimulates bacterial surface sensing. Science. 358:535–538. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3. Hug  I, Deshpande  S, Sprecher  KS, Pfohl  T, Jenal  U. 2017. Second messenger–mediated tactile response by a bacterial rotary motor. Science. 358:531–534. [DOI] [PubMed] [Google Scholar]
  • 4. Fu  J, et al.  2021. Strategies for interfering with bacterial early stage biofilms. Front Microbiol.  12:675843. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5. Li  P, Yin  R, Cheng  J, Lin  J. 2023. Bacterial biofilm formation on biomaterials and approaches to its treatment and prevention. Int J Mol Sci.  24:11680. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6. Lauga  E, DiLuzio  WR, Whitesides  GM, Stone  HA. 2006. Swimming in circles: motion of bacteria near solid boundaries. Biophys J.  90:400–412. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7. Berke  AP, Turner  L, Berg  HC, Lauga  E. 2008. Hydrodynamic attraction of swimming microorganisms by surfaces. Phys Rev Lett.  101:038102. [DOI] [PubMed] [Google Scholar]
  • 8. Giacché  D, Ishikawa  T, Yamaguchi  T. 2010. Hydrodynamic entrapment of bacteria swimming near a solid surface. Phys Rev E Stat Nonlin Soft Matter Phys.  82:056309. [DOI] [PubMed] [Google Scholar]
  • 9. Frymier  PD, Ford  RM, Berg  HC, Cummings  PT. 1995. Three-dimensional tracking of motile bacteria near a solid planar surface. Proc Natl Acad Sci U S A.  92:6195–6199. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10. Marshall  KC, Stout  R, Mitchell  R. 1971. Mechanism of the initial events in the sorption of marine bacteria to surfaces. J Gen Microbiol.  68:337–348. [Google Scholar]
  • 11. Li  G, Tam  L-K, Tang  JX. 2008. Amplified effect of Brownian motion in bacterial near-surface swimming. Proc Natl Acad Sci U S A.  105:18355–18359. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12. Vigeant  MA-S, Ford  RM, Wagner  M, Tamm  LK. 2002. Reversible and irreversible adhesion of motile Escherichia coli cells analyzed by total internal reflection aqueous fluorescence microscopy. Appl Environ Microbiol.  68:2794–2801. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13. Spagnolie  SE, Lauga  E. 2012. Hydrodynamics of self-propulsion near a boundary: predictions and accuracy of far-field approximations. J Fluid Mech.  700:105–147. [Google Scholar]
  • 14. Liu  B, Jin  B, An  N. Simulation of flagellated bacteria near a solid surface: effects of flagellar morphology and ionic strength. Chin J Phys. 2026;102:768–780.
  • 15. Bianchi  S, Saglimbeni  F, Frangipane  G, Dell’Arciprete  D, Di Leonardo  R. 2019. 3D dynamics of bacteria wall entrapment at a water–air interface. Soft Matter. 15:3397–3406. [DOI] [PubMed] [Google Scholar]
  • 16. Bianchi  S, Saglimbeni  F, Di Leonardo  R. 2017. Holographic imaging reveals the mechanism of wall entrapment in swimming bacteria. Phys Rev X.  7:011010. [Google Scholar]
  • 17. Vigeant  MA-S, Wagner  M, Tamm  LK, Ford  RM. 2001. Nanometer distances between swimming bacteria and surfaces measured by total internal reflection aqueous fluorescence microscopy. Langmuir. 17:2235–2242. [Google Scholar]
  • 18. Gingell  D, Heavens  OS, Mellor  JS. 1987. General electromagnetic theory of total internal reflection fluorescence: the quantitative basis for mapping cell-substratum topography. J Cell Sci.  87:677–693. [DOI] [PubMed] [Google Scholar]
  • 19. Liu  Q, He  R, Zhang  C, Zhang  R, Yuan  J. 2024. Bacterial surface swimming states revealed by TIRF microscopy. Soft Matter. 20:661–671. [DOI] [PubMed] [Google Scholar]
  • 20. Liu  Q, Zhang  C, Zhang  R, Yuan  J. 2024. Speed-dependent bacterial surface swimming. Appl Environ Microbiol.  90:e0050824. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21. Htet  PH, Das  D, Lauga  E. 2024. Hydrodynamic hovering of swimming bacteria above surfaces. Phys Rev Res.  6:L032070. [Google Scholar]
  • 22. Di Leonardo  R, Dell’Arciprete  D, Angelani  L, Iebba  V. 2011. Swimming with an image. Phys Rev Lett.  106:038101. [DOI] [PubMed] [Google Scholar]
  • 23. Hu  J, Wysocki  A, Winkler  RG, Gompper  G. 2015. Physical sensing of surface properties by microswimmers—directing bacterial motion via wall slip. Sci Rep.  5:9586. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24. Dunstan  J, Miño  G, Clement  E, Soto  R. 2012. A two-sphere model for bacteria swimming near solid surfaces. Phys Fluids. 24:011901. [Google Scholar]
  • 25. Leishangthem  P, Xu  X. 2024. Thermodynamic effects are essential for surface entrapment of bacteria. Phys Rev Lett.  132:238302. [DOI] [PubMed] [Google Scholar]
  • 26. Xu  Z, et al.  2023. Contact area and deformation of Escherichia coli cells adhered on a cationic surface. Langmuir.  39:6387–6398. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27. Soman  V, Kumari  S, Nath  S, Elangovan  R. 2020. The response of bacterial flagellar motor to stepwise increase in NaCl concentration. bioRxiv 257477. 10.1101/2020.08.19.257477, preprint: not peer reviewed. [DOI]
  • 28. Turner  L, Ping  L, Neubauer  M, Berg  HC. 2016. Visualizing flagella while tracking bacteria. Biophys J.  111:630–639. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29. Lindeberg  T. 1998. Feature detection with automatic scale selection. Int J Comput Vis.  30:79–116. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

pgag319_Supplementary_Data

Data Availability Statement

All data needed to evaluate the conclusions are present in the paper and/or the Supplementary material.


Articles from PNAS Nexus are provided here courtesy of Oxford University Press

RESOURCES