Bridging Structure and Dynamics at the Nanoscale through Optogenetics and Electrical Stimulation