From Open Babel
Revision as of 12:10, 31 May 2006 by Ghutchis (Talk | contribs)

Jump to: navigation, search

ChemSpotlight is a Spotlight metadata importer plugin for Apple's Mac OS X 10.4 Tiger, which reads common chemical file formats (MDL .mol, .mdl, .sd, .sdf, Tripos .mol2, Protein Data Bank .pdb, Chemical Markup Language .cml, and XYZ) using the Open Babel chemistry library. It is provided as a Universal Binary for PowerPC and Intel, for optimized performance on both.

It’s probably easier to show the results from ChemSpotlight than to describe it. ChemSpotlight indexes chemistry files, adds molecular formulas (complete with subscripts in the Finder), molecular weight, and a variety of other information for Spotlight searches and “Get Info” windows. Notice the computed chemical formula and molecular weight information for this file:


ChemSpotlight adds all of this information to the Spotlight index, allowing chemical searches for a range of properties. Since Spotlight indexes automatically in the background as files are created or modified, after installing, you don’t need to worry about updating the database.

Technical Details

ChemSpotlight reads in files using the Open Babel library and then generates the following fields for any molecules it finds:

# Return all files with at least one molecule with mass < 200
mdfind "net_sourceforge_openbabel_Mass < 200"
# The next line matches all files containing molecules with mass < 200 AND molecules with > 10 atoms
mdfind "net_sourceforge_openbabel_Mass < 200 && net_sourceforge_openbabel_NumAtoms > 10"
# Match the c1(c(cccc1)Br SMILES string (i.e., a literal string)
mdfind "net_sourceforge_openbabel_SMILES = '*c1(c(cccc1)Br*'"

Note that the SMILES matching is for literal strings of SMILES. I don’t (yet) know how to use the Daylight SMARTS matching system inside Spotlight, although perhaps other tools can filter the results from Spotlight using the SMARTS system.

For more information, see the ChemSpotlight homepage.