What is to follow is a very technical description of my (successful) attempts at installing ICRF's 3D Docking program. I'm putting it here in case any other researchers need to know.
Site: [
http://www.sbg.bio.ic.ac.uk/docking/]
The problem: Installing and compiling ICRF's rigid-body docking package, "3D-Dock" on my macintosh.
Why: 3D Dock allows the "docking" of two proteins by matching their surface topologies through a fast fourier-transform method. Input files are stripped PDBs. One model is selected as the "static" model, and the other is rotated and translated around the aforementioned model. The resultant complementarity is scored, and the top model complexes can be displayed. Surface morphology can be futher refined by sidechain optimization with the Multidock program.
I should commend ICRF on their very well written manual. Generally speaking, science software manuals are very very sketchy and hard to understand. 3D Dock's, on the other hand, is very concise, clear, and helpful. The tutorial is also a great idea.
With that in mind, this entry isn't about how to use it, or what it's good for. It's how to install the damn thing, which was not nearly as intuitive as one would like. For that, and that specifically, read on.
Step 1: Install Apple's Developer Tools
Because you'll need to compile the program yourself, you'll need a compiler. By far the easiest way to get this is just to install Apple's free [
XCode] set of tools. Those with Tiger or later OS'es will already have the CD. The default install is fine. You won't actually have to touch any code, you just need the compiler. More on this later.
Step 2: [Download] the following packages:
FTDock. This is the actual rotation/translation program. Because it uses the [
GNU]-licensed FFTW (fast fourier transform) libraries, it itself is also GNU licensed, which means that anyone can download/modify/use it for free.
RPScore. This program will take the positional data from FTDock and score it ranging from the most likely matching to the least-likely. Because it does not contain any GNU-licensed code, you must actually e-mail the authors of the program and request it.
Multidock. This program too is not GNU-licensed, and must therefore be requested from ICRF's [
site]
Step 3: Prepare the necessary folders.
I think it would be a lot easier and make a lot more sense if they just released the entire shebang as one large GNU-licensed project. For whatever reason, however, they haven't. So, to keep the files and everything straight, you'll need to keep everything separate for a while.
What I did was make a "Science" folder at my root directory. (e.g. /science), and transferred the FTDock, RPScore and Multidock tarballs into it. I ungzipped/untarred (using stuffit expander) the
http://www.sbg.bio.ic.ac.uk/docking/downloads/gnu_licensed_3D_Dock.tar.gz into it. I then renamed this folder "3D_Dock".
I then used stuffit expander to ungzip and untar the other two tarballs
into the newly-named 3D_Dock. You can do this from the command line, but it was easier to do it this way.
I simply renamed the RPScore folder "RPScore", and the Multidock folder "Multidock". Inventive, huh?
This is just to keep them straight for later.
Step 4: Download and compile FFTW.
As stated before, you'll need to install the fast-fourier install libraries. There's a link to the fftw-2.1.3 version on ICRF's site. I tried the latest fftw version (3.1.1 as of this writing), but I couldn't get ftdock to compile correctly with it. Oh well. Unzip/untar the file into the 3D_Dock folder. Name it fftw-2.1.3 or something.
Now you have to fire up the console.
cd into the fftw folder. If you've done exactly as I've done, it'll be at this path:
/Science/3D_Dock/fftw-2.1.3/.
You'll need to configure the compiler directives to properly build the files necessary for FTDock. Do so by issuing the following command:
NOTE: if you have a mac with a G3/G4/G5 processor (which is most), read the next paragraph before executing this command.
./configure --enable-float --host=powerpc-apple
Note, my macintosh has a G4 processor, which along with G3s and G5s is capable of altivec (vector) processing. I don't know anything about the new intel macs, as I don't have one. Donations anyone?
In order to take advantage of the great speed increases possible with the altivec processing, add the
--enable-threads --enable-altivec flags, like so:
./configure --enable-float --enable-threads --enable-altivec --host=powerpc-apple
You'll see a bunch of text roll by. Everything should go without a hitch. If not, [
mail me] and I'll help you out.
Now type the command:
make.
Again, you'll see a bunch of text roll by, with some scary warnings and such. If you have a compiler and everything else works fine, it should work.
At this point, the FFTW libraries should be ready.
Step 5: Set up the FFTW Makefile.
Now fire up your text editor of choice (TextEdit works fine, or you can use pico or whatever from within the console) and edit the Makefile in the
progs directory of the 3D_Dock folder (
/Science/3D_Dock/progs/Makefile in this example).
You'll need to change three lines here.
First change the
FFTW_DIR to the directory that contains the FFTW libraries you just compiled. Again, if you've been following me exactly it should be set to "
/Science/3D_Dock/fftw-2.1.3".
Next, change the
SHELL variable to "
/bin/bash". Note: this might not be necessary, but just do it anyway.
Next, delete the flags "
-malign-double" and "
-mcpu=pentiumpro" from the
CC_FLAGS string.
Save the file, and you're done with this part.
Step 6: Compile FTDock.
Now we can actually do the fun part. In the console, make sure you're in the
progs directory of 3D_Dock, and type
make. This will compile the application, just as you compiled the FFTW libraries earlier.
You'll want to keep a backup of this makefile, for reasons that will become clear soon. You can either do with the finder, or (better yet) from within the console:
cp Makefile FTDock_Makefile.
Step 7: Compile RPScore.
The tricky part here is that RPScore uses some of the same files that FTDock does, and so has to also be inside of the
progs directory. Copy all of the contents from the
RPScore directory into the
progs directory. You'll be asked if you want to overwrite the Makefile. Say yes, because this new makefile is for RPScore, and you're all done with the FTDock Makefile. See why you made the backup?
Simply type
make while residing in the
progs folder, just as you did previously. You should now have compiled RPScore.
Note: if you had any errors while compiling FTDock, you won't be able to compile RPScore either. [
Contact me] if you need help.
Step 8: All Done.
There (should) now be a whole raft of new files in the
prog directory. There's a lot of files ending in ".o" (object files), and some others, but most importantly, there should be some new executables:
ftdock
build
randomspin
clean
rpdock
rpscore
filter
centres
Reading the manual will tell you what each does.
Note: So far I haven't had any luck with multidock. More on that later. I don't know if anyone else will ever need the information presented here, but just in case, I'm putting it out into the wild. It took me about half a day looking up various CFLAGS and whatnot before I got something that worked.
Have fun!