Skip to main content

Python scripts to automate molecular docking

Installation

pip install moldock

or the latest version

pip install git+https://github.com/ci-lab-cz/docking-scripts.git

Dependencies

from conda

conda install -c conda-forge python=3.9 numpy=1.20 rdkit scipy dask distributed vina

from pypi

pip install meeko

Installation of gnina is described at https://github.com/gnina/gnina

Description

Fully automatic pipeline for molecular docking.

  • two major scripts vina_dock and gnina_dock which support docking with vina and gnina (gnina also supports smina and its custom scoring functions)
  • can be used as command line scripts or imported as a python module
  • support distributed computing using dask library
  • if calculation was interrupted it can be continued by invoking the same command, but everything except output DB may be omitted (these will be ignored nevertheless if DB exists) because all data is stored in DB at the first call
  • get_sdf_from_db is used to extract data from output DB

Pipeline:

  • input SMILES are converted in 3D by RDKit embedding, if input is 3D structures in SDF their conformations wil be taken as starting without changes.
  • ligands are protonated by chemaxon at pH 7.4 and the most stable tautomers are generated (optional, requires a Chemaxon license)
  • molecules are converted in PDBQT format
  • docking with vina/gnina
  • output poses are converted in MOL format and stored into output DB along with docking scores

Example

Both scripts vina_dock and gnina_dock have similar common arguments.

Docking using input SMILES, prepared protein and config files. Ligands will not be protonated with Chemaxon, so their supplied charged states will be used. 4 CPU cores will be used. When docking will finish an SDF will be created with top docking poses for each ligand.

vina_dock -i input.smi -o output.db -p protein.pdbqt -s vina_config --no_protonation -c 4 --sdf 

Retrieve second poses for compounds mol_id_1 and mol_id_2 with their docking scores in SDF format:

get_sdf_from_db -i output.db -o out.sdf -d mol_id_1,mol_id_4 --fields docking_score --poses 2 

Instead of a comma-separated list of ids a text file can be supplied as an argument -d.

Retrieve top poses for compounds with docking score less then -10:

get_sdf_from_db -i output.db -o out.sdf --fields docking_score --poses 1 --add_sql 'docking_score < -10' 

Use as a Python module

from moldock import vina_dock

vina_dock.iter_docking(dbname='output.db', receptor_pdbqt_fname='protein.pdbqt', protein_setup='vina_config.txt', protonation=False, exhaustiveness=8, seed=-1, n_poses=10, ncpu=4)

Changelog

0.1.2

  • (bugfix) docking of macrocycles is rigid (in future may be changed)

Licence

CC BY-NC-SA 4.0

Metadata

Release files for moldock 0.1.3

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

Source distribution (sdist)

Source distribution for moldock 0.1.3
File Size Uploaded Provenance Actions
moldock-0.1.3.tar.gz 17.0 kB Without provenance Details for moldock-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 39.2 kB

Release files / moldock-0.1.3.tar.gz

Download URL moldock-0.1.3.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
42c525e85fa97cdb824cfbed3827819c6ae43a97ad15fcf60ac67abe12062458
BLAKE2b-256 checksum
How to use checksums
efc26878db411975255ab4415b8340a560c74c4c3454a3f34f3236632f29fda3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.0.post20200528 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9

Release files / moldock-0.1.3-py3-none-any.whl

Download URL moldock-0.1.3-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7fb9c89ba834dafe8a55476186726480d63728d223474c5e15e2e3f9f9d9fc5
BLAKE2b-256 checksum
How to use checksums
5f556247f188516da1c086ed6dda72f99fc9af72ec75febf8ca087e4a487b910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.0.post20200528 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9

Security for moldock 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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