Medicinal plants have an effect on body functions because of the various chemical constituents they have. For example the opium poppy has sedative and analgesic effects because it contains alkaloid constituents morphine and papaverine, and the white willow has analgesic and anti-inflammatory effects because it contains an aspirin precursor. In herbal pharmacology the constituents of medicinal plants, their biological effects and mechanisms of action are studied.