Skip to main content

dockstring

CI Tests Code Style: yapf

A Python package for easy molecular docking and docking benchmarking. We can dock molecules in a few lines of code from just a SMILES string! For details, see our paper and our website:

García-Ortegón, Miguel, et al. "DOCKSTRING: easy molecular docking yields better benchmarks for ligand design." Journal of Chemical Information and Modeling (2021).

Installation

Supported platforms: This package is primarily intended for Linux, but we have some support for Mac. Please note that the scores from the Mac version do not always perfectly match the Linux version, so we encourage the use of the Linux version whenever possible.

Package versions:

When installing dockstring, please be mindful of which package versions you install. The dockstring dataset was created using:

  • rdkit=2021.03.3
  • openbabel=3.1.1
  • python=3.7.10

If you want to reproduce the calculations of the dockstring dataset exactly (or calculate docking scores completely consistent with the dataset) then ideally install these versions of the packages above. However, python 3.7 has reached end of life, so we have tested higher versions of the packages: It appears that python<=3.10, openbabel=3.1.1, rdkit<=2022.03 will also work. Ultimately we just suggest being mindful of which version you install, and test whether it matches the dataset values after installation (instructions on this below). If in doubt, use our environment.yml file. Note that if you do not care about consistency with our pre-computed dataset then any package version is ok.

Installation instructions:

We recommend installing with conda using our package on conda-forge: this will automatically install the correct versions of rdkit and openbabel (which currently cannot be installed with pip). To do this, run:

conda install -c conda-forge dockstring

It can alternatively be installed from PyPI by running:

python3 -m pip install dockstring

However, this will not install the dependencies because openbabel currently cannot be installed with pip.

If you want to use dockstring for benchmarking, we recommend installing the latest version by cloning this repo:

  1. Clone this repository.

  2. Choose whether to install into an existing environment or create a new environment.

    • To install into a new environment, run:
      conda env create -f environment.yml
      conda activate dockstring
      
    • To install into an existing environment, simply install the desired versions of openbabel and rdkit.
  3. Install the dockstring package with pip from this repository:

    pip install .
    
  4. Check whether the installation was successful by running a test script. Running without error indicates a successful install.

    python tutorials/simple_example.py
    
  5. (optional) Install PyMol for target, search box and ligand visualization:

    conda install -c conda-forge pymol-open-source
    
  6. (optional) Check whether your local version of dockstring matches the dockstring dataset. This is only necessary if you plan to mix pre-computed docking scores from the dockstring dataset with locally-computed scores, or if you want to compare results with the dockstring paper.

    We have created a pytest test which randomly docks N molecules from the dockstring dataset and checks whether they match. The value of N can be changed by setting the environment variable num_dockstring_test_molecules. We recommend starting with N=50, then progressing to N=1000 to do a full test. The test can be run with the following commands:

    conda install -c conda-forge pytest  # only if not installed already
    num_dockstring_test_molecules=1000 python -m pytest tests/test_dataset_matching.py  # change "1000" to the number you wish to dock
    

    If the test passes then your local version of docktring matches the dataset exactly! 🥳 If the test does not pass, we encourage you to look how the error rate (this will be displayed in the error messages). If 99%+ of scores match then it is probably ok to use dockstring in the benchmarks, but there will of course be some error and this should be noted.

If this method of installation does not work for you, please raise a github issue and we will try to help.

Tutorials

  • See dockstring's basic usage here.
  • Learn how to visualize docking poses here

See our website for links to tutorials for our dataset and benchmarks.

Development

See DEVELOPMENT.md

Citation

If you use the dockstring package/dataset/benchmark in your work, please use the following citation:

@article{garciaortegon2022dockstring,
    author = {García-Ortegón, Miguel and Simm, Gregor N. C. and Tripp, Austin J. and Hernández-Lobato, José Miguel and Bender, Andreas and Bacallado, Sergio},
    title = {DOCKSTRING: Easy Molecular Docking Yields Better Benchmarks for Ligand Design},
    journal = {Journal of Chemical Information and Modeling},
    volume = {62},
    number = {15},
    pages = {3486-3502},
    year = {2022},
    doi = {10.1021/acs.jcim.1c01334},
    URL = {https://doi.org/10.1021/acs.jcim.1c01334}
}

Release files for dockstring 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dockstring 0.3.4
File Size Uploaded
dockstring-0.3.4.tar.gz 6.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for dockstring 0.3.4
File Interpreter ABI Platform
dockstring-0.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 MB

Release files / dockstring-0.3.4.tar.gz

Download URL dockstring-0.3.4.tar.gz
Size 6.1 MB
Tags Source
SHA-256 checksum
How to use checksums
832730f294e88fbcf576347b494a5c3a96eee4e71b23819f6455b6fa053f9f9d
BLAKE2b-256 checksum
How to use checksums
88c486069d6bea1d7bb430e929b02c45bc5e9c3a0d9426a53662a12fa50673ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / dockstring-0.3.4-py3-none-any.whl

Download URL dockstring-0.3.4-py3-none-any.whl
Size 4.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e0e61d4f6f5ff22b3cc2905ea01af5752fe0a14f93b4a148d81ffa1fac661cc5
BLAKE2b-256 checksum
How to use checksums
267b4eab9b2d80f920b0fbaaf0c7cc42e948df6fc716b18cb5399bd3d5c768e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.3.4 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page