Here, a procedure to selectively activate a neuronal protein with a short pulse of light by genetically encoding a photo-reactive unnatural amino acid into a target neuronal protein expressed in neurons in culture or in vivo is presented.