This is about as easy to digest as 5lbs of biscotti, but the last sentence helps explain why coffee smell does what it does to your brain.
Green coffee beans contain up to 10% of chlorogenic acids, i.e., various isomers of hydroxy-cinnamoyl esters of quinic acid (a common plant constituent). Common to most plants and fruits, green coffee beans can contain as much as 10% of dry weight of chlorogenic acids. These are mixtures of mono- and di-esters of 3-substituted 4-hydroxycinnamic acid and quinic acid, a sugar-like molecule.
In the roasting process, approximately half of the chlorogenic acids lose a molecule of water, thereby forming an internal ester bond that results in a mixture of non-acidic quinolactones (quinides).
Brewing roasted coffee causes isomerisation of the quinides. This results in hundreds of different compounds, each with potentially unique pharmacological actions. Although few of these compounds are present in more than 0.3% of dry weight of coffee, each may contribute significantly to the effects of coffee as these compounds have chemical properties that allow ready entry into the brain. Furthermore, synergistic effects of different quinides acting on the same biological target may contribute to healthful coffee effects. The pharmacological effects of chlorogenic acids or quinides are mostly unknown. Of interest is a previous Australian report that 240 mg of ground coffee, approximately 1/5th of that contained in a 160 mL cup of coffee, displaced 50% of the binding of the opiate receptor antagonist [3H]naloxone. This suggests that this constituent of coffee may interact with the opiate system of the brain, which has been implicated in regulation of mood and well-being and in alcoholism and drug addiction.