Installing and Using WatCH in Mac OS X (10.6.8)
WatCH is a tool for identifying conserved water sites and analyzing their degree of conservation using heirarchical cluster analysis of superimposed related Protein Data Bank structures.
WatCH uses complete-linkage hierarchical cluster analysis to calculate clusters of bound water molecules.
Talking about water molecules in structure takes us to protein structures determined by XRD. WatCH is an interesting tool to analyze water molecules when not but one but many XRD-determined structures.
As described in the documentation included with the program (a file named WatCH.tar.gz) this program could be compiled using the GNU and Sun C compilers on Solaris, X86 and IRIX (woa, old school) platforms. This sentence also implies the use of the command line. It also requires perl. Well, this documentation dates back to 1998 so it is a sure bet that they were NOT considering Mac OS X...
After trying the included:
install.pl
which immediately spit back the following error:basics.c(3): catastrophic error: cannot open source file "malloc.h"
#include <malloc.h>
Well, 10 years ago I would have stared at the terminal for days. Then, I'll probably use Yahoo (yeah, I know) to find out about malloc.h and Mac OS X. Nowadays, with the help of the Intel compilers I decided to dig into the local files using Spotlight. I found out about i_malloc.h that is used by Intel. So, I changed line 4 of my Makefile from:CC = cc
toCC = icc
and the corresponding line in basics.c line 3 (as indicated in the error shown above) from:#include <malloc.h>
to:#include </Users/leninwtigger/Desktop/WatCH/src/inc/i_malloc.h>
(I copied the i_malloc.h from its intel assigned folder to the inc subdirectory from the WatCH installation source) and tried again. I got another error:complete_link_clustering.c(8): catastrophic error: cannot open source file "malloc.h"
#include <malloc.h>
andmain_cluster.c(110): catastrophic error: cannot open source file "malloc.h"
#include <malloc.h>
since those to c files require malloc too. I just replaced the offending lines and then ran the installation script:perl install.pl
and success! (well, quite success since no errors were reported this time). Once everything is in place and compiled, there is another step that is required: edit all the perl (.pl) file so that the right perl interpreter is selected. If you don't know which one is that, type:which perl
and that will give you back the right path.There is another way to do this without Intel compilers and I will expand on that next. According to Apple pages for unix malloc.h is obsolete and should be commented out of source files. In this case, there is no need to change the compiler from cc to icc. For more info, see the Apple Developers webpage.
Details of this algorithm and its application to thrombin and trypsin can be found in the following reference:
P. C. Sanschagrin and L. A. Kuhn Cluster Analysis of Consensus Water Sites in Thrombin and Trypsin Shows Conservation between Serine Proteases and Contributions to Ligand Specificity Prot. Sci., Vol. 7, No. 10, October 1998, pp 2054-2064.
Comments