Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleswing committed Mar 6, 2017
1 parent 03ef391 commit 080d140
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion deepchem/utils/rdkit_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def load_molecule(molecule_file, add_hydrogens=True, calc_charges=True):
elif ".pdbqt" in molecule_file:
raise MoleculeLoadException("Don't support pdbqt files yet")
elif ".pdb" in molecule_file:
my_mol = Chem.MolFromPDBFile(str(molecule_file), sanitize=False, removeHs=False)
my_mol = Chem.MolFromPDBFile(
str(molecule_file), sanitize=False, removeHs=False)
else:
raise ValueError("Unrecognized file type")

Expand Down
5 changes: 3 additions & 2 deletions examples/pdbbind/pdbbind_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ def compute_single_pdbbind_feature(x):
return None
return ind, computed_feature


def compute_pdbbind_features(grid_featurizer, pdb_subdir, pdb_code):
"""Compute features for a given complex"""
protein_file = os.path.join(pdb_subdir, "%s_protein.pdb" % pdb_code)
ligand_file = os.path.join(pdb_subdir, "%s_ligand.sdf" % pdb_code)
features = grid_featurizer.featurize_complexes([ligand_file],
[protein_file])
features = grid_featurizer.featurize_complexes([ligand_file], [protein_file])
features = np.squeeze(features)
return features

Expand All @@ -163,5 +163,6 @@ def load_pdbbind_grid(split="index", featurizer="grid", subset="full"):

return tasks, (train, valid, test), transformers


if __name__ == "__main__":
load_pdbbind_grid()

0 comments on commit 080d140

Please sign in to comment.