How can the chemical structure of codeine, an opiate sold over-the-counter for years in cough medication, differ only slightly from that of a highly-regulated opiate like morphine? And why does this slight change in structure cause our bodies to respond differently to each drug? The answer comes down to the relationship between drug structure and function. Different drug functions require different drug structures because these compounds directly bind receptors in the brain to produce an effect. But just as one key fits a lock far better than another, one drug may be significantly more potent than an alternative based on how tightly it binds the receptor in addition to how rapidly each drug reaches the receptor. Structural derivatives of natural compounds have been designed to reach receptors more quickly and bind tighter to result in a stronger clinical response. In this way, opioid addiction may be traced back to the chemistry behind drug structure.
By the 17th century, the anesthetic properties of opium poppies had been known for thousands of years, and scientists were actively seeking ways to separate the painkilling compounds from inactive components of the plant . Morphine was the first natural product isolated from crude extracts of the opium poppy in 1804 by Friedrich Wilhelm Sertürner [1,2]. While the plant produces about fifty natural opium alkaloids, morphine is the most abundant representing about 8-19% of the total opium resin . Opium poppies make morphine from the combination of two amino acids, phenylalanine and tyrosine, to create a core structure known as the 4,5-epxymorphinan ring . The resulting ring configuration is then further decorated by the addition of several chemical functional groups to its exterior. A functional group is a collection of bound atoms that are generally the center of reactivity and give the molecule its chemical behavior or properties. (Figure 1)
Biochemistry explains how these particular structures of opioids translate directly to drug function. Most opioids are readily absorbed by the gastrointestinal system and are subsequently distributed throughout the body. Breakdown of these drugs occurs in the liver to produce active painkilling secondary products called metabolites that may be more potent than the initially ingested drug. For example, when codeine is administered directly to patients, its methyl group (methyl group, -CH3) is taken off in the liver by a process known as demethylation. Since morphine only differs from codeine by the presence of this methyl group, codeine becomes morphine upon demethylation. As such, morphine is a metabolite of codeine that is more potent than codeine itself . Because only 10% of codeine is converted to morphine, it is three-to-five times weaker than when morphine is directly supplied [6,7]. This range of potency exists because each individual person has different abilities to effectively breakdown drugs dependent on the presence of specific enzymes, which are the molecules responsible for drug metabolism.
The journey to reach the central nervous system, the primary target of opioids, ends with crossing the blood-brain barrier. Although there are several classes of brain-opioid receptors, one important interaction for a majority of opioids takes place with the m-receptor  (Figure 2). This interaction is where drug structure plays a crucial role. Opioid binding at the m-receptor replaces naturally-produced endorphins and spurs a release of dopamine, which results in a strong euphoric effect to suppress feelings of pain . The speed and intensity of these pleasurable sensations depend on how quickly an opiate enters the brain and how tightly it fits the m-receptor. Perhaps the most intriguing aspect of this opiate-receptor relationship is that specific functional groups are required to bind the m-receptor to create a perfect fit. In fact, morphine’s two hydroxyl groups (hydroxyl group, -OH) are what make it more potent than codeine, which has only one hydroxyl in addition to a methyl group . This methyl group on codeine does not bind as tightly to the m-receptor compared to the hydroxyl group on morphine, which leads to a lesser release of dopamine, and thus causes codeine to be a weaker opiate [4,6]. Upon the discovery that opioid strength is determined by the binding of receptors in the brain, scientists sought to create a drug with the same painkilling properties as morphine, but without unwanted metabolites or its propensity to cause addiction. Thus heroin—the “heroic drug”—was born.
Heroin is considered a semi-synthetic opioid. It is synthesized by taking the core structure of morphine and acetylating (acetyl group, -C2H3O) both hydroxyl groups to result in a change of its polarity . Polarity is a separation of electrical charges to create one region of a molecule with a more positive charge and another with a more negative charge. Polar groups, such as the hydroxyl groups of morphine, readily interact with other polar solvents like water. The acetylation of these hydroxyl groups makes heroin less polar, and therefore less water-soluble than morphine. When taken orally, this decrease in polarity reduces the uptake of heroin because drugs need to be water-soluble for absorption . When injected intravenously, however, heroin can cross the blood-brain barrier more quickly than morphine, whose polarity prevents fast transport into the brain. Heroin is converted to morphine after it enters the brain by deacetylation to allow interaction with the m-receptor . While receptor interaction remains the same between these drugs, heroin’s rapid delivery causes users to experience a faster and five times stronger high . Ironically, this so-called “heroic drug” is no longer used in medical settings due to its greater addiction potential . The interesting detail that heroin and morphine are not that different structurally begs the question: Are there any opioids whose structure differs from the natural core of those found in the opium poppy?
One example comes in the form of synthetic opioids such as fentanyl, a drug that is 50 to 100 times stronger than morphine  (Figure 3). On the surface, it appears that the structures of fentanyl and morphine are drastically unrelated. Fentanyl belongs to the phenylpiperidine class of opioids, which have a six-membered carbon ring directly attached to another six-membered ring containing five carbons and one nitrogen . Given that the nitrogen-containing ring (piperidine) is responsible for the activity of both heroin and morphine towards the m-receptor, all of these drugs bind the same receptor in the brain . What distinguishes fentanyl is how fast it arrives at the receptors. Fentanyl passes the blood-brain barrier almost instantaneously, where it hugs the m-receptor so tightly that it requires only a small dose to produce opioid activity [4,6,9]. The structure of fentanyl is highly non-polar which causes rapid crossing of the blood-brain barrier , while additional functional groups adorning its piperidine ring foster a close-fitting m-receptor interaction . Synthetic opioids like fentanyl are structurally designed to act quickly and bind tightly, which is what makes them so effective yet addictive.
Understanding how drug structure relates to function is essential to navigate a world of prescription drugs with high abuse rates. Even the most potent opioids have a noble and beneficial purpose in medicine; fentanyl is used to treat patients with chronic pain who have developed tolerance to other treatments . Scientists have the responsibility to develop new drugs as keys to eliminate addiction and other side-effects while ensuring that they still fit nicely into the receptor lock to relieve patients of their pain.
Staff Writer, Signal to Noise Magazine
PhD Candidate, Biochemistry, Molecular, and Structural Biology Program, UCLA
 Goerig, M. & Schulte am Esch, J. Friedrich Wilhelm Adam Sertürner - the discoverer of morphine on the 150th anniversary of his death. Anästhesiol Intensivmed Notfallmed Schmerzther, 26(8), 492-498 (1991).
 Crow, J.M. Addicted to the cure. Chemistry World (2017, Jan 3). https://www.chemistryworld.com/feature/new-opioid-drugs/2500163.article.
 The Opium Alkaloids. United Nations Office on Drugs and Crime, 13-14 (1953). https://www.unodc.org/unodc/en/data-and-analysis/bulletin/bulletin_1953-01-01_3_page005.html.
 Drewes A.M. et al. Differences between opioids: pharmacological, experimental, clinical and economical perspectives. British Journal of Clinical Pharmacology. 75(1), 60-78 (2013). doi:10.1111/j.1365-2125.2012.04317.x.
 Cortazzo, M.H., Copenhaver, D. & Fishman, S.M. Major Opioids and Chronic Opioid Therapy. Practical Management of Pain (Fifth Edition) 495–507.e3 (2014). doi: 10.1016/B978-0-323-08340-9.00036-0.
 Keating, D. & Granados, S. See how deadly street opioids like ‘elephant tranquilizer’ have become. Washington Post Health Analysis (2017, Oct 25) https://www.washingtonpost.com/graphics/2017/health/opioids-scale/?utm_term=.2ce79c4bf7a8Ret.
 Thorn C.F., Klein T.E., & Altman R.B. Codeine and morphine pathway. Pharmacogenet Genomics 19(7), 556-8 (2009, Jul). doi: 10.1097/FPC.0b013e32832e0eac.
 Way, E.L., Young, M.J. & Kemo, J.W. Metabolism of heroin and its pharmacologic implications. United Nations Office on Drugs and Crime, 25-33 (1965, Jan 1).
 Bond, A. Why fentanyl is deadlier than heroin, in a single photo. Stat News, Heath (2016, September 29). https://www.statnews.com/2016/09/29/why-fentanyl-is-deadlier-than-heroin/.