Researchers probed the transit of cations across a nanopore membrane for the generation of osmotic energy. The team controlled the passage of cations across the membrane using a voltage applied to a gate electrode. This control allowed the cation-selective transport to be tuned from essentially zero to complete cation selectivity. The findings are expected to support the application of blue energy solutions for sustainable energy alternatives worldwide.