I am fascinated by the role of diverse functional groups in determining the pharmacological activities of drugs. You can use this website to find information about functional groups, find drugs with specific functional groups, and find statistics on the occurrence of functional groups in commonly used pharmaceutical agents. There are blogs that discuss functional groups in more detail. There is also information about log P and pKa values, as well as chirality.
The database currently contains the top 300 drugs, as listed at clincalc.com. Note that we do not include biologicals or inorganics such as potassium and iron. Additional drugs are always being added.