[Year 2024] How to Install AutoDock Vina on ARM Mac
AutoDock Vina is an open-source program used for molecular docking and works on Linux, Mac, and Windows. It is designed to be user-friendly, requiring only the molecular structures of the ligand and protein, along with the binding site specification.
Recently I had trouble installing AutoDock Vina v1.2.5 in a Conda environment on my M1 Mac. The instruction "AutoDock Vina installation in a Conda environment" in the official document led to a failure.
% conda create -n vina python=3
% conda activate vina
% conda config --env --add channels conda-forge
% conda install -c conda-forge numpy swig boost-cpp sphinx sphinx_rtd_theme
% pip install vina
Collecting vina
...
Building wheels for collected packages: vina
Building wheel for vina (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for vina (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [155 lines of output]
fatal: not a git repository (or any of the parent directories): .git
...
# error This header is deprecated and will be removed. (You can define BOOST_TIMER_ENABLE_DEPRECATED to suppress this error.)
1 warning and 2 errors generated.
error: command '/usr/bin/g++' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for vina
Failed to build vina
ERROR: Could not build wheels for vina, which is required to install pyproject.toml-based projects
After a struggle, I figured out a solution.
Environment
- MacBook Pro 2021
- Apple M1 Pro
- macOS Sonoma 14.4.1
- Miniconda 24.3.0
Right Commands
% conda create -n vina python=3.8
% conda activate vina
% conda install -c conda-forge vina
That's it. Be sure to use conda only. No pip. Python version has to be between 3.5 and 3.8 if you are going to use Meeko, too.
% vina --version
AutoDock Vina v1.2.5