oddt.docking package

Submodules

oddt.docking.AutodockVina module

class oddt.docking.AutodockVina.autodock_vina(protein=None, auto_ligand=None, size=(10, 10, 10), 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=(10,10,10))

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

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.
clean()[source]
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.AutodockVina.parse_vina_docking_output(output)[source]

Function parsing Autodock Vina docking output to a dictionary

Parameters:

output : string

Autodock Vina standard ouptud (STDOUT).

Returns:

out : dict

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:

output : string

Autodock Vina standard ouptud (STDOUT).

Returns:

out : dict

dicitionary containing scores computed by Autodock Vina

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(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])
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(x2[, force])
mutate(x2, force=False)[source]

Module contents

class oddt.docking.autodock_vina(protein=None, auto_ligand=None, size=(10, 10, 10), 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=(10,10,10))

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

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.
clean()[source]
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