Biowulf High Performance Computing at the NIH
Autodock & AutodockVina on Biowulf

AutoDock is a suite of automated docking tools. It is designed to predict how small molecules, such as substrates or drug candidates, bind to a receptor of known 3D structure.

AutoDock Vina does not require choosing atom types and pre-calculating grid maps for them. Instead, it calculates the grids internally, for the atom types that are needed, and it does this virtually instantly.

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program. Sample session:

[user@biowulf]$ sinteractive --cpus-per-task=8
salloc.exe: Pending job allocation 46116226
salloc.exe: job 46116226 queued and waiting for resources
salloc.exe: job 46116226 has been allocated resources
salloc.exe: Granted job allocation 46116226
salloc.exe: Waiting for resource configuration
salloc.exe: Nodes cn3144 are ready for job

[user@cn3144 ~]$ module load AutodockVina

[user@cn3144 ~]$ module list

Currently Loaded Modules:
  1) AutodockVina/1.1.2

[user@cn3144 ~]$ vina --config conf.txt --cpus $SLURM_CPUS_PER_TASK

#################################################################
# If you used AutoDock Vina in your work, please cite:          #
#                                                               #
# O. Trott, A. J. Olson,                                        #
# AutoDock Vina: improving the speed and accuracy of docking    #
# with a new scoring function, efficient optimization and       #
# multithreading, Journal of Computational Chemistry 31 (2010)  #
# 455-461                                                       #
#                                                               #
# DOI 10.1002/jcc.21334                                         #
#                                                               #
# Please see http://vina.scripps.edu for more information.      #
#################################################################

Output will be ligand_out.pdbqt
Reading input ... done.
Setting up the scoring function ... done.
Analyzing the binding site ... done.
Using random seed: 653328095
Performing search ...
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************
done.
Refining results ... done.

mode |   affinity | dist from best mode
     | (kcal/mol) | rmsd l.b.| rmsd u.b.
-----+------------+----------+----------
   1        -12.3      0.000      0.000
   2        -10.1      5.153      9.937
   3         -9.6      5.800      9.437
   4         -9.5      5.027     10.364
Writing output ... done.

[user@cn3144 ~]$ exit
salloc.exe: Relinquishing job allocation 46116226
[user@biowulf ~]$

Batch job
Most jobs should be run as batch jobs.

Create a batch input file (e.g. autodock.sh). For example:

#!/bin/bash
module load Autodock
autodock4 -p myfile.dpf -l myfile.dlg 

Submit this job using the Slurm sbatch command.

sbatch [--mem=#] autodock.sh
The --mem=#g flag should be used if the autodock run requires more than the default 4 GB of memory.
Swarm of Jobs
A swarm of jobs is an easy way to submit a set of independent commands requiring identical resources.

Create a swarmfile (e.g. myfile.swarm). For example:

cd /data/$USER/mydir;  autodock4 -p lig1.macro.def -l lig1.log
cd /data/$USER/mydir;  autodock4 -p lig2.macro.def -l lig2.log
cd /data/$USER/mydir;  autodock4 -p lig3.macro.def -l lig3.log
cd /data/$USER/mydir;  autodock4 -p lig4.macro.def -l lig4.log
[...]

Submit this job using the swarm command.

swarm -f myfile.swarm [-g #] --module Autodock
where
-g # Number of Gigabytes of memory required for each process (1 line in the swarm command file)
-t # Number of threads/CPUs required for each process (1 line in the swarm command file). (not useful for Autodock which is single-threaded, but can be used for a swarm of Vina jobs)
--module AutodockLoads the Autodock module for each subjob in the swarm