Whenever you have a set of small molecules (with a database identifier like PubChem, ChEBI, KEGG, etc), you commonly get to a point where you might want to classify them into meaningful biological/non-biological categories (like metabolite, secondary metabolite, pesticide, lipid, steroid, terpenoid, food additive, adhesive, etc) . I currently do this by using the ChEBI ontology (specially using the Role ontology), the Chemical branch of the MeSH terms (with PubChem assignments using Eutils) and with the chemical branches of KEGG BRITE (and using all possible cross ref between KEGG compounds, ChEBI, KEGG, PubChem, etc to use each others classifications). Does anybody has other suggested routes of classifying small molecules into functional categories? Thanks!!