GO:0050965:   detection of temperature stimulus involved in sensory perception of pain
The series of events involved in the perception of pain in which a temperature stimulus is received and converted into a molecular signal.