ADFRsuite on MacOS

ADFRsuite is a protein-ligand docking program developed in the Sanner laboratory at Scripps Research under the AutoDock umbrella. It provides robust docking capabilities and includes several useful scripts for preparing docking simulations.

However, MacOS’s Gatekeeper enforces strict software signing requirements to prevent potential malware. While earlier versions of MacOS allowed workarounds (as described here), these methods no longer work on MacOS Sequoia.

This presents a significant challenge for running academic software, as the signing process often involves costs that academic projects may not afford. An effective alternative is to run ADFRsuite in a Docker container, which is both functional and secure. This guide demonstrates how to create a Dockerfile, build the Docker image, and use ADFRsuite from within Docker.

Docker file

Doble check that https://ccsb.scripps.edu/adfr/download/1038/ still resolves to ADFRsuite_x86_64Linux_1.0.tar.gz. If not, modify the URL accordingly in the Dockerfile.

FROM ubuntu:22.04

# Install necessary dependencies for downloading and extracting files
RUN apt-get update && apt-get install -y \
    curl \
    tar \
    && rm -rf /var/lib/apt/lists/*

# Download the ADFRsuite tarball and extract it
RUN curl -L https://ccsb.scripps.edu/adfr/download/1038/ -o /root/ADFRsuite_x86_64Linux_1.0.tar.gz && \
    tar -xzvf /root/ADFRsuite_x86_64Linux_1.0.tar.gz -C /root && \
    rm /root/ADFRsuite_x86_64Linux_1.0.tar.gz

# Install ADFRsuite
RUN cd /root/ADFRsuite_x86_64Linux_1.0 && echo "Y" | ./install.sh

# Add ADFRsuite binaries to the PATH
ENV PATH=/root/ADFRsuite_x86_64Linux_1.0/bin:$PATH

WORKDIR /root/input

# Clean up the extracted ADFRsuite files
RUN rm -rf /root/ADFRsuite_x86_64Linux_1.0

Building the Docker Image

To build the Docker image, execute the following command in the directory containing your Dockerfile:

docker build --platform=linux/amd64 -t adfr-suite --progress=plain --no-cache .

This creates the Docker image with ADFRsuite installed. See that we are using --platform=linux/amd64, this is not perfect for ARM ships (M serie), but it will do the job and avoid future issues during the building.

Running the Container

Interactive mode

The following command runs the container interactively, mounting the current directory to /root/input inside the container:

docker run --platform=linux/amd64 --rm -it -v $(pwd):/root/input adfr-suite

Running Specific Commands

To execute specific ADFRsuite commands directly, use this syntax:

docker run --platform=linux/amd64 --rm -v $(pwd):/root/input adfr-suite \
    prepare_receptor -r /root/input/protein.pqr -o /root/input/protein.pdbqt

Replace prepare_receptor and its arguments with the desired ADFRsuite command and options.

With this setup, you can use ADFRsuite on MacOS via Docker, bypassing Gatekeeper restrictions.

Happy simulations!

Alejandro Martínez León
Alejandro Martínez León
PhD-Student in Biophysics

My research interests include molecular dynamic simulations, coding and theoretical biophysics.