Building AutoDock4 on Ubuntu 14.04
This is a tutorial made at the very beginning of my work with AutoDock. This was perfomed on my g4-pavilion
machine.
Step 1: download the source autodocksuite-4.2.6-src.tar.gz from the AutoDock 4.2.6 Download Page.
Step 2: unpack that tar.gz file and move to the containing folder "src":
Step 3: add read, write and execute permissions to source files:
leonardosv@PC:~/Desktop/src$ chmod +rwx ./autodock/*
Step 4: read the README file for building from source.
Step 5: identify my machine type:
leonardosv@PC:~/Desktop/src$ uname -a
Linux leonardosv-HP-Pavilion-g4-Notebook-PC 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Step 6: create a subdirectory "x86_64Linux2" under ~/autodock/ and ~/autogrid/:
Step 7: change to the ~/autodock source directory.
At this point the README file suggest to run a command to auto-reconfigure. Since we want to run the default project, this step is ommitted. Otherwise, it doesn't compile.
Step 8: change to the ~/autodock/x86_64Linux2/ subfolder and configure:
Here is the complete output stored in the "configure_out" file:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gawk... (cached) gawk
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for gethostname... yes
checking for getpid... yes
checking for GetProcessId... no
checking for fchmod... yes
checking for setlinebuf... yes
checking for sysconf... yes
checking for times... yes
checking for getrusage... yes
checking for pow... no
checking for sqrt... no
checking for strncasecmp... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking for g++ option to support OpenMP... -fopenmp
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
Pay attention to the files created in the last command run:
Obviously, we created "configure_out" to store last configure output.
Step 9: make:
leonardosv@PC:~/Desktop/src/autodock/x86_64Linux2$ touch make_out
leonardosv@PC:~/Desktop/src/autodock/x86_64Linux2$ make | tee make out
NOTE: in case this fails, try make clean
and then make again.
Many object files are created, but most importantly a couple of executable files:
It is time to check if it works!.
Step 10: create a new testing folder "~/src/Run_Experiments/First_Run/":
Step 11: look for user guides:
Step 12: check which files are needed as input for Autodock (page 20):
Step 13: look for example input files to get some inspiration:
Step 14: let's choose "dock_rigidlig":
Step 15: copy the the whole example folder contents and the Autodock executable, into our experimental folder:
Step 16: check the "run_examples" script:
Step 17: run Autodock:
NOTE: executables and input files must be in the same folder. Therefore we move the "autodock" executable and its corresponding log into "~/dock_rigidlig".
Step 18: copy the missing file "1dwd_rec.maps.fld", and run again:
Step 19: copy all required files (specified by "1dwd_rec.maps.fld"), and run again:
NOTE: If writes cannot be performed, check and change file permissions (if needed).
This process took a couple of minutes in my i5 CPU machine with 4GB RAM.
Step 20: verify the results, which are stored in the log file:
As I told you, the process took (about) a couple of minutes to run up to completion!
Update 1
In case you want to use the previous version of Autodock 4.2 (Release 4.2.5.1), you have to follow the same procedure described here from step 1 up to step 12. Steps 13 and 14 don't apply because there is no EXAMPLE folder in older releases, but instead a ~/autodock/Tests folder from where input files can be taken. Then you can follow from step 15 till the end.
In case you want to build autogrid (so far we tested Release 4.2.5 using AutoDockTools (See LINK OF RELATED POST)), the same steps from 1 to 9 can be followed.
It was also successfully tested in eredmithrim running Ubuntu 16.04.