Glinttsd / Vina-GPU-CUDA

A CUDA implementation of Vina-GPU
23 stars 19 forks source link

work on Ubuntu #1

Open xiaolinpan opened 2 years ago

xiaolinpan commented 2 years ago

Many thanks for your open-source code of Vina-GPU, it's excellent work for drug design and discovery. I am not familiar with c/c++. Could you help me compile it on ubuntu?

tavolivos commented 2 years ago

Same inquiry. It would be great to have a step-by-step tutorial on compilation on ubuntu or fedora. Many thanks!

cewinharhar commented 1 year ago

For people having problems: Here a step-by-step tutorial (worked for me, nvidia 3090, ubuntu 22)

Set up the necessary Boost library

  1. Download
  2. mv to /usr/local/ #default location
  3. Extract: tar --bzip2 -xf boost_1_81_0.tar.bz2
  4. ./bootstrap.sh
  5. ./b2

    now we want to make the path globally accessable

  6. LD_LIBRARY_PATH=/usr/local/boost_1_81_0/stage/lib:${LD_LIBRARY_PATH}
  7. export LD_LIBRARY_PATH

set up cuda

The absolutely easiest way to do this is with conda

  1. install anaconda or miniconda
  2. create env:
    1. conda create -n gpu
    2. conda install -c conda-forge cudatoolkit-dev
  3. activate env: conda activate gpu
  4. Find the nvcc compiler and remember this path
    1. which nvcc
    2. If you cant find nvcc, maybe reboot or reactivate conda env and find nvcc with plocate nvcc

Set up vina-gpu-cuda

  1. Git clone https://github.com/Glinttsd/Vina-GPU-CUDA.git
  2. move (mv) to folder where vina-gpu-cuda is installed
  3. Change the file Makefile in vina-gpu-cuda foler as follows:
    1. Change BOOST_LIB_PATH:
      1. BOOST_LIB_PATH=/usr/local/boost_1_81_0
    2. Change NVCC path:
      1. NVCC_COMPILER=/home/user/anaconda3/envs/docking/bin/nvcc
  4. sudo make clean
  5. sudo make cuda #IGNORE ALL THE RANDOM ERRORS, IF A NEW EXECUTABLE POPS UP YOU'RE GOOD TO GO
  6. ./Vina-GPU --config ./input_file_example/2bm2_config.txt
  7. BAM