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=None, 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 or None (default=None)

Temporary directory for Autodock Vina files. By default (None) system temporary directory is used, for reference see tempfile.gettempdir.

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

dock(ligands[, protein])

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])

Automated scoring procedure.

set_protein(protein)

Change protein to dock to.

clean

clean()[source]
dock(ligands, protein=None)[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.

Returns
ligandsarray 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)[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.

Returns
ligandsarray 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.

property tmp_dir
oddt.docking.AutodockVina.parse_vina_docking_output(output)[source]

Function parsing Autodock Vina docking output to a dictionary

Parameters
outputstring

Autodock Vina standard ouptud (STDOUT).

Returns
outdict

dicitionary containing scores computed by Autodock Vina

oddt.docking.AutodockVina.parse_vina_scoring_output(output)[source]

Function parsing Autodock Vina scoring output to a dictionary

Parameters
outputstring

Autodock Vina standard ouptud (STDOUT).

Returns
outdict

dicitionary containing scores computed by Autodock Vina

oddt.docking.AutodockVina.write_vina_pdbqt(mol, directory, flexible=True, name_id=None)[source]

Write single PDBQT molecule to a given directory. For proteins use flexible=False to avoid encoding torsions. Additionally an name ID can be appended to a name to avoid conflicts.

oddt.docking.internal module

ODDT’s internal docking/scoring engines

oddt.docking.internal.change_dihedral(coords, a1, a2, a3, a4, target_angle, rot_mask)[source]
oddt.docking.internal.get_children(molecule, mother, restricted)[source]
oddt.docking.internal.get_close_neighbors(molecule, a_idx, num_bonds=1)[source]
oddt.docking.internal.num_rotors_pdbqt(lig)[source]
class oddt.docking.internal.vina_docking(rec, lig=None, box=None, box_size=1.0, weights=None)[source]

Bases: object

Methods

correct_radius

score

score_inter

score_intra

score_total

set_box

set_coords

set_ligand

set_protein

weighted_inter

weighted_intra

weighted_total

correct_radius(atom_dict)[source]
score(coords=None)[source]
score_inter(coords=None)[source]
score_intra(coords=None)[source]
score_total(coords=None)[source]
set_box(box)[source]
set_coords(coords)[source]
set_ligand(lig)[source]
set_protein(rec)[source]
weighted_inter(coords=None)[source]
weighted_intra(coords=None)[source]
weighted_total(coords=None)[source]
class oddt.docking.internal.vina_ligand(c0, num_rotors, engine, box_size=1)[source]

Bases: object

Methods

mutate

mutate(x2, force=False)[source]

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=None, 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 or None (default=None)

Temporary directory for Autodock Vina files. By default (None) system temporary directory is used, for reference see tempfile.gettempdir.

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

dock(ligands[, protein])

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])

Automated scoring procedure.

set_protein(protein)

Change protein to dock to.

clean

clean()[source]
dock(ligands, protein=None)[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.

Returns
ligandsarray 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)[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.

Returns
ligandsarray 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.

property tmp_dir