Installing and setting up RxDock

foss meson rxcmd rxdock ubuntu

Photo credit: Fleur, Unsplash

rDock and RxDock

RxDock is a fork of rDock, which started in the late 1990s. Considering the speed of software evolution, that time point is several lifetimes ago in the world of software development. Some wrinkles here and there in code are to be expected and, while we at RxTx and the community around us are very busy in ironing these wrinkles, they admittedly are there.

We can say that RxDock has a great set of functionalities and that it is one of the best open source high-throughput virtual screening (HTVS) suites packed with all the functionalities aspiring computational chemists need, but the major hurdle in getting new users onboard and proving it to them is the archaic way of installing and using the software. The graphical user interface is non-existent, the software itself cannot be found maintained in the relevant Linux (or macOS Homebrew, or FreeBSD Ports etc.) repos, you have to set up your working directory every time you start using RxDock, you have to build the software from its sources, and all of that sounds very taxing and complicated to the average user, aspiring graduate students and everyone who are not tech-savvy.

Getting started to use scientific software can be daunting for anyone, especially to beginners or newcomers to the field. Luckily, installing and setting up RxDock is much easier done than said, and we will walk you over through the entire process in this blog post. This blog post is intended for absolute beginners in Linux, scientific software in general and computational chemistry.

The primary target systems for RxDock are Linux on AMD64 (x86-64) with the GCC compiler as well as FreeBSD on AMD64 with the Clang compiler. In this blog post (and tutorial of sorts), we will be using Ubuntu 20.04 LTS as an example, but Ubuntu 20.10 should work just as well.

Installing and setting up RxDock

About Ubuntu

The good thing about command-line interface (CLI) software is that everything can be easily replicated and everyone has the same user experience. Here, you will be able to follow the guide simply by copy-pasting the commands in your terminal that comes with every Ubuntu desktop installation. Just open it up and follow the instruction further in the blog post.

The first thing we have to take care of are updates in case they aren't already.

$ sudo apt update

apt update

$ sudo apt upgrade

apt upgrade

Let's continue with installing tools for obtaining and building RxDock (Git, Meson, GNU C++ compiler; CMake and pkg-config are used for finding dependencies on the system).

$ sudo apt install git meson build-essential cmake pkg-config

apt install git meson build-essential cmake pkg-config

Of course, if you already have installed the packages, apt will tell you. Let's continue by installing the required libraries, {fmt} and Eigen:

$ sudo apt install libfmt-dev libeigen3-dev

apt install libfmt-dev libeigen3-dev

If your output looks like this, you're all set to begin installing RxDock.

The latest version of RxDock can be found either on GitHub or GitLab. Open up the terminal in your home directory and follow the instructions below.

$ mkdir workspace
$ cd workspace
$ git clone https://github.com/rxdock/rxdock.git

git clone

You should have the folder called rxdock with all the necessary files downloaded from GitHub in your workspace directory.

RxDock build configuration is done using the Meson build system.

$ cd rxdock
$ meson -Dbuildtype=release -Dtests=true builddir

Meson beginning Meson end

Should Meson fail to find any of the dependencies listed in the picture above, use the apt search command to find the desired package and install it manually using apt install command. Also, should you fail to find the packages and get stuck on this step, please use the RxDock forum and reach out to the RxDock community or contact us directly at our contact page.

$ cd builddir
$ ninja
$ ninja test

ninja test

If everything went fine, and your system is up to date, and you followed instructions to the letter – that's it. The RxDock is installed on your desktop or laptop computer, and you can start using it immediately.

To check where your RxDock is installed, go to your rxdock folder, right-click on an empty space, and select Properties. Remember the Parent folder path.

The RxDock folder

In order to start using RxDock, we have to set up a working environment. Go back to your workspace directory and open up a new terminal. Make a new directory called training, and enter it.

$ mkdir training
$ cd training

Remember the Parent folder path? Now is the time to use it. Execute the following instructions and modify the RBT_ROOT path to correspond to the Parent folder path, in the same manner the code below corresponds to my Parent folder path in the picture above.

$ export RBT_ROOT=/home/pnikolic/workspace/rxdock
$ export PATH=$RBT_ROOT/bin:$PATH
$ export PERL5LIB=$RBT_ROOT/lib:$PERL5LIB
$ export PATH=$RBT_ROOT/builddir:$PATH
$ export LD_LIBRARY_PATH=$RBT_ROOT/builddir:$LD_LIBRARY_PATH

Let us verify that the RxDock is properly installed and the working environment is properly set up. Use the following example code to call the RxDock.

$ rxcmd cavity-search -h

Typing just cavity in place of cavity-search is fine too; RxDock command-line interface is smart enough to know what you want.

RxDock command-line interface cavity-search

And that's it. You have your RxDock properly installed and your workspace is properly set up. Just remember that you have to set up your working environment every time you start working. That means every time you reboot your computer, change the folder you're working in, etc. you have to write those five lines of code above. You would do yourself a great favor if you wrote them down somewhere you can easily copy them, or you can just bookmark this page to make your life easier.

Should you have any questions, do not hesitate to reach out to the RxDock community on our forum or contact us directly.

Happy docking!

Previous Post Next Post