Cellulose elementary fibril orientation in the spruce S1-2 transition layer

The tight organization of major wood cell wall polymers limits the swellability, solubility and reactivity of cellulose fibers during the production of regenerated textile fibers, nanocellulose, bioethanol, and many other value-added products. However, the ultrastructural assembly of cellulose elementary fibrils (EF) and matrix materials in one of the outer layers, i.e. S1-2 transition layer of wood cell wall, is far from being understood. Here, single-axis electron tomography on ultrathin spruce sections was applied to observe the three-dimensional (3D) structure of the S1-2 layer. The nanoscale geometries of the EFs were further quantitatively modeled through mathematical fitting of the tomographic subvolumes by suitable parametric space curves. The results showed that crisscross, bundled and parallel EF organizations are all present in this layer; the former two exhibit a denser structure. Several quantitative measures such as distances and angles were obtained for the analyzed structures. The result obtained in this study suggests that the S1-2 transition layer differs in structure than the principal cell wall layers. The structural differences and its possible role in wood cell wall have been discussed. These results will enhance our understanding of the swellability, accessibility and solubility of woody biomass for its conversion into the aforementioned value-added products.

S Supplementary Figure S3: Nearest neighbor distances (nm) for each analyzed subvolume, which on the xy plane are squares of length 40.5 nm and whose centers are located on the squares of the color map. The colormap is overlapped on Figure 4b to visualize location. The colorbar refers to the colormap in the middle of the figure (S12 transition layer). S Supplementary Figure S4: Crossed-fibrillar structure: if the microfibril orientation in the S1 and S2 layers follows the concentric plane of wood cell wall, there is less or no possibility of crossedfibrillar structure in the S1-2 transition layer as shown in fig. S4a. The sketch in fig. S4b shows that a crossed-fibrillar structure is likely when microfibrils in the neighboring principal layers, with opposite helices, protrude from the cell wall plane towards the lumen.

Description of the fitting algorithm
The algorithm used in this work to fit the geometry of the EFs is an adaptation of the one presented Where h(t) is an xyz triple that defines the point of a space curve h at the parameter value of t. The trigonometric operators allow the space curve to adopt a helical geometry with x and y amplitudes S (c1, c2), angular frequency (ω), and phase shift (φ). The terms Px(t) and Py(t) are polynomials, which confer the curve flexibility to deviate from a straight helix. The algorithm places space curves in the regions of the subvolume with the highest relative density, by varying the parameters of equation (1) while optimizing an appropriate cost function.
The mass enclosed within a chosen distance L on the x and y dimensions from the curve h(t) is given by: where t0 and tf are the lower and upper bounds of the parametric variable domain, hx and hy are the x and y components of the ordered triplet generated by h(t) and ρ(h(t)) the density of the voxel at the location h(t). For a discrete tomographic volume, this expression may be approximated as: In order to further attract the space curves to the densest regions of the tomogram, the L 3 term was neglected from equation (3) and the tomographic density was weighted by the inverse square of its distance from the space curve, as: This cost function C, sometimes combined with a penalty term (see below), was used to optimize the parameters of h(t) for the initial phase of the algorithm. The optimization was carried out employing two different methods in sequence: i) Particle Swarm Optimization (PSO) 1

and ii)
Nelder-Mead simplex method 2 . The former is one of the so-called "global optimization" methods, which performs a wide exploration in the variable space to seek the global optimum of the cost function. Its result depends very little on the starting value and is therefore more suitable for the initial search. However, since it tends to explore with such freedom that it can easily yield extreme and unphysical solutions, its search space was limited in the following way: ω = [-1.5/p, +1.5/p], The result from PSO was used as starting point for the second part of the optimization using the simplex method. The latter is more efficient at converging to a nearby local minimum and was thus employed to optimize all the parameters of the space curve. In this phase, a penalty term penalizing high values of ω (> 6/p) (which could generate a single curly path fitting the whole bundle) was introduced to the cost function C. For tomograms like the one in Figure 2, a further term was added, penalizing linear terms in whose absolute value is outside the interval [0.5, 2]. This is to correct for the fact that curves aligned to the y axis can be favored solutions compared to those that run diagonally, because they usually fit a larger portion of the subvolume (apart from the case in which they run along its main diagonal). Therefore, in such densely packed volumes with inevitable experimental noise, it is possible obtain several solutions that run parallel to the y axis and intersect the criss-cross structure, although the latter is clearly prevalent by visual inspection. Alternatively, the y-axis could be rotated align it with one of the criss-cross directions, but this would make it harder to fit the orthogonal direction with the currently employed fitting algorithm.
Once an optimal space curve was found, the tomographic density within 6 nm of the curve was removed from the dataset, a new curve was added and the whole process was repeated, until a designated fraction of the density was removed or a user-defined maximum number of curves were placed.
After placing the adequate number of curves, their associated tomographic density was restored to the analyzed volume and each curve was iteratively refined using the simplex optimizer and adding a repulsion term to the cost function, proportional to the inverse square of the distance: Where s is the curve under consideration (i.e. whose parameters are being optimized), n is the number of fitted space curves and hi(tj) provides the xyz coordinates of the i th space curve at the j th point of an array of t values in [t0,tf]. This refinement phase adjusted the curves based on the position of the other curves fitted to the volume. For each iteration, the curves were optimized in S random order to avoid any bias due to the order of the fittings, with the only rule that the first curve of a certain iteration could not be the same as the last curve of the previous iteration. The refinements were carried out until convergence (i.e. the average difference between consecutive iterations is smaller than a threshold) or after a maximum number of iterations had been reached.

Calculation of Nearest-Neighbor distances
For each space curve fitted to a subvolume, the average distance between its position and that of the other curves was approximated by equation (5), and the minimum of these was reported as the nearest-neighbor spacing. For a space curve of the form given by equation (1)