Surface-enhanced Raman scattering captures conformational changes of single photoactive yellow protein molecules under photoexcitation.