Commit b6dd864a authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Docking fixes

parent 332bceb6
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -83,18 +83,25 @@ class ConvexHullPocketFinder(BindingPocketFinder):
  Based on https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4112621/pdf/1472-6807-14-18.pdf
  """

  def __init__(self, scoring_model=None, pad=5):
  def __init__(self, scoring_model=None, pocket_featurizer=None, ligand_featurizer=None, pad=5):
    """Initialize the pocket finder.

    Parameters
    ----------
    scoring_model: `dc.models.Model`, optional
      If specified, use this model to prune pockets.
    pocket_featurizer: `dc.feat.BindingPocketFeaturizer`, optional
      If `scoring_model` is specified, `pocket_featurizer` must be as
      well. This featurizer is used to featurize binding pockets.
    ligand_featurizer: `dc.feat.MolecularFeaturizer`, optional
      Featurizer used to featurize the ligand.
    pad: float, optional
      The number of angstroms to pad around a binding pocket's atoms
      to get a binding pocket box.
    """
    self.scoring_model = scoring_model
    self.pocket_featurizer = pocket_featurizer
    self.ligand_featurizer = ligand_featurizer
    self.pad = pad

  def find_all_pockets(self, protein_file):
+5 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ from copy import deepcopy
from collections import Counter
from deepchem.utils.pdbqt_utils import pdbqt_to_pdb
from scipy.spatial.distance import cdist
from deepchem.utils import pdbqt_utils
from deepchem.utils.pdbqt_utils import convert_mol_to_pdbqt
from deepchem.utils.pdbqt_utils import convert_protein_to_pdbqt
from deepchem.utils.geometry_utils import angle_between
@@ -141,6 +142,10 @@ def apply_pdbfixer(mol, add_missing=True, hydrogenate=True, pH=7.4,
  Returns
  -------
  Rdkit Mol

  Note
  ----
  This function requires RDKit and PDBFixer to be installed.
  """
  molecule_file = None
  try: