Multi-peak fitting function was used to fit the data using a, Gaussian profile for bulk FTIR and b, a Lorentzian profile for IR s-SNOM data. α-helix corresponds to 1662 cm−1, β-sheet corresponds to 1618 cm−1 and 1678 cm−1, and the loop (D) region corresponds to 1635 cm−1. c, Schematic of the IR s-SNOM setup for nanowire imaging. Secondary structure of the OmcS nanowire at pH 10.5 is shown in a (PDB ID: 6EF8) with α-helices in red, 310 helices in pink and beta strands in green. d, At pH 10.5 used to solve the structure of OmcS nanowires, spatiospectral analysis of near-field phase data of the amide I mode of OmcS nanowire. The blue line corresponds to a fit of imaginary parts of a Lorentzian, with peak positions at 1669 cm−1 and 1643 cm−1 corresponding to α-helical and loop regions respectively. Data represent mean ± standard deviation for individual OmcS nanowires (n = 3 biologically independent samples).