a Schematic of the stereotaxic delivery of AAV carrying CaMKIIα-ChR2 into the LPBN of wild-type mice. b Light activation (473 nm, 20 Hz, 5-ms pulse width, ~5 mW) of LPBNCaMKIIα neurons significantly decreases the PWT induced by von Frey stimulation in mice injected with AAV-CaMKIIα-ChR2-mCherry, compared with mice injected with AAV-CaMKIIα-mCherry. No significant difference was found between before (Pre) and after (Post) light stimulation. c Light activation (473 nm, 20 Hz, 5-ms pulse width, ~5 mW) of LPBNCaMKIIα neurons significantly decreases thermal paw-withdrawal latency measured by the Hargreaves test in mice injected with AAV-CaMKIIα-ChR2-mCherry, compared with mice injected with AAV-CaMKIIα-mCherry. No significant difference was found between before (Pre) and after (Post) light stimulation. d, e Quantification of time spent in the preferred chamber in the RTPA test before (Pre), during (Light), and after (Post) 10-min illumination of the LPBN in mice transfected with AAV-CaMKIIα-mCherry (d) and AAV-CaMKIIα-ChR2-mCherry (e). f Schematic of the open field test (OFT) with photostimulation via a 473-nm laser (Pre, Light, and Post; 5 min for each stage). g Example traces of the OFT from mice with AAV-CaMKIIα-mCherry (upper) and AAV-CaMKIIα-ChR2-mChreey (lower) injected into the LPBN. h Quantification of the total distance moved (upper) and ratio of time spent in the periphery and center (lower) in the OFT before (Pre), during (Light), and after (Post) 10-min illumination of the LPBN in wild-type mice transfected with AAV-CaMKIIα-mCherry and AAV-CaMKIIα-ChR2-mCherry. All data are presented as mean ± s.e.m. and error bars represent s.e.m. ***P < 0.001 and ****P < 0.0001. See also Supplementary Table 1 for further statistical information. Source data are provided as a Source Data file.