Local-to-global signal transduction at the core of the Mn2+ sensing riboswitch

The widespread manganese-ion sensing yybP-ykoY riboswitch controls the expression of bacterial Mn2+ homeostasis genes. Here, we first determine the crystal structure of the ligand-bound yybP-ykoY riboswitch from Xanthomonas oryzae at 2.85 Å resolution, revealing two conformations with docked four-way junction (4WJ) and incompletely coordinated metal ions. In >50 μs of MD simulations, we observe that loss of divalents from the core triggers local structural perturbations in the adjacent docking interface, laying the foundation for signal transduction to the regulatory switch helix. Using single-molecule FRET, we unveil a previously unobserved extended 4WJ conformation that samples transient docked states in the presence of Mg2+. Only upon adding sub-millimolar Mn2+, however, can the 4WJ dock stably, a feature lost upon mutation of an adenosine contacting Mn2+ in the core. These observations illuminate how subtly differing ligand preferences of competing metal ions become amplified by the coupling of local with global RNA dynamics.


INTRODUCTION
Riboswitches are structured RNA motifs commonly found in the 5'-untranslated regions of bacterial mRNAs, where they regulate many essential and virulence genes in response to binding of a specific ligand [1][2][3] . Currently, there are over 40 different riboswitch classes known to respond to ligands ranging from metabolites 4 , enzyme cofactors 5 , signaling molecules [6][7][8] , tRNAs 9 , and to metal ions [10][11][12] . Ligand binding generally stabilizes a conformation of the riboswitch that modulates either Rho-independent transcriptional termination or translation initiation through accessibility of the Shine-Dalgarno (SD) sequence. The static ligand-bound structures, and the ligand-recognition modes, of a number of riboswitches have been determined at atomic resolution 2,[12][13][14] . Often, the ligand occupies a linchpin position in the global fold where distal residues of the RNA are brought together; however, the dynamic paths by which the local binding of a ligand as small as a metal ion are transduced into the large-scale molecular rearrangements necessary for a regulatory decision by the gene expression machinery largely remain enigmatic 14 .
The yybP-ykoY RNA motif is one of the most widespread riboswitches across bacteria, including human and plant pathogens [15][16][17] . It has evolved to sensitively detect Mn 2+ metal ions and broadly regulate a variety of genes, particularly those involved in Mn 2+ homeostasis, at the levels of either transcription or translation 12,15,18 . We previously solved crystal structures of this riboswitch, suggesting that the charge, geometry, and Lewis-acid hardness of Mn 2+ may be sensed locally by encapsulation of the cation by five phosphoryl oxygens and the N7 of a conserved adenosine. The global structure suggested that formation of the binding site requires "docking" of two distal helical legs of a four-way junction (4WJ) to form a paperclip-shaped global architecture, facilitated by an A-minor interaction and a second, nonspecific divalent metal binding site (Fig.   1a) 12 . However, the transduction of ligand binding in this metal-sensing core into global structural changes that affect the distal helix P1.1 involved in riboswitching is not understood, rendering it an archetypical representative of our level of understanding of many crystallized riboswitches 14 .
Here, we first solve the structures of two ligand-bound states of the yybP-ykoY transcriptional riboswitch from the rice pathogen X. oryzae 19,20 , captured in distinct conformations that offer 'snapshots' of structural changes en route to full ligand binding. We then use these conformers for atomistic molecular dynamics (MD) simulations that reveal how ligand-dependent local structural perturbations in the metal-sensing core are linked to the stability of distal P1.1 helix to affect riboswitching. Finally, using single-molecule FRET (smFRET), we investigate the global structural dynamics of the riboswitch in the presence of varying concentrations of Mg 2+ and Mn 2+ , as well as other transition metals, revealing a previously unobserved extended conformation of the riboswitch. We show that addition of Mg 2+ induces two kinetically distinct docked conformations that remain in dynamic equilibrium with the extended conformation. In contrast, upon addition of sub-millimolar Mn 2+ , the riboswitch adopts a stably docked conformation that becomes abolished upon mutation of the conserved core adenosine. Taken together, our work reveals the liganddependent (un)folding pathway of the Mn 2+ sensing riboswitch as a guide for how subtle binding preferences distinguishing two similar metal ion ligands cascade through the coupling of local with global RNA conformational dynamics into powerful effects on gene regulation.

X. oryzae yybP-ykoY crystal structures reveal disordered metal sensing cores
We determined the structure of the yybP-ykoY riboswitch from X. oryzae in the presence of Mn 2+ (Xory-Mn) by X-ray crystallography at 2.85 Å resolution ( Fig. 1b and Supplementary Table 1).
In this phytopathogenic bacterium that causes rice blight, the riboswitch is found upstream of the yebN Mn 2+ efflux pump gene 20 , whose characterization helped identify the yybP-ykoY RNA as a little Sr 2+ occupancy at either of the M A,Mg or M B,Mn sites compared to external sites in the structure, attesting to specificity for the smaller divalent ions.
While the two new Xory-Mn conformers are similar, the regions immediately surrounding the metal ion binding sites differ between them and Llac-Mn. The Conformer 1' M B,Mn binding area is most similar to the L. lactis M B,Mn , except U49 in the L3 backbone is flipped out, away from the stacked conformation observed for the equivalent L. lactis A42 (Fig. 1d, Supplementary   Fig. 2), while still preserving all M B,Mn metal contacts (Fig. 2a). By comparison, the conformer 1 M A,Mg site is more distinct in that the inner-sphere contacts to the phosphoryl oxygens of G8 and A10 are lost (shown as red lines), with G8 potentially retaining an outer-sphere, through-water contact (Fig. 2a).
Compared to Conformer 1, Conformer 2 exhibits even more pronounced changes. While both metal ions remain bound, L3 is shifted away from P1.1. As a consequence, the M A,Mg site in Conformer 2 has lost one metal contact, that to U52 in L3, consistent with this loop's shift. The M B,Mn site is concomitantly moved by 2 Å relative to its position in Llac-Mn and Conformer 1 ( Fig. 1d). Three of its metal contacts are lost, specifically the inner-sphere contacts to the phosphates of C51, U52, and G9, which are now too far to interact at 6.8, 5.8, and 4.4 Å, respectively (Fig. 2b). Two of these lost contacts, U52 and G9, are from phosphates that bridge the two metal sites. Interestingly, the electron density is sufficiently clear to suggest that A48 in the binding site is flipped relative to its previous orientation, now orienting its N1, rather than N7, toward M B,Mn . Consistent with this generally disorganized architecture, the temperature B-factors for L3 are higher in Conformer 2 than Conformer 1 (Fig. 2c,d), indicating increased flexibility.
Strikingly, this includes larger flexibility around P1.1, suggesting a possible link between the flexibilities of these two key regions. Taken together, our crystal structures provide first evidence that lost contacts between the metal ions, L1, and a partially unfolded L3 can translate into disorder in the distal P1.1 helix, which provides a basis for riboswitching.

MD simulations reveal effects of M A,Mg and M B,Mn inner-sphere contacts on L3 stacking
To provide deeper insights into the RNA dynamics associated with metal identity, we performed 29 atomistic molecular dynamics (MD) simulations, equivalent to a total of 53 µs of real-time (see Table 1, Methods), with different metal ions in the M A,Mg and M B,Mn sites and starting either from Xory-Mn Conformers 1 or 2 (as reported here) or from Llac-Mn. As expected, given their necessarily limited timescales compared to experiments 22,23 , we found that our simulations generally maintained quite stable inner-sphere contacts for divalent metal ions, including their coordination with water molecules (Fig. 3a-c). To accelerate these dynamics we performed additional MD simulations that replaced one or both divalent ions at the M A,Mg and M B,Mn ion binding sites with monovalent K + ions (Table 1). Importantly, while the divalent-tomonovalent replacement affects both the thermodynamics and kinetics of the inner-sphere contacts of the metal ions, their relative thermodynamic stability allows monovalent first-shell ligands to model the functional behavior of divalents on a shorter timescale 22,23 . Accordingly, even these more dynamic simulations maintained the global architecture of the riboswitch except for local perturbations of L3 and a variable P2-P4 helical angle (Supplementary Fig. 4 and Supporting Information).
Upon closer inspection, we found that the inner coordination sphere of monovalent ions in both the M A,Mg and M B,Mn sites were significantly more stable in simulations where the second binding site was occupied by a divalent rather than monovalent ion (Fig. 3a). This observation suggests that binding of the divalent ion into one binding site may help pre-organize and stabilize the second binding site, consistent with the notion of cooperativity between M A,Mg and M B,Mn .
Furthermore, while some inner-sphere contacts remained very stable, other contacts were lost upon replacement with a monovalent (Fig. 3a-c). Notably, the bridging inner-sphere contacts of the U52 phosphate with the M A,Mg ion and those of the C51 and G9 phosphates with the M B,Mn metal were found to be most labile across all simulations (Fig. 3a These latter interactions are likely stabilized by coupling of the A-minor interaction of A10 to the G66-C44 base pair and associated stacking of A10 on the neighboring A46. All these interactions are parts of the L1-L3 tertiary docking contact and remained stable across all simulations (Fig.   3d).
We also found the dynamics of the entire L3 loop to be sensitive to the type of ion in the M B,Mn site. When Mn 2+ in the M B,Mn site was replaced with K + , the flexibility of the L3 loop was increased so that the loop populated various conformations with broken stacking patterns ( Fig. 3b and Supporting Information). These perturbations originated from the weakened inner-sphere contact of the A48(N7) nitrogen to the M B,Mn metal, suggesting that the L3 loop is involved in direct sensing of the Mn 2+ ion by forming a linchpin to support a tight stacking patterns only in the presence of the native Mn 2+ (Fig. 3e).

Stability of the SRL-like conformation of L1 loop requires an A-minor interaction
To complement our probing of structural dynamics in the docked state with those in the undocked state, we performed additional MD simulations of the segment consisting only of P1.1, P1.2 and L1. We started these "undocked" simulations from either of the two Xory-Mn Conformers and Llac-Mn (Table 1), with the aim to reveal their structural dynamics in the absence of the L1-L3 docking contact. While the L1 loop in the context of the entire riboswitch with its docked L1-L3 interaction always populated the SRL-like, two of our three "undocked" simulations lost this motif (Figs. 3f,g, Supplementary Fig. 8, and Supporting Information). In particular, in one of the simulations we observed loss of the G9-G93 trans Watson-Crick/Hoogsteen and G8-A94 trans Sugar-Edge/Hoogsteen base pairing 21 as well as the S-turn 24 that forms part of the M A,Mg site ( Fig.   3f,g). The former two base pairs are coaxially stacked on the P1.1 stem, suggesting that their loss may highlight the beginning of a transduction path by which P1.1 could become destabilized.

smFRET reveals an undocked conformation that transiently docks upon Mg 2+ addition
To probe the global structural dynamics in the presence of Mg 2+ and Mn 2+ , we used smFRET to monitor fluorophores positioned on the distal legs of the Xory riboswitch (Fig. 4a, Supplementary   Fig. 13, and Methods). smFRET traces at 100 mM KCl in the absence of any divalent metal ions showed a stable low-FRET value of ~0.1 without global dynamics (Fig. 4b), with a population FRET histogram displaying a single peak centered on ~0.13±0.10 (mean ± standard deviation) (Fig. 4c). The non-dynamic nature of the traces is also evident as an 'on-diagonal' contour centered at ~0.13 in the transition occupancy density plot (TODP), which shows initial vs. final FRET value transitions for the population of molecules as a heat map (Fig. 4d). This FRET value corresponds to an estimated distance of ~74 Å between the two fluorophores and suggests an extended, stably undocked (SU) conformation where the two RNA legs are distal and do not interact, unlike the docked crystal structure (Fig. 1b).
Addition of Mg 2+ up to 0.1 mM did not result in significant changes in the FRET histograms since almost all traces remained in the SU conformation, with ~3 % of them showing brief excursions into a higher ~0.6-FRET state (Supplementary Fig. 14). Further raising the Mg 2+ concentration resulted in more dynamic traces transiently adopting this high-FRET state, accompanied by a corresponding decrease in the population of SU traces ( Fig. 4b-d,   Supplementary Fig. 14). At a near-physiological concentration of 1 mM Mg 2+ , the time-and population-averaged distribution between low-and high-FRET, with mean FRET values of ~0.15±0.11 (49 %) and 0.63±0.14 (51 %), respectively, became almost equal (Fig. 4c). A FRET value of 0.63 corresponds to a distance of ~49 Å between the two labeled RNA arms, similar to the distance observed in the crystal structures, suggesting adoption of the compact 'docked' conformation. Reaching 10 mM Mg 2+ , the fraction of this docked conformation further increased and saturated at ~69 %, with a sigmoidal Mg 2+ concentration dependence that fit well with a Hill equation to yield a half-saturation point of K 1/2 ~ 0.6 mM and a cooperatively coefficient of n = 1.7 (Fig. 4e). These data demonstrate that the Mn 2+ riboswitch adopts an extended SU conformation in the absence of divalents, which increasingly samples transient docked conformations upon a rise in Mg 2+ concentration.
At a low Mg 2+ concentration of 0.1 mM, single-exponential kinetics were observed with a slow docking rate constant, k dock ~0.56 s -1 , and a fast undocking rate constant, k undock ~12.5 s -1 ( Fig.   4f and Supplementary Fig. 15). ~1.21 s -1 ( Fig. 4f and Supplementary Fig. 15). The TODP further shows that a majority (82 %) of traces are dynamically transitioning between the two FRET states, as highlighted by dominant 'off-diagonal' contours, while only a small fraction (~18 %) remains in the stable low-FRET state (Fig. 4d). The double-exponential kinetics arises from two distinct populations: 'dynamic docked' (DD) and 'dynamic undocked' (DU) traces corresponding to molecules residing largely in the docked and undocked states, respectively. (Fig. 4g). Among the dynamic traces, ~65 % were DD while ~35 % were DU traces. As observed for other RNAs that undergo docking of two adjacent helical arms 25-31 , the heterogeneity observed in the population was largely static and molecular behaviors interconverted only rarely (< 2% of traces) over the experimental timescale (5-10 min) (Fig. 4h). Interconversion between the DU and DD behaviors was observed more readily, however, when first chelating, then reintroducing Mg 2+ (Fig. 4i), suggesting that they represent kinetically trapped conformations on a deeply rugged folding free energy landscape 32,33 .

Sub-millimolar Mn 2+ uniquely yields a stably docked riboswitch
We next asked what specific effect Mn 2+ has on the folding of the riboswitch. In the presence of 1 mM Mg 2+ , addition of a low concentration of 0.1 mM Mn 2+ resulted in the appearance of a unique population of stably docked (SD, ~43%) traces residing in the high-FRET state for >30 s (k undock < 0.03 s -1 ) before photobleaching (Fig. 5a). Accordingly, the FRET histogram showed two peaks with mean FRET values of 0.17±0.14 and 0.69±0.12 and an increased ~68 % population of the docked conformation (Fig. 5a). The SD population is evident in the TODP as a new 'on-diagonal' contour centered on the ~0.7-FRET value (Fig. 5a). Dynamic traces under these conditions again   (Fig. 5b, Supplementary Fig. 16).
Interestingly, in the absence of Mg 2+ , while 0.1 mM Mn 2+ alone led to the appearance of DD and SD traces with ~62 % docked population (mean FRET 0.67±0.12) (Fig. 5c), 0.1 mM of Ni 2+ , Co 2+ , Sr 2+ or Zn 2+ did not affect SU traces and Cd 2+ had only a small effect in promoting DD traces.
These results suggest that while the Xory riboswitch has some degree of plasticity in recognizing ligands, in a background of Mg 2+ it preferentially recognizes Mn 2+ and -to a lesser extent -Cd 2+ .
To probe how the kinetically distinct SU, DU and DD traces respond to Mn 2+ , we observed the same set of molecules at 1 mM Mg 2+ before and after the addition of Mn 2+ . We found that all three populations respond to Mn 2+ and are capable of forming the stably docked (SD) population ( Fig. 5d). In particular, the SU traces converted into DU, DD, and SD conformations with similar probabilities, suggesting that they are correctly folded with metal sensing sites poised to bind ligand. By comparison, a majority of DD traces converted into SD traces whereas DU traces adopted DD and SD behavior upon Mn 2+ addition. Only a small fraction of traces showed no response at low Mn 2+ suggesting that they may be misfolded.

Mutation of the conserved adenosine A48 results in complete loss of the SD conformation
The highly conserved discriminator base A48 in L3 is positioned to confer Mn 2+ specificity via its N7 and also helps maintain L3 in a stacked conformation. We therefore tested the effect of a single A48U mutation on folding and Mn 2+ sensing of the riboswitch. Similar to the WT, at 100 mM KCl without divalents, smFRET traces of the mutant riboswitch showed the SU population with a mean FRET value of 0.11±0.12 ( Fig. 5e). At 1 mM Mg 2+ , we observed dynamic traces with excursions into the docked higher FRET states, and the FRET histogram showed a major (64 %) 0.14±0.11 low-FRET peak and a minor (36 %) broad 0.52±0.21 mid-FRET peak that corresponds to more extended docked conformations (Fig. 5f). Of note, 100% of the dynamic mutant traces showed DU character with only brief excursions into the docked conformations (Fig. 5f). As a result, we  (Fig. 5h). These data demonstrate that the conserved discriminator A48 is essential for Mn 2+ inducing a stably docked riboswitch conformation. The presence of Mg 2+ partially rescues the loss of Mn 2+ sensing by the mutant, yet does not restore its ability to form the SD conformation.
Possibly this reflects the ability of Mg 2+ to bind at M B in A48U, though with weaker affinity, via the uridine O4, as suggested in the A41U L. lactis structure 12 .

DISCUSSION
Using a combination of X-ray crystallography, MD simulations and smFRET, our work here sheds  Our structural snapshots, MD simulations and smFRET data support the model shown in Contrasting with the Mn 2+ riboswitch, the NiCo riboswitches, which cooperatively sense the transition metals Ni 2+ or Co 2+ , resemble the overall 'H' shaped architecture of the Mn 2+ riboswitch but with a tight 4WJ that lacks an analogous tertiary docking interface. Accordingly, the NiCo riboswitch appears to acts through a distinct mechanism utilizing four bound metal ions to weave together a network of interactions between the interhelical residues that stabilize the 4WJ and so prevent formation of a terminator via strand invasion 34 . Similarly, the Mg 2+ sensing M-box riboswitch adopts an architecture with three parallel co-axially stacked helices that are brought together by the binding of six Mg 2+ ions, leading to formation of a terminator 35 . Therefore, both the NiCo and Mg 2+ sensing riboswitches achieve gene regulation by employing multiple metal ions that directly interact with and stabilize the 'switch' helix. The Mn 2+ riboswitch is thus unique in requiring only a single metal ion that does not make any direct contacts with switch helix P1.1.
By combining high-resolution structural information with insights into both atomistic and global dynamics, our study outlines the mechanism by which a ligand as small as a single divalent metal ion couples local with global structure to give Mn 2+ the ability to influence RNA folding and finetune gene expression by cooperating with a high background of Mg 2+ . The general lessons revealed here of how a ligand-binding signal can be transduced across an RNA are likely to become a recurring theme among riboswitches where the ligand represents a distal structural linchpin for the 'switch' helix.

Acknowledgements
This work was supported by NIH R01 grants GM062357 and GM118524 to N.G.W., by project

RNA preparation and crystallization
RNA was cloned, transcribed, purified, refolded with 2.5 mM Mn 2+ , and screened for crystallization as previously described 12 . The X. oryzae aptamer domain sequence was modified to improve the chances of crystallization, including replacing the terminal loops in variable regions with GAAA tetraloops and adding a GG at the beginning of the sequence to increase T7 RNA polymerase efficiency 36 . We also removed a single unconserved U flip-out near the base of P1.1.
In this construct, a native CA dinucleotide at the four-way junction was omitted from the sequence (Fig. 1a), possibly aiding crystallization. Initial crystal hits were obtained using the Nucleic Acid Since this dataset was collected near the Sr K-edge wavelength (0.769 Å), we could observe anomalous signal from Sr 2+ ions in the crystal. At 4 σ (a relatively low threshold), there was modest signal at the Conformer 2 M A,Mg site, suggesting only partial occupancy by Sr 2+ (Fig. 2b).
However, there is no occupancy seen at any of the other M A,Mg or M B,Mn sites, despite there being external sites in the lattice with stronger anomalous signal (Supplementary Fig. 1 42 and intermittent re-phasing and density modification in AutoSol were used to build the final model (Supplementary Table 1).

Molecular Dynamics Simulations
The crystal structures of Mn 2+ sensing riboswitch from X. oryzae from this study (both Conformers 1 and 2) and from L. lactis (PDB ID 4Y1I 12 ) were used as starting structures for MD simulations.
We aimed to study the effect of divalents in the metal ion binding sites on the structural dynamics of the riboswitch, so we prepared a set of starting structures containing different ions (Mn 2+ , Mg 2+ , and K + ) in the M A,Mg and M B,Mn sites ( Table 1). In addition, we probed both for syn-and anticonformations of A48 in Conformer 2 from Xory to verify refinement of the corresponding electron density as a syn-oriented nucleotide. Starting structures of the SRL-like motif lacking tertiary interactions with the rest of the aptamer were prepared from the crystal structures but entailing only the P1.1, P1.2 and L1 segments without divalents.  Table 2 The simulation time for each studied system was at least 2 µs (Supplementary Table 2).

Data analysis
All trajectories were analyzed with the Ptraj module of the AMBER package 44

Single-molecule FRET RNA preparation
The RNA for smFRET studies was annealed from two synthetic RNA oligonucleotides ( Supplementary Fig. 13

Figure S1
Figure S1|. Overall ions and anomalous sites for the X. oryzae yybP-ykoY riboswitch crystal construct. a) Conformer 1 (orange) and b) Conformer 2 (cyan). Total ions within 5 Å of A chain include 2 Mn 2+ (magenta), 45 Mg 2+ (or Mn 2+ ) (black), and 9 Sr 2+ (green). The anomalous difference map, collected at 0.769 Å, is shown in pink mesh at level 4 σ. Placement of Sr 2+ ions was determined by anomalous map and/or high electron density. Since Mn 2+ has minimal anomalous signal at this wavelength and it is similar in ionic radius to Mg 2+ , it could not be differentiated from Mg 2+ . Thus, Mn 2+ (2.5 mM in the crystal) could partially or fully occupy sites denoted as Mg 2+ (30 mM in the crystal). Binding site Mn 2+ were predicted to be so based on previous analysis of the L. lactis structure, but were not confirmed by this structure.

Comparison of Xory Mn 2+ bound structures to Cd 2+ bound structures
With respect to the recent finding that Cd 2+ can also bind to the yybP-ykoY riboswitch 1 , our smFRET results and unpublished data from a yybP-ykoY and Broccoli-based fluorescent sensor agree with this conclusion. However, our structure (at 2.85 A resolution) and previous ones with Mn 2+ cannot provide strong evidence for or against their intriguing argument for heptacoordination as the mechanism of specificity for Mn 2+ . While Cd 2+ is heptacoordinate in their Llac-MntP structure (PDB ID 6CC3), with water as its seventh ligand, it is not clear how that water could enable a mechanism of specificity for Mn 2+ against other metals. Further, in the highest-resolution structure (6CB3), Cd 2+ at M B was found to be hexacoordinate. The Llac-alx structure (6CC1) is also modelled as bound in a heptacoordinate fashion to M B , with the seventh ligand here coming from a second phosphoryl oxygen from the same phosphate of U44. However, this structure is similar to all of our Mn 2+ -bound structures, in that the resolution is not high enough to show the subtle difference in orientation of a phosphate that would be required to distinguish hexa-from hepta-coordination. As for the M A site, our Cd 2+ -only smFRET data suggest that M A probably prefers either Mg or Mn over Cd 2+ . Upon inspection of their data, M A does not appear clearly heptacoordinate in any of their structures. It is actually octacoordinate in the Llac with Cd/Mg/Ba (PDB 6CB3) and another claim (Llac-MntP) relies on placed waters not seen in the electron density. A very high-resolution structure of a yybP-ykoY riboswitch with Mn 2+ is required to address this interesting question. In any case, taken together with our structures, these agree with the finding of flexibility in the Mn-binding area, even when the riboswitch ligand is bound. It is a separate biological argument whether Cd 2+ is a relevant ligand, as it in the past was often considered toxic and xenobiotic for most organisms, and its high-affinity binding to enzymes at sites of other metals is generally considered aberrant 2 .

Global structural dynamics of docked structures of aptamers in the MD simulations
To elucidate structural dynamics of Mn 2+ sensing riboswitch, we performed a set of explicit solvent MD simulations on microseconds time scale. In addition to simulations containing both M A and M B ion binding sites occupied by divalent ions, we performed a set of simulations testing the effect of replacement of these divalent ions by monovalents in each ion binding position separately or in both of them simultaneously (see Table S2).
The global structural dynamics of the studied systems was visualized by the B-factors calculated per residues ( Figure S4). All simulations revealed similar trends in global structural dynamics except of behavior of L3 loop, which was found to be sensitive to type of ions in the M A and M B ion binding sites (see below). All stems exhibited high structural stability in all simulations. We observed larger fluctuations on the tips of P2, P3, and P4 stems. These fluctuations were found to be caused by unstacking of the L2 nucleotide, which should be considered as inherent part of native structural dynamics of GNRA tetraloops [3][4][5][6][7] . In the case of simulations of L. lactis structure, B-factor values indicated also large fluctuations of the P2 stem. Detailed analyses revealed that these fluctuations were connected with a reversible bending of the P2 stem and its movement toward and away from the P4 stem. This global movement was correlated with flipping of ε torsion angle of A28 nucleotide, which fluctuated between two states (see Figure S5).  Table 1 in the main text for full list of the simulations). The colors of background bars correspond to the regions in the secondary and 3D structures shown on panels C-F.

MD simulations confirmed syn orientation of A48 in L3 loop of X. oryzae structure Conformer 2
The electron density of the conformer 2 of the X. oryzae structure revealed adenine A48 in synrather than anti-conformation. In order to verify this unusual glycosidic bond orientation within the given structural context, we used two different refinements of the conformer 2 structure (Figure S6) as starting structures for subsequent MD simulations. These simulations aimed to indirectly probe the orientation of A48 glycosidic bond via analyses of compatibility of a given orientation of A48 with its structural environment reflecting the native A48 orientation through molecular interactions. We thus expected that while simulation starting from native orientation of A48 will fluctuate around starting structure conformation, the non-native orientation of A48 in the starting structure should result in structural changes in initial phase of MD simulation. For sake of completeness, it is also possible that both orientations of A48 might coexist in the crystal lattice ensemble and electron density represents ensemble-averaged picture of A48, which is structurally compatible with its structural environment in both orientations. In such case, both A48 orientations would be equally tolerated by their structural environment and thus both would be equally stable in MD simulations.
Therefore, we performed MD simulations of conformer 2 both with syn-and anti-oriented A48. Namely, we compared simulations having their ion binding sites occupied by corresponding native divalent ions, i.e., by Mg 2+ and Mn 2+ in M A and M B , respectively (see Table S2). We observed that the simulation started from structure with syn-oriented A48 stably fluctuated around crystal conformation during the entire 2 µs simulation. In contrast, the simulation started with antioriented A48 revealed significant structural changes during initial phase of the simulation. Namely, the A48 nucleobase was shifted already in the initial geometrical optimization, so that it was coordinated to the Mn 2+ ion by N7 nitrogen, while N6 exocyclic amino group was repelled away from the Mn 2+ ion. This movement was accompanied by reconformation of the sugarphosphate backbone between U52 and C53 that shifted away from A48 to avoid sterical clash ( Figure S7). Subsequently, in the early stages of the simulations, namely during thermal equilibration, such reconformation of U52-C53 sugar-phosphate backbone resulted in destabilization of the U52(H3)…A48(O2') hydrogen bond and exposure of the U52 into solvent ( Figure S7). All these rapid structural changes should not be considered as native structural dynamics of the riboswitch and are unambiguously a consequence of starting structure bias, namely non-native refinement of A48 anti orientation. Thus, in agreement with the observed electron density, we found that anti-oriented A48 is not compatible with the overall structure of Conformer 2 containing open-conformation of loop L3. Thus, crystallographic data together with MD simulations provide clear evidence of syn-orientated A48 in this particular L3 loop conformation; the MD simulations of Conformer 2 started with anti-A48 were not further analyzed and discussed.
For the sake of completeness, it is worth noting that MD simulations of Conformer 1 (containing closed conformation of loop L3 and A48 clearly resolved as anti-orientated) did not reveal any rapid structural changes during the early stage relaxation that would point to any doubts of the refinement of the L3 loop conformation.

Figure S7
Figure S7| Structural changes observed during early stages of the MD simulations of X. oryzae conformer 2 with anti-orientation of A48. Green structure corresponds to crystal structure, while the silver refers to the structure after initial rearrangements during these early stages.

Stacking pattern of L3
Most of the nucleobases from L3 loop form continuous stacking pattern (Figure S4 D,E, Figure  S11. This segment is further stacked by its 5'-end on adenine A10 (A9 according to numbering of L. lactis) from L1 loop, which forms type I A-minor interaction with G66=C44 (G61=C37 according to numbering of L. lactis) base pair. This A-minor interaction together with part of the stacking pattern formed by the A10(A9) adenine and two nucleotides at 5'-end of L3 loop (i.e., A10|A46|C47 and A9|U39|C40 in simulation of structure from X. oryzae and L. lactis, respectively) represent rather rigid part of the stacking pattern, which was found to be stable in all ionic conditions (Figures S8-S9 and Table S2). In addition to the A-minor interaction making tertiary contact between L1 and L3 loops, the above-mentioned A10|A46|C47 (A9|U39|C40) part of the stacking pattern is stabilized also by other tertiary interactions such as hydrogen bonding of C47 (C40 according to numbering of L. lactis) cytosine with riboses of C53 and A45 (G46 and G38 in L. lactis) of the P3.2 stem (see Figures S11 and S12 for evolution of all tertiary contacts between A10|A46|C47 (A9|U39|C40) part of the stacking pattern and its structural environment). The insensitivity of this region to types of ions in M A and M B sites suggests that the L1-L3 loop tertiary contact mediated by this pattern might be formed in all ionic conditions even if M A and M B sites are not yet properly formed and occupied by the corresponding divalent ions. The rest of stacking pattern of L3 loop (i.e., A48|U52|C51|A50 and A41|C45|U44|U43 in X. oryzae and L. lactis structures, respectively) showed different dynamics depending mostly on the type of ion in M B site (Figures S8-S9 and Table S2). The presence of Mn 2+ ion in M B significantly stabilized native stacking pattern in L3 loop, while this pattern was destabilized in simulations where the Mn 2+ ion was replaced by K + . Surprisingly, when both divalent ions were replaced by K + ions, the stability of L3 loop stacking pattern was higher than in case where only Mn 2+ ion in M B site was replaced by monovalent while M A was occupied by Mg 2+ ion, though still less stable than in simulations having also M B site occupied by Mn 2+ . In order to explain this observation, we hypothesize that stacking pattern of L3 loop represents inherently quite stable conformation of this loop capable of remaining stable on at least microsecond time scale. However, when M A binding site is occupied by Mg 2+ , unlike K + , it enforces proper positioning of A46 and U52 (U39 and C45 according L. lactis numbering) phosphates which leads to destabilization of the stacking pattern of L3. This stacking-structure-destabilization effect of Mg 2+ can be overcompensated only by binding of Mn 2+ ion into the M B binding site.

Figure S10
Figure S10| The stacking pattern formed by A10 (A9 according to numbering of L. lactis) and nucleobases of loop L3 with depicted tertiary interactions (see Figure S11 for their structural stabilities in MD simulations).

Figure S11
Figure S11| Time evolution of tertiary interactions of nucleotides included in the stacking pattern of L3 loop (see Figure S10 for structural view of these tertiary contacts).

Structural dynamics of SRL-like conformation of L1 in different structural contexts
Besides structures of whole aptamer which all remained in docked state in our simulations, we also performed simulations of the structures consisting only of P1.1, P1.2 and L1 (based on X. oryzae -Conformers 1 and 2 and L. lactis crystal structures, see Table S2). Such minimalistic structure obviously lacks all tertiary contacts to L3 loop and P3 stem and thus its dynamics should correspond to the dynamics of this particular part in undocked state.
The base-pairing ( Figure S12) as well as backbone conformation were monitored and compared to the corresponding values observed in the simulations of complete aptamer, i.e., in docked state. Note that the overall conformation of L1 loop as well as base pairing in P1.1 stem (with exception of terminal AU pairs of the P1.1 stem in simulation of L. lactis aptamer which revealed base pair fraying) were entirely stable in the simulations of complete aptamers. The most significant structural changes were observed in simulation of the isolated P1.2|L1|P1.1 structure based on Conformer 2 of the X. oryzae structure. The disruption of G9(N1)…G93(N7) H-bond was followed by reconformation of G8-A94 from tSH into cWC base pairing and loss of the Sturn conformation of the sugar-phosphate backbone of G8-A10. Interestingly, the simulation of the same structural motif derived from the Conformer 1 of X. oryzae crystal structure showed less pronounced changes, in particular, the G9(N1)…G93(N7) H bond was broken and recreated several times. Finally, in case of the simulation based on L. lactis structure, the L1 loop resembled conformation observed in the complete aptamer; however, we observed rather significant unpairing in P1.1 stem. This may be due to a weaker P1.1 in L. lactis that is shorter by 1-bp and has three A-U base pairs capping the stem, as opposed to the two G-C base pairs in the X. oryzae structure.
In summary, the data indicate that when A10 is sequestered in the A-minor interaction, the P1.2|L1|P1.1 segment adopts a conformation resembling the topology of a canonical sarcin-ricin loop. Compared to the sarcin-ricin loop consensus sequence, the A10 nt is inserted between its GpU platform and the flexible region. In addition, the trans-Hoogsteen/Hoogsteen base pair in the flexible region adjacent to the GpU platform is replaced by a trans-Watson-Crick/Hoogsteen pair. When the A10 is not involved in the tertiary interaction, it instead destabilizes the SRL-like topology.

The yybP-ykoY riboswitch can discriminate between similar transition metal ions
The selectivity of the Xory riboswitch for Mn 2+ over Mg 2+ arises in part from the inner-sphere contact with A48(N7), suggesting that other soft transition metal ions may also be recognized 1 . To test this hypothesis, we probed the effects of different divalent metal ions on the conformation of the riboswitch, at 0.1 mM concentration alone or in the presence of 1 mM Mg 2+ . FRET histograms showed that out of all the different metal ions tested, Cd 2+ is most effective in promoting docked conformations (Fig. 5b, Supplementary Fig.  16). In the presence of 1 mM Mg 2+ , addition of 0.1 mM Cd 2+ resulted in ~65 % of the high-FRET docked conformation, comparable to the docked population upon addition of 0.1 mM Mn 2+ . Examination of individual smFRET traces as well as the TODP showed that this is due to a large fraction of SD traces (Supplementary Fig. 16), in agreement with the tight binding of Cd 2+ to the yybP-ykoY riboswitch shown recently 1 . Among the other metals tested, Ni 2+ , Co 2+ , Sr 2+ or Zn 2+ had little effect on promoting the folded conformations of the riboswitch under these conditions. Interestingly, in the absence of Mg 2+ , while 0.1 mM Mn 2+ alone led to the appearance of DD and SD traces with ~62 % docked population (mean FRET 0.67±0.12) (Fig. 5c), 0.1 mM of Ni 2+ , Co 2+ , Sr 2+ or Zn 2+ did not affect SU traces and Cd 2+ had only a small effect in promoting DD traces (Supplementary Fig. 16). This suggests that, while Mg 2+ and Mn 2+ may both bind at M A,Mg , Cd 2+ may be more specific to the M B,Mn site. These results suggest that while the Xory riboswitch has some degree of plasticity in recognizing ligands, in a background of Mg 2+ it preferentially recognizes Mn 2+ and Cd 2+ and can effectively discriminate against similar divalent transition metal ions.