Structural basis for ion selectivity in potassium-selective channelrhodopsins

Summary KCR channelrhodopsins (K+-selective light-gated ion channels) have received attention as potential inhibitory optogenetic tools but more broadly pose a fundamental mystery regarding how their K+ selectivity is achieved. Here, we present 2.5–2.7 Å cryo-electron microscopy structures of HcKCR1 and HcKCR2 and of a structure-guided mutant with enhanced K+ selectivity. Structural, electrophysiological, computational, spectroscopic, and biochemical analyses reveal a distinctive mechanism for K+ selectivity; rather than forming the symmetrical filter of canonical K+ channels achieving both selectivity and dehydration, instead, three extracellular-vestibule residues within each monomer form a flexible asymmetric selectivity gate, while a distinct dehydration pathway extends intracellularly. Structural comparisons reveal a retinal-binding pocket that induces retinal rotation (accounting for HcKCR1/HcKCR2 spectral differences), and design of corresponding KCR variants with increased K+ selectivity (KALI-1/KALI-2) provides key advantages for optogenetic inhibition in vitro and in vivo. Thus, discovery of a mechanism for ion-channel K+ selectivity also provides a framework for next-generation optogenetics.


Cryo-EM structures of K + -selective channelrhodopsin HcKCRs
Cryo-EM structures of K + -selective channelrhodopsin HcKCRs in vivo high-density recording of neural activity All-optical physiology

INTRODUCTION
Motile organisms sense light, an important energy source and environmental signal, using rhodopsin family proteins. Rhodopsins are classified into microbial and animal types, 1 both containing a seven-helix transmembrane (7TM) domain (opsin) covalently bound to a chromophore (retinal). Microbial rhodopsins undergo retinal isomerization upon light absorption (from alltrans to 13-cis), leading to diverse ion-pump, ion-channel, sensor, and enzymatic functionalities. 2,3 When combined with precise light and gene delivery, expression of these proteins (especially channel-and pump-type rhodopsins) enables control of membrane potential in specific cells within animals with high spatiotemporal resolution. This experimental approach (optogenetics) has been applied to studies of neural circuitry and organismal physiology and to treatment of human diseases. [4][5][6][7] Cation-conducting channelrhodopsins (cation ChRs or CCRs, fluxing monovalent and divalent cations) from chlorophyte algae were first used in optogenetics 4 to excite neurons with light. 5,[8][9][10][11][12] Following identification of channelrhodopsins (ChRs) in 2002, 13 many variants with unique properties were engineered or discovered, expanding the optogenetic toolbox for excitation. 6 Optogenetic inhibition was shown using Cl À pumps and H + pumps, 14,15 with more potent inhibition later achieved using designed and natural anion-conducting channelrhodopsins (anion ChRs or ACRs), 16-18 now used across many organisms. [19][20][21][22][23] However, developmental or anatomical variations in [Cl À ] gradients can lead to unintended neuronal excitation, complicating some ACR applications. 24,25 Since physiological neuronal membrane deactivation by repolarization involves K + efflux, creating K + -selective ChRs could be considered for neuronal silencing 25 ; however, previously known K + channels exhibit conserved organization with no similarity to ChRs (Figure S1). Canonical K + channels, like KcsA (tetramer) 26 or TRAAK (dimer), 27 use a fourfold-symmetric selectivity filter with a highly conserved TVGYG or related motif 28 (Figures S1B-S1D). Even the recently discovered H + /K + channel TMEM175 maintains a fourfold-symmetric selectivity filter despite lacking the TVGYG motif 29-32 (Figures S1B-S1D); in contrast, ChRs form oligomers (dimers or trimers), but the ionconducting pathway is within each monomer and highly asymmetric 2 (Figures S1B-S1D, left).
Recently, the third family of channelrhodopsins, termed pump-like channelrhodopsins (PLCRs, or bacteriorhodopsinlike channelrhodopsins), was discovered in cryptophyte algae and marine metagenomic datasets; PLCRs show greater sequence similarity to pump-type (Cl À and H + ) rhodopsins than canonical ChRs 33-36 but function instead as channels with distinctive properties. For example, the PLCR ChRmine exhibits extremely high photocurrents, high light sensitivity, and a redshifted action spectrum. 34,37 Moreover, some PLCRs, such as ChRmine and CCR4 from Guillardia theta (GtCCR4), are selective for monovalent ions. 38,39 Two microbial rhodopsins were identified as light-gated K +selective channels. 40 These KCR rhodopsins from Hyphochytrium catenoides (HcKCR1 and HcKCR2), are homologous by sequence to previously discovered PLCRs 38,41 but exhibit higher K + /Na + permeability ratios (P K /P Na ) of $23 and $17, respectively, surpassing other PLCRs (e.g., P K /P Na of both GtCCR4 and ChRmine = $0.9), 39 CCRs (e.g., Chlamydomonas reinhardtii ChR2 [CrChR2] P K /P Na = $0.5), 42 and some canonical K + channels (e.g., P K /P Na of mouse SLO3 and viral Kcv exhibit P K /P Na of 5-10 and $9, respectively). 43,44 KCRs thus show promise as inhibitory optogenetic tools. 40 However, the mechanism of K + selectivity in KCRs remains elusive, and insight would be enormously valuable, not only as a general paradigm for understanding how ion-channel proteins can achieve K + selectivity but also for developing next-generation KCR-based optogenetic tools.

RESULTS
Overall structural comparison between HcKCR1, HcKCR2, and ChRmine We expressed HcKCR1 and HcKCR2 in Sf9 insect cells and reconstituted purified proteins into lipid nanodiscs (STAR Methods); cryo-EM structures in the dark state were resolved at 2.6 and 2.5 Å , respectively (Figures S2A-S2H; Table S1). The high-resolution density maps allowed accurate modeling of most residues of both HcKCRs (residues 6-260 for HcKCR1 and 2-260 for HcKCR2), as well as water molecules, lipids, and all-trans-retinal with conformer also validated by high-performance liquid chromatography (HPLC) ( Figures S2I-S2P, S3A, and S3B; Data S1). In HcKCR2, the N-terminal P2 is surrounded by P95, F96, W100, and Y101 with no space for the first methionine ( Figure S2N), consistent with its predicted posttranslational cleavage. 45 Both HcKCR1 and 2 form trimers, as in ChRmine. 36,38,46 Trimerization occurs through direct lipid-mediated interactions among transmembrane helices (TMs) 1-2 and 4-5 of adjacent protomers, and the center of the interface is filled with lipid molecules ( Figures 1A and 1B). The monomers exhibit an extracellular N-terminal region (residues 6-21 for HcKCR1 and 2-21 for HcKCR2), an intracellular C-terminal region (residues 255-260 for both), and 7 TM domains (within residues 22-254 for both), connected by three intracellular loops (ICL1-3) and three extracellular loops (ECL1-3) ( Figures 1C and 1D). The overall structures of HcKCR1 and 2 are almost identical with only minor differences in the N-terminal region, ICLs, and ECLs (Figure 1E).
HcKCRs also superpose onto ChRmine, but with critical structural differences (Ca root mean square deviation [r.m.s.d.] is 1.75 Å ) (Figure 1F). First, in ChRmine, both N-and C-terminal regions have short a-helices parallel to the membrane, absent in the HcKCRs ( Figure 1F). Second, ICLs and ECLs, except for ECL3, exhibit different conformations; the HcKCR ECL1, a domain that distinguishes PLCRs from other ChR families, is $6 residues shorter than in ChRmine and tightly packed to the helix bundle core (Figure 1F). Third, TM1 and the C-terminal half of TM7 are tilted about 7 and 10 , respectively, relative to the helical bundle. The C-terminal TM7 helix is also $1.5 turns longer than that of ChRmine (Figure 1F), resembling canonical CCRs (Figure 1G). These structural differences alter the shape of the ion-conducting pathway within each monomer (discussed in ''Ion-conducting pore and K + selectivity'' below).

The Schiff base region
Microbial rhodopsins have an all-trans-retinal molecule covalently bound to a conserved TM7 lysine via a Schiff base. In the dark, the Schiff base is protonated and stabilized by nearby acidic residues. 47 Initial reactions triggered by light absorption include retinal isomerization and subsequent proton transfer from the Schiff base to a nearby acidic residue or water molecule. The residues stabilizing the Schiff base proton and receiving the proton in the photo-intermediate state (M intermediate) are termed the Schiff base counterion(s) and the proton acceptor, respectively. 48 The architecture of this region affects key properties of microbial rhodopsins 48 and is thus a critical focus here.
We previously revealed features in the Schiff base region of ChRmine distinct from those of other microbial rhodopsins 38 ; TM3 is unwound in the middle of the membrane, and two aspartates (potential counterion and proton acceptor) appear on TM3/ ECL1 and TM7. One aspartate (D115) faces away from the Schiff base proton, and the other (D253) forms H-bonds with Y85/Y116 (Figure 2A,right). These features were shared in HcKCRs, suggesting a conserved architecture among PLCRs (Figures 2A  and S4A). However, we noted three key differences in HcKCRs: (1) K84 points toward the extracellular side (Figures 2A and S2K), (2) no water molecules are observed between the Schiff base ll OPEN ACCESS proton and the two aspartates (D105 and D229) (Figure 2A), and (3) the highly conserved arginine (Figure S1A) on ECL1 (R112 in ChRmine) is replaced by a tryptophan (W102 in HcKCRs) (Figures 2A and S1A). These differences prompted further characterization of D105 and D229.
First, to assign protonation states to these two aspartates and identify the primary counterion, we measured absorption spectra of wild-type (WT), D105N, and D229N mutants of both HcKCRs (Figures 2B,S3C,and S3D). l max values of WT, D105N, and D229N mutants of HcKCR1 at neutral pH were 521, 508, and 386 nm, respectively, demonstrating that protonation of D105 causes only a small blue shift ($13 nm); protonation of D229 causes a larger blue shift ($135 nm), indicating concomitant deprotonation of the Schiff base nitrogen (Figure 2B,left). Similar trends were also observed in HcKCR2 (Figure 2B,right). These findings initially suggested that both D105 and D229 are (A) Cryo-EM density map (left) and ribbon representation of HcKCR1 homotrimer viewed parallel to membrane (middle) and from intracellular side (right). (B) Cryo-EM density map (left) and ribbon representation of HcKCR2 homotrimer viewed parallel to membrane (middle) and from intracellular side (right). (C and D) Monomeric structures of HcKCR1 (C) and HcKCR2 (D). (E-G) Structural comparisons of HcKCR1 (blue) with HcKCR2 (orange) (E), ChRmine (red) (F), and C1C2 (green) (G) from different angles. (legend continued on next page) ll OPEN ACCESS deprotonated in the dark state, with only D229 serving as the primary counterion to stabilize the positive charge of the Schiff base proton-contrasting with ChRmine, in which both corresponding aspartate residues (D115 and D253) are essential counterions of the Schiff base proton. 38 However, our electrophysiology surprisingly revealed that channel function is completely abolished for both D229N and D105N mutants (Figures 2C and S5B). We conducted laser flash-photolysis and laser patch-clamp experiments ( Figures  2D-2F, S3E, and S3F), revealing that HcKCR1 has eight intermediates (K 1 , K 2 , L 1 , L 2 , M 1 , M 2 , N 1 , and N 2 ) (Figures 2D and 2F), suggesting that D105 works as the proton acceptor. This interpretation is also supported by the pH-sensitive pyranine assay, 49 showing that the Schiff base proton is released to bulk solvent later than the rise of the M 1 intermediate (Figure 2D); this result indicates that the Schiff base proton is not directly released to water but is transferred to an acidic residue in the Schiff base region. Notably, the absorption spectra of M 1 and M 2 intermediates in the D105N mutant are different from those in WT (Figure S3F), suggesting that the structures of the D105N mutant at these intermediates, denoted as M 0 and M 00 ( Figure 2F), are also different from WT and compromise channel function. Overall, these results suggest that D105 does not work as the counterion in the dark state but rather as the proton acceptor in the M intermediate and that proton transfer to D105 would be an important step for correct channel gating.

The retinal binding pocket
The residues surrounding the retinal chromophore are essential for key ChR properties, including kinetics and absorption spectrum. 50-52 We next focused on this area and found that HcKCRs and ChRmine share highly similar residues in the retinal binding pocket ( Figure 3A); 12 of 18 residues are conserved among HcKCRs and ChRmine, and only two residues are different between HcKCR1 and 2 ( Figure 3B). We introduced mutations to Y106 and T109 in HcKCRs (Y116 and T119 in ChRmine) because a previous study showed that Y116W and T119A in ChRmine decelerated and accelerated off-kinetics, respectively. 46 However, corresponding mutations in HcKCRs showed distinct results; the Y106W mutation moderately decelerated off-kinetics only in HcKCR2, and the T109A mutation did not accelerate but rather decelerated off-kinetics only in HcKCR1 (Figures 3C, 3D, S5, S6A, and S6B). Y106 and T109 are part of both the retinal binding pocket and the Schiff base region (Figure 2A), suggesting that the differences in the Schiff base could account for the distinct mutational effects observed.
We next introduced mutations to C110 and V133 of the type we had previously shown to prolong off-kinetics in CrChR2, 50,53,54 which gave rise to the step-function opsins (SFOs) that enable prolonged cell-type-specific control with brief light pulses. 4,5 Although previous attempts to transfer this functionality to PLCRs were unsuccessful, 55 we discovered that the outcome was strikingly successful for HcKCR1 and 2 ( Figures 3C and 3D). The C110T mutation increased the t off of HcKCR1 and 2 by $1500and $1800-fold, respectively (Figure 3D); notably, the HcKCR1 C110T retained comparable photocurrent size (Figure 3C). This study thus provides the initial step-function opsin arising from any PLCR, with HcKCR1 C110T showing potential as an optogenetic tool for long-timescale inhibition.
HcKCR1 and 2 exhibit different spectral properties; l max of HcKCR1 and 2 are 521 nm and 486 nm, respectively ( Figure 2B). Despite similarity in retinal binding pockets, these differ at positions 136 and 140 near the b-ionone ring of the retinal (Figures 3A and 3B), offering an opportunity to investigate spectral mechanisms. While 6-s-trans-retinal is found in all reported structures of naturally occurring microbial rhodopsins ( Figure S4B), during the structural refinement of HcKCR2 with 6-s-trans-retinal (STAR Methods), we observed a steric clash between the C 17 atom of retinal and the methyl group of A140, along with extra density next to the C 18 atom (Figure S2P,top). Modeling 6-scis-retinal resolved this issue (Figure S2P,bottom), indicating that these two residues (A136/A140 in HcKCR2) create a steric clash with the C 17 atom and simultaneously make space to accommodate the C 16 atom to induce the rotation of the b-ionone ring ( Figure 3E). The $220 rotation of the ring shrinks the p-conjugated system of retinal and thereby induces a $35 nm spectral shift (Figures 2B and 3E). This aligns with a previous study showing that a designed ChR with glycine and alanine at the same positions, C1C2GA, exhibits retinal rotated by $210 and a spectrum blue-shifted by $20 nm ( Figure S4B). 56 Swapping these two residues between HcKCR1 and HcKCR2 confirmed their influence on the orientation of the b-ionone ring and largely explained the spectral difference ( Figure 3F). HcKCR2 thus represents the initial naturally occurring microbial rhodopsin with experimentally demonstrated 6-s-cis-retinal configuration.
Ion-conducting pore and K + selectivity The three major classes of ChRs (including the PLCRs), 21,38,57,58 although all assembling as multimers, exhibit ion-conducting pores within each monomer formed by TM1, 2, 3, and 7. For example, the PLCR ChRmine forms a trimer, 38 and although mutations in the center of this trimer were found to modulate ion selectivity, this central region was not predicted to form a conducting pore in Kishi et al. (2022) 38 ; rather, each monomer forms its own transmembrane pore. 38 In the dark state, the pore is divided into intracellular and extracellular vestibules (IVs and EVs) by intracellular, central, and extracellular constriction sites (ICSs, CCSs, and ECSs). 2 HcKCRs have primary sequences similar to archaeal pumptype rhodopsins ( Figure S1A) but exhibit larger cavities due to structural differences among the pore-forming helices ( Figures  4A and S4C). Due to TM3 unwinding, not only TM1, 2, 3, and 7 but also ECL1 shape the EV, as observed in ChRmine ( Figures 1F and 4A). 38 Three notable differences from ChRmine were observed. First, although HcKCRs and ChRmine exhibit two IVs (IV1 and IV2) divided by a TM7 arginine (R244 in HcKCRs and R268 in ChRmine) and both are occluded at the ICS, the CS interaction network is different. In ChRmine, R268 forms H-bonds with Q71, and D126 forms H-bonds with both Q130 and Y260 as well as a water-mediated H-bond with Q71. This H-bond network, together with L47, A74, and G261, defines the ICS (Figure 4B,right). In contrast, in HcKCRs, R244 approaches TM3 due to the $10 tilt of the cytoplasmic half of TM7 ( Figure 1F) and forms a salt bridge with D116 (D126 in ChRmine). Moreover, A74, Q130, and Y260 in ChRmine are replaced by S70, T120, and F236, respectively, resulting in   Figure 4C). While the Schiff base architecture is similar (Figure 2A), the small conformational difference of K84 enlarges the pore in HcKCRs, and the EV extends close to the Schiff base lysine (K233), similar to GtACR1 ( Figure S4C). Thus, not only the counterion complexes (D105, D229, Y81, and Y106) but also C77, T109, and K233 contribute to defining the CCS in HcKCRs ( Figure 4C, left/middle).
Finally, several hydrophilic residues that line the EV in ChRmine, including D92, R112, E154, T245, and E246, are replaced by aromatic residues (F88, W102, F144, F/Y221, and Y222), which make the surface more hydrophobic ( Figure 4C, left/middle). Moreover, W102 and Y222 form a new constriction (ECS) with ECL1 positioned closer to the core of the helix bundle compared to that of ChRmine ( Figure 1F) and allow N99 on ECL1 to H-bond with Y222, separating the EV into two cavities (Figure 4C,left/middle). The replacement of arginine with tryptophan (W102) in HcKCRs also causes a rotameric change of histidine (H225 in HcKCRs) and generates a new H-bond between H225 and F/Y221 ( Figure 4C, left/middle). Overall, these aromatic residues create unique EVs with shape and properties quite distinct from those of other microbial rhodopsins ( Figures S1A and S4C).
In canonical K + channels, the ion-selectivity filter is typically occupied by K + ions. However, in our KCR structures, although the resolution is high and numerous water densities were observed, no densities were conclusively identified as K + ions (further supported by Attenuated Total Reflection Fourier Transform InfraRed [ATR-FTIR] spectroscopy 59 [Figures S3G and S3H], UV-Vis absorption spectra measurement [ Figure S3I], Fluorescence-detection Size-Exclusion Chromatography-based ThermoStability assay [FSEC-TS] 60 [Figure S3J], and MicroScale Thermophoresis [MST] experiments 61 [ Figure S3K]). These results collectively validated that K + ions do not stably bind to KCRs in the dark state. We used molecular dynamics (MD) simulations and applied artificial force to pull a K + ion through the extracellular part of the channel (STAR Methods). We found that the ion passes between N99, W102, and Y222, which we refer to as the selectivity triad, and then enters the extracellular vestibule with minimal protein distortion. As the K + ion passes through the triad, it forms a p-cation interaction with W102 and polar interactions with the carbonyl group of N99 and the hydroxyl group of Y222 ( Figures 5C and 5D); at this stage. the K + ion is largely dehydrated with just two coordinated water molecules ( Figure 5D). These findings are in agreement with our electrophysiology, demonstrating that N99L, W102Q, and Y222F reduce selectivity ( Figure 5B). Previous studies have shown that interactions with the face of phenyl rings and carbonyl groups are more favorable for K + than Na + or Li + in a size-dependent manner, 62-64 providing a rationale for how the selectivity triad favors K + .
These findings, along with the homology model of the Y222A mutant, may offer a compelling explanation for differences in E rev between Y222A and Y222F mutations (E rev of Y222A and Y222F are À10.6 ± 1.5 mV and À44.2 ± 2.9 mV, respectively). The Y222A mutation expands the space defined by the selectivity triad, leading to reduction in the energy barrier to partially hydrated ion permeation ( Figures 5C and 5D). Consequently, the triad loses ability to function as a K + -selective filter (Figure 5B); indeed, the photocurrent amplitude of the Y222A mutant is substantially higher than that of the WT ( Figures S5B and S6A). The lower E rev in Y222F compared to Y222A suggests that both the hydroxyl group of Y222 ( Figure 5D) and the bulkiness of the side chains comprising the selectivity filter are important for high K + permeability. This finding agrees with the previous results indicating that KCR selectivity is inversely proportional to the size of hydrated substrate cations. 40,65 In contrast, the reason behind the significant enhancement of K + selectivity we observed in H225 mutations remained unclear, as H225 is not directly involved in the selectivity triad. To address this, we determined the cryo-EM structure of the H225F mutant at 2.7 Å resolution ( Figure S2; Table S1) and compared it to WT, initially observing no remarkable differences in the EV ( Figures 5C and 5D). While H225 is not part of the selectivity triad, it interacts weakly with W102 and Y222 due to its proximity. Considering that mutations in H225 might affect stability of the selectivity filter, we conducted additional MD simulations for both WT and H225F. In WT HcKCR1, we noticed that the selectivity triad stochastically deviated from the cryo-EM conformation, adopting a more open structure with Y222 rotating away from W102 ( Figure 5E; Video S1). We refer to the Y222 (C and D) Selectivity filter region of HcKCR1 WT (cryo-EM structure), K + -coordinated form of HcKCR1 WT (MD snapshot), Y222A mutant (homology model), and H225F mutant (cryo-EM structure), viewed parallel to membrane (C) and magnified (D). Cavities calculated with HOLLOW. Black dashes indicate H-bonds; purple and red spheres indicate K + and water, respectively. (E) Superimposed HcKCR1 WT structure (blue) and MD snapshot (green) viewed parallel to membrane (left) and from extracellular side (right). Residues in the filter and retinal are shown as sticks. (F) Histograms of distances between Y222 and C29 during simulations. conformation similar to that of the cryo-EM structure as conformation 1 (tight) and the Y222 conformation positioned farther from W102 as conformation 2 (loose) ( Figures 5E and 5F). WT simulations suggested that when Y222 adopts the loose conformation, the triad architecture becomes significantly opened, transiently reducing channel selectivity ( Figures 5B and 5E). Surprisingly, in simulations of the H225F mutant, Y222 occupies the tight conformation for a greater fraction than in WT simulations ( Figure 5F; Video S2); simulations of the H225A mutant (also with greater K + selectivity) using our homology model revealed the same trend ( Figure 5F; Video S3). These results strongly suggest that the selectivity triad in HcKCR1 has intrinsic flexibility and that mutation to H225 stabilizes the architecture favoring K + selectivity. Intriguingly, the proportional occupancy time in conformation 1 increases in the order WT/H225F/H225A ( Figure 5F), while photocurrent amplitude decreases in the same order ( Figures S5B and S6A). This observation is consistent with the idea that conformation 2 represents a state with a lowered energy barrier.
To investigate the impact of H225F on the selectivity triad, we conducted electrophysiology using intracellular K + and extracellular cesium (Cs + ) or lithium (Li + ) ( Figures S6C and S6D; STAR Methods). Cs + is a weakly hydrated cation with a smaller hydration radius than Na + /K + , while Li + has a larger hydration radius than both Na + and K + . 40, 65 We observed no significant difference in K + vs. Cs + permeability between WT and H225F (E rev for WT = À28.7 ± 4.6 mV vs. E rev for H225F = À30.2 ± 2.0 mV; p = 0.7815). However, a pronounced discrepancy was observed in K + vs. Li + permeability between WT and H225F (E rev for WT = À102.8 ± 2.7 mV vs. E rev for H225F = À119.2 ± 2.3 mV; p = 0.0035) ( Figures S6C and S6D). These findings further support the idea that the selectivity conferred by the triad and its enhancement by H225F depend upon the hydration radius of cations entering from the extracellular side.
We performed electrophysiology under two different bi-ionic conditions: one with high extracellular Na + ([Na + ] out , 150 mM NaCl with no K + ) and high intracellular K + ([K + ] in , 150 mM KCl with no Na + ) (physiological), and the other with inverted ion concentration gradients (reversed) (Figures 6A and S5A; STAR Methods). In canonical K + channels, specific coordination among water, K + ions, and the backbone carbonyls of the selectivity filter together confer K + selectivity, which is usually maintained regardless of the ion gradient (Figure S6E,right). Similarly, the endolysosomal K + /H + channel TMEM175, which employs a different fourfold-symmetric motif as the filter, also maintains selectivity independent of ion gradient. 66 However, when we measured E rev in HcKCR1, we found that while maintaining robust photocurrents ( Figures S6E and S6F), E rev shifted positively (from E rev of À82.2 ± 2.5 mV) but only to 26.2 ± 3.3 mV under the reversed condition, indicating a decrease in P K /P Na when the concentration gradient is inverted (Figures 6A,middle/right,and S6D,left). This pattern was also observed in HcKCR2 ( Figure 6A, middle/right). The hydration state of ions accessing the selectivity filter from intracellular vs. extracellular is likely different since the selectivity filter is on the extracellular side and exposed to the bulk solvent, and ions accessing the filter from the extracellular side are expected to be fully hydrated ( Figure 5A). In contrast, the intracellular side of the ion-conducting pathway in KCRs is very narrow ( Figure 5A); our MD simulations revealed that the middle of the TM helices would have to move at least 7 Å to allow passage of fully hydrated ions. Given the relatively small structural changes during the photocycle in other microbial rhodopsins, 67-70 it is unlikely that ions pass through the intracellular pathway while maintaining full hydration, even when the channel is fully open. Indeed, low-temperature FTIR experiments of HcKCR1 in the M intermediate (open state) revealed structural change not different from that of HsBR, insufficient for conduction of fully hydrated ions (manuscript in preparation). 68,71 In our MD simulations of HcKCR1 in the presence of K + , we observed transient binding of K + near the IV, defined by the constriction at D116 and T120 ( Figures 6B-6D). These events were accompanied by partial dehydration of K + ( Figure 6C), and the salt bridge between R244 and D116 was lost, with the R224 side chain reoriented toward solvent and K + replacing the guanidinium of R224, making simultaneous binding unfavorable ( Figures 6B and 6D). Considering that D116 is located near the intracellular opening, the transient binding of K + in our simulations may reveal partial dehydration of ions entering from the intracellular side. Computational and functional analyses of the D116N mutant were in good agreement with this hypothesis. MD simulation revealed that K + does not bind to D116N and T120 in the D116N mutant, unlike in WT HcKCR1 ( Figure 6B). Electrophysiology showed that while currents were nearly abolished in D116N, a small inward current remained, revealing that D116 is not absolutely required for ion conduction ( Figure S5B).
We further investigated the importance of dehydration by analyzing effects of guanidinium ions (Gu + ) on HcKCR1 activity ( Figures 6E and 6F; STAR Methods). Gu + has a radius larger than that of dehydrated K + or Na + but smaller than that of hydrated K + or Na + ( Figure 6E); moreover, Gu + is one of the most weakly hydrated cations. 72 Addition of intracellular Gu + (G-I) Ion conduction models of WT HcKCR in physiological (G) and reversed conditions (H), and H225F in physiological conditions (I). TMs 1, 2, and 4-6 are removed for clarity. Black arrow and dashed lines indicate cation flow and H-bonds, respectively. Oxygen and hydrogen atoms of water molecules are shown as spheres colored in red and white, respectively. Magenta circles represent K + -selective filters. (legend continued on next page) ll OPEN ACCESS completely blocked channel activity of WT HcKCR1 ( Figure 6F). The lack of outward Gu + current in itself indicated that either Gu + acts as a pore blocker by interacting with a specific binding site in the pore or that Gu + is too large for HcKCR1 to transport (in which case even larger cations-such as fully hydrated K + or Na + -would also be too large, suggesting that partial dehydration may be important for ion transport). We next found that Gu + indeed blocked both inward and outward ion conductance, i.e., the transport of Na + and K + ( Figure 6F, left). Considering the structural similarity between Gu + and the side chain of the arginine, it is possible that D116 serves as a Gu + binding site as R244 interacts with D116 and that Gu + binding to this site (D116) prevents ion flux. This idea was supported by further electrophysiology of the D116N mutant showing that Gu + does not significantly inhibit the inward current remaining in the mutant ( Figure 6F, right), presumably no longer able to bind to D116 just as with the R244 guanidinium moiety.
Proposed mechanism for the high K + permeability ratios of KCRs Regarding the mechanism for high K + permeability ratios of KCRs, we note that under physiological conditions, the concentrations of Na + , Ca 2+ , and Mg 2+ are higher on the extracellular side, while the concentration of K + is higher on the intracellular side. When the KCR is opened by light, fully hydrated Na + approaching from the extracellular side would encounter a large energy barrier at the selectivity filter, mainly formed by the triad N99, W102, and Y222. A K + ion at the triad can form a p-cation interaction with the indole ring of W102 ( Figure 5D), which is more favorable 62-64 for K + than Na + , thus providing a K + -specific energy barrier reduction. It is likely that the interaction energy between hydrated Na + and the triad is insufficient to compensate for the energy barrier (including the dehydration penalty) and that the Na + ions that might enter from the extracellular side would be outcompeted by (1) K + ions from the intracellular side and, if present, (2) hydrated K + ions from the extracellular side. Hydrated Ca 2+ and Mg 2+ , with even larger sizes, energy barriers, and dehydration energies, would be blocked accordingly ( Figure 6G). Of note, monovalent cations from the intracellular side may experience gradual dehydration (possibly initiated by D116 interaction), reducing the number of waters as the selectivity triad is reached. Regardless of ion flux direction, interaction between partially dehydrated K + and the triad is more effective at reducing the energy barrier, accounting for selective K + permeation ( Figure 6G). When the gradient is inverted, Na + from the intracellular side becomes the dominant ion undergoing partial dehydration before reaching the filter. Thus, the free energy provided by the gradient can compensate for sub-optimal Na + -triad interactions ( Figure 6H). Notably, the selectivity triad architecture is dynamic (Video S1). When Y222 moves away from W102, the structure deforms and the energy barrier for ions is reduced, resulting in a transient decrease in selectivity. The mutations in residues surrounding the filter (e.g., F221 or H225) can enhance K + selectivity by stabilizing the filter region ( Figure 6I).
In conclusion, KCRs adopt a distinctive mechanism to specifically favor K + flux, operating under physiological ion balance conditions. This mechanism relies on three key factors, including (1) the extracellular selectivity filter, (2) the intracellular dehydration system, and (3) the high extracellular Na + and intracellular K + present under physiological conditions. The importance of multiple factors is supported by electrophysiology with filter mutants (Figure 6A, middle/right); even under bi-ionic (Na + and K + ) conditions with inverted gradients, WT KCRs maintain weak K + selectivity (E rev for HcKCR1 = 26.2 ± 3.3 mV; HcKCR2 =19.8 ± 5.6 mV). However, disruptions in the selectivity triad lower the energy barrier for ion passage, causing KCRs to function more as non-selective cation channels under reversed-ion conditions (E rev for HcKCR1 Y222A = 11.3 ± 1.0 mV, W102Q = 6.7 ± 1.5 mV; HcKCR2 Y222A = 15 ± 1.4 mV, W102Q = 9.0 ± 0.7 mV). These findings suggest that both the concentration gradient and selectivity filter are critical for proper functioning of KCRs as K + channels.
In vitro and in vivo applications of the KCR variants with enhanced K + selectivity KCRs hold potential as potent inhibitory optogenetic tools for neuroscience. We therefore aimed to design improved inhibitory optogenetic tools for in vitro and in vivo applications, leveraging our structural understanding of enhanced K + selectivity. The H225F mutant exhibited hyperpolarized E rev compared to WT ( Figure 7A; À69.6 ± 1.9 mV vs. À82.0 ± 1.9 mV; p = 0.0004) with only slightly decreased photocurrents ( Figure 7B) and comparable kinetics ( Figure 7C) in cultured neurons. Intriguingly, the action spectrum of the H225F demonstrated reduced blue-and red-shoulders under both one-photon (1P) and two-photon (2P) illumination ( Figure 7D). In slice physiology experiments, we observed efficient inhibition of spiking (Figures 7E and 7F; STAR Methods), consistent with our data from HEK cells (Figure 5B) and cultured neurons ( Figures 7A-7D). Because of these potent loss-of-function properties, we name the H225F mutants of HcKCR1 and 2 as KALI-1 and KALI-2 (K + -selectivity Augmented Light-Gated Ion Channels).
We initially tested KALI properties for inhibitory optogenetics in all-optical physiology. We began evaluation with 1P or 2P illumination in neurons expressing KALI-1 or KALI-2. The blueshifted KALI-2 performed exceptionally in 1P all-optical experiments with red Ca 2+ indicators XCaMP-R and sRGECO ( Figures S7A-S7G), and, unlike eNpHR3.3, showed no rebound activity upon light termination ( Figures S7E and S7F). Moreover, KALI-1 displayed low optical crosstalk (compared with WT) in 2P experiments, highlighting utility with green indicators like GCaMP6m ( Figures S7H-S7M), and improved 2P inhibition of (I)  We also tested KALIs with electrophysiological recording in vivo using Neuropixels probes. 73 Both WT HcKCR1 and KALI-1 showed robust expression in mouse retrosplenial cortex ( Figure S7N). Consistent with our 1P all-optical experiments ( Figures S7A-S7G), KALI-1 inhibited spontaneous spiking more efficiently than WT HcKCR1 or the Cl À pump eNpHR3.3 ( Figures  7I-7L), and unlike eNpHR3.3, KALI-1 showed no rebound activity after light cessation ( Figure 7I). Although exceptionally potent inhibition could sometimes outlast the light intervention by a few seconds, recovery was completed within 3 s after light-off, which is suitable for fast optogenetic behavioral design and interpretation. In cases where even a few seconds of persistent circuit response might be undesirable, reducing light power allowed for instantaneous recovery after light-off ( Figures 7K and 7L). In summary, KALIs provide substantial advantages for inhibitory optogenetics in diverse experimental setups, including two of the most powerful modern approaches: all-optical physiology of intact neural circuitry and high-density recording of neural activity in vivo.

DISCUSSION
KCRs have attracted attention for K + selectivity and spectral properties, which in combination with the strong photocurrents and high light sensitivity of the broader PLCR class 34,40 together suggest exceptional utility for optogenetic silencing. However, even at a basic level, these properties of KCRs had not been understood-including how K + selectivity can be achieved in an asymmetric channel pore-with significance for both fundamental science and biological applications. Here, we have revealed the initial structural and mechanistic underpinnings of these special properties, obtained insights into the emergence of K + selectivity in microbial opsins, and provided structureguided modifications offering opportunities for neuroscience.

Structural principles underlying large spectral shifts
The HcKCR1 and HcKCR2 findings revealed here represent the second and third PLCR family members with high-resolution structures, enabling structural comparison among PLCRs. Many unusual features observed in the structure of ChRmine, the initial structure from the PLCR family, 38,46 are conserved in HcKCR1 and HcKCR2, such as trimeric assembly, short TM3, deformed Schiff base, and large cavities within the monomer (Figures 1, 2, 3, and 4). However, major differences were also noted, including variations in primary counterion and water distribution in the Schiff base region, potentially related to different retinal isomer composition after light absorption. In ChRmine, as with other microbial rhodopsins, all-trans-retinal is isomerized chiefly to 13-cis upon light illumination, 38 while in HcKCR1, the percentages of increased 9-, 11-, and 13-cis are similar ( Figures  S3A and S3B). The 13-cis retinal-bound HcKCR1 likely corresponds to the open state; further studies will be needed to identify function of the 9-and 11-cis photoproducts.

Structural foundations of diversity in selectivity and kinetics
The ECS interaction network is the main difference between HcKCRs and ChRmine. Due to displacements of ECL1 and TM7 ( Figure 1F), three residues (N99, W102, Y222) create the selectivity filter, while F/Y221 and H225 stabilize the tight conformation of this architecture in HcKCRs ( Figure 4C). However, even between HcKCR1 and HcKCR2, the interaction network differs ( Figures 4C and S2O). Mutations at positions D/N18, L/Q211, Q/R218, and F/Y221 alter the ECS ( Figure S1A), possibly contributing to the different P K /P Na of HcKCR1 (25.7 ± 2.7) and HcKCR2 (17.0 ± 1.5).
A recently discovered KCR, WiChR, exhibits a higher K + permeability ratio and different amino acids at positions 18, 210, 211, 218, 221, and 222 (HcKCR1 numbering), suggesting that the ECS interaction network is also different in WiChR and that structural information of WiChR would be valuable in understanding the differences in K + selectivity among KCRs. Further detailed comparisons and insights into filter mechanisms could lead to the development of novel KCRs with improved K + selectivity, given that we have already successfully created HcKCR mutants with P K /P Na values > 50 (e.g., H225F) guided by information from our HcKCR structures ( Figure 5B).
In addition to H225F, we discovered two additional mutations that usefully modulate the properties of HcKCRs: C110T for long-timescale and light-sensitive effects and Y222A for excitatory effects ( Figures 3C, 3D, 5B, S5B, and S6A). The C110T mutation remarkably increased the t off of HcKCRs by over 1500-fold, a surprising result as previous attempts with other PLCRs had failed. The C110T HcKCR variants provide improved capability for prolonged control over neuronal activity at even lower light levels 4,5 ; indeed, the transferability of this mutation 55 may enable more long-t off mutants based on PLCRs. The Y222A mutation, in contrast, does not significantly affect t off but depolarizes E rev by $70 mV, thereby transforming function from inhibitory to excitatory under physiological conditions. The photocurrent amplitude of this mutant is comparable to or higher than that of WT HcKCR ( Figures S5B and S6A), giving rise to a particularly potent excitatory optogenetic tool.
Perspectives on evolution and structure-guided design of K + selectivity Until the present study, all structurally resolved K + channels showed a common tetramer-type assembly for the K + selectivity filter 78 (Figures S1B-S1D). Even the lysosomal ion channel TMEM175, initially reported to be K + -selective 29,66,79 but shown to be more H + -selective under physiological conditions, 80 lacks the canonical K + -selectivity motif but shares the tetrameric assembly pattern. Interestingly, while microbial rhodopsins are known to form diverse oligomeric assemblies, not a single rhodopsin forming a tetramer has yet been reported. 3 This observation suggests that tetrameric assembly may be unstable for microbial rhodopsins, which achieve pore selectivity within each monomer. The orientation of the conserved arginine residue on TM3/ECL1 (R82 in HsBR and R112 in ChRmine) may be important to define channel-vs. pump-type properties, and indeed, replacement of this arginine (R/Q) significantly affected function and ion selectivity of the Na + pump KR2 (Figure S4C). 38,81 In KCRs, this arginine is replaced by tryptophan, and this replacement may be an important step in evolving high K + permeability ratios.
To fully understand the KCR photocycle, further studies including structural determination of intermediate states in HcKCRs will be necessary. In addition, while KCRs serve as potent inhibitory tools, there is room for improvement. For example, the unitary conductance of HcKCR1 is $0.7 pS, 40 still considerably lower than for canonical K + channels (e.g., the unitary conductance of Kv1.1 and Kv1.2 are 8.7-20 and 14-18 pS, respectively 82 ). However, the insights presented here already reveal key mechanisms underlying high K + permeability ratios in KCRs and have enabled molecular engineering of diverse KCR variants with improved functionality, including C110T, Y222A, and H225F.
These findings provide insight into the evolution of solutions to the ancient problem of K + -selectivity and help advance the discovery and application of opsins with distinct ion selectivity. These natural microbial rhodopsins, together with the variants developed in this study, will further diversify and improve optogenetic technologies, creating avenues for basic life science and biomedical research.

Limitations of the study
The structures obtained here represent the dark, non-conducting state of KCRs, making it challenging to determine the exact ion-conducting pathway in the open state. Currently, no open-state structures for any channelrhodopsin have been reported, posing difficulties in constructing accurate homology models. Furthermore, due to the relatively slow channel opening in KCRs (as indicated in Figure 2F), employing MD simulations to calculate the open state is not feasible. Slowly inactivating mutants, such as the C110T variant we described here and in the initial KCR structure discovery report (Tajima et al., 2022), 83 might be beneficial for determining the open-state structure, but even with these variants, it will be essential to achieve maximal open-state occupancy with light irradiation. By utilizing such mutants under suitable conditions or by employing techniques like time-resolved serial femtosecond crystallography (TR-SFX) or time-resolved cryo-EM, we might gain insights into the open-state structure of KCRs. 36 Compared to WT KCRs, KALIs exhibit higher K + selectivity ( Figures 5B and 7A) and reduced optical crosstalk when combined with red Ca 2+ indicators ( Figures 7G and 7H). But while our MD simulations provided insight into the structural basis for enhanced K + selectivity ( Figures 5C-5F), the finding of reduced optical crosstalk was largely serendipitous and remains unexplored mechanistically; the difference in action spectra between WT and KALI may contribute ( Figure 7D) but seems un-likely to serve as a complete explanation. Further studies, including detailed spectroscopic analyses of intermediates in the photocycle, will elucidate the precise reasons for this improvement.

STAR+METHODS
Detailed methods are provided in the online version of this paper and include the following:

DECLARATION OF INTERESTS
The KCR variants are described in pending patent application material; these tools and all methods, protocols, clones, and sequences are freely available to nonprofit institutions and investigators.

Lead contact
Further information and requests for resources and reagents should be directed to and will be fulfilled by the Lead Contact, Karl Deisseroth (deissero@stanford.edu).

Materials availability
Plasmids and viruses detailed in this manuscript are freely available for academic use upon request to the corresponding authors.
Data and code availability d The raw images of HcKCR1 WT, HcKCR2 WT, and HcKCR1 H225F mutant after motion correction has been deposited in the Electron Microscopy Public Image Archive under accession EMPIAR-11558. d The cryo-EM density map and atomic coordinates for HcKCR1 WT, HcKCR2 WT, and HcKCR1 H225F mutant have been deposited in the Electron Microscopy DataBank and PDB, under accessions EMD-34530, 34531, and 35713, and 8H86, 8H87, and 8IU0, respectively. d All other data are available upon request to the corresponding authors.

EXPERIMENTAL MODEL AND STUDY PARTICIPANT DETAILS
Insect cell culture Spodoptera frugiperda (Sf9) cells (Expression systems, authenticated by the vendor) were cultured in ESF921 medium (Expression systems) at 27.5 C with 130 rpm in an Innova S44i R shaking incubator (Eppendorf). Primary neuron and HEK293 cell culture Primary cultured hippocampal neurons were obtained from P0 Sprague-Dawley rat pups (Charles River) and isolated from CA1 and CA3 regions. The tissues were digested with 0.4 mg/mL papain (Worthington) and seeded onto glass coverslips coated with 1:30 Matrigel (Becton Dickinson Labware). The cultures were maintained in a 5% CO2 humid incubator using Neurobasal-A media (Thermo Fisher) supplemented with 1.25% FBS (HyClone), 4% B-27 supplement (Gibco), 2mM Glutamax (Gibco), and 2 mg/mL fluorodeoxyuridine (FUDR, Sigma). Neurons were grown on coverslips in a 24-well plate at a density of 65,000 cells per well. HEK293FT cells (Thermo Fisher, authenticated by the vendor) were maintained in a 5% CO 2 humid incubator with DMEM media (GIBCO) supplemented with 10% FBS (Invitrogen), and 1% Penicillin-Streptomycin (Invitrogen), and were enzymatically passaged at 90% confluence by trypsinization.

Animals used for surgeries
All mouse experiments conformed to guidelines established by the National Institutes of Health and were conducted under protocols approved by the Stanford Administrative Panel on Laboratory Animal Care. All mice were group-housed in a light-regulated colony room (lights on at 07:00, off at 19:00), with food and water available ad libitum. Both male and female mice 4-20 weeks of age were used for all studies.

METHOD DETAILS
Cloning, protein expression, and purification of HcKCR1 WT, HcKCR2 WT, and HcKCR1 H225F mutant Wild-type HcKCR1 (M1-S265) was modified to include an N-terminal influenza hemagglutinin (HA) signal sequence and FLAG tag epitope, and C-terminal enhanced green fluorescent protein (eGFP), followed by 10 3 histidine (His) and Rho1D4 epitope tags; the N-terminal and C-terminal tags are removable by human rhinovirus 3C (HRV3C) protease cleavage. Wild-type HcKCR2 (M1-D265) was modified to include C-terminal Kir2.1 membrane targeting sequence, HRV3C protease cleavage sequence, eGFP, and 8 3 His tag. HcKCR1 H225F mutant was designed by QuikChange site-directed mutagenesis method based on the HcKCR1 WT construct.
The constructs were expressed in Spodoptera frugiperda (Sf9) insect cells using the pFastBac baculovirus system. Sf9 insect cells were grown in suspension to a density of 3.0 3 10 6 cells ml À1 , infected with baculovirus and shaken at 27.5 C for 24 h. All-trans retinal (ATR) (Sigma-Aldrich) is supplemented to a final concentration of 10 mM in the culture medium 24 h after the infection. The cell pellets were lysed with a hypotonic lysis buffer (20 mM HEPES-NaOH pH 7.5, 20 mM NaCl, 10 mM MgCl 2 , 1 mM benzamidine, 1 mg mL À1 leupeptin, 10 mM ATR), and cell pellets were collected by centrifugation at 10,000 3g for 30 min. The above process was repeated twice; then, cell pellets were disrupted by homogenizing with a glass Dounce homogenizer in a hypertonic lysis buffer (20 mM HEPES-NaOH pH 7.5, 1 M NaCl, 10 mM MgCl 2 , 1 mM benzamidine, 1 mg mL À1 leupeptin, 10 mM ATR), and crude membrane fraction was collected by ultracentrifugation (45Ti rotor, 125,000 3g for 1 h). The above process was repeated twice; then, the membrane fraction was homogenized with a glass douncer in a membrane storage buffer (20 mM HEPES-NaOH pH 7.5, 500 mM NaCl, 10 mM imidazole, 20% glycerol, 1 mM benzamidine, 1 mg mL À1 leupeptin), flash frozen in liquid nitrogen, and stored at À80 C until use.

Preparation of membrane scaffold protein
Membrane scaffold protein (MSP1E3D1) is expressed and purified as described earlier 91 with the following modifications. Briefly, MSP1E3D1 gene in pET-43a(+) was transformed in Escherichia coli (E. coli) BL21 (DE3) cells. Cells were grown at 37 C with shaking to an OD 600 of 0.5-1.0, and then expression of MSP1E3D1 was induced by addition of 1 mM IPTG. Cells were further grown for at 37 C for 4 h, and cells were harvested by centrifugation. Cell pellets were resuspended in PBS (À) buffer supplemented with 1% Triton X-100 and protease inhibitors and were lysed by sonication. The lysate was centrifuged at 30,0003g for 30 min, and the supernatant was loaded onto a Ni-NTA column equilibrated with lysis buffer, followed by washing with 4 column volumes of wash buffer-1 (40 mM HEPES-NaOH pH 7.5, 300 mM NaCl, 1% Triton X-100), 4 column volumes of wash buffer-2 (40 mM HEPES-NaOH pH 7.5, 300 mM NaCl, 50 mM sodium cholate), 4 column volumes of wash buffer-3 (40 mM HEPES-NaOH pH 7.5, 300 mM NaCl), 4 column volumes of wash buffer-4 (40 mM HEPES-NaOH pH 7.5, 300 mM NaCl, 20 mM imidazole), and eluted with wash buffer-4 containing 300 mM imidazole. The eluted MSP1E3D1 was dialyzed in buffer containing 10 mM HEPES-NaOH pH 7.5, 100 mM NaCl, and concentrated to approximately 10 mg mL À1 using an Amicon ultra 10 kDa molecular weight cutoff centrifugal filter unit (Merck Millipore). The concentrated samples were ultracentrifuged (TLA 55 rotor, 71,680 3g for 30 min), and stored at À80 C after flash freezing in liquid nitrogen. The concentration was determined by absorbance at 280 nm (extinction coefficient = 29,910 M À1 cm À1 ) measured by NanoDrop 2000c spectrophotometer (Thermo scientific).
Nanodisc reconstitution of HcKCR1 WT, HcKCR2 WT, and HcKCR1 H225F mutant Prior to nanodisc reconstitution, 30 mg SoyPC (Sigma P3644-25G) was dissolved in 500 mL chloroform and dried using a nitrogen stream to form a lipid film. The residual chloroform was further removed by overnight vacuum desiccation. Lipid films were rehydrated in buffer containing 1% DDM, 20 mM HEPES-NaOH pH 7.5, 100mM NaCl, resulting in a clear 10 mM lipid stock solution.
HcKCR1 WT was reconstituted into nanodiscs formed by the scaffold protein MSP1E3D1 and SoyPC at a molar ratio of 1:4:400 (monomer ratio: HcKCR WT, MSP1E3D1, SoyPC). First, freshly purified HcKCR1 WT in DDM SEC buffer (0.03% DDM, 20 mM HEPES-NaOH pH 7.5,100 mM NaCl) was mixed with SoyPC and incubated on ice for 20 min. Purified MSP1E3D1 was then added to mess up to total solution volume of 750 mL, and gently mixed on rotator at 4 C for 10 min. Final concentrations were 14.5 mM HcKCR1 WT, 58.2 mM MSP1E3D1, and 5.8 mM SoyPC, respectively. Detergents were removed by stepwise addition of Bio-Beads SM2 (Bio-Rad). Prior to use, Bio-Beads were washed by sonication in methanol, water, and buffer containing 20 mM HEPES-NaOH pH7.5,100 mM NaCl with an ultrasonic bath sonicator and weighed after liquid was removed by a P1000 tip. As the first batch, 100 mg Bio-Beads (final concentration of 133 mg mL À1 ) was added, and the mixture was gently rotated at 4 C for 12 h. The second batch of Bio-Beads (equal amount) was added and further rotated at 4 C for 2.5 h. The Bio-Beads were removed by passage through a PolyPrep column (Bio-Spin column, Bio-Rad), and the lysate was ultracentrifuged (TLA 55 rotor, 71,680 3g for 30 min) before size-exclusion chromatography on a Superdex 200 Increase 10/300 GL column (Cytiva), equilibrated in buffer containing 20 mM HEPES-NaOH pH7.5, 100 mM NaCl. The peak fractions were collected and concentrated to approximately 6 mg mL À1 estimated based on the absorbance (A 280) value of 16, using an Amicon ultra 50 kDa molecular weight cutoff centrifugal filter unit (Merck Millipore).
HcKCR2 WT was reconstituted into nanodiscs basically in the same manner as HcKCR1 WT. In brief, HcKCR2 WT, MSP1E3D1 and SoyPC were mixed at a molar ratio of 1:4:100, with the final concentration of 41 mM, 164 mM, and 4.1 mM, respectively. The total solution volume was 750 mL. Detergents were removed by stepwise addition of Bio-Beads SM2 (Bio-Rad). The first Bio-Beads batch amount was 25 mg. After rotation at 4 C for 12 h, 40 mg of fresh Bio-Beads were added every 12 h, twice in total. HcKCR2 WT in a nanodisc was purified through size-exclusion chromatography and concentrated to approximately 12 mg mL À1 estimated based on the absorbance (A 280) value of 30, using an Amicon ultra 50 kDa molecular weight cutoff centrifugal filter unit (Merck Millipore).
For the HcKCR1 H225F mutant, sodium was replaced with potassium for all steps of the purification. HcKCR1 H225F, MSP1E3D1 and SoyPC were mixed at a molar ratio of 1:4:50, with the final concentration of 29 mM, 117 mM, and 1.5 mM, respectively. The total solution volume was 750 mL. Detergents were removed by stepwise addition of Bio-Beads SM2 (Bio-Rad). The first Bio-Beads batch amount was 25 mg. After rotation at 4 C for 12 h, 40 mg of fresh Bio-Beads were added every 12 h, twice in total. HcKCR1 H225F mutant in a nanodisc was purified through size-exclusion chromatography and concentrated to approximately 10 mg mL À1 estimated based on the absorbance (A 280) value of 24, using an Amicon ultra 50 kDa molecular weight cutoff centrifugal filter unit (Merck Millipore).
Cryo-EM grid preparation of nanodisc-reconstituted HcKCR1 WT, HcKCR2 WT, and HcKCR1 H225F mutant Prior to grid preparation, the sample was centrifuged at 20,380 3g for 30 min at 4 C. The grids were glow-discharged with a PIB-10 plasma ion bombarder (Vacuum Device) at approximately 10 mA current with the dial setting of 2 min for both sides. 3 mL of protein solution was applied to freshly glow-discharged Quantifoil R1.2/1.3 Au 300 mesh holey carbon grid in dark room with dim red light. Samples were vitrified by plunging into liquid ethane cooled by liquid nitrogen with a FEI Vitrobot Mark IV (Thermo Fisher Scientific) at 4 C with 100% humidity. The blotting force was set as 10. The waiting and blotting time were 10 s and 4 s, respectively. All grid preparations were performed under dim red-light conditions.
Cryo-EM data acquisition and image processing of HcKCR1 WT Cryo-EM images were acquired under operation at an accelerating voltage of 300 kV on a Krios G3i microscope (Thermo Fisher Scientific) equipped with a Gatan BioQuantum energy filter and a K3 direct detection camera in the electron counting mode. The movie dataset was collected in standard mode, using a nine-hole image shift strategy in the SerialEM software, 84 with a nominal defocus range of À0.8 to À1.6 mm. The 5,445 movies were acquired at a dose rate of 14.313 e À /pixel/s, at a pixel size of 0.83 Å and a total dose of 48 e À /Å 2 .
The data processing was performed using the cryoSPARC v3.2.0 software platform. 92 The collected 5,445 movies were subjected to Patch motion correction and Patch CTF estimation in cryoSPARC. Initial particles were picked from all micrographs using Blob picker and were extracted using a box size of 280 pixels. 407,781 particles were selected after 2D classification from 2,439,182 particles. The following Ab-initio reconstruction, Heterogeneous refinement, and Non-uniform refinement 93 enabled us to reconstruct the 2.92 Å map (C1 symmetry) with 130,130 particles. Further particles were picked by Template picker and Topaz picker 94 and subjected to 2D classification followed by Heterogeneous refinement. Non-uniform refinement after removing of the duplicated particles enable us to obtain 2.60 Å map (C3 symmetry) with 917,464 particles. The subsequent 2D classification, global CTF refinement, 95 and non-uniform refinement yielded the final map at a global resolution of 2.58 Å . Note that following our initial report, 83 the second and third HcKCR1 structures were determined in detergent (3.17-3.35 Å ) 96 and peptidiscs (2.88 Å ), 97 respectively, suggesting that HcKCR1 can tolerate a wide range of membrane/lipid environments for structural studies.
Cryo-EM data acquisition and image processing of HcKCR2 WT Cryo-EM images were acquired under operation at an accelerating voltage of 300 kV on a Krios G4 microscope (Thermo Fisher Scientific) equipped with a Gatan BioQuantum energy filter and a K3 direct detection camera in the electron counting mode. The movie dataset was collected in standard mode, using the fringe-free imaging (FFI) and aberration-free image shift (AFIS) strategy in the EPU software (Thermo Fisher Scientific), with a nominal defocus range of À0.6 to À1.6 mm. The 7,718 movies were acquired at a dose rate of 17.5 e À /pixel/s, at a pixel size of 0.83 Å and a total dose of 51 e À /Å 2 .
The data processing was performed using the cryoSPARC v3.3.2 software platform. The collected 7,718 movies were subjected to Patch motion correction and Patch CTF estimation in cryoSPARC. Particles were picked from all micrographs by Blob picker, Template picker, and Topaz picker, resulted in 3,382,955 particles, 5,852,598 particles, and 2,844,575 particles, respectively. These particle subsets were subjected to 2D classification and subsequent Heterogeneous refinement. The particles in the best classes were 508,364 particles for the Blob picker, 777,572 particles for the Template picker, and 519,445 particles for the Topaz picker, respectively. After removal of duplicates, 1,243,623 particles were selected and subjected to Non-uniform refinement, resulting in a 2.66 Å map (C3 symmetry). The additional Heterogeneous refinement, Non-uniform refinement, Local motion correction, 98 and another Non-uniform refinement along with defocus refinement and global CTF refinement yielded the final map at a global resolution of 2.53 Å .
Cryo-EM data acquisition and image processing of HcKCR1 H225F mutant Cryo-EM images were acquired at 300 kV on a Krios G3i microscope (Thermo Fisher Scientific) equipped with a Gatan BioQuantum energy filter and a K3 direct detection camera in the electron counting mode. The movie dataset was collected in standard mode, using the fringe-free imaging (FFI) and aberration-free image shift (AFIS) strategy in the EPU software (Thermo Fisher Scientific), with a nominal defocus range of À0.8 to À1.6 mm. The 6,654 movies were acquired at a dose rate of 14.2 e À /pixel/s, at a pixel size of 0.83 Å and a total dose of 48 e À /Å 2 .
The data processing was performed using the cryoSPARC v4.0.0 software platform. The collected 6,654 movies were subjected to Patch motion correction and Patch CTF estimation in cryoSPARC. Particles were picked from all micrographs by Template picker, and Topaz picker, resulting in 4,599,946 particles, and 762,851 particles, respectively. These particle subsets were subjected to 2D classification and subsequent Heterogeneous refinement. The best classes contained 745,810 particles for the Template picker, and 236,191 for the Topaz picker, respectively. After removal of duplicates, 896,040 particles were selected and subjected to Non-uniform refinement with iterative CTF refinement, resulting in a 2.83 Å map (C3 symmetry).
The particles were transferred to RELION 4.0 and were subjected to masked 3D classification without alignment. Selected 180,294 particles were transferred back to cryoSPARC and the additional Non-uniform refinement yielded the final map at a global resolution of 2.66 Å .

Model building and refinement
Initial models of HcKCR1 WT and HcKCR2 WT were formed by rigid body fitting of the predicted models of HcKCR1 WT and HcKCR2 WT, respectively, generated using locally installed AlphaFold2. 99 This starting model was then subjected to iterative rounds of manual and automated refinement in Coot 89 and Refmac5 100 in Servalcat pipeline, 90 respectively. The Refmac5 refinement was performed with the constraint of C3 symmetry. The initial model for HcKCR1 H225F mutant was the refined model of HcKCR1 WT.
The final model was visually inspected for general fit to the map, and geometry was further evaluated using Molprobity. 101 The final refinement statistics are summarized in Table S1. All molecular graphics figures were prepared with UCSF Chimera, 87 UCSF Chi-meraX, 88 CueMol2 (http://www.cuemol.org), and PyMOL. 102

Pore analysis
The ion-conducting pore pathways were calculated by the software HOLLOW 1.3 with a grid-spacing of 1.0 Å 103

Measurement of UV absorption spectra and pH titration
To investigate the pH dependence of the absorption spectra of HcKCR1 and HcKCR2, 10 mg mL À1 purified protein solution was 100-fold diluted in buffer containing 0.05% DDM, 100 mM NaCl, and 100 mM of either citric acid pH 2.2, citric acid pH 3.0, sodium acetate pH 4.0, sodium citrate pH 5.0, sodium cacodylate pH 6.0, HEPES-NaOH pH 7.0, Tris-HCl pH 8.0, N-cyclohexyl-2-aminoethanesulfonic acid (CHES) pH 9.0, 3-(cyclohexylamino)-1-propanesulfonic acid (CAPS) pH 10.0, or CAPS pH 11.0. The StockOptions pH Buffer Kit (Hampton research) was used for buffer preparation except for CHES pH 9.0 (Nacalai). The absorption spectra were measured with a V-750 UV-visible spectrometer (JASCO) at room temperature. averaged and served for the following analyses. Using the simplex method of nonlinear least-squares (IgorPro 9, WaveMetrics, Portland, OR), the kinetics of photocurrent were fitted by a triple-exponential function.

ATR-FTIR spectroscopy
Ion binding to HcKCR1 WT was monitored by ATR-FTIR spectroscopy as described previously, 59,109-112 except for some minor modifications for reconstitution into the membrane. In ATR-FTIR spectroscopy, rhodopsins are normally reconstituted into lipids for forming a film on the ATR-prism. Thus, sample was reconstituted with a protein-to-lipid (asolectin; Sigma-Aldrich) molar ratio of 1:20, by removing the n-dodecyl-b-D-maltoside (DDM) with Bio-Beads SM-2 (Bio-Rad) at 4 C in dark condition. The HcKCR1 WT sample in asolectin liposomes was washed repeatedly with a buffer containing 2 mM K 2 HPO 4 /KH 2 PO 4 (pH 7.5) and collected by ultracentrifuging for 20 min at 222,000 x g at 4 C in dark condition. The lipid-reconstituted HcKCR1 WT was placed on the surface of a silicon ATR crystal (Smiths, three internal total reflections) and naturally dried. The sample was then rehydrated with the buffer at a flow rate of 0.6 mL min À1 , and temperature was maintained at 20 C by circulating water. The perfusion buffer is composed of 200 mM NaCl, 200 mM Tris-HCl, pH 7.5 (buffer A) and 200 mM KCl,pH 7.5 (buffer B). In the case of anion binding experiments, the perfusion buffer was replaced with 200 mM NaCl, 20 mM HEPES-NaOH, pH 7.5 (buffer A) and 200 mM NaBr, 20 mM HEPES-NaOH, pH 7.5 (buffer B), respectively.
ATR-FTIR spectra were recorded in kinetics mode at 2 cm À1 resolution, renge of 4000-700 cm À1 using an FTIR spectrometer (Agilent) equipped with a liquid nitrogen-cooled mercury-cadmium-telluride (MCT) detector (an average of 1710 interferograms per 15 min). Ion binding-induced difference spectra were measured by exchanging the buffer A and buffer B. The cycling procedure is shown in Figure S3G, and the difference spectra were calculated as the averaged spectra in buffer B minus buffer A. The absorption of unbound salt and the water vapor absorption were subtracted from the raw spectra for spectral correction. The drift of baseline caused by protein swelling/shrinkage was also subtracted in order to obtain the final spectra. 110 Light-induced structural changes of HcKCR1 WT were also measured by ATR-FTIR as shown in Figure S3G. Since ATR-FTIR experimental setup has been optimized for ion perfusion-induced difference spectroscopy using a solution exchange system, we have modified experimental setup that enables light irradiation experiment. A light source was installed above the ATR prism. In addition, an optical filter and a condenser lens were placed directly under the light source. To obtain the ion binding-induced difference spectra under the light illumination condition, light minus dark difference spectra under perfusing the different solution between buffer A and buffer B was subtracted each other. The absorption of unbound salt and the water vapor absorption were subtracted from the raw spectra for spectral correction. The drift of baseline caused by protein swelling/shrinkage was also subtracted in order to obtain the final spectra. 110 Protein expression, and purification of KR2 KR2 is expressed and purified as described earlier 113 with the following modifications. Briefly, KR2 gene in pET-43a(+) was transformed in E. coli C41 (DE3) cells. Cells were grown at 37 C with shaking to an OD 600 of 0.5-1.0, and then expression of KR2 was induced by addition of 0.5 mM IPTG and supplemented with 10 mM ATR (Sigma). Cells were further grown for at 37 C for 2.5 h, and cells were harvested by centrifugation. Cell pellets were lysed by sonication with a hypotonic lysis buffer (20 mM HEPES-NaOH pH 7.5, 20 mM NaCl, 10 mM MgCl 2 , 0.1 mM PMSF), and membrane fraction was collected by ultracentrifugation (45Ti rotor, 125,000 3g for 1 h). The membrane fraction was homogenized with a glass douncer in a membrane storage buffer (20 mM HEPES-NaOH pH 7.5, 500 mM NaCl, 10 mM imidazole, 20% glycerol, 0.1 mM PMSF), flash frozen in liquid nitrogen, and stored at À80 C until use.
The eluted KR2 was dialyzed in buffer containing 20 mM HEPES-NaOH pH 7.5, 300 mM NaCl, and concentrated to approximately 5 mg mL À1 using an Amicon ultra 100 kDa molecular weight cutoff centrifugal filter unit (Merck Millipore). The concentrated samples were ultracentrifuged (TLA 55 rotor, 71,680 3g for 30 min) before size-exclusion chromatography on a Superdex 200 Increase 10/300 GL column (Cytiva), equilibrated in DDM SEC buffer (0.03% DDM, 20 mM HEPES-NaOH pH 7.5, 300 mM NaCl). The peak fractions of the protein were collected and concentrated to approximately 10 mg mL À1 and stored at À80 C after flash freezing in liquid nitrogen. The concentration was determined by absorbance at 280 nm measured by NanoDrop 2000c spectrophotometer (Thermo-scientific).

Analysis of protein thermal stability using FSEC-TS
The fluorescence-detection size-exclusion-chromatography-based thermostability (FSEC-TS) assay 60 was performed to evaluate ion binding to proteins. In this assay, the types of ions in the sample solution were varied and heated to various temperatures, and the thermal stability was evaluated by the decay in peak intensity of the SEC profile.
Purified samples of HcKCR1 WT and KR2 were treated with ions by dialysis (buffer: 0.03% DDM, 20 mM Tris-HCl (pH 8.0), and either 100 mM NaCl, KCl, or CsCl, respectively). Purified HcKCR1 WT and KR2 protein at 0.1 mg mL À1 were separated into 60 mL aliquots in PCR tubes, heated at a range of temperatures from 20 C to 95 C for 15 min, and centrifuged at 20,380 g for 15 min. Then, 20 mL of the supernatant was loaded onto a TSKgel 3000 SW XL column (TOSOH bioscience) equipped with Prominence (Shimadzu), pre-equilibrated with DDM SEC buffer (0.03% DDM, 100 mM NaCl, 20 mM HEPES pH 7.5), and run at a flow rate of 0.6 mL min À1 . The experiment was performed in triplicate. The peak heights of 280 nm absorbance were normalized to that from samples incubated at 4 C, and the data were fit to a 4-parameter logistic curve using the GraphPad Prism software.

Microscale thermophoresis (MST)
Microscale thermophoresis experiments were performed on a NanoTemper Monolith (NanoTemper Technologies). C-terminal His 6tagged KR2 was purified through size exclusion chromatography in a final buffer containing 0.03% DDM, 100 mM NaCl, and 20 mM HEPES-NaOH pH 7.5. The final buffer of HcKCR1 WT with C-terminal His 10 tag contained 0.03% DDM, 100 mM KCl, and 20 mM HEPES-KOH pH 7.5. The sample was labeled according to manufacturer instructions with RED-tris-NTA second-generation dye (NanoTemper Technologies). The concentration of protein was constant at 200 nM; For KR2 and HcKCR1 WT, either NaCl or KCl was added, respectively, in a 2-fold serial dilution at a final concentration ranging from 7.81 mM to 1 M, with 20 mM HEPES (pH 7.5) and 0.03% DDM. After 1 h incubation at room temperature, the samples were centrifuged (20,380 3 g, 10 min) to remove the denatured proteins and incubated for 30 min at room temperature. Thermophoresis was measured at 25 C with an excitation power of 20% and an MST power of 40%. Measurement protocol times were as follows: fluorescence before 3 s, 20 s MST, and 1 s after MST. The thermophoresis measurements were performed three times. Reported K D values were calculated with GraphPad Prism software.
In vitro electrophysiology in HEK293 cells Cells and devices for the measurement were prepared as described previously. 38 Briefly, HEK293 cells (Thermo Fisher Scientific) expressing opsins were placed in an extracellular Tyrode medium (150 mM NaCl, 4 mM KCl, 2 mM CaCl 2 , 2 mM MgCl 2 , 10 mM HEPES pH 7.4, and 10 mM glucose). Borosilicate pipettes (Harvard Apparatus, with resistance of 4-6 mOhm) were filled with intracellular medium (140 mM potassium-gluconate, 10 mM EGTA, 2 mM MgCl 2 and 10 mM HEPES pH 7.2). After break-in, cells were held for at least 5 min before recording to ensure cell health and stability of the recording. Light was delivered with the Lumencor Spectra X Light engine with 470 nm and 560 nm filters for blue and orange light delivery, respectively. Light stimulation was for 1 s, with 1.0 mW/mm 2 light power density, and all recordings were performed in triplicate to ensure stable and reproducible data. Recordings were randomized in order across conditions to counterbalance for unknown variables.
To estimate reversal potentials (E rev ), cells were voltage clamped at À86 mV, and stepped to test voltages from À96 mV to +4 mV with 10 mV spacing (after liquid junction potential correction). Light stimuli were introduced after 1 s of holding voltage change, followed by a 1-s dark period while maintaining the stepped voltage value. Between each sweep, a 30-s dark period was imposed to prevent opsin desensitization. E rev for each cell was extrapolated from an I-V curve generated from each recording. For channel kinetics and photocurrent amplitude estimation, to generate large driving forces and thus currents suitable for biophysical quantification, cells were stepped to potentials 70 mV more depolarized than E rev, except for variants with E rev close to 0 mV (the 'excitatory' variants Y222A and W102Q) which were stepped 70 mV more hyperpolarized than E rev . Inhibitory variants were held at 0 mV (except Y222F at +20 mV and excitatory variants Y222A and W102Q at À70 mV to optimize current property detection and analysis).
Data were analyzed in Clampfit software (Axon Instruments) after smoothening using a lowpass Gaussian filter with a À3 dB cutoff for signal attenuation and noise reduction at 1,000 Hz. Liquid junction potentials were corrected using the Clampex built-in liquid junction potential calculator as previously described. 38 The relative ion permeability of sodium and potassium (P K /P Na ) was calculated using the Goldman-Hodgkin-Katz equation, with T = 298K, P Cl = 0, F = 96485 C/mol and R = 8.314 J/K,mol.
Statistical analysis was performed with one-way ANOVA and the Kruskal-Wallis test for non-parametric data, using Prism 7 (GraphPad) software. Data collection across opsins was randomized and distributed to minimize across-group differences in expression time, room temperature, and related experimental factors.
Ion selectivity testing in HEK293 cells HEK293 cells and devices for the measurement were prepared as described in the previous section. For the high sodium extracellular/high potassium intracellular condition, we used sodium bath solution containing 150 mM NaCl, 2 mM CaCl 2 , 2 mM MgCl 2 , 10 mM HEPES pH 7.3 with 10 mM glucose, along with potassium pipette solution containing 150 mM KCl, 2 mM CaCl 2 , 2 mM MgCl 2 , 10mM HEPES pH 7.3, and 10 mM glucose. For the high potassium extracellular/high sodium intracellular condition, NaCl and KCl concentrations were reversed, and all other ionic concentrations were kept constant. Reversal potentials were then recorded using with the same experimental procedure of in vitro HEK293 patching using standard extracellular and intracellular solutions; holding voltage started from À120 mV for Na + extra/K + intra experiments and À30 mV for K + extra/Na + intra experiments, to span relevant voltage ranges given the ion balance present. Liquid junction potentials were corrected using the Clampex built-in liquid junction potential calculator, which was calculated as 4.2 mV in this experiment.
For sodium extracellular/potassium intracellular condition, equilibrium potentials were measured by holding membrane potentials from À120 mV to +20 mV in steps of 10 mV (before LJP correction). for potassium extracellular/sodium intracellular, equilibrium potentials were measured by holding from À30 mV to 100 mV (before LJP correction) in 10 mV steps. The relative ion permeability of sodium and potassium (P K /P Na ) was calculated using the Goldman-Hodgkin-Katz equation as stated above.
To test intracellular guanidinium blockage, an intracellular buffer containing 150 mM GuHCl, 2 mM CaCl 2 , 2 mM MgCl 2 , 10 mM HEPES pH 7.3, and 10 mM glucose was used with a typical high sodium extracellular buffer. To test extracellular Cs + or Li + , extracellular buffers with 150 mM CsCl or LiCl with 10 mM HEPES pH 7.3, 2 mM CaCl 2 , 2 mM MgCl 2 with 10 mM glucose were used with a regular high K + intracellular buffer. Experiments were conducted using the same procedure as Na + extra/K + intra experiments.
Statistical analysis was performed with one-way ANOVA and the Kruskal-Wallis test for non-parametric data, using Prism 7 (GraphPad) software. Data collection across opsins was randomized and distributed to minimize across-group differences in expression time, room temperature, and related experimental factors.

System setup for molecular dynamics simulations
We performed two sets of MD simulations: (1) to study the selectivity filter and (2) to study the interaction of potassium ions with D116. To study the selectivity filter, we simulated the HcKCR1 WT as well as the H225F, and H225A mutants. The WT and H225F simulations were initiated using the structures reported in this manuscript and the H225A structure was modeled by removing the appropriate atoms from the WT structure. To study the interaction of potassium ions with D116, we simulated HcKCR1 WT and the D116N mutant. The WT simulations were initiated from an earlier refinement of the structure reported here which has no substantial differences in the intracellular side of the protein and the D116N mutant was modeled such that the positions of all the common atoms were retained. In this set of simulations, to study the exit pathway of ions from the channel, we placed a K + in both the intracellular and extracellular vestibules near D116 and D205, respectively. For the first set of simulations, we performed six independent replicates for each simulation condition, and for the second set of simulations, we performed three independent replicates for each simulation condition, each 500 ns in length. For each simulation, initial atom velocities were assigned randomly and independently.
The structures were aligned to the Orientations of Proteins in Membranes 114 entry for PDB accession code: 1M0L 115 (bacteriorhodopsin). Prime (Schrö dinger) 116 was used to model missing side chains, and to add capping groups to protein chain termini. The Crosslink Proteins tool (Schrö dinger) was used to model unresolved portions of ECL2, ICL3, and ECL3. Parameters for the ligands were generated using the Paramchem webserver. 117,118 Only in the second set of simulations, Dowser software was used to add waters to cavities within the protein structure. 119 Six POPC lipids were modeled in the center of the trimer; three in the extracellular leaflet and three in the intracellular leaflet. Protonation states of all titratable residues were assigned at pH 7. Histidine residues were modeled as neutral, with a hydrogen atom bound to either the delta or epsilon nitrogen depending on which tautomeric state optimized the local hydrogen-bonding network. Using Dabble, 120 the prepared protein structures were inserted into a pre-equilibrated palmitoyl-oleoyl-phosphatidylcholine (POPC) bilayer, the system was solvated, and sodium, potassium, and chloride ions were added to neutralize the system. In the first set of simulations, sodium, potassium, and chloride were added to obtain final concentrations of 75 mM, 75 mM, and 150 mM, respectively and, in the second set of simulations, potassium and chloride were added to obtain a final concentration of 150 mM each. The final systems comprised approximately 101,000 atoms, and system dimensions were approximately 105 3 105 3 95 Å .

Molecular dynamics simulation and analysis protocols
We used the CHARMM36m force field for proteins, the CHARMM36 force field for lipids and ions, and the TIP3P model for waters. [121][122][123] Retinal parameters were obtained through personal communication with Scott Feller. 124 The first set of simulations were performed using the Compute Unified Device Architecture (CUDA) version of particle-mesh Ewald molecular dynamics (PMEMD) in AMBER20 125 on graphics processing units (GPUs) and the second set of simulations were performed using AMBER18.
Systems were first minimized using three rounds of minimization, each consisting of 500 cycles of steepest descent followed by 500 cycles of conjugate gradient optimization. 10.0 and 5.0 kcal mol À1 Å À2 harmonic restraints were applied to protein, lipids, and ligand for the first and second rounds of minimization, respectively. 1 kcal mol À1 Å À2 harmonic restraints were applied to protein and ligand for the third round of minimization. Systems were then heated from 0 K to 100 K in the NVT ensemble over 12.5 ps and then from 100 K to 298 K in the NPT ensemble over 125 ps, using 10.0 kcal mol À1 Å À2 harmonic restraints applied to protein and ligand heavy atoms. Subsequently, systems were equilibrated at 298 K and 1 bar in the NPT ensemble, with harmonic restraints on the protein and ligand non-hydrogen atoms tapered off by 1.0 kcal mol À1 ,Å À2 starting at 5.0 kcal mol À1 ,Å À2 in a stepwise fashion every 2 ns for 10 ns, and then by 0.1 kcal mol À1 ,Å À2 every 2 ns for 20 ns. Production simulations were performed without restraints at 310 K and 1 bar in the NPT ensemble using the Langevin thermostat and the Monte Carlo barostat, and using a timestep of 4.0 fs with hydrogen mass repartitioning. 126 Bond lengths were constrained using the SHAKE algorithm. 127 Non-bonded interactions were cut off at 9.0 Å , and long-range electrostatic interactions were calculated using the particle-mesh Ewald (PME) method with an Ewald coefficient of approximately 0.31 Å , and 4th order B-splines. The PME grid size was chosen such that the width of a grid cell was approximately 1 Å . Trajectory frames were saved every 200 ps during the production simulations.
To obtain a putative ion conduction pathway, we performed simulations with an artificial force applied to potassium ions pulling them from the solvent into the extracellular vestibule. In these simulations, the same equilibration protocol was performed, followed by 8 ns of unbiased simulation. A potassium ion was then pulled in line with the protein by applying a potential in the plane of the Figure S1. Comparisons of sequence, topology, and assembly, related to Figure 1