Understanding transcriptional responses to chemical perturbations is crucial for drug discovery. This paper introduces PRnet, a perturbation-conditioned deep generative model that predicts transcriptional responses to novel chemical perturbations at both bulk and single-cell levels. Evaluations show PRnet outperforms existing methods in predicting responses across novel compounds, pathways, and cell lines. PRnet enables gene-level interpretation and in silico drug screening, identifying and experimentally validating novel compound candidates against small cell lung cancer and colorectal cancer. It also generates a large-scale integration atlas of perturbation profiles, successfully recommending drug candidates for 233 diseases. PRnet is a valuable tool for gene-based therapeutics screening.