💿 Installation#
Via pip (standard)#
Getting the last “stable” version#
Strongly recommended; although this project is still in beta state.
pip install moldrug
Linux 🐧
Recent Linux distributions require creation of virtual environment before calling pip.
Additionally the default Python might be too new for Moldrug. Python 3.12 is not yet supported (see pull requests #9 and #10).
For example on Ubuntu 24.04 LTS, one needs to perform following steps
Get older Python
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.11-venv
Create a virtual environment
python3.11 -m venv .venv source .venv/bin/activate
Only then call
pippip install moldrug
The other Linux distributions might require installation of older Python and creation of virtual environment as well.
Getting the development version#
pip install -U git+https://github.com/ale94mleon/moldrug.git@main
Via conda#
moldrug is also available through conda. However, the pip installation is the recommended one.
conda create -n moldrug -c ale94mleon -c conda-forge moldrug
Note
MacOS users may face some problems trying to install because of the AutoDock-Vina dependency. If that is the case, just download the executable as it is explained next.
If some dependencies are missing, please install them through pip. Some of them might be:
pip install meeko crem pyyaml scipy tqdm
Converting pdb to pdbqt for the receptor#
This step can be achieved through OpenBabel or ADFR. We recommend ADFR. Depending on the platform, you should be able to access the program prepare_receptor in different ways. In my case, it lies on /Users/$USER/ADFRsuite-1.0/bin/prepare_receptor. Then you can convert your pdb with:
/Users/$USER/ADFRsuite-1.0/bin/prepare_receptor -r your_protein.pdb -o your_protein.pdbqt
Check this tutorial for more information. MacOS users may need to use ADFRsuite inside a docker container to avoid Gatekeeper’s restrictions (see this article).
Getting docking box information#
To perform docking you must provide boxcenter (center for AutoDock-Vina) and boxsize (size for AutoDock-Vina) to the cost functions defined in moldrug.fitness. For that, two PyMOl plugins are useful: GetBox and/or autodock. Details of their installation and use are not discussed here, please visit their corresponding repositories for more information.
Working with a docker container#
Use the Docker configuration file on GitHub.
Visit the moldrug’s Docker container.
Finally, pip install moldrug inside the container.
Running tests#
pip install -e .[dev]
pytest tests