September 25, 2006
SpotSmart - Substructure search on your Mac
I have made a perl-script to enhance the excellent ChemSpotlight with substructure searching. The script in itself translates the output from mdfind into a valid smiles-file that could be searched using obgrep.Update: A new version of the script solves an issue with long SMILES
To start using the script, I recommend the following steps.
- Download and install ChemSpotlight (and OpenBabel that comes bundled within it.
- Download the perl-script to a suitable location (e.g. your home-folder).
- Create an alias by adding the following line (as one long line...) to your .profile-file (assuming you are using bash as your shell): alias spotsmart='mdfind -0 net_sourceforge_openbabel_SMILES\ !=\ \"\" | xargs -0 mdls -name net_sourceforge_openbabel_SMILES | /the/full/path/to/the/script/spot2smi.pl | obgrep -i smi'(More help on this can be found further down)
- Reapply your profile by starting a new shell or typing source .profile
- The alias can then be used to search for SMART-structures as follows. In the terminal, type spotsmart thesmartstringfollowed by enter. You will recieve a list of SMILES-strings that match your query, as well as the filename of the file where it was found.
As an example,
spotsmart c1ccccc1
will find all benzene rings in all the files that ChemSpotlight can read (unfortunately, that don't include ChemDraw).This solution is far from optimal, but it gives you a mean to do substructure searches on your Mac fairly easily!
Here is a more detailed explanation on how to edit the .profile-file in step 3.
- Open the Terminal application (located in the Utilities-folder in your Applications-folder)
- Type cd ~to make sure that you hare in your home directory.
- Type open -a TextEdit .profileto open the file in TextEdit.
- Enter the text from above in the end of the file, making sure that you substitute the text /the/full/path/to/the/script/spot2smi.plto the actual path to where you saved the script.
- Save the file.
Posted 19 years, 8 months ago on September 25, 2006
The trackback for this post is disabled
The trackback for this post is disabled
Navigation
Sections
Donations
On user request I have added a "Donate" button. If you would like to donate to me through PayPal, you could use the following button:
Props: