Morphinan is a chemical that is important in chemistry and medicine, although not directly. Although its structure is too complicated to write using ASCII, it is basically three benzene rings fused in a plane , with another heterocyclic pyridine ring connected to the structure at a right angle. (If none of that makes sense, don't worry). The chemical formula for morphinan is C16H21N. The members of the ring are numbered from 1 to 17.
The name "morphinan" is derived from "morphine", the first member of this class derived. Morphine is (in technical terms), a morphinan molecule with hydroxy groups at the 3 and 6 positions, an oxygen atom bridging the rings at the 4 and 5 positions, and a methyl group at the 17 position. Codeine, a much less powerful opiate, has the same modifications except that the hydroxy group at the 3 position is replaced with a methoxy group. Hydrocodone (Vicodin) has a methoxy at 3 and an oxygen atom at 6. The variations on the basic morphinan structure range from drugs that are weak opiates (codeine), to strong opiates (morphine) to drugs of abuse (heroin, desomorphine) to drugs used to immobilize elephants (etorphine). There is always research going on to find new combinations of radical groups in those 17 positions, to produce a drug that maximizes analgesia while minimizing respiratory depression, addiction potential and other side effects.
This is one of the basics of biochemistry: variations upon a theme. The same basic molecule, modified by changes that are seemingly minor, produces widely different effects. However, in the case of morphinan, there are additional twists. Some drugs with a morphinan structure have no "classical" opiate effects: dextromethorphan and thebaine, for example. And many drugs with opiate effects, including some of the most popular ones, are not morphinans at all. Tramadol, Fentanyl, Pentazocin, Pethidine (Demerol) and Methadone are all structurally unrelated to morphinan, and to each other. And this is why despite the seeming order that biochemistry has brought to medicine, there are many mysteries, because sometimes drugs with similar structures will have wildly different effects, and sometimes drugs with wildly different structures will have similar effects.