Unverified Commit b3ebc4d5 authored by Bharath Ramsundar's avatar Bharath Ramsundar Committed by GitHub
Browse files

Merge pull request #987 from rbharath/more-trim

Speeds up tests and removes files
parents 6de39a63 e6b88130
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ class TestDocking(unittest.TestCase):
      return
    docker = dc.dock.VinaGridDNNDocker(exhaustiveness=1, detect_pockets=True)

  @attr("slow")
  def test_vina_grid_rf_docker_dock(self):
    """Test that VinaGridRFDocker can dock."""
    if sys.version_info >= (3, 0):
@@ -55,8 +56,8 @@ class TestDocking(unittest.TestCase):
    ligand_file = os.path.join(current_dir, "1jld_ligand.sdf")

    docker = dc.dock.VinaGridRFDocker(exhaustiveness=1, detect_pockets=False)
    (score, (protein_docked, ligand_docked)) = docker.dock(protein_file,
                                                           ligand_file)
    (score, (protein_docked, ligand_docked)) = docker.dock(
        protein_file, ligand_file)

    # Check returned files exist
    assert score.shape == (1,)
@@ -103,6 +104,7 @@ class TestDocking(unittest.TestCase):

    assert score.shape == (1,)

  @attr("slow")
  def test_vina_grid_dnn_docker_dock(self):
    """Test that VinaGridDNNDocker can dock."""
    current_dir = os.path.dirname(os.path.realpath(__file__))
@@ -110,8 +112,8 @@ class TestDocking(unittest.TestCase):
    ligand_file = os.path.join(current_dir, "1jld_ligand.sdf")

    docker = dc.dock.VinaGridDNNDocker(exhaustiveness=1, detect_pockets=False)
    (score, (protein_docked, ligand_docked)) = docker.dock(protein_file,
                                                           ligand_file)
    (score, (protein_docked, ligand_docked)) = docker.dock(
        protein_file, ligand_file)

    # Check returned files exist
    assert score.shape == (1,)
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ class TestPoseGeneration(unittest.TestCase):
      return
    vpg = dc.dock.VinaPoseGenerator(detect_pockets=True, exhaustiveness=1)

  @attr("slow")
  def test_vina_poses(self):
    """Test that VinaPoseGenerator creates pose files."""
    current_dir = os.path.dirname(os.path.realpath(__file__))
+0 −13
Original line number Diff line number Diff line
"""
Convenience classes for assembling graph models.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals

__author__ = "Han Altae-Tran and Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "MIT"

import warnings
import tensorflow as tf
+0 −28
Original line number Diff line number Diff line
"""Manages Placeholders for Graph convolution networks.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals

__author__ = "Han Altae-Tran and Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "MIT"

import warnings
import numpy as np
import tensorflow as tf
from deepchem.feat.mol_graphs import ConvMol


def merge_two_dicts(x, y):
  z = x.copy()
  z.update(y)
  return z


def merge_dicts(l):
  """Convenience function to merge list of dictionaries."""
  merged = {}
  for dict in l:
    merged = merge_two_dicts(merged, dict)
  return merged
+0 −21
Original line number Diff line number Diff line
"""
Implements a multitask graph convolutional classifier.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals

__author__ = "Han Altae-Tran and Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "MIT"

import warnings
import os
import sys
import numpy as np
import tensorflow as tf
import sklearn.metrics
import tempfile
from deepchem.data import pad_features
from deepchem.utils.save import log
from deepchem.models import Model
Loading