Cocaine. Molecular model of the drug cocaine (formula: C17H21NO4), with its individual atoms represented as spheres. Cocaine is an alkaloid drug obtained from the leaves of the coca plant (Erythroxylon coca). It has a local anaesthetic action when applied to the skin, and has been used in surgery. Due to its more notorious effects, however, it has largely been replaced by artificial alternatives. When injected or snorted, the drug acts as a central nervous system stimulant, producing feelings of energy and exhilaration. Psychological dependence can develop. The drug is illegal to own or produce.