Macs in Chemistry

Insanely great science

 

Installing Decoy Finder under Mac OS X

DecoyFinder is a graphical tool which helps finding sets of decoy molecules for a given group of active ligands. It does so by finding molecules which have a similar number of rotational bonds, hydrogen bond acceptors, hydrogen bond donors, logP value and molecular weight, but are chemically different, which is defined by a maximum Tanimoto value threshold between active ligand and decoy molecule MACCS fingerprints. Optionally, a maximum Tanimoto value threshold can be set between decoys in order to assure chemical diversity in the decoy set.

Dependencies

I’m using Mac OS X 10.8 which comes with Python 2.7 installed, you also need to check where it is installed, you can check by typing

chrismacbookpro:~ swain$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages’].

To do all the installation you need Xcode and the optional command line tools installed.

commandlinetools

To install OpenBabel with python bindings you need to download the source code and follow these instructions. When I did this it installed the three files openbabel.py, pybel.py and _openbabel.so into usr/local/bin but I think they should be in the site-packages folder so I copied them there.

python

You can check is all OK by opening a python session in a Terminal window and typing

chrismacbookpro swain$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import openbabel
>>> 
>>> import pybel
>>>

If you get no errors then all should be OK.

PySide can be downloaded as a Mac OS X bianary and installed in the same location as Pybel.py etc. To install PySide in Mac OS X, you need to install both PySide and the appropriate Qt version. Qt should be installed in usr/local.

Once you have everything installed, download DecoyFinder from here, extract the contents of the archive to wherever you want.

Then type

swain$ python decoy_finder.py

I used this structure as the my “lead” and used the chembridge catalogue as a local file for the source of decoys.

MyLead

decoyfinder

You can follow the process in the Terminal window.

chrismacbookpro:~ swain$ python /Users/swain/Downloads/DecoyFinder-1.1/decoy_finder.py 
No icon theme set, using default: Tango
starting thread
started
Looking for decoys!
1 decoys found
2 decoys found
3 decoys found
4 decoys found
5 decoys found
6 decoys found
7 decoys found
8 decoys found
9 decoys found
10 decoys found
11 decoys found
12 decoys found
13 decoys found
14 decoys found
15 decoys found
16 decoys found
17 decoys found
18 decoys found
19 decoys found
20 decoys found
21 decoys found
22 decoys found
23 decoys found
24 decoys found
25 decoys found
26 decoys found
27 decoys found
28 decoys found
29 decoys found
30 decoys found
31 decoys found
32 decoys found
33 decoys found
34 decoys found
35 decoys found
36 decoys found
('Decoy set completed for ', 'TestCompund1')
All decoy sets complete
Completed 1 of 1 decoy sets
Found all wanted decoys

A log file is created that would be very useful for keeping track of things.

"DecoyFinder 1.1 log file generated on 2013-08-19 13:16:08.928491""Output file:","/Users/swain/MyLead_decoys_1.sdf""Active ligand files:""/Users/swain/Desktop/MyLead.mol""Decoy sources:""/Users/swain/Documents/Structure_Databases/ChemBridge/chemdbridgePremiumSet_sdf.sdf""Search settings:""Active ligand vs decoy tanimoto threshold","0.75""Decoy vs decoy tanimoto threshold","0.9""Hydrogen bond acceptors range","2""Hydrogen bond donors range","1""LogP range","1.0""Molecular weight range","25""Rotational bonds range","1""Minimum nº of decoys per active ligand","36""Maximum nº of decoys per active ligand","36""Active ligand","HBA","HBD","logP","MW","RB","nº of Decoys found""TestCompund1","2.0","0.0","2.3389","200.27954","3","36"

The options tab allows you to modify the details of the decoy selection process.

decoyfinderOptions

Whilst this all worked fine when using local files, when I tried to use the downloading of Zinc files I got a segmentation error. Any suggestions on how to solve this are welcome.