Molecules have characteristic shapes that are important for their functions. A diatomic molecule, such as molecular oxygen or hydrogen, is always linear. More complex shapes occur when a molecule contains more than two atoms. Molecular shapes depend on the arrangement of various electron groups around the central atom. The negatively charged electron groups repel one another and try to stay as far away from each other as possible. For example, in a water molecule, the oxygen atom has two pairs of electrons covalently bonded to hydrogen atoms and two lone pairs of electrons. The lone pair-lone pair and lone pair-bonding pair repulsions are the least when the bond angle is 104.5°. So, the water molecule has a bent shape. Complex biological molecules may contain anywhere between a few to millions of atoms arranged in arrays of rings and chains. The shapes of biomolecules allow structure-specific recognition. For example, opiates with active regions that are structurally similar to endorphins can bind to endorphin receptors and relieve pain.