![]() |
VinaPerformDocking.py - Perform docking
VinaPerformDocking.py [--energyComponents <yes or no>] [--energyComponentsLabels <Label1, label2, Label3>] [--energyLabel <text>] [--energyRange <number>] [--exhaustiveness <number>] [--forcefield <AD4, Vina, or Vinardo>] [--forcefieldWeightParams <Name,Value,...>] [--gridSpacing <number>] [--gridSize <xsize,ysize,zsize>] [--infileParams <Name,Value,...>] [--maxEvaluations <number>] [--mergeHydrogens <yes or no>] [--minRMSD <number>] [--mode <Dock, LocalOptimizationOnly, ScoreOnly>] [--mp <yes or no>] [--mpParams <Name, Value,...>] [--numPoses <number>] [--numThreads <number>] [--outfileParams <Name,Value,...> ] [--overwrite] [--precision <number>] [--quiet <yes or no>] [--randomSeed <number>] [--receptorFlexFile <receptor flex file>] [--skipRefinement <yes or no>] [--validateMolecules <yes or no>] [--vinaVerbosity <number>] [-w <dir>] -g <RefLigandFile or x,y,z> -r <receptorfile or maps prerfix> -i <infile> -o <outfile>
VinaPerformDocking.py -h | --help | -e | --examples
Dock molecules against a protein receptor using AutoDock Vina [Ref 168, 169]. The molecules must have 3D coordinates in input file. In addition, the hydrogens must be present for all molecules in input file.
No protein receptor preparation is performed during docking. It must be prepared employing standalone scripts available as part of AutoDock Vina. You may optionally specify flexible residues in the binding pocket to prepare a flexible receptor file and employ it for docking molecules along with the fixed receptor file.
The following three forecefileds are available to score molecules: AD4 (AutoDock4), Vina, and Vinardo (Vina RaDii Optimized) [Ref 170].
The supported input file formats are shown below:
The supported output file format is: SD (.sdf, .sd).
The following output files are generated:
The flexible receptor output file contains docked poses corresponding to flexible residues. It is only generated during 'Dock' value of '-m, --mode' option. The number of poses in this file matches those written to the output file containing docked molecules.
Write out binding energy components of the total binding energy docking score to outfile. The following three energy components are written to outfile: intermolecula energy, internal energy, and torsions energy.
A triplet of comma delimited values corresponding to energy data field labels for writing out the binding energy components to outfile. You must specify all three values. A value of 'None' implies the use of the default labels as shown below:
Energy data field label for writing out binding energy docking score to output file. Default: <ForcefieldName>_Total_Energy (kcal/mol).
Maximum energy difference from the best pose during the generation of poses. Units: kcal/mol.
Print examples.
Exhaustiveness of global MC search. The higher values make the search more exhaustive and it takes longer to complete. You may want to use '16' or '32' as the value of '--exhaustiveness ' to increase the accuracy of your pose prediction.
Forcefield to use for scoring. Possible values: AD4 (AutoDock 4), Vina [Ref 169, 169], or Vinardo (Vina RaDii Optimized) [Ref 170].
You must specify affinity maps using '-r, --receptor' option during the use of 'AD4' forcefield.
A comma delimited list of parameter name and value pairs for forcefield scoring.
The supported parameter names along with their default values are are shown below for different forcefields:
The glue weight parameter corresponds to linear attraction for macrocycle closure and has the same value for AD4, Vina, and Vinardo. The rot weight has the same value for Vina and Vinardo.
Reference ligand file for calculating the docking grid center or a triplet of comma delimited values in Angstrom corresponding to grid center.
This is required option. However, it is ignored during the specification of maps prefix for '-r, --receptor' option.
Docking grid size in Angstrom.
Docking grid spacing in Angstrom.
Print this help message.
Input file name containing molecules for docking against a receptor. The molecules must have 3D coordinates in input file. In addition, the hydrogens must be present for all molecules in input file. The input file may contain 3D conformers.
A comma delimited list of parameter name and value pairs for reading molecules from files. The supported parameter names for different file formats, along with their default values, are shown below:
Maximum number of evaluations to perform for each MC run during docking. By default, its value is set 0 and the number of MC evaluations is determined using heuristic rules.
Merge hydrogens during preparation of molecules for docking. The hydrogens are automatically merged during 'AD4' value of '-f, --forcefield' option and its value is set to 'yes'. Otherwise, it's set to 'no'.
Minimum RMSD between output poses in Angstrom.
Dock molecules or simply score molecules without performing any docking. The supported values along with a brief explanation of the expected behavior are shown below:
The 'ScoreOnly" allows you to score 3D moleculed from input file which are already positioned in a binding pocket of a receptor.
Use multiprocessing.
By default, input data is retrieved in a lazy manner via mp.Pool.imap() function employing lazy RDKit data iterable. This allows processing of arbitrary large data sets without any additional requirements memory.
All input data may be optionally loaded into memory by mp.Pool.map() before starting worker processes in a process pool by setting the value of 'inputDataMode' to 'InMemory' in '--mpParams' option.
A word to the wise: The default 'chunkSize' value of 1 during 'Lazy' input data mode may adversely impact the performance. The '--mpParams' section provides additional information to tune the value of 'chunkSize'.
A comma delimited list of parameter name and value pairs to configure multiprocessing.
The supported parameter names along with their default and possible values are shown below:
These parameters are used by the following functions to configure and control the behavior of multiprocessing: mp.Pool(), mp.Pool.map(), and mp.Pool.imap().
The chunkSize determines chunks of input data passed to each worker process in a process pool by mp.Pool.map() and mp.Pool.imap() functions. The default value of chunkSize is dependent on the value of 'inputDataMode'.
The mp.Pool.map() function, invoked during 'InMemory' input data mode, automatically converts RDKit data iterable into a list, loads all data into memory, and calculates the default chunkSize using the following method as shown in its code:
For example, the default chunkSize will be 7 for a pool of 4 worker processes and 100 data items.
The mp.Pool.imap() function, invoked during 'Lazy' input data mode, employs 'lazy' RDKit data iterable to retrieve data as needed, without loading all the data into memory. Consequently, the size of input data is not known a priori. It's not possible to estimate an optimal value for the chunkSize. The default chunkSize is set to 1.
The default value for the chunkSize during 'Lazy' data mode may adversely impact the performance due to the overhead associated with exchanging small chunks of data. It is generally a good idea to explicitly set chunkSize to a larger value during 'Lazy' input data mode, based on the size of your input data and number of processes in the process pool.
The mp.Pool.map() function waits for all worker processes to process all the data and return the results. The mp.Pool.imap() function, however, returns the the results obtained from worker processes as soon as the results become available for specified chunks of data.
The order of data in the results returned by both mp.Pool.map() and mp.Pool.imap() functions always corresponds to the input data.
Number of docked poses to generate for each molecule and write out to output file. This option is only valid for 'Dock' value of '-m, --mode' option.
Number of threads/CPUs to use for MC search calculation in Vina. The default value is set to 1 during multiprocessing for 'Yes' value of '--mp' option. Otherwise, it's set to 0 and rely on Vina detect and use all available CPUs for multi-threading.
Output file name for writing out molecules. The flexible receptor residues are written to <OutfileRoot>_Flex_Receptor.<OutfileExt>.
A comma delimited list of parameter name and value pairs for writing molecules to files. The supported parameter names for different file formats, along with their default values, are shown below:
Overwrite existing files.
Floating point precision for writing energy values.
Use quiet mode. The warning and information messages will not be printed.
Random seed for MC search calculations. A value of zero implies it's randomly chosen by Vina during the calculation.
Protein receptor file name or prefix for affinity map files corresponding to the fixed portion of the receptor.
You must specify affinity map files for 'AD4' forcefield. The affinity map files correspond to <MapsPrefix>.*.map and must be present
The supported receptor file format is PDBQT (.pdbqt). It must contain a prepared protein receptor ready for docking. You may prepare a PDBQT receptor file from a PDB file employing the command line scripts available with AutoDock Vina and Meeko. For example: prepare_receptor, prepare_flexreceptor.py, or or mk_make_recepror.py.
You may want to perform the following steps to clean up your PDB file before generating a PDBQT receptor file: Remove extraneous molecules such as solvents, ions, and ligand etc.; Extract data for a chain containing the binding pocket of interest.
Protein receptor file name corresponding to the flexible portion of the receptor. The supported receptor file format is PDBQT (.pdbqt). It must contain a prepared protein receptor ready for docking. You may prepare a flexible PDBQT receptor file from a PDB file employing the command line script prepare_flexreceptor or mk_make_recepror.py available with Autodock Vina and Meeko.
Skip refinement. Vina is initialized to skip the use of explicit receptor atoms, instead of precalculated grids, during the following three docking modes: Dock, LocalOptimizationOnly, and ScoreOnly.
Validate molecules for docking. The input molecules must have 3D coordinates and the hydrogens must be present. You may skip validation of molecules in input file containing all valid molecules.
Verbosity level for running Vina. Possible values: 0 - No output; 1 - Normal output; 2 - Verbose. Default: 0 during multiprocessing for 'Yes' value of '--mp' option; otherwise, its set to 1. A non-zero value is not recommended during multiprocessing. It doesn't work due to the mingling of the Vina output from multiple processes.
Location of working directory which defaults to the current directory.
To dock molecules using Vina forcefield against a prepared receptor corresponding to chain A extracted from PDB file 1R4L.pdb, multi-threading across all available CPUs during Vina MC search, calculating grid center form a reference ligand file, using grid box size of 25 Angstrom, generating one pose for each molecule, and write out a SD file containing docked molecules, type:
To run the first example for generating multiple docked poses for each molecule and write out all energy terms to a SD file, type:
To run the first example for docking molecules using Vinardo forcefield and write out a SD file, type:
To run the first example for docking molecules using AD4 forcefield relying on the presence of affinity maps in the working directory and write out a SD file, type:
To run the first example for docking molecules using a set of explicit values for grid dimensions and write out a SD file, type:
To run the first example for only scoring molecules already positioned in the binding pocket and write out a SD file, type:
To run the first example for docking molecules to increase the accuracy of pose predictions and write out a SD file, type:
To run the first example in multiprocessing mode on all available CPUs without loading all data into memory, a single thread for Vina docking, and write out a SD file, type:
To run the first example in multiprocessing mode on all available CPUs by loading all data into memory, a single thread for Vina, and write out a SD file, type:
To run the first example in multiprocessing mode on specific number of CPUs and chunk size without loading all data into memory along with a specific number of threads for Vina docking and write out a SD file, type:
To run the first example for docking molecules employing a flexible portion of the receptor corresponding to ARG273 and write out a SD file, type:
To run the first example for docking molecules using specified parameters and write out a SD file, type:
Diogo Santos-Martins and Stefano Forli
PyMOLConvertLigandFileFormat.py, PyMOLExtractSelection.py, PyMOLInfoMacromolecules.py, PyMOLVisualizeMacromolecules.py, RDKitConvertFileFormat.py, RDKitEnumerateTautomers.py, RDKitGenerateConformers.py, RDKitPerformMinimization.py, RDKitPerformConstrainedMinimization.py
Copyright (C) 2024 Manish Sud. All rights reserved.
The functionality available in this script is implemented using AutoDockVina and Meeko, open source software packages for docking, and RDKit, an open source toolkit for cheminformatics developed by Greg Landrum.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.