oddt.docking package¶
Submodules¶
oddt.docking.AutodockVina module¶
-
class
oddt.docking.AutodockVina.
autodock_vina
(protein=None, auto_ligand=None, size=(20, 20, 20), center=(0, 0, 0), exhaustiveness=8, num_modes=9, energy_range=3, seed=None, prefix_dir=’/tmp’, n_cpu=1, executable=None, autocleanup=True, skip_bad_mols=True)[source]¶ Bases:
object
Autodock Vina docking engine, which extends it’s capabilities: automatic box (auto-centering on ligand).
Parameters: protein: oddt.toolkit.Molecule object (default=None)
Protein object to be used while generating descriptors.
- auto_ligand: oddt.toolkit.Molecule object or string (default=None)
Ligand use to center the docking box. Either ODDT molecule or a file (opened based on extesion and read to ODDT molecule). Box is centered on geometric center of molecule.
- size: tuple, shape=[3] (default=(20, 20, 20))
Dimentions of docking box (in Angstroms)
- center: tuple, shape=[3] (default=(0,0,0))
The center of docking box in cartesian space.
- exhaustiveness: int (default=8)
Exhaustiveness parameter of Autodock Vina
- num_modes: int (default=9)
Number of conformations generated by Autodock Vina. The maximum number of docked poses is 9 (due to Autodock Vina limitation).
- energy_range: int (default=3)
Energy range cutoff for Autodock Vina
- seed: int or None (default=None)
Random seed for Autodock Vina
- prefix_dir: string (default=/tmp)
Temporary directory for Autodock Vina files
- executable: string or None (default=None)
Autodock Vina executable location in the system. It’s realy necessary if autodetection fails.
- autocleanup: bool (default=True)
Should the docking engine clean up after execution?
- skip_bad_mols: bool (default=True)
Should molecules that crash Autodock Vina be skipped.
Attributes
tmp_dir
Methods
clean
()dock
(ligands[, protein, single])Automated docking procedure. predict_ligand
(ligand)Local method to score one ligand and update it’s scores. predict_ligands
(ligands)Method to score ligands lazily score
(ligands[, protein, single])Automated scoring procedure. set_protein
(protein)Change protein to dock to. -
dock
(ligands, protein=None, single=False)[source]¶ Automated docking procedure.
Parameters: ligands: iterable of oddt.toolkit.Molecule objects
Ligands to dock
- protein: oddt.toolkit.Molecule object or None
Protein object to be used. If None, then the default one is used, else the protein is new default.
- single: bool (default=False)
A flag to indicate single ligand docking - performance reasons (eg. there is no need for subdirectory for one ligand)
Returns: ligands : array of oddt.toolkit.Molecule objects
Array of ligands (scores are stored in mol.data method)
-
predict_ligand
(ligand)[source]¶ Local method to score one ligand and update it’s scores.
Parameters: ligand: oddt.toolkit.Molecule object
Ligand to be scored
Returns: ligand: oddt.toolkit.Molecule object
Scored ligand with updated scores
-
predict_ligands
(ligands)[source]¶ Method to score ligands lazily
Parameters: ligands: iterable of oddt.toolkit.Molecule objects
Ligands to be scored
Returns: ligand: iterator of oddt.toolkit.Molecule objects
Scored ligands with updated scores
-
score
(ligands, protein=None, single=False)[source]¶ Automated scoring procedure.
Parameters: ligands: iterable of oddt.toolkit.Molecule objects
Ligands to score
- protein: oddt.toolkit.Molecule object or None
Protein object to be used. If None, then the default one is used, else the protein is new default.
- single: bool (default=False)
A flag to indicate single ligand scoring - performance reasons (eg. there is no need for subdirectory for one ligand)
Returns: ligands : array of oddt.toolkit.Molecule objects
Array of ligands (scores are stored in mol.data method)
-
set_protein
(protein)[source]¶ Change protein to dock to.
Parameters: protein: oddt.toolkit.Molecule object
Protein object to be used.
-
tmp_dir
¶
oddt.docking.internal module¶
ODDT’s internal docking/scoring engines
-
class
oddt.docking.internal.
vina_docking
(rec, lig=None, box=None, box_size=1.0, weights=None)[source]¶ Bases:
object
Methods
correct_radius
(atom_dict)score
([coords])score_inter
([coords])score_intra
([coords])score_total
([coords])set_box
(box)set_coords
(coords)set_ligand
(lig)set_protein
(rec)weighted_inter
([coords])weighted_intra
([coords])weighted_total
([coords])
Module contents¶
-
class
oddt.docking.
autodock_vina
(protein=None, auto_ligand=None, size=(20, 20, 20), center=(0, 0, 0), exhaustiveness=8, num_modes=9, energy_range=3, seed=None, prefix_dir=’/tmp’, n_cpu=1, executable=None, autocleanup=True, skip_bad_mols=True)[source]¶ Bases:
object
Autodock Vina docking engine, which extends it’s capabilities: automatic box (auto-centering on ligand).
Parameters: protein: oddt.toolkit.Molecule object (default=None)
Protein object to be used while generating descriptors.
- auto_ligand: oddt.toolkit.Molecule object or string (default=None)
Ligand use to center the docking box. Either ODDT molecule or a file (opened based on extesion and read to ODDT molecule). Box is centered on geometric center of molecule.
- size: tuple, shape=[3] (default=(20, 20, 20))
Dimentions of docking box (in Angstroms)
- center: tuple, shape=[3] (default=(0,0,0))
The center of docking box in cartesian space.
- exhaustiveness: int (default=8)
Exhaustiveness parameter of Autodock Vina
- num_modes: int (default=9)
Number of conformations generated by Autodock Vina. The maximum number of docked poses is 9 (due to Autodock Vina limitation).
- energy_range: int (default=3)
Energy range cutoff for Autodock Vina
- seed: int or None (default=None)
Random seed for Autodock Vina
- prefix_dir: string (default=/tmp)
Temporary directory for Autodock Vina files
- executable: string or None (default=None)
Autodock Vina executable location in the system. It’s realy necessary if autodetection fails.
- autocleanup: bool (default=True)
Should the docking engine clean up after execution?
- skip_bad_mols: bool (default=True)
Should molecules that crash Autodock Vina be skipped.
Attributes
tmp_dir
Methods
clean
()dock
(ligands[, protein, single])Automated docking procedure. predict_ligand
(ligand)Local method to score one ligand and update it’s scores. predict_ligands
(ligands)Method to score ligands lazily score
(ligands[, protein, single])Automated scoring procedure. set_protein
(protein)Change protein to dock to. -
dock
(ligands, protein=None, single=False)[source]¶ Automated docking procedure.
Parameters: ligands: iterable of oddt.toolkit.Molecule objects
Ligands to dock
- protein: oddt.toolkit.Molecule object or None
Protein object to be used. If None, then the default one is used, else the protein is new default.
- single: bool (default=False)
A flag to indicate single ligand docking - performance reasons (eg. there is no need for subdirectory for one ligand)
Returns: ligands : array of oddt.toolkit.Molecule objects
Array of ligands (scores are stored in mol.data method)
-
predict_ligand
(ligand)[source]¶ Local method to score one ligand and update it’s scores.
Parameters: ligand: oddt.toolkit.Molecule object
Ligand to be scored
Returns: ligand: oddt.toolkit.Molecule object
Scored ligand with updated scores
-
predict_ligands
(ligands)[source]¶ Method to score ligands lazily
Parameters: ligands: iterable of oddt.toolkit.Molecule objects
Ligands to be scored
Returns: ligand: iterator of oddt.toolkit.Molecule objects
Scored ligands with updated scores
-
score
(ligands, protein=None, single=False)[source]¶ Automated scoring procedure.
Parameters: ligands: iterable of oddt.toolkit.Molecule objects
Ligands to score
- protein: oddt.toolkit.Molecule object or None
Protein object to be used. If None, then the default one is used, else the protein is new default.
- single: bool (default=False)
A flag to indicate single ligand scoring - performance reasons (eg. there is no need for subdirectory for one ligand)
Returns: ligands : array of oddt.toolkit.Molecule objects
Array of ligands (scores are stored in mol.data method)
-
set_protein
(protein)[source]¶ Change protein to dock to.
Parameters: protein: oddt.toolkit.Molecule object
Protein object to be used.
-
tmp_dir
¶